Commit graph

7400 commits

Author SHA1 Message Date
Stephen Adams 37be70525b Revert "Add optional message to assert in Dart2js - continued"
To be re-applied with .status changes.

TBR=sigmund@google.com

Review URL: https://codereview.chromium.org//1346093003 .
2015-09-16 16:37:10 -07:00
Stephen Adams d5b2b393f3 Add optional message to assert in Dart2js - continued
This CL takes https://chromiumcodereview.appspot.com/1325843003/ and makes some changes:

 - distinguish enableUserAssertions from enableTypeAssertions
 - better type inference for disabled assertions

R=lrn@google.com

Review URL: https://codereview.chromium.org//1342213003 .
2015-09-16 15:16:02 -07:00
Terry L. Lucas fc8682ceac Fixed another dart2js code emitting error and enabled tests that now work
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1346203002 .
2015-09-16 08:19:15 -07:00
Terry L. Lucas 7b322c246c Dartium JS Enabled take 2
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1348173002 .
2015-09-16 07:13:53 -07:00
Rico Wind b6e48e9617 Use cammelCase for all service extension variables
R=johnmccutchan@google.com, johnmmccutchan@google.com
BUG=

Review URL: https://codereview.chromium.org//1343033002 .
2015-09-16 07:27:45 +02:00
Terry L. Lucas 09c804aa78 Revert "Dartium JS Interop enabled."
This reverts commit 403bd1698d.

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1345083002 .
2015-09-15 19:44:26 -07:00
Terry L. Lucas 403bd1698d Dartium JS Interop enabled.
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1349493003 .
2015-09-15 17:36:47 -07:00
Rico Wind f3f358e5f3 Change times reported from io resource meta data to be milliseconds since epoch
Change tests accordingly (and add a few extra tests)

Move the logic to the _IOResource class to only have one datetime and one stopwatch.

R=johnmccutchan@google.com, sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1341733003 .
2015-09-15 07:42:06 +02:00
Rico Wind 38b579fa78 Add tracking of open processes to the new io resource tracking.
I plan on refactoring the io_resource_info.dart file a bit in a follow up, but I keept this simple

I also plan on adding some sort of sanity checking when the vm exits, to make sure
all 3 maps are empty (in debug mode)

This fixes issue #24314, before we would hold on to process that failed to start
running in the _processes map.

Closes #24314
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1331033003 .
2015-09-14 12:54:36 +02:00
Lasse R.H. Nielsen ff65079c47 Add packages parameter to Isolate.spawnUri.
No implementation supplied, marked as "not implemented everywhere".

BUG= http://dartbug.com/23951
R=iposva@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//1323373002 .
2015-09-11 13:07:54 +02:00
Lasse R.H. Nielsen 7464947ca0 Make Map constructor external to allow dart2js to specialize it.
Review URL: https://codereview.chromium.org//1330303002 .
2015-09-11 13:06:09 +02:00
Lasse R.H. Nielsen d755dd65b9 Update range errors to agree on the numbers.
Also ensure that typed-data errors are consistent with other lists.

Fixes issue #24295
BUG= http://dartbug.com/24295
R=floitsch@google.com, iposva@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1318943005 .
2015-09-11 13:05:36 +02:00
Lasse R.H. Nielsen 931e41777e Merge pull request #24236 from a14n/use-const
use const constructors of Utf8* at several places
2015-09-11 12:26:27 +02:00
Kevin Millikin 95860326cd Fix a typo in the documentation for HashMap.
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1337873003 .
2015-09-11 11:28:10 +02:00
Stephen Adams 1aa97c36b5 dart2js ssa: Open coding of removeLast should use -1 as index
This makes the error consistent between unoptimized and optimizer code.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1315523012 .
2015-09-10 15:38:49 -07:00
Terry L. Lucas 9b0d2582fc Revert "Dartium w/ JsInterop enabled"
This reverts commit 346af54711.

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1330163010 .
2015-09-09 17:33:24 -07:00
Terry L. Lucas 346af54711 Dartium w/ JsInterop enabled
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1321613005 .
2015-09-09 17:01:40 -07:00
Johnni Winther 8855bc8161 Support metadata on patches.
Closes #24291

R=karlklose@google.com

Review URL: https://codereview.chromium.org//1302333006.
2015-09-09 13:04:51 +02:00
Rico Wind c6918fb126 Refactor the io resource classes
Move stopwatch so that we will only ever need one instance

Add utility functions for doing reads and writes

The only functional change here is that I say that an except is a read
of one byte, which also updates the readcount. I think this is just as
correct as what we did before.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1320023008 .
2015-09-09 09:18:07 +02:00
Terry L. Lucas 012c998f64 Revert "Patched in Dartium JsInterop"
This reverts commit 4bb2e617db.

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1327083002 .
2015-09-08 13:35:03 -07:00
Terry L. Lucas 4bb2e617db Patched in Dartium JsInterop
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1310363006 .
2015-09-08 12:46:41 -07:00
Rico Wind db0d25efd1 Add resource metadata for open files.
Start tracking the read/write information for files in the new
resource management class.

There is currently no time information, I will refactor the timings so that the
static stopwatch from the socket_patch class is moved into the resource class
instead in a follow up (keeping this simply and only about the file addition).

The testing setup may seem a bit strange, but it is the only way I
seem to be able to guarantee that setup actually finishes and that we
get it cleaned up. John may know of a better way

R=sgjesse@google.com, johnmccutchan@google.com
BUG=

Review URL: https://codereview.chromium.org//1326703004 .
2015-09-08 11:27:06 +02:00
Søren Gjesse 0124a0542e Revert "Handle addError on a WebSocket"
This reverts commit 373dd4b33c.

Timeout in tests on Windows and Mac

TBR=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//1328123002 .
2015-09-07 09:07:39 +02:00
Søren Gjesse 373dd4b33c Handle addError on a WebSocket
A call to addError on a WebSocket will now close the connection and add the
error to the associated stream.

Using addError on a WebSocket is not that relevant as normally the close
method is used to close with a possible error condition.

BUG= https://github.com/dart-lang/sdk/issues/24278
R=lrn@google.com

Review URL: https://codereview.chromium.org//1304243005 .
2015-09-07 08:28:49 +02:00
Stephen Adams cbaae993a1 Make functions that appear to be unreachable throw.
Functions are unreachable if their parameters have an empty type. We would generate bogus code for the function due to the empty type so we might as well generate a throw. This can prevent spurious inclusion of more code referenced only in the unreachable code.

It is usually a bug if we generate unreachable methods but it can happen for legitimate reasons.  One is that type inference is sometimes more precise than type propagation in the optimizer. Another is that we call a function that has an uninstantiated parameter type. This usually happens due the infeasibility of the path being hidden by a correlation between the type and some variable's value.

There is a tail of bugs that need to be flushed out before we can enable this by default.

Enable with:

  DART_VM_OPTIONS=-Dunreachable-throw=true  <compile>

language/cyclic_default_values_test fails, with foo and foo2 falsely unreachable:

