Commit graph

6981 commits

Author SHA1 Message Date
nweiz@google.com 9ba7eef1c4 Fix a crash in pub's version solver.
The solver was choking when pub's implicit dependencies on barback
failed and had to be backtracked.

R=rnystrom@google.com
TBR

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45832 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 23:52:39 +00:00
sra@google.com 0ef007d00b 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

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45829 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 22:36:15 +00:00
alanknight@google.com 1f20842389 Another try at appendHtml and insertAdjacentHtml should be consistently sanitized
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45818 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 17:59:23 +00:00
alanknight@google.com bfa61f62e0 "Reverting 45815"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45816 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 17:04:53 +00:00
alanknight@google.com 1c69173804 Test Dartium with appendHtml sanitizing. Will immediately revert.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45815 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 16:30:17 +00:00
alanknight@google.com 90a31f8fea "Reverting 45807"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45808 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 01:29:49 +00:00
alanknight@google.com 2faa58eb4c Testing for appendHtml and insertAdjacentHtml should be consistently sanitized
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45807 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 01:10:19 +00:00
nweiz@google.com ee60510cac Fix VersionSelection.getDependenciesOn.
R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45803 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 23:19:10 +00:00
nweiz@google.com 1acd46fe74 Rewrite pub's version solver.
The idea of this change is to eagerly check, before selecting a package version,
whether that version is compatible with the existing dependencies. This avoids a
bunch of unnecessary backtracking, and makes the progression of the solver more
comprehensible when

R=rnystrom@google.com
BUG= dartbug.com/17429

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45799 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 22:33:31 +00:00
alanknight@google.com e1c798b0fd "Reverting 45790"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45791 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 19:04:23 +00:00
alanknight@google.com 9453809937 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@45790 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 18:04:17 +00:00
johnmccutchan@google.com f01c1490f7 Revert 45783
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com 95515238cc Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
sra@google.com 28cfbd8f44 Make more use of ArgumentError.value in js_lib.
This helps surface error values in the messages which helps make captured errors understandable.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45782 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 22:16:50 +00:00
floitsch@google.com f8c3219190 dart2js: Remove isD8 and isJsShell functions.
These functions were used to detect d8 and jsshell. They are not used anymore because of preamble files.

R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45779 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 20:51:40 +00:00
floitsch@google.com 52e228e0f3 dart2js: remove bad assumptions in js_helper library.
Cleans up some code.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45757 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 06:35:45 +00:00
sra@google.com afbb537add Better toString and Error.toSafeString output for closures for dart2js.
Closures that appear in error messages, especially NoSuchMethodError, need to identify the function so that captured error messages and stack traces are useful.

Old:
  1. Instance of 'Object'
  2. Instance of 'Object'
  3. Instance of 'anonymous'
  4. Instance of 'anonymous'
  5. Instance of 'main_localFunction'

New:
  1. Closure 'print'
  2. Closure 'Widget_staticMethod'
  3. Closure 'foo' of Instance of 'Widget'
  4. Closure 'remainder' of 1234
  5. Closure 'main_localFunction'

In minified code the names are (usually) minified. Being able to unminify them later is separate issue.
This CL makes NoSuchMethodError variants more uniform in quoting of method to assist unminifying the message.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45753 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 23:47:23 +00:00
alanknight@google.com f777d314b7 Relax the deltaX/Y/Z types in WheelEvent constructor
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45741 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 18:04:58 +00:00
alanknight@google.com f0136ff1eb Clean up WheelEvent
BUG=
R=terry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45740 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 16:34:01 +00:00
alanknight@google.com 4a1b567136 Pass Redirect status higher than 307 through to the user
BUG=
R=terry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45739 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 16:25:56 +00:00
lrn@google.com 5351182e38 Add Map.unmodifiable constructor.
R=sgjesse@google.com, sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45733 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 11:09:13 +00:00
johnmccutchan@google.com 64f6d0db2e Fix Typo in exitCode documentation
This should probably be merged into 1.10 if possible.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45686 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 14:20:39 +00:00
sgjesse@google.com 6a4e6571f4 Add handling of HTTP '100 Continue' intermediate response
The '100 Continue' intermediate response is just ignored, as there
is currently no API for the client to wait to this.

BUG=http://dartbug.com/23413
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45685 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 13:48:15 +00:00
sgjesse@google.com 197f336534 Make sure to process WebSocket frames when closing a WebSocket
On a WebSocket the actual listening on the stream is causing the
processing of inbound frames to start. If the connection is closed
without ever being listened on, then a close frame from the other end
will not be processed.  In this case the timeout of waiting for a
close from the other end will always be hit.

If you are _only_ using the WebSocket connection in one direction it
seems a bit artificial to have to listen on the stream to even process
the close frame.

This change will make sure the stream is listened to when closing a
WebSocket.

This is a breaking change. Before you could close and then
listen. With this change that sequence will throw on the listen. This
is reflected in the changes that was needed for the tests.

R=kustermann@google.com, lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45679 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 09:32:39 +00:00
floitsch@google.com 8e7e2e621c 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

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45675 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 02:08:33 +00:00
floitsch@google.com d2c6e4d0b6 dart2js: compute the currentScript in the preamble for d8 and jsshell.
This change enables deferred loading for the lazy emitter on d8. Without it the computeThisScript function would be executed within an 'evaled' piece of code, and thus not find the correct URL.

This change also reduces the code of the generated code (by a tiny amount),

R=herhut@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45671 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 00:59:00 +00:00
rmacnak@google.com 016214f002 Add Debugger.inspect. 1976 here we come!
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45664 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 22:18:43 +00:00
johnmccutchan@google.com 1f851efdbb Rename 'dart:debugger' to 'dart:developer'
- Rename 'dart:debugger' to 'dart:developer'
- Make 'breakHere' and 'breakHereIf' top level functions.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45658 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 21:24:57 +00:00
ricow@google.com 80539a0f75 Revert "pub: don't start the admin server if no --admin-port flag was given."
This reverts commit 45614

Causes redness on the bots, floitsch@ will investigate offline

R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45633 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:13:12 +00:00
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