Commit graph

6952 commits

Author SHA1 Message Date
sra@google.com 6ab9b2ceb2 Optimize DateTime properties
Several small pieces fit together to improve calendar arithmetic code in a customer's app.

1. Mark DateTime primitives that return small integers as returning uint31.

2. uint31 + uint31 -> uint32 in type inference.

3. uint32 / N can be generated as (uint32 / N) | 0 when N >= 2.

R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=45621

Review URL: https://codereview.chromium.org//1106443003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45625 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 00:52:29 +00:00
nweiz@google.com d3bff0054f Fix an invalid variable name in DependencyQueue.
Also fix an analysis hint.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1126263003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45622 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 21:51:54 +00:00
sra@google.com 532a7948d8 Optimize DateTime properties
Several small pieces fit together to improve calendar arithmetic code in a customer's app.

1. Mark DateTime primitives that return small integers as returning uint31.

2. uint31 + uint31 -> uint32 in type inference.

3. uint32 / N can be generated as (uint32 / N) | 0 when N >= 2.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1106443003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45621 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 21:39:17 +00:00
floitsch@google.com 90759b7299 pub: don't start the admin server if no --admin-port flag was given.
`pub serve` used to bind its admin port to the port below the main port. For example `pub serve --port=8081` would automatically bind its admin port to 8080.
With this change the admin server is only started if an --admin-port flag was provided.

BUG= http://dartbug.com/20922
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1126403002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45614 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 20:01:51 +00:00
nweiz@google.com 05e6d1cf78 Convert a bunch of version solver code to use async/await.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1125373002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45612 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 19:50:38 +00:00
ricow@google.com e92f697236 Remove dart2dart support from testing scripts and status files
I will leave it to the dart2js people to remove the support from the dart2js tools (there is also a bunch of comments still in code, do a git grep)

R=kustermann@google.com, floitsch@google.com, kmillikin@google.com
BUG=

Review URL: https://codereview.chromium.org//1126363003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45588 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 11:29:55 +00:00
lrn@google.com 4d539e4975 Fix typo in EfficientLengthIterable documentation, and improve it slightly.
R=kustermann@google.com

Review URL: https://codereview.chromium.org//1132503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45586 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 10:18:36 +00:00
herhut@google.com 38af8ac50a Improve documentation for MirrorsUsed.
BUG= http://dartbug.com/15656
R=floitsch@google.com, kathyw@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1122983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45585 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 09:08:11 +00:00
alanknight@google.com dd9150542d Keep dart:debugger comments in sync
BUG=
R=johnmccutchan@google.com, skybrian@google.com

Review URL: https://codereview.chromium.org//1130043002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45578 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 23:14:38 +00:00
alanknight@google.com 6fe25b0578 Provide a dart2js implementation of dart:debugger
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1121293003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45577 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 22:36:01 +00:00
sra@google.com ac0f1ade9e Recognize unmodifiable lists
Add a new type, JSUnmodifiableArray, that is the type returned by
List.unmodifiable and the type of const list literals.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1126063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45575 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 21:25:25 +00:00
floitsch@google.com 067bdb8331 dart2js: Access to metadata and types goes through builtins.
Instead of exposing an embedded constant "METADATA" and "TYPES" provide a builtin-function that reads these values.
This allows us to implement the metadata and types table differently. In particular we want to be able to generate them lazily.

R=sra@google.com

Review URL: https://codereview.chromium.org//1125083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45574 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 21:20:17 +00:00
nweiz@google.com 0a7ea97a6f Fix or work around failing pub tests.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1123323003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45572 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 20:40:46 +00:00
nweiz@google.com 1f70e37a96 Cache pubspecs when HostedSource.getVersions is called.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1113363004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45571 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 18:25:29 +00:00
lrn@google.com 92c526b2a2 Make EfficientLength public, as EfficientLengthIterable.
R=iposva@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1104063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45556 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 09:00:45 +00:00
lrn@google.com b3d466a1ca Update {,Linked}Hash{Set,Map} documentation.
Now specifies that the default [isValidKey] accepts all values in the
default and identity cases.

BUG= http://dartbug.com/23356
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1130453003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45552 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 08:35:23 +00:00
lrn@google.com 7fe3363524 Fix SplayTreeMap.from ignoring the compare and isValidKey arguments.
BUG= http://dartbug.com/23387
R=wibling@google.com