DART_VM_OPTIONS=-Dunreachable-throw=true tools/test.py -mrelease -cdart2js -rd8  language/cyclic_default_values_test

I have added a test for the cause - a type inference bug with default argument values.

DART_VM_OPTIONS=-Dunreachable-throw=true tools/test.py -mrelease dart2js/simple_inferrer_const_closure_default_test
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1320673004 .
2015-09-04 15:11:08 -07:00
Rico Wind 06ab2bdbdd Extract meta data about open sockets into separate class.
The current implementation only has information about tcp and udp
sockets, and we explicitly do not track internal and pipe uses of
_NativeSockets.

The testing of this is done through the service layer, which is the end user of
this.

BUG=
R=sgjesse@google.com

Committed: 01eff8ce18

Review URL: https://codereview.chromium.org//1323943003 .
2015-09-03 19:18:42 +02:00
Rico Wind 665f397bb8 Revert "Extract meta data about open sockets into separate class."
This reverts commit 01eff8ce18.

Seeing issues on windows and on dart2js

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1323183002 .
2015-09-02 16:18:52 +02:00
Rico Wind 01eff8ce18 Extract meta data about open sockets into separate class.
The current implementation only has information about tcp and udp
sockets, and we explicitly do not track internal and pipe uses of
_NativeSockets.

The testing of this is done through the service layer, which is the end user of
this.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1323943003 .
2015-09-02 15:26:35 +02:00
keertip fe5550e934 fix dartdoc.bat
BUG=

Review URL: https://codereview.chromium.org//1318603006 .
2015-09-01 10:42:22 -07:00
Paul Berry 3069c86af4 Document the fact that SendPort.send() dispatches messages immediately.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1320423004 .
2015-08-31 14:13:18 -07:00
Alexandre Ardhuin 0784fc3134 use const constructors of Utf8* 2015-08-29 22:44:28 +02:00
John McCutchan 69092c741d Another dart2js fix 2015-08-27 11:52:43 -07:00
John McCutchan 23a30a8825 Really fix dart2js
BUG=

Review URL: https://codereview.chromium.org//1315193008 .
2015-08-27 11:46:47 -07:00
Natalie Weizenbaum 5778d87dd2 Forward stack traces through stream transformers.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1302363003 .
2015-08-27 11:38:27 -07:00
John McCutchan e2d2eed004 Fix old dart2js patch reference in service extensions
BUG=

Review URL: https://codereview.chromium.org//1311133010 .
2015-08-27 11:36:59 -07:00
John McCutchan 7052bd6bed Rework service extensions to be safe
- When scheduling a service extension to be invoked, store the closure in an array held in the isolate.
- At the tail of IsolateMessageHandler::HandleMessage, invoke all pending service extension closures.

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

Review URL: https://codereview.chromium.org//1299493007 .
2015-08-27 11:23:39 -07:00
William Hesse 13bf8ff9f8 Breaking Change: merge BoringSSL branch into master
This replaces the NSS secure networking library from Mozilla
with the BoringSSL library from Google. This library, based
on OpenSSL, reads certificates from files in PEM format, rather
than storing certificates and keys in a SQLite database, the
way NSS does. There will be a blog post, changelog entries,
and other documentation of the breaking changes.

Review URL: https://codereview.chromium.org//1319703002 .
2015-08-26 14:42:12 +02:00
Karl Klose 9a3b5614de dart2js: Inline Primitives.identicalImplementation into identical patch.
This gets rid of one layer of indirection that was not necessary and implements the conditional completely in JavaScript which avoids the potential for recursion when generating the intermediate representation for boolean conversion.

R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1290433002 .
2015-08-26 11:25:12 +02:00
Kevin Millikin e99fb4fc26 dart2js: Use the NoInline annotation on getInterceptor in the JS runtime.
This also requires fixing NoInline to work for the JS runtime.
Previously it was ignored.

R=karlklose@google.com
BUG=

Review URL: https://codereview.chromium.org//1315083002 .
2015-08-26 10:56:14 +02:00
Stan Manilov fe402c50ea sdk/dartanalyzer now detects an available build
Similar to CL 1276333002; this allows the dartanalyzer script to pick an
available build, rather than failing if ReleaseIA32 is not available.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1314893003 .
2015-08-25 20:48:14 +02:00
Harry Terkelsen bc0deb66d7 dart2js: fetch http Resources
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1308143002 .
2015-08-25 10:46:27 -07:00
keertip f07cec063c fix links in readme
BUG=
R=sethladd@google.com

Review URL: https://codereview.chromium.org//1299873003 .
2015-08-20 13:17:34 -07:00
Lasse R.H. Nielsen 1d537028f7 Mark resource as experimental
Fixes issue 24150
BUG= http://dartbug.com/24150
R=sandholm@google.com

Review URL: https://codereview.chromium.org//1284393004 .
2015-08-20 13:59:01 +02:00
Ryan Macnak 9278cc312b Really update return type of dart2js patch of dart:developer.log.
Review URL: https://codereview.chromium.org//1296553003 .
2015-08-19 14:00:40 -07:00
Ryan Macnak 360b40a599 Update return type of dart2js patch of dart:developer.log.
Review URL: https://codereview.chromium.org//1302823002 .
2015-08-19 13:42:53 -07:00
Seth Ladd 41e670f913 add void to dart:developer log
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1295803004 .
2015-08-19 13:01:29 -07:00
keertip 3865dd8748 create dartdoc snapshot, add to dart-sdk. Also add resources needed to run dartdoc from the sdk.
BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org//1295073003 .
2015-08-19 08:02:41 -07:00
Lasse R.H. Nielsen f8f06d784a Implement new parameters on Isolate.spawn() for dart2js.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1294803003 .
2015-08-19 13:52:36 +02:00
Asger Feldthaus ff74930f67 dart2js: Mark startRootIsolate as "used" by the backend.
This fixes a type inference issue where the empty type was inferred for
the parameters to this method.

BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1298173002 .
2015-08-18 15:55:55 +02:00
Lasse R.H. Nielsen 4b80cfd69e Remove the "not implemented yet" warning for new spawnUri parameters.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1293423002 .
2015-08-18 11:04:38 +02:00
Lasse R.H. Nielsen 6c7093dd19 Fix typo in dart2js code.
Review URL: https://codereview.chromium.org//1300803002 .
2015-08-18 10:26:46 +02:00
Lasse R.H. Nielsen 5fa70c4220 Make Dart2js implement the onExit/onError/errorsAreFatal parameters to spawnUri.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1286193006 .
2015-08-18 09:56:42 +02:00
Florian Loitsch debf1d6f7c Don't zone-register async callbacks for every await call in the VM.
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.

R=hausner@google.com

Committed: 4dae43d637
Reverted: cb4f9fc925

Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 19:26:50 +02:00
Florian Loitsch cb4f9fc925 Revert "Don't zone-register async callbacks for every await call in the VM."
This reverts commit 4dae43d637.

Review URL: https://codereview.chromium.org//1296973002 .
2015-08-17 16:43:35 +02:00
Florian Loitsch 4dae43d637 Don't zone-register async callbacks for every await call in the VM.
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 15:58:19 +02:00
Florian Loitsch 672df7c087 dart2js: Don't zone-register callbacks in async functions for every await.
R=johnniwinther@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1281523003 .
2015-08-17 15:57:34 +02:00
Florian Loitsch 7e64f3d962 Dart2js async-await. Bind the async-body to the current zone.
Also ensure the wrapping of js-functions happens only once per
async-call.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1163833002 .
2015-08-17 15:56:53 +02:00
Florian Loitsch 09ac73acd4 Add type to BroadcastSubscriptionWrapper.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1289203005 .
2015-08-17 14:45:21 +02:00
Florian Loitsch 410b181e13 The return-value of 'asFuture' isn't necessarily related to the Stream's type.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1295843002 .
2015-08-17 14:44:31 +02:00
Lasse R.H. Nielsen 1b8f3fba14 Make List constructor give better error messages for non-int arguments
BUG= http://dartbug.com/15986
R=herhut@google.com, iposva@google.com, sra@google.com

Committed: 33c7663826

Review URL: https://codereview.chromium.org//1214723009 .
2015-08-17 13:01:13 +02:00
Florian Loitsch b161b5ab9a Reenable types that were disabled because of a bug in dart2js.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1294713003 .
2015-08-17 12:50:48 +02:00
Florian Loitsch 00aaf1708d Accept a computation that returns a Future for Future.delayed.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1296623004 .
2015-08-17 11:34:43 +02:00
Alan Knight 89b99e60bf Remove dart2js-specific annotations from childNodes
BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org//1290263002 .
2015-08-14 09:32:45 -07:00
Lasse R.H. Nielsen 51fa195f16 Revert "Make List constructor give better error messages for non-int arguments"
There are VM-only tests that assume exact text of failure.

BUG=

Review URL: https://codereview.chromium.org//1294483003 .
2015-08-14 15:05:17 +02:00
Lasse R.H. Nielsen 33c7663826 Make List constructor give better error messages for non-int arguments
BUG= http://dartbug.com/15986
R=herhut@google.com, iposva@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1214723009 .
2015-08-14 13:44:19 +02:00
Sigmund Cherem e3fbf44643 dart2js: add function coverage tracking in dart2js output, dumpinfo, and
coverage recording server

R=sra@google.com

Review URL: https://codereview.chromium.org//1288593002 .
2015-08-13 16:47:58 -07:00
Florian Loitsch ad38b75bb2 Forward cancel subscription in stream pipes.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1284223005 .
2015-08-13 12:57:35 +02:00
Stan Manilov ac8a228d0b sdk/dart now detects an available build
The shell scripts in sdk/sdk are using ReleaseIA32 as the default build
configuration in the case one is not provided as an environment
variable. This is arbitrary so a check of the available builds is
performed and if ReleaseIA32 is available it is selected. Otherwise, an
arbitrary configuration is selected (currently the last one
lexicographically). In the case where there are no subfolders in the
"out" folder, ReleaseIA32 is selected, in order to produce the same
error that used to be produced before (this can be changed to a custom
message for user-friendliness).

Currently only the "dart" shell script is changed and if the change is
accepted, the others will be changed too.

R=floitsch@google.com, zerny@google.com

Review URL: https://codereview.chromium.org//1276333002 .
2015-08-12 15:19:23 +02:00
Lasse R.H. Nielsen edff0face7 Make String.allMatches lazy.
R=floitsch@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//1273713003 .
2015-08-12 11:01:21 +02:00
Seth Ladd b30a7a1750 change param name to match docs
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1287453002 .
2015-08-11 10:55:16 -07:00
John McCutchan 590557dfd0 When no service response is requested, send null back to the service isolate so it can cleanup
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1285673003 .
2015-08-11 07:13:09 -07:00
Asger Feldthaus 136ec727ee dart2js: Do not use JSDouble for native behavior return types.
Previously, a JS('double', ...) expression would be seen as having
the exact JSDouble class as return type. This is problematic since that
class is reserved for non-integer doubles, and the result is generally
not known to be non-integer.

For example, the sqrt function returns 'double' but sqrt(0) == 0 which
is an integer.

BUG=
R=floitsch@google.com

Committed: b0905eadce

Review URL: https://codereview.chromium.org//1276353006.
2015-08-11 15:14:50 +02:00
Florian Loitsch 0370922ca4 Improve documentation for Pattern.allMatches.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1272743004 .
2015-08-11 13:26:07 +02:00
Lasse R.H. Nielsen e9f48a37e8 Add getters for callbacks on StreamController.
R=floitsch@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1278873008 .
2015-08-11 10:55:48 +02:00
John McCutchan 5f02eb3c62 Move service extension handler execution to a timer
R=iposva@google.com

Review URL: https://codereview.chromium.org//1282883003 .
2015-08-10 14:56:43 -07:00
Seth Ladd d71110f31f Fix comment formatting 2015-08-10 08:50:37 -07:00
Lasse R.H. Nielsen 90643a7ef7 Make HttpClient not send fragments as part of request.
Make HttpServer ignore fragments sent in requests (which are invalid HTTP request syntax).

Add `removeFragment` method to Uri.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1281973004 .
2015-08-10 12:18:12 +02:00
John McCutchan 0f13b9c931 Allow Dart code to register service protocol handlers
- Add 'registerExtension' to dart:developer
- A service protocol handler must implement ServiceExtensionHandler
- Service extensions can report result OR error code / message

R=turnidge@google.com

Review URL: https://codereview.chromium.org//1270103002 .
2015-08-06 16:20:56 -07:00
Ryan Macnak b6c979f20b Hoist InstanceMirror.delegate to ObjectMirror.
BUG=http://dartbug.com/14827
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1273983002 .
2015-08-05 17:09:59 -07:00
Lasse R.H. Nielsen 0a35f7be3b Update Changelog.
Fix various typos and style nits.

BUG=23961
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1272593002 .
2015-08-05 12:58:30 +02:00
Søren Gjesse 2ca0bc6d5a Echo the WebSocket close reason as well as the close code
When receiving a close frame with a code and reason both the code
and the reason are now added to the close frame send as response.
Before only the code was added

BUG=https://github.com/dart-lang/sdk/issues/23964
R=kustermann@google.com

Review URL: https://codereview.chromium.org//1273663002 .
2015-08-05 11:53:32 +02:00
Sigurd 58c18aaa9b Fix typos in doc-string.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//371523006 .
2015-08-05 11:15:39 +02:00
Srdjan Mitrovic caa3cce77e Fix some TODOs
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1263963003 .
2015-08-04 17:13:22 -07:00
John McCutchan a2757141b0 Make dart:developer log more user friendly
- Make required arguments required.
- Validate required arguments in Dart before calling native.
- timestamp is now a DateTime.
- level has a default (ALL).
- sequence number is last + 1 if not provided.

R=lrn@google.com