Review URL: https://codereview.chromium.org//1127043002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45550 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 08:18:56 +00:00
floitsch@google.com 10d128dc5e dart2js: add builtin 'isSubtype'.
R=sra@google.com

Review URL: https://codereview.chromium.org//1121313007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45546 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 00:52:04 +00:00
nweiz@google.com 95e45dbb89 Fix version solver tests.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1128683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45545 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 23:54:40 +00:00
nweiz@google.com 7f8e604192 Don't let the version solver starve the event queue.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1127863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45543 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 22:54:36 +00:00
floitsch@google.com ceabb95bd6 dart2js: add classNameFromIsCheckProperty to compiler builtins.
R=sra@google.com

Review URL: https://codereview.chromium.org//1106613006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45537 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 19:32:19 +00:00
johnmccutchan@google.com a19cd071e5 Add 'dart:debugger' library
- Add the 'dart:debugger' library.
- Add the 'Debugger' class.
- Add explicit Dart breakpoint triggered by a call to: Debugger.breakHere();
- Add Debugger.breakHereIf(bool expr)

R=hausner@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//1116263004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45529 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:05:37 +00:00
sethladd@google.com 31209403af one-line api doc comment for dart:typed_data
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1118123004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45516 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 00:18:44 +00:00
sethladd@google.com 34aa76f666 add a one-line comment for dart:profiler
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1125713005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45514 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 23:17:02 +00:00
nweiz@google.com 907786bbde Fix version solving in pub.
I deleted a line in r45508 because it had an unused variable, but it
turned out that it also had relevant side-effects.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1123473005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45513 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 22:16:29 +00:00
nweiz@google.com 268a068151 Fix all the analysis hints in pub.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1101343004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45508 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 20:50:05 +00:00
kevmoo@google.com ba757ecc5e dart:* API fixes for docs
plus other cleanup

R=lrn@google.com

Review URL: https://codereview.chromium.org//1120293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45482 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-03 21:21:53 +00:00
rmacnak@google.com a6e42c48b5 Deal with deferred loading in the VM mirrors.
- Invalidate MirrorSystem.libraries when a load completes.
- Recheck if a deferred import's target has been loaded before failing.
- Allow loading libraries from a LibraryDepedencyMirror.
- Propogate compile-time error when attempting to reflect a deferred type.

BUG=http://dartbug.com/22592
R=asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//1095903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45444 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-28 23:47:45 +00:00
lrn@google.com 31e27c7f9f Reuse RangeError.checkValidRange in dart2js core_patch.dart.
R=herhut@google.com

Review URL: https://codereview.chromium.org//1066843007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45422 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-27 09:29:50 +00:00
lrn@google.com af031d6c0a Document ByteBuffer.asX() methods.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1052373011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45421 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-27 09:06:20 +00:00
nweiz@google.com e29bab1b4d Support defining environment constants for dart2js via the command-line.
These constants only work for dart2js because neither Dartium nor the isolate
API support defining them.

BUG= http://dartbug.com/15806
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1106713003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45416 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 21:40:49 +00:00
nweiz@google.com 697f93da1c Properly print an error when failing to load a transformer.
R=rnystrom@google.com
BUG= http://dartbug.com/21490

Review URL: https://codereview.chromium.org//1106803002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45414 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 21:39:44 +00:00
lrn@google.com b3ee3a85bf Improve return type of markUnmodifiableList to JSArray instead of List.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1076013006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45372 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 10:20:53 +00:00
alanknight@google.com 25c6f198f5 "Reverting 45351"
BUG=

Review URL: https://codereview.chromium.org//1097053006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45353 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 17:51:58 +00:00
alanknight@google.com 7431beaec2 appendHtml and insertAdjacentHtml should be consistently sanitized
BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org//1081973003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45351 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 17:16:01 +00:00
floitsch@google.com eb20073478 dart2js: add compiler builtins to the core-runtime.
WIP.

R=johnniwinther@google.com, sra@google.com

Committed: https://code.google.com/p/dart/source/detail?r=45176
Reverted: https://code.google.com/p/dart/source/detail?r=45177

Review URL: https://codereview.chromium.org//954253002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45347 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 13:44:39 +00:00
sgjesse@google.com 4d85e2a2aa Revert "Fix warnings and hints in the SDK"
This reverts r45331.