Review URL: https://codereview.chromium.org//1266053003 .
2015-08-04 07:12:39 -07:00
John McCutchan 7640cf4b85 Fix test failure
patch from issue 1271693003 at patchset 20001 (http://crrev.com/1271693003#ps20001)

Review URL: https://codereview.chromium.org//1270953003 .
2015-08-04 07:05:34 -07:00
William Hesse bdda0eff52 Revert "Change msg to message in debugger function."
This reverts commit 2ae214316c.

BUG=

Review URL: https://codereview.chromium.org//1261203005 .
2015-08-04 15:22:47 +02:00
Lasse R.H. Nielsen 2ae214316c Change msg to message in debugger function.
BUG=23949
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1271693003 .
2015-08-04 14:58:13 +02:00
Florian Loitsch e9b91c7c92 Default values for static functions are now inside closures. (in the startup emitter).
Since static closures are const values, they can reference each other in the default values:

foo([x = bar]) => null;
bar([x = foo]) => null;

Therefore, we must not reference the default values during tear-off installation (as was the case until now).

The corresponding test has been uploaded in https://chromiumcodereview.appspot.com/1255083008/

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1266903004 .
2015-08-04 13:56:28 +02:00
Florian Loitsch 0231f6ba39 dart2js: fix named arguments with Function.apply in the startup emitter.
This includes a full rewrite of the Function.apply in the runtime.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1252533003 .
2015-08-03 18:06:31 +02:00
Florian Loitsch f6b142c5f4 dart2js: Support const symbols in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1253443003 .
2015-08-03 17:56:34 +02:00
Florian Loitsch 8d6063d806 dart2js: support isolates in the startup-emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1249023002 .
2015-08-03 17:48:43 +02:00
Florian Loitsch 62b49eadc6 dart2js: support tear-offs in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1229923005 .
2015-08-03 17:02:31 +02:00
Lasse R.H. Nielsen ac33dfe194 Fix missing generic type parameters on streams.
Add test.

BUG= 23859
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1250373007 .
2015-08-03 14:21:17 +02:00
Florian Loitsch ffb72ee817 Make sure '_globalState' is set before calling computeThisScript.
As first line of running `_globalState = new _Manager()` we invoked `_nativeDetectEnvironment()`. However, that one could ending up calling the getter `IsolateNatives.thisScript` which, in turn could need `_globalState`. Since the state wasn't set yet, this yielded a NPE.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1264543004 .
2015-08-03 10:37:41 +02:00
Johnni Winther 783ed933ff Fix boolean conversion bug in dart2js + update JSRegExp accordingly.
BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1259473005.
2015-07-27 14:19:26 +02:00
John McCutchan bfd2d4ed2a Refactor dart:developer log to use named parameters
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1247803002 .
2015-07-21 10:01:37 -07:00
John McCutchan f818f9dc0f Support piping log data over the service protocol
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1241683005 .
2015-07-21 07:54:46 -07:00
Florian Loitsch fb4633a1c5 dart2js: Use JS_GET_NAME instead of magic constant for catch-all function.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1245573002 .
2015-07-20 14:53:59 +02:00
Alan Knight cd8c569632 Make sure NodeValidator uriAttributes aren't passed as attributes
WIP

BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org//1236413002 .
2015-07-17 14:12:44 -07:00
Alan Knight 8d0ceaad7b Another try at placating the type checking for FilteredElementList
BUG=

Review URL: https://codereview.chromium.org//1230313008 .
2015-07-17 12:41:17 -07:00
Alan Knight de3ce04f0a Fix type problem with FilteredElementList._iterable
BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org//1236793006 .
2015-07-17 10:53:19 -07:00
Lasse R.H. Nielsen 848f6c978c Do "path normalization" when creating a URI.
Path normaliztion removes '.' and '..' segments from a URI. Such relative references are only intended for URI References, and Uri References are only intended for resolving against a full URI.

We do path normalization on all URIs that have a scheme, authority or an absolute path, and partial normalization on what are really just relative paths. The partial normalization can leave ".." at the start of the path.

The URI reference resolution algorithm doesn't work as expected for a URI ending in "..". Resolving "./foo" wrt. a base of "/a/.." results in  "/a/foo" - this is avoided when the base is path normalized before it's used.

This also fixes the "normalizePath" function which currently removes leading '..' segments, contrary to its documentation. It also makes the function redundant since all URI paths are normalized automatically.

See discussion on http://dartbug.com/23688

Also fix bug in the removeDotSegments function.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1224263009.
2015-07-17 17:08:36 +02:00
Terry L. Lucas 206ffe343b Revert "- Update _blink library using dart:js instead of native keyword"
This reverts commit 8ecb64d6b0.

TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1237263005 .
2015-07-17 07:45:12 -07:00
Terry L. Lucas 8ecb64d6b0 - Update _blink library using dart:js instead of native keyword
- Fixed dart:js event wrapping
- Fixed dart2js gen when --gen-interop used
- Cleanup and enabled static window() for JS interop
- Enabled --gen-interop
- Added --gen-interop switch

R=vsm@google.com,alanknight@google.com

Review URL: https://codereview.chromium.org//1234273003 .
2015-07-17 07:37:18 -07:00
Lasse R.H. Nielsen 4a8a844c34 Add setters for callbacks on StreamController.
This allows you to create a stream controller at one point and
add or change the callbacks later. This can be useful if you
want to store a stream controller in a final instance field and
also want the controller to call instance methods as callbacks.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1242023007.
2015-07-17 12:03:00 +02:00
Alan Knight d5599eb63b Restore workaround for old Chrome bug that also affects Safari and in some cases Firefox, fix test suppressions
BUG=

Review URL: https://codereview.chromium.org//1242063002 .
2015-07-16 13:20:26 -07:00
Alan Knight 4e790fef3d appendHtml, when sanitizing, should create document fragment in the right context
BUG=
R=terry@google.com

Committed: 560f12bb21

Committed: 930a40daa5

Review URL: https://codereview.chromium.org//1221043003 .
2015-07-16 10:30:51 -07:00
Lasse R.H. Nielsen e4881c55d0 Add errorsAreFatal, onExit and onError parameters to the spawn functions.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1240743003.
2015-07-16 16:52:43 +02:00
Florian Loitsch 547a0c4c04 dart2js: More documentation for embedded globals and shared property names.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1236033006 .
2015-07-16 14:57:30 +02:00
Natalie Weizenbaum bdd5803006 Fix a WebSocket crash.
Previously, a WebSocket would crash if it was closed after its
StreamSubscription was canceled. Now, it tracks whether the subscription
was canceled by canceling and nulling out its own internal subscription.

Fixes #23845

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//1234163002 .
2015-07-15 13:30:06 -07:00
Lasse R.H. Nielsen 4ee6246556 Add split function to LineSplitter class in dart:convert.
The split function returns a lazy iterable of the lines, unlike the convert
function which returns a list.
This makes the function usable on large strings where not all of the lines
are needed.

Closes https://github.com/dart-lang/sdk/issues/23837

R=kevmoo@google.com

Review URL: https://codereview.chromium.org//1240623002 .
2015-07-15 12:26:24 +02:00
Cristian Almstrand 3b125d3bc9 Please refer to https://code.google.com/p/dart/issues/detail?id=23418 for the bug reportincluding a WebStorm project which demonstrates the problem.
This proposal includes a fix to ensure that indices passed to the public functions defined in class FilteredElementList of the dart:html package consistently refer to element indices (not element indices sometimes, and node indices other times). Without this change, it is not possible to reliably insert elements relative to other elements. This can be problematic as the order of HTML elements must be guaranteed to ensure elements appear where expected in a normal page flow.

This proposal also address the TODO in file sdk/lib/html/html_common/filtered_element_list.dart to avoid excessively creating/allocating a filtered list of elements from nodes whenever calling [], every, any, length, etc. The implementation is less concise but should result in much reduced memory allocation and speed improvements.

R=alanknight@google.com

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

Patch from Cristian Almstrand <cristian.almstrand@gmail.com>.
2015-07-14 14:50:42 -07:00
Terry L. Lucas cec5812335 Fixed Dictionary and Event hookup w/o --gen-interop
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1233083004 .
2015-07-14 14:18:48 -07:00
Terry L. Lucas 1fa61ee114 Fixed a few more things to make Dartium build w/o --gen-interop
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1239653003 .
2015-07-14 07:17:59 -07:00
Terry L. Lucas 82fbd3382a Remove blink_jsObject when --gen-interop is not used.
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1236933003 .
2015-07-14 05:49:27 -07:00
Alan Knight 610edadff2 Revert "appendHtml, when sanitizing, should create document fragment in the right context"
This reverts commit 930a40daa5.

BUG=

Review URL: https://codereview.chromium.org//1230203005 .
2015-07-13 15:32:17 -07:00
Terry L. Lucas 045d9698d3 Revert "Turn on JS interop usage for DOM Dart libraries"
This reverts commit 7f6fc7eed2.
2015-07-13 13:40:42 -07:00
Terry L. Lucas 7f6fc7eed2 Turn on JS interop usage for DOM Dart libraries
Review URL: https://codereview.chromium.org//1235903003 .
2015-07-13 13:38:45 -07:00
Terry L. Lucas 48af868f47 Fixed compilation error
Review URL: https://codereview.chromium.org//1233923003 .
2015-07-13 13:24:08 -07:00
Alan Knight 930a40daa5 appendHtml, when sanitizing, should create document fragment in the right context
BUG=
R=terry@google.com

Committed: 560f12bb21

Review URL: https://codereview.chromium.org//1221043003 .
2015-07-13 12:50:49 -07:00
Terry L. Lucas 4947e570d4 Changed to use JSInterop
Review URL: https://codereview.chromium.org//1173403004 .
2015-07-13 12:38:16 -07:00
Florian Loitsch ec398a7385 dart2js: Rename "current isolate" to "static state (holder)".
R=herhut@google.com

Review URL: https://codereview.chromium.org//1232463007 .
2015-07-10 19:08:11 +02:00
Seth Ladd d69cd1dcfd one-liners for typed data
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1231903007 .
2015-07-09 16:47:41 -07:00
Seth Ladd 4bc681814b make one-line docs for math
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1231933007 .
2015-07-09 16:28:22 -07:00
Seth Ladd 4c685b6e84 add docs for indexed_db
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org//1233513002 .
2015-07-09 16:20:03 -07:00
Seth Ladd 41ed922e4f add one-liner docs to dart:developer
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1229173002 .
2015-07-09 15:35:04 -07:00
Lasse R.H. Nielsen 8450179afe Update documentation of Uri.parse.
It currently says that parse tries to escape invalid characters.
That's not true (at least not in most cases, though I think a few might
still work).
This just removes that part of the documentation.

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

Review URL: https://codereview.chromium.org//1213713006 .
2015-07-09 12:24:26 +02:00
Alan Knight 1e8a275a20 Revert "appendHtml, when sanitizing, should create document fragment in the right context"
This reverts commit 560f12bb21.

	modified:   sdk/lib/html/dart2js/html_dart2js.dart
	modified:   sdk/lib/html/dartium/html_dartium.dart
	modified:   tests/html/element_add_test.dart
	modified:   tools/dom/templates/html/impl/impl_Element.darttemplate

BUG=

Review URL: https://codereview.chromium.org//1230553003 .
2015-07-08 12:19:30 -07:00
Alan Knight 560f12bb21 appendHtml, when sanitizing, should create document fragment in the right context
BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org//1221043003 .
2015-07-08 10:16:37 -07:00
Devon Carew 9e8c08320d Merge pull request #23689 from dart-lang/devoncarew_sdk_readme
fix links in the sdk readme doc
2015-07-07 13:27:14 -07:00
Florian Loitsch 908865c47e dart2js: Rename emitters.
The "old" and "new" name was not helpful.

R=herhut@google.com

Review URL: https://codereview.chromium.org//1220333003 .
2015-07-07 14:47:33 +02:00
Stephan Herhut e21d8dbf93 dart2js: Implement serialization of Capability for isolates.
R=karlklose@google.com, floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//1217763004.
2015-07-07 10:27:30 +02:00
Lasse R.H. Nielsen 3c976019cc Make int.gcd accept zero as an operand, including both operands being zero.
R=floitsch@google.com, regis@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1211473002.
2015-07-07 09:51:13 +02:00
Lasse R.H. Nielsen 03f92623b2 Revert usage of delegating generative constructor, still not supported by VM.
Also update test expectation for d8/jsshell now that test doesn't use non-zero timer any more.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1221033008.
2015-07-03 14:53:29 +02:00
Lasse R.H. Nielsen e0a61ceeb4 Fix comparison of StreamIterator with Iterable - should be Iterator.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1220233004.
2015-07-03 13:30:37 +02:00
Lasse R.H. Nielsen f529055c1b Update documentation of StreamIterator, improve tests.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1216123004.
2015-07-03 13:23:39 +02:00
Florian Loitsch 24fbfa7f78 Revert "Fix runtimeType.toString for tear-offs."
This reverts commit 87a7ca0720.

Review URL: https://codereview.chromium.org//1220793012.
2015-07-02 13:57:07 +02:00
Florian Loitsch 87a7ca0720 Fix runtimeType.toString for tear-offs.
Tear-offs are constructed by building a fresh constructor on the fly. However, that constructor is unnamed and didn't have the 'builtin$cls' property set. As such, the runtime-type system was unable to extract a good name and wasn't able to provide a good 'toString' for it. With this CL the constructor has a good 'name' set.

Also removes the 'builtin$cls' property that was a duplicate of 'name'. Whenever we defined a new Dart class, we added a 'builtin$cls' property on the constructor which was a duplicate of the name. This was necessary, because IE doesn't store the function name on the constructor. However, there we can just assign the 'name' field, and don't need to introduce a new field-name ('builtin$cls'). As such, we can always use the 'name' property.

R=sra@google.com

Review URL: https://codereview.chromium.org//1213033002.
2015-07-02 10:59:31 +02:00
Sigmund Cherem 4ec3db6947 keep old location of libraries.dart in the generated SDK (fixes 23755)
R=kevmoo@google.com