TBR=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//1097353003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45338 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 11:08:38 +00:00
lrn@google.com d44257439c Don't rely on Function being callable in static analysis.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1099233002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45336 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 11:07:15 +00:00
lrn@google.com f139d0e93b Add List.unmodifiable constructor.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1056353004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45334 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 10:48:22 +00:00
lrn@google.com 45718dff8b Avoid checking Uint8List for non-Latin-1 characters.
Optimize checking code as well.
Remove some unused code.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1100873003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45332 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 10:43:32 +00:00
sgjesse@google.com f8eaff5b69 Fix warnings and hints in the SDK
BUG=
R=paulberry@google.com, sgjesse@google.com, whesse@google.com

Review URL: https://codereview.chromium.org//996683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45331 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 10:35:49 +00:00
sra@google.com 00dde387ab Improve CssClassSet add / remove
Allow the 'contains' call to be removed if the result is unused.

    DivElement bars = new DivElement()
        ..classes.add('pipeline-bars');
-->
      t3 = document.createElement("div", null);
      list = t3.classList;
      list.contains("pipeline-bars");
      list.add("pipeline-bars");
-->
      t3 = document.createElement("div", null);
      t3.classList.add("pipeline-bars");

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1092553002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45324 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 22:48:12 +00:00
pquitslund@google.com 4c03f25626 Analyzer build updates to use analyzer_cli.
The associated change to add analyzer_cli to DEPS is here:
https://codereview.chromium.org/1093173004/

R=brianwilkerson@google.com, paulberry@google.com, ricow@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org//1100553003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45321 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 20:59:31 +00:00
sgjesse@google.com 170be8d7d1 Process outstanding events before making a new HTTP client request
This re-applies r45127, which was reverted in r45129. The revert was due
to a failing test which is re-written here to perform the separate steps
in a deterministic order.

Original change description:

This fixes the issue of using a HTTP client connection from the
connection pool which was closed and where the close indication has
already been received by the event handler.

This specifically fixes the 'pub get' issue where a long running
constraint resolver would end with the error "Connection closed before
full header was received"

Retrying GET methods when the connection is closed after succesfuly
sending (parts of) the request is still missing.

R=lrn@google.com

BUG=http://dartbug.com/21798

Review URL: https://codereview.chromium.org//1055943004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45313 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 12:14:55 +00:00
sra@google.com f1ab388015 Rewrite for-in loop on JavaScript indexable arrays as indexing loop
for (E variable in a) <body>

is generated as:

  _end = a.length;
  for (_i = 0; _i < a.length; a.length == _end || (0, H.throwConcurrentModificatiionError)(a), ++_i) {
    variable = a[_i];
    <body>;
  }

or, when the list is known to be fixed length:

  for (_i = 0; _i < a.length; ++_i) {
    variable = a[_i];
    <body>;
  }

R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=45270

Reverted: https://code.google.com/p/dart/source/detail?r=45271

Review URL: https://codereview.chromium.org//1087973002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45309 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 03:13:36 +00:00
sra@google.com 904c18efcc Enforce token syntax for CssClassSet arguments
Committed: https://code.google.com/p/dart/source/detail?r=45265

Reverted: https://code.google.com/p/dart/source/detail?r=45266

R=terry@google.com

Committed: https://code.google.com/p/dart/source/detail?r=45301

Committed: https://code.google.com/p/dart/source/detail?r=45303

Reverted: https://codereview.chromium.org/1096433006/

Review URL: https://codereview.chromium.org//1077203004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45307 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 01:32:49 +00:00
sra@google.com 736007062a Revert "Enforce token syntax for CssClassSet arguments"
TBR=terry@google.com
BUG=

Review URL: https://codereview.chromium.org//1096433006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45306 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 01:14:32 +00:00
sra@google.com a1850bb69a Enforce token syntax for CssClassSet arguments
Committed: https://code.google.com/p/dart/source/detail?r=45265

Reverted: https://code.google.com/p/dart/source/detail?r=45266

R=terry@google.com

Committed: https://code.google.com/p/dart/source/detail?r=45301

Review URL: https://codereview.chromium.org//1077203004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45303 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 00:37:10 +00:00
sra@google.com ec484da9f6 Revert "Enforce token syntax for CssClassSet arguments"
Review URL: https://codereview.chromium.org//1098073003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45302 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-21 00:25:54 +00:00
sra@google.com 01d3e99f18 Enforce token syntax for CssClassSet arguments
Committed: https://code.google.com/p/dart/source/detail?r=45265

Reverted: https://code.google.com/p/dart/source/detail?r=45266

R=terry@google.com

Review URL: https://codereview.chromium.org//1077203004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45301 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-20 23:44:11 +00:00