Review URL: https://codereview.chromium.org//1216313002.
2015-06-30 17:08:21 -07:00
Lasse R.H. Nielsen ede6cb71a5 Make modInv throw Exception on incompatible operands.
Also update errors to be more descriptive accross the integer methods.

I'm still considering whether a more precise "NotCoPrimeException" would be better.

R=regis@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1209523002.
2015-06-30 14:46:14 +02:00
Jacob Richman ae72b6a701 Enhance dart:js interop in a backwards compatible manner.
BUG=

Review URL: https://codereview.chromium.org//1213873004.
2015-06-29 11:20:11 -07:00
Sigmund Cherem b18c5a3e7c sdk files reorganization to make dart2js a proper package
BUG=
R=brianwilkerson@google.com, floitsch@google.com, whesse@google.com

Review URL: https://codereview.chromium.org//1212513002.
2015-06-29 10:21:14 -07:00
Jacob Richman 7e9e4d89d3 Revert "Enhance dart:js interop in a backwards compatible manner."
This reverts commit ac32e37ab1300cb1ce1cd081f050ff1d04e54cbe.

BUG=

Review URL: https://codereview.chromium.org//1209093005.
2015-06-26 10:29:25 -07:00
Jacob Richman 3fdeb669ee Enhance dart:js interop in a backwards compatible manner. List objects can now be passed back and forth to Dartium without requiring jsify
BUG=
R=terry@google.com, vsm@google.com

Review URL: https://codereview.chromium.org//1194643002.
2015-06-26 10:06:45 -07:00
Lasse R.H. Nielsen f8ce36df55 Add Resource class. Currently unimplemented.
R=herhut@google.com, iposva@google.com

Committed: 2890a7a2a9

Review URL: https://codereview.chromium.org//1181663002.
2015-06-26 11:42:02 +02:00
Stephan Herhut dd41983945 dart2js: Use an abstract Name class for names in the generated JavaScript ast.
BUG=
R=asgerf@google.com, floitsch@google.com, sigurdm@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1198293002.
2015-06-25 09:39:57 +02:00
Harry Terkelsen a684edf08b Don't use ES6 map if browser has no Map
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1199343006.
2015-06-24 16:51:18 -07:00
Harry Terkelsen 46fdfd1c7d Use an ES6 map for a linked identity hash map.
BUG=
R=floitsch@google.com

Committed: 008b41dc33

Review URL: https://codereview.chromium.org//1188713005.
2015-06-24 15:16:47 -07:00
Stephen Adams 9425621eac JSInvocationMirror - return unmodifiable list or map
R=floitsch@google.com

Committed: ec9ecdd3ff

Reverted.

Review URL: https://codereview.chromium.org//1200403003.
2015-06-24 11:00:31 -07:00
Stephen Adams 52740cbcf4 Revert "JSInvocationMirror - return unmodifiable list or map"
Will re-land with .status updates for tests that started working.

TBR=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//1207723003.
2015-06-24 08:19:00 -07:00
Stephen Adams ec9ecdd3ff JSInvocationMirror - return unmodifiable list or map
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1200403003.
2015-06-24 07:45:55 -07:00
Lasse R.H. Nielsen 3300a005f2 Change documentation of modInverse to not specify error thrown.
R=ricow@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1204993002.
2015-06-24 11:04:27 +02:00
Soren Gjesse 0415d9271d Improve the encoding/decoding to/from system encoding on Windows
On Windows the dart:io SYSTEM_ENCODING is now also working with strings
which have null characters in them. Previously the string would be
terminated at the null character.

BUG=https://github.com/dart-lang/sdk/issues/23295
R=kustermann@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1194883002.
2015-06-24 10:36:05 +02:00
Stephen Adams afe5b32e48 Fix for issue 23432.
Get the correct receiver in noSuchMethod stubs.

noSuchMethod stubs for selectors with Interceptor calling convention should pass the receiver to noSuchMethod (not 'this').  The actual receiver is selected by Object.noSuchMethod and Interceptor.noSuchMethod.

R=floitsch@google.com

Committed: c8d7cd8ef4

Reverted: 21a322fd99

Review URL: https://codereview.chromium.org//1181063005.
2015-06-22 17:02:21 -07:00
Stephen Adams 21a322fd99 Revert "Fix for issue 23432."
Reverted while investigating failed tests.

TBR=sigmund@google.com

Review URL: https://codereview.chromium.org//1203523003.
2015-06-22 13:46:29 -07:00
Stephen Adams c8d7cd8ef4 Fix for issue 23432.
Get the correct receiver in noSuchMethod stubs.

noSuchMethod stubs for selectors with Interceptor calling convention should pass the receiver to noSuchMethod (not 'this').  The actual receiver is selected by Object.noSuchMethod and Interceptor.noSuchMethod.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1181063005.
2015-06-22 13:16:05 -07:00
Alan Knight 1d5b657427 Make it easier and more efficient to use trusted HTML text
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1154423009.
2015-06-22 09:41:01 -07:00
Lasse R.H. Nielsen 78a3db3128 Revert "Add Resource class. Currently unimplemented."
This reverts commit 2890a7a2a9.

Causes a dart2js test error and a significant amount of analyzer
warnings.

Review URL: https://codereview.chromium.org//1193273003.
2015-06-22 16:43:44 +02:00
Lasse R.H. Nielsen 2890a7a2a9 Add Resource class. Currently unimplemented.
R=herhut@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//1181663002.
2015-06-22 15:05:14 +02:00
Devon Carew 5635fbfb4c fix links in the sdk readme doc 2015-06-21 08:57:17 -07:00
Regis Crelier a192ef4acb Implement gcd in sdk.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1199513003.
2015-06-19 13:40:01 -07:00
Stephen Adams 773d7b00fb Use ArgumentError.value in more places in js_lib.
Main effect is that more numeric operations will indicate 'null' is the problem argument, e.g.

    Illegal Arguments(s)
-->
    Illegal Argument: null

BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1181003005.
2015-06-19 11:02:25 -07:00
Sigurd 3322eeddee Let SyncStartIterable extend IterableBase instead of Iterable.
Otherwise it misses implementations of all the helper methods.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1165733003.
2015-06-19 09:23:51 +02:00
Harry Terkelsen d042c3ff27 Revert "Use an ES6 map for a linked identity hash map."
This reverts commit 008b41dc33.

BUG=

Review URL: https://codereview.chromium.org//1192163002.
2015-06-18 09:51:45 -07:00
Harry Terkelsen 008b41dc33 Use an ES6 map for a linked identity hash map.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1188713005.
2015-06-18 09:13:53 -07:00
Søren Gjesse eaeecf2ed1 Add file modes for opening a file write only
Added two new file modes WRITE_ONLY and WRITE_ONLY_APPEND. The current
file modes WRITE and WRITE_APPEND are kept as the read/write mode with
no change. Kept the same overall handling of create/truncate/append
semantics for the new file modes.

R=ager@google.com, ahe@google.com
BUG=

Review URL: https://codereview.chromium.org//1193653002.
2015-06-18 15:19:26 +02:00
Lasse R.H. Nielsen ac3765566d Update documentation of Stream.pipe to match behavior.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1189873004.
2015-06-18 13:03:15 +02:00
Asger Feldthaus fb38d61dba dart2js cps: Support function types in 'is' and 'as' operators.
The generated code uses different helpers than the SSA. In SSA, there are calls to buildFunctionType and _isTest. The CPS uses checkSubtypeOfRuntimeType, the "one size fits all" method we also use to test against type variable types.

When the function type has no type variables in it we could hoist the function type into a constant, but the constant system does not support type representation constants at the moment. But it seems like an optimization we may want to add later.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1180973003.
2015-06-18 11:30:57 +02:00
Regis Crelier 16bb52b88d Implement modInverse for an even modulus.
Update test.

Fixes #23502

R=srdjan@google.com

Review URL: https://codereview.chromium.org//1188843004.
2015-06-17 13:50:30 -07:00
Lasse R.H. Nielsen fbedc2b86f Also iprove Future.value(null) and documentation of some Stream related classes.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1177343004.
2015-06-16 11:38:07 +02:00
Søren Gjesse c05c8c6606 Revert change to Platform.excutable and add Platform.resolvedExecutable
The change to Platform.excutable in
e03ab17437 was a breaking change and it
has been reverted.

A new getter Platform.resolvedExecutable has been added to provide the
the fully qualified path of the executable.

BUG=https://github.com/dart-lang/sdk/issues/16994
R=lrn@google.com, kustermann@google.com, len@google.com

Review URL: https://codereview.chromium.org//1180623006.
2015-06-15 10:13:21 +02:00
Stephen Adams f7263216e4 Better messages for optimized index errors.
Typed list, Array and String indexer methods detect index errors in their own optimized way but now defer to common code to diagnose the error.  This code is shared with the optimized 'ioore' helper, which makes the error message consistent between optimized and unoptimized code.

The main reason for doing this is to ensure that the error messages have as much information as possible to help debug off-line using captured error messages.

BUG=
R=lrn@google.com

Committed: 0d4361fb6d

Reverted: 82215d36f4

Review URL: https://codereview.chromium.org//1180713003.
2015-06-12 18:21:47 -07:00
Stephen Adams 82215d36f4 Revert "Better messages for optimized index errors."
TBR=lrn@google.com

Review URL: https://codereview.chromium.org//1187553005.
2015-06-12 16:53:19 -07:00
Stephen Adams 0d4361fb6d Better messages for optimized index errors.
Typed list, Array and String indexer methods detect index errors in their own optimized way but now defer to common code to diagnose the error.  This code is shared with the optimized 'ioore' helper, which makes the error message consistent between optimized and unoptimized code.

The main reason for doing this is to ensure that the error messages have as much information as possible to help debug off-line using captured error messages.

BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1180713003.
2015-06-12 15:33:58 -07:00
Ryan Macnak fd1531b4d8 Fix some markup in the mirrors docs.
BUG=http://dartbug.com/21714
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1184623003.
2015-06-12 14:43:38 -07:00
Seth Ladd 00be3be571 be more explicit about when and how to register for listeners with isolates
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1181043003
2015-06-12 15:02:11 +02:00
Seth Ladd f1b934d816 make the one-liner for the SDK docs an actual one-liner
BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org//1183623003
2015-06-12 12:21:52 +02:00
Johnni Winther ee1be89b30 Support foreigns as external.
BUG=

Review URL: https://codereview.chromium.org//1169083004.
2015-06-11 15:27:56 +02:00
Regis Crelier 9edc6e5a6d Detect zero receiver of modInverse (may not converge and time out
in that case).

See #23502

Review URL: https://codereview.chromium.org//1177063002.
2015-06-10 16:40:24 -07:00
Regis Crelier 90315a1694 Remove bigint reference in js_number.dart
Review URL: https://codereview.chromium.org//1177873002.
2015-06-10 15:34:43 -07:00
Regis Crelier f6f338ce67 Implement modInverse (bigint version does not support even modulus yet).
Added tests.

See #23502

R=srdjan@google.com

Review URL: https://codereview.chromium.org//1174513004.
2015-06-10 15:01:46 -07:00
Karl Klose 183ae17958 Move IS_INDEXABLE_FIELD to JsGetName.
Also remove the old helper functions and references from js_helper and friends.

R=herhut@google.com

Review URL: https://codereview.chromium.org//1158423005.
2015-06-09 11:29:50 +02:00
Rico Wind f3c6339206 Switch over testing pub seperately from the the normal packages
This will call a new test script that Natalie will fill in the blanks of for pub testing.

This also moves pub from third_party/pkg_tested into third_party/pkg.

The corresponding changes to the buildbot is here:
http://src.chromium.org/viewvc/chrome?revision=295555&view=revision

R=nweiz@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1166093002.
2015-06-09 08:12:51 +02:00
Ryan Macnak cef08e5674 Fix dartdoc for InstanceMirror.delegate and ClosureMirror. Avoid misleading use of the term 'evaluation'.
BUG=http://dartbug.com/15889
BUG=http://dartbug.com/20139
BUG=http://dartbug.com/21992
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1144923012.
2015-06-08 17:41:34 -07:00
Sigmund Cherem 1763aa3467 dart2js: reuse stack trace on rethrow
BUG= dartbug.com/15171
R=sigurdm@google.com

Review URL: https://codereview.chromium.org//1152023004
2015-06-08 12:27:49 -07:00
Stephan Herhut e4255659dd dart2js: Do not emit type metadata for fields declared in non-reflectable classes.
BUG=
R=karlklose@google.com, zarah@google.com

Committed: 67537ffbd7

Reverted: 6cc3bd1124

Committed: a1b630641e

Reverted: 5af9221e1b

Review URL: https://codereview.chromium.org//1169453005
2015-06-08 15:35:25 +02:00
Seth Ladd ac1b0cf8ac Merge pull request #23585 from dart-lang/sethladd-patch-2
Removing Polymer from core SDK API's homepage
2015-06-05 14:20:34 -07:00
Seth Ladd 9326f9d79a update one-line docs for svg, gl, audio
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org//1163163004
2015-06-04 16:39:02 -07:00
Seth Ladd 464ffd0fca Removing Polymer from core SDK API's homepage
Also, the "writing API documentation" page was never moved over from the codesite.
2015-06-04 15:20:28 -07:00
pq 2c5e890fc7 Build fixes.
Long tail of fixes related to moving out of `pkg_tested`.

R=paulberry@google.com

Review URL: https://codereview.chromium.org//1162423002
2015-06-03 14:03:15 -07:00
Lasse R.H. Nielsen 5a843ebbf3 Add "checked" parameter to Isolate.spawnUri.
R=iposva@google.com

Review URL: https://codereview.chromium.org//1154673004
2015-06-03 12:32:52 +02:00
Karl Klose 683743c9c5 Change more JS foreign methods to JS_GET_NAME.
R=herhut@google.com

Review URL: https://codereview.chromium.org//1154073004
2015-06-03 11:41:46 +02:00
Anders Johnsen 114c37738d Fix signature of UnmodifiableListMixin.insert to match List.insert.
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1160423002
2015-06-03 09:32:49 +02:00
Lasse R.H. Nielsen 6f2dd2552c Fix typo in ListMixin.insertAll.
Also add test for input iterable being linked to receiver list.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1146163004
2015-06-02 11:58:35 +02:00
Natalie Weizenbaum 3d8c06c4e9 Start pulling pub from its own repo.
Pub now lives in third_party/pkg/pub (it's in pkg to make it possible to import
using "package:" imports).

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

Review URL: https://codereview.chromium.org//1165473002
2015-05-29 14:50:18 -07:00
Lasse R.H. Nielsen babcd4e9c0 Revert "Make EfficientLength public, as EfficientLengthIterable."
It's still not a good solution for detecting an Iterable with an efficient
length. It's not inherited by, e.g., a DelegatingIterable wrapper or similar
generic Iterable transformers.

Keep this as an internal optimization for quickly detecting the most common
efficient-length Iterable classes (List, Set, Queue, Map.keys/values), but
don't make it public.

A *real* solution would be adding a hasEfficientLength getter to Iterable, or
adding an efficientLength getter that may return null if it's not efficient.
This would something that a wrapper can attach to.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1154263003
2015-05-29 12:52:45 +02:00
Lasse R.H. Nielsen 542e675fed Fix typo in dart2js typed_data.
Review URL: https://codereview.chromium.org//1163653002
2015-05-29 11:18:01 +02:00
Lasse R.H. Nielsen cf4eaae5a6 Change RangeError instances to use RangeError.range.
This avoids using the (sometimes confusing) "[...)" notation for half-open ranges.
Also change argument tests to simpler interval tests, and move error handling to the end of the functions.

Mostly in VM typed-data libraries.

R=sgjesse@google.com, srdjan@google.com

Committed: 932bcc6901

Review URL: https://codereview.chromium.org//1132603003
2015-05-29 10:50:20 +02:00
Lasse R.H. Nielsen 9e175d27d7 Revert "Change RangeError instances to use RangeError.range."
Method hashes needs to be updated.

Review URL: https://codereview.chromium.org//1160903002
2015-05-28 10:46:15 +02:00
Lasse R.H. Nielsen 932bcc6901 Change RangeError instances to use RangeError.range.
This avoids using the (sometimes confusing) "[...)" notation for half-open ranges.
Also change argument tests to simpler interval tests, and move error handling to the end of the functions.

Mostly in VM typed-data libraries.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1132603003
2015-05-28 10:34:03 +02:00
Ivan Posva 91e71b53e3 - Update expected string in pub test.
BUG=

Review URL: https://codereview.chromium.org//1159983005
2015-05-28 00:32:30 -07:00
Ivan Posva 0358f722ba - Include original, loaded URI in error message.
- Update error string comparison in pub.

BUG=

Review URL: https://codereview.chromium.org//1156983003
2015-05-28 00:14:39 -07:00
Alan Knight ee0a5db6a5 Make sanitizer tests handle IE11, where tagName can't be clobbered
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1148893004
2015-05-27 12:56:09 -07:00
William Hesse fc1bb66b88 Escape arguments in pub error message command line reproduction.
BUG=dartbug.com/23505
Rebase of https://codereview.chromium.org/1035853003/

R=nweiz@google.com

Review URL: https://codereview.chromium.org//1156663002
2015-05-27 17:21:36 +02:00
Søren Gjesse f05608c49d Fix errors in previous commit
Commit was 897d05b6f0.

TBR=lrn@google.com
BUG=http://dartbug.com/23521

Review URL: https://codereview.chromium.org//1145403004
2015-05-27 11:18:03 +02:00
Lasse R.H. Nielsen 25a16a39b3 In JsonEncoder, test if map has only string keys, and use toEncodable if not.
Currently the encoder assumes that a map will have string keys, and will fail
in ugly ways if it doesn't. With this change, the toEncodable function used on
other un-encodable values is also used on non-String-keyed maps.

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

Review URL: https://codereview.chromium.org//1153893004
2015-05-27 10:49:21 +02:00
Søren Gjesse 897d05b6f0 Fix argument processing for RandomAccessFile.writeFrom
It is now the same as for RandomAccessFile.writeFromSync

Added some tests.

R=lrn@google.com
BUG=http://dartbug.com/23521

Review URL: https://codereview.chromium.org//1156993003
2015-05-27 10:01:24 +02:00
Stephen Adams 4b2d2379cf dart:js - speed up constructor calls with few arguments.
This eliminates the 5x perf hit reported in http://dartbug.com/23514

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1152673003
2015-05-26 15:02:25 -07:00
Lasse R.H. Nielsen dcf0286f53 Add Iterable.empty constructor.
Convenience constructor giving an easy/quick way to create an empty iterable.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1152483002
2015-05-22 10:39:58 +02:00
Alan Knight 39e5dba8c0 Fix typo in sanitizer
BUG=

Review URL: https://codereview.chromium.org//1151903004
2015-05-21 14:43:02 -07:00
Alan Knight efb738f633 Sanitization should reject elements that we can't examine (e.g. embed/object on FF)
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1146753004
2015-05-21 13:54:50 -07:00
Natalie Weizenbaum 8298073cbc Always ignore non-public transformers.
This was happening for the most part, but the dependency computer could
get tripped up when a package used a transformer from a dev dependency
on only private files.

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

Review URL: https://codereview.chromium.org//1143453006
2015-05-20 17:44:46 -07:00
Søren Gjesse e03ab17437 Make Platform.executable return the fully qualified path of the executable
BUG=http://dartbug.com/16994
R=kustermann@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1145053002
2015-05-20 13:14:51 +02:00
Florian Loitsch ec51cdcca3 dart2js: Cleanups and renames in runtime code that thouches types.
As a convention we use "rti" in variable names that represent internal type encodings.

R=sra@google.com

Review URL: https://codereview.chromium.org//1135653005
2015-05-19 17:43:01 +02:00
Florian Loitsch de495c6b20 dart2js: remove JS_OBJECT_CLASS_NAME and JS_NULL_CLASS_NAME from foreign
Instead of comparing the constructor's class name to the one of the Dart object class (or Null class), provide a builtin that returns whether a type is _the_ object or null type.

This CL also starts the convention that internal types should have "rti" in their name.

R=sra@google.com

Review URL: https://codereview.chromium.org//1136913006
2015-05-19 17:40:02 +02:00
Kathy Walrath fc4ec71aff Update README.md 2015-05-18 15:44:23 -07:00
John McCutchan f3a74e69c9 Fix typo in Stream documentation.
R=johnmccutchan@google.com, msimprovertechnologies@gmail.com

Review URL: https://codereview.chromium.org//1142683002
2015-05-18 11:32:47 -07:00
John McCutchan 6e42aec4f6 Deprecate 'dart:profiler' and move functionality to 'dart:developer'
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1133713006
2015-05-18 11:31:20 -07:00
Lasse R.H. Nielsen 759b494b10 Remove experimental warning from Isolate methods.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1140823006
2015-05-18 11:14:14 +02:00
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