Commit graph

1332 commits

Author SHA1 Message Date
Erik Corry 4b9bba55b4 Stoppp using trippple consonants
R=ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2833073002 .
2017-04-21 17:50:13 +02:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
John McCutchan 7399d4bdec DBC follow up CL
- [x] Hoist handle out of loop.
- [x] Avoid allocating a handle.

BUG=

Review-Url: https://codereview.chromium.org/2819523003 .
2017-04-13 07:38:15 -07:00
Peter von der Ahé 588857cae3 Restore status line for non-dart2js compilers.
Review-Url: https://codereview.chromium.org/2802003002 .
2017-04-06 14:46:17 +02:00
Peter von der Ahé 4e65f5d759 Update status file with dart2js crash.
Review-Url: https://codereview.chromium.org/2798313002 .
2017-04-06 13:44:53 +02:00
Peter von der Ahé d515791312 Handle bad packages files and #void without crashing.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2804843003 .
2017-04-06 12:05:54 +02:00
Siva Annamalai c53e020e6c Adjust status files to account for running the Dart test cases through flutter engine on linux.
Accounted for language, co19, lib, corelib, isolate and standalone tests.

Filed issues to track all failing tests

  https://github.com/flutter/flutter/issues/9109
  https://github.com/flutter/flutter/issues/9110
  https://github.com/flutter/flutter/issues/9111
  https://github.com/flutter/flutter/issues/9113
  https://github.com/flutter/flutter/issues/9114
  https://github.com/flutter/flutter/issues/9115

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2784293003 .
2017-04-03 16:35:09 -07:00
Martin Kustermann d8e291cb89 [kernel] vm: Fix a few issues in the kernel flow graph builder, update status file for checked-mode
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2792033002 .
2017-04-03 19:47:01 +02:00
Florian Schneider 4525b2451c VM: Re-enable regexp/global_test
The corresponding performance issue has been fixed.

Fixes #21708.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2781283003 .
2017-03-30 16:02:58 -07:00
Lasse R.H. Nielsen c6ef4c8dd9 Fix edge cases where a FormatException source argument starts with a newline.
Fixes #29195

BUG= http://dartbug.com/29195
R=eernst@google.com

Review-Url: https://codereview.chromium.org/2789523002 .
2017-03-30 15:17:38 +02:00
Vyacheslav Egorov 536c610fd2 Update status files for all test suites for -c dartk / -c dartkp configuration.
We are going to switch to testing all testsuites instead of just limiting ourselves to

co19 language kernel service

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2780943004 .
2017-03-29 13:18:57 +02:00
William Hesse 011a5a6a66 Remove ie10 and opera sections from status files
BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2783653002 .
2017-03-28 16:38:59 +02:00
Jacob Richman 14531fa62d Re-land "Format all multitests"
Only delta from the original is a bad merge of tests/corelib/list_test.dart

This reverts commit 44d8be0ed3.

BUG=

Review-Url: https://codereview.chromium.org/2774783002 .
2017-03-23 12:40:21 -07:00
Jacob Richman 44d8be0ed3 Revert "Format all multitests"
This reverts commit 312b66dd5f.

BUG=

Review-Url: https://codereview.chromium.org/2770063002 .
2017-03-23 10:49:40 -07:00
Jacob Richman 312b66dd5f Format all multitests
BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2768073002 .
2017-03-23 10:26:44 -07:00
Jacob Richman 88eb557b65 Fix warnings_checker.dart handling of multitests
Update all tests

Support //# multitests for better dartfmt compatibility and fewer multitest false positives

All files under tests were manually updated with

find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'

For now both old and new styles are allowed to accommodate CO19 tests.

R=efortuna@google.com
BUG=

Review-Url: https://codereview.chromium.org/2765693002 .
Review-Url: https://codereview.chromium.org/2765893003 .
2017-03-21 17:29:56 -07:00
Jacob Richman bf2b545150 Revert "Update all tests"
This reverts commit ce76e9c30beaf9a193d3677b88c20a1ebb3fae8c.
2017-03-21 16:33:18 -07:00
Jacob Richman 3c7353d987 Update all tests
Support //# multitests for better dartfmt compatibility and fewer multitest false positives

All files under tests were manually updated with

find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'

For now both old and new styles are allowed to accommodate CO19 tests.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2765693002 .
2017-03-21 12:39:28 -07:00
Jacob Richman 6a7d6c385e Add comments
Add spaces to make sure dartfmt doesn't destroy bespoke indentation

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2763823002 .
2017-03-20 21:03:12 -07:00
William Hesse 1cb1b70d5d Update firefox status for Unicode 6.3 test
BUG=https://github.com/dart-lang/sdk/issues/28983
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2745303003 .
2017-03-14 14:39:37 +01:00
Stephen Adams 8cadbf4f72 Redo "Remove U+180E from whitespace in js_runtime and tests"
TBR=alanknight@google.com
BUG=

Review-Url: https://codereview.chromium.org/2747983003 .
2017-03-13 21:43:05 -07:00
Stephen Adams 66539fb493 Revert "Remove U+180E from whitespace in js_runtime and tests"
Several VM and browser status updates needed.

TBR=alanknight@google.com
BUG=

Review-Url: https://codereview.chromium.org/2748003002 .
2017-03-13 21:11:10 -07:00
Stephen Adams c6a01283c1 Remove U+180E from whitespace in js_runtime and tests
BUG= https://github.com/dart-lang/sdk/issues/28983
R=alanknight@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2733353002 .
2017-03-13 20:18:19 -07:00
Stephen Adams 129f9dbb4c Update status for ff + jsshell list_test
TBR=nweiz@google.com
BUG=

Review-Url: https://codereview.chromium.org/2744743002 .
2017-03-09 16:28:39 -08:00
Alan Knight 8d5015556e Update test status for Firefox 52/Issue 28983
BUG=

Review URL: https://codereview.chromium.org/2732963006 .
2017-03-07 16:52:28 -08:00
Asger Feldthaus 3a7529a363 Remove status file sections for the CPS IR.
BUG=
R=kmillikin@google.com

Committed: 2d6c90a6b3
Review-Url: https://codereview.chromium.org/2720513006 .
2017-02-28 17:11:19 +01:00
Asger Feldthaus e7b9672b3e Revert "Remove status file sections for the CPS IR."
This reverts commit 2d6c90a6b3.

BUG=

Review-Url: https://codereview.chromium.org/2720283002 .
2017-02-28 17:08:04 +01:00
Asger Feldthaus 2d6c90a6b3 Remove status file sections for the CPS IR.
BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2720513006 .
2017-02-28 14:40:06 +01:00
Lasse R.H. Nielsen dccdd1b981 Normalize UriData.parse result.
Validates base64 encoding, normalizes padding.
Normalizes non-base64 data using URI percent-escapes for all invalid characters.

Fixes issue #28728, #28700
BUG= http://dartbug.com/28728 http://dartbug.com/28700
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2694373003 .
2017-02-17 11:02:38 +01:00
Sigmund Cherem 91796be231 Add mode to test.dart to run dart2js with kernel, and include initial set of
failures in status files

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

Review-Url: https://codereview.chromium.org/2688413004 .
2017-02-14 14:37:23 -08:00
Ryan Macnak cfe5e5f075 Include metadata in AOT to expand inline frames in stack traces and provide line numbers.
Also fix stack trace collection to always include invisible frames. It can happen that a visible function is inlined into an invisible function, and we don't expand inlined frames until we print a stack trace.

dart2js product x64:
compile time: 12.459s
VMIsolate(CodeSize): 152292
Isolate(CodeSize): 3343117
ReadOnlyData(CodeSize): 3728928
Instructions(CodeSize): 8677600
Total(CodeSize): 15901937
->
compile time: 14.195s (+13%)
VMIsolate(CodeSize): 174034
Isolate(CodeSize): 3892418 (+16%)
ReadOnlyData(CodeSize): 5036320 (+35%)
Instructions(CodeSize): 8682624
Total(CodeSize): 17785396 (+12%)

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2687143005 .
2017-02-13 10:27:36 -08:00
Natalie Weizenbaum 8de3c35cc2 [Gardening] Mark a test as flaky on Dart2js. (#28713)
corelib/list_unmodifiable_test fails flakily on dart2js.

See #28712
2017-02-10 15:05:40 -08:00
Lasse R.H. Nielsen d4a1e06892 Update URI related documentation and examples.
Adds a test for all the examples.

Fixes issues: #28659, #28660, #28661

BUG= http://dartbug.com/28659, http://dartbug.com/28660, http://dartbug.com/28661
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2679933002 .
2017-02-07 11:54:28 +01:00
Brian Wilkerson 2ee2fe9b5c [Gardening] Disable running strong-mode analyzer tests in code that is not strong mode clean
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2679553003 .
2017-02-06 13:26:39 -08:00
Lasse R.H. Nielsen dd561d513b Add Uri.isScheme test function.
Allows checking the scheme of a URI against a known value.
Example: `uri.isScheme("http")`.
Has two advantages over `uri.scheme == "http"`:
* It's case insensitive, so you can do `uri.isScheme("HTTP")` as well, and
* for simple URIs, it doesn't need to allocate a new string.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2664453003 .
2017-01-30 13:26:39 +01:00
Lasse R.H. Nielsen dab2d0efb8 Fix invalid URIs generated using Uri constructor with clever paths.
Fixes issue #28359
BUG= http://dartbug.com/28359
R=floitsch@google.com

Committed: d3a839fb84
Review-Url: https://codereview.chromium.org/2626013004 .
2017-01-16 09:16:06 +01:00
Lasse R.H. Nielsen d3a839fb84 Fix invalid URIs generated using Uri constructor with clever paths.
Fixes issue #28359
BUG= http://dartbug.com/28359
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2626013004 .
2017-01-13 09:38:07 +01:00
Florian Schneider bef4967ea1 Remove dart_noopt and related parts from the VM.
dart_noopt is not needed anymore because we have testing
and builbot integration of the real precompilation pipeline in place now.

Fixes #24569
Fixes #25726
Fixes #25845

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2624393002 .
2017-01-11 16:55:55 -08:00
Matthias Hausner dfde15a8be Gardening: mark regexp pcre_test slow/timeout in precompiled code
This test seems to be slow in any configuration. There are old bugs,
e.g. 21593 and 22008 that mention the slowness and flakiness, but there
are no takers to either fix the regexp code or make the test smaller.

Note: in precompiled mode, the regular expression code is interpreted, and thus actually slower than in the JIT version of the test.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2624733005 .
2017-01-10 13:03:49 -08:00
Regis Crelier dc0605012f Move Null type to the Bottom in the VM (fixes #28025).
Fix wrong comments.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2608373002 .
2017-01-05 10:05:31 -08:00
Florian Loitsch 59ffd06f15 Update status file.
Review-Url: https://codereview.chromium.org/2598183002 .
2016-12-23 11:51:28 +01:00
Johnni Winther dd1a470dda No luck at status-bingo
Review-Url: https://codereview.chromium.org/2600503002 .
2016-12-22 15:27:52 +01:00
Johnni Winther f6b5361adb Support for Null as bottom in dart2js
Closes #28026

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2595363002 .
2016-12-22 15:01:33 +01:00
Kasper Lund 0efa6cfda0 Revert "Update status"
This reverts commit 5fdc195aa1 and follows
the revert of the dart2js support for null-as-bottom.

TBR'ed.

R=johnniwinter@google.com
BUG=

Review-Url: https://codereview.chromium.org/2592373002 .
2016-12-22 09:53:14 +01:00
Johnni Winther 5fdc195aa1 Update status
Review-Url: https://codereview.chromium.org/2594013002 .
2016-12-21 16:36:35 +01:00
Harry Terkelsen c78814326c Update jsshell to 50.0
R=sra@google.com

Review URL: https://codereview.chromium.org/2552123003 .
2016-12-06 16:58:15 -08:00
Ryan Macnak 1ebeb79942 Remove runtime 'dart_app' as it became identical to 'vm'.
Merge compiler 'dart2app' and 'dart2appjit' and rename to 'app_jit' since they came to mean the same thing.

Update status files to reflect these changes.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2541533004 .
2016-12-01 16:47:33 -08:00
William Hesse e2a48dbf38 Update status for failing tests
BUG=https://github.com/dart-lang/sdk/issues/27925
R=eernst@google.com

Review URL: https://codereview.chromium.org/2536183002 .
2016-11-29 14:26:27 +01:00
William Hesse 6f7005ee71 Update status for co19 tests on browsers.
BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2538443002 .
2016-11-28 16:32:41 +01:00
Lasse Reichstein Holst Nielsen 7957a1c256 Make EfficientLength extend Iterable.
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.

It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.

R=floitsch@google.com

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

Committed: b08fb1373f
2016-11-28 08:04:04 +01:00
William Hesse 4bfe727db6 Update status for Firefox 50
BUG=https://github.com/dart-lang/sdk/issues/27873
BUG=https://github.com/dart-lang/sdk/issues/27872
BUG=https://github.com/dart-lang/sdk/issues/27871
BUG=https://github.com/dart-lang/sdk/issues/27867
R=sortie@google.com

Review URL: https://codereview.chromium.org/2526493004 .
2016-11-23 09:49:01 +01:00
Vyacheslav Egorov 2403444eba VM: Optimize RegExp.matchAsPrefix(...) by generating a sticky RegExp specialization.
This is the same as a sticky RegExp flag in ES2015.

Overlay some RegExp fields on top of each other - given that they should never be used simultaneously.

BUG=http://dartbug.com/27810
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2510783002 .
2016-11-17 17:46:21 +01:00
John McCutchan 50b47360bd Update more status files for hot reload bots
BUG=

Review URL: https://codereview.chromium.org/2500343003 .
2016-11-15 07:34:03 -08:00
Ryan Macnak 3658a16e47 DBC: When calling DRT_OptimizeInvokedFunction, patch the stack to have a stub instead of the to-be-optimized function as the caller.
Fixes #27746

R=fschneider@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2473213002 .
2016-11-04 09:51:02 -07:00
Florian Schneider 6fa4a54bba DBC: Fix smi shl with large (>word-size) shift counts
Insert check to guard against large shift counts.

Integer shifts with shift counts greater or equal than the number
of bits per word are undefined behavior in C/C++.

Fixes #27474.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2474103003 .
2016-11-04 12:16:34 +01:00
Florian Schneider de6b131857 Temporarily skip flaky tests for DBC
BUG=#27746

Review URL: https://codereview.chromium.org/2477753002 .
2016-11-03 15:08:42 +01:00
Florian Schneider 44418359e0 DBC: Handle constants correctly in the optimizing backend
We don't always allocate a register for constants in optimized code. Instead
they are copied into registes as needed by parallel moves at the use site.

Fixes #27731.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2477653002 .
2016-11-03 12:24:05 +01:00
Ryan Macnak d8bb15f915 Mark failing DBC tests.
Issue #27731
Issue #27732
Issue #27733

R=zra@google.com

Review URL: https://codereview.chromium.org/2465253007 .
2016-11-02 15:28:57 -07:00
Ryan Macnak 6cf5c3baa3 Revert "Make EfficientLength extend Iterable."
This reverts commit b08fb1373f.

TBR=lrn@google.com

Review URL: https://codereview.chromium.org/2467283003 .
2016-11-02 13:20:41 -07:00
Lasse R.H. Nielsen b08fb1373f Make EfficientLength extend Iterable.
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.

It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2467113003 .
2016-11-02 14:05:35 +01:00
Florian Loitsch 6beb1fdd11 Change Set.difference API to accept Set<Object>.
Fixes #27573
BUG= http://dartbug.com/27573
R=lrn@google.com

Review URL: https://codereview.chromium.org/2413233002 .
2016-10-20 14:37:15 +02:00
Florian Schneider 6d66f3dea8 VM: Make optimized try-catch work in DBC.
The catch entry block has all locals in fixed locations
(Rj) where j = kNumberOfRegisters - i for parameter i.

This means we reserve a range of DBC registers at the top-end of the frame.
Those registers are blocked for general allocation to avoid any overlap
with the rest of the registers that are allocated from the bottom.

Each optimized frame with a try-catch will be kNumberOfRegisters wide.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2388093003 .
2016-10-13 11:36:23 -07:00
Florian Schneider 8a7dabe522 Temporarily update status for 2 tests on SIMDBC.
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2388363002 .
2016-10-04 09:25:44 -07:00
Lasse R.H. Nielsen 9bd4406d4b Fix bug in _SimpleUri.resolve.
In some cases it didn't follow our non-RFC behavior for resolving a relative
path on top of another relative path.

Fixes issue #27447
BUG= http://dartbug.com/27447
R=eernst@google.com

Review URL: https://codereview.chromium.org/2374253004 .
2016-09-29 15:00:42 +02:00
Sigmund Cherem fc0bf7a85b First set of test triage for fast-startup
Review URL: https://codereview.chromium.org/2285823002 .
2016-08-26 10:04:41 -07:00
Lasse R.H. Nielsen 99ec987a09 Remove deprecated Resource class from dart:core.
BUG=
R=floitsch@google.com, mit@google.com

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

Committed: f61143153a
Committed: 35437dda1f
2016-08-26 11:58:04 +02:00
Lasse Nielsen 35437dda1f Remove deprecated Resource class from dart:core.
BUG=
R=floitsch@google.com, mit@google.com

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

Committed: f61143153a
2016-08-26 10:50:58 +02:00
Lasse Nielsen f61143153a Remove deprecated Resource class from dart:core.
BUG=
R=floitsch@google.com, mit@google.com

Review URL: https://codereview.chromium.org/2272373002 .
2016-08-26 10:31:08 +02:00
Lasse R.H. Nielsen afbbbb97cf Reapply fast-URI patch.
Review URL: https://codereview.chromium.org/2245533004 .
2016-08-17 10:54:24 +02:00
Florian Schneider 021ebb2033 Correct and GC unrecognized flags from our tests.
Fix some misspelled flags.

Remove some non-existent flags.

Fix --short_socket_read and --short_socket_write flags used in IO tests.

Running with --ignore-unrecognized-flags is still on because some flags are only visible
in DEBUG mode.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2247733005 .
2016-08-15 18:28:11 -07:00
Lasse R.H. Nielsen 3502fd5fd7 Revert "Reapply fast-URI patch."
Seems to trigger VM bug.

Review URL: https://codereview.chromium.org/2225243003 .
2016-08-09 12:51:58 +02:00
Lasse R.H. Nielsen 99e94db85b Reapply fast-URI patch.
R=whesse@google.com

Review URL: https://codereview.chromium.org/2220373002 .
2016-08-09 09:38:47 +02:00
William Hesse ca49303576 Revert "Add fast-mode Uri class."
This reverts commit 00090a0c72.

Revert "Add fast-mode Uri class."

This reverts commit 323ca7e410.

Revert "Fix regression for the one case where we deliberately don't follow the RFC."

This reverts commit b39e048c4b.

Revert "Cache hashCode in Uri implementations to improve performance when used as, e.g., Map key."

This reverts commit a11ad27723.

BUG=https://github.com/dart-lang/sdk/issues/26917
TBR=keertip@google.com

Review URL: https://codereview.chromium.org/2167663002 .
2016-07-20 14:32:52 +02:00
Keerti Parthasarathy 69a8b11f67 Fix for uri replace whene uri has fragment. Was adding a second '#'.
BUG=
R=het@google.com

Review URL: https://codereview.chromium.org/2158933003 .
2016-07-18 16:31:43 -07:00
Stephen Adams 1eee3c7dc7 dart2js js_runtime: faster code for floor() & ceil()
Within the [-2^31, 2^31) range it is faster to truncate and correct at boundaries than call Math.ceil/Math.floor.

Each call to toInt() has been specialized to the calling operator (ceil, floor, ~/ etc).

This makes the conversion faster (values are already integral) and lets us put the name of the operation and original operands in conversion errors, e.g

(a / b).floor();  // b == 0
Unsupported operation: Infinity
-->
Unsupported operation: Infinity.floor()

a ~/ b;   // b == 0
Unsupported operation: Infinity
-->
Unsupported operation: Result of truncating division is Infinity: 132 ~/ 0

R=sigmund@google.com

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

Downside: an extra 400 bytes
2016-07-15 12:27:59 -07:00
Brian Wilkerson afd21330f7 Generalize the first argument in an assert to be an expression (issue 26865)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2140673004 .
2016-07-12 11:02:51 -07:00
John McCutchan ef71bc1834 Improve hot reload test mode
- [x] Start reloading even earlier.
- [x] Keep the value of FLAG_reload_every per-isolate (so spawned isolates reload eagerly too).
- [x] Adjust the reload every back off curve to be linear in the beginning.
- [x] Cap the reload every threshold at 1,000,000
- [x] Test status file updates.
- [x] Stop disabling the background compiler / OSR when running tests.
- [x] Skip multi tests with compilation errors when reloading.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2133823002 .
2016-07-11 12:29:13 -07:00
William Hesse c87a720c86 Update status for package_resource_test
BUG=https://github.com/dart-lang/sdk/issues/26842
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2131263002 .
2016-07-08 17:38:29 +02:00
Johnni Winther 4764bbc66f Update status for package_resource_test.
Review URL: https://codereview.chromium.org/2130373002 .
2016-07-08 16:18:41 +02:00
Ryan Macnak eb20b68e87 Add --hot-reload to the test harness.
./tools/build.py -mdebug,release runtime
./tools/test.py -mdebug,release --checked --hot-reload

BUG=http://dartbug.com/26809
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2114083002 .
2016-07-01 11:28:00 -07:00
Lasse R.H. Nielsen b39e048c4b Fix regression for the one case where we deliberately don't follow the RFC.
The new code didn't have that exception.

Also optimize some string operations when it's possible.

R=eernst@google.com

Review URL: https://codereview.chromium.org/2117453002 .
2016-06-30 14:52:23 +02:00
Lasse R.H. Nielsen 323ca7e410 Add fast-mode Uri class.
Optimize parser and make it recognize a class of URIs that don't need extra
handling: no escapes, no funny characters, already (nearly or completely)
normalized.
Have a class specifically for those URIs which retains the original
input string without having allocate any further strings.

R=floitsch@google.com

Committed: 00090a0c72

Review URL: https://codereview.chromium.org/2086613003 .
2016-06-30 13:25:36 +02:00
Lasse R.H. Nielsen 00090a0c72 Add fast-mode Uri class.
Optimize parser and make it recognize a class of URIs that don't need extra
handling: no escapes, no funny characters, already (nearly or completely)
normalized.
Have a class specifically for those URIs which retains the original
input string without having allocate any further strings.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2086613003.
2016-06-30 12:20:15 +02:00
Zach Anderson 22e449ba09 Fix Windows time zone name extraction. Update API docs
On Windows, the OS provides a full name for the time zone
rather than an abbreviation. Further the string may
contain non-ASCII characters, so a conversion is
necessary. This CL updates the API docs to match the
actual behavior, and fixes the string conversion problem.

fixes #17085

R=asiva@google.com

Review URL: https://codereview.chromium.org/2069783002 .
2016-06-14 13:51:19 -07:00
Todd Turnidge a7d46eb5a6 Canonicalize uris in C++ instead of Dart for the standalone embedder.
Adds Dart_DefaultCanonicalizeUrl() to the dart embedding api.

Motivation:

As we try to get source reloading working for the standalone embedder, things get simpler if an isolate doesn't run Dart code while it is loading Dart code.  We intend to solve this by moving the embedder tag handler calls to the service isolate.  But making a blocking rpc into the service isolate whenever a url needs to be canonicalized during parsing seems like it would slow things down and make things complicated.  By moving canonicalization into C++, we avoid this.

R=ahe@google.com, fschneider@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2011543002 .
2016-06-02 12:29:57 -07:00
Ryan Macnak ef8baa8760 Add test harness option for app snapshots with unoptimized code.
./tools/test.py -m all -c dart2appjit -r dart_app --use-blobs

Rename 'dart_product' runtime to 'dart_app'.

Rename Dart_PrecompiledJITSnapshotBlob to Dart_CreateAppJITSnapshot and add documentation.

Remove out-of-date scripts in tools/precompilation.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1992703005 .
2016-05-26 10:37:47 -07:00
Lasse R.H. Nielsen fbf64bb7a5 Make Iterable.toList more efficient if the length is known.
Add more tests. Fix (some) bugs found by tests.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/1999793002.
2016-05-23 10:00:19 +02:00
Lasse R.H. Nielsen 5d6e8bcda1 Make Iterable.generate use ListIterable as base implementation.
This makes it work the same as a List like the documentation claims.

Update documentation of Future.doWhile, and a few other documentation fixes.

BUG= http://dartbug.com/26358
BUG= http://dartbug.com/26462
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1992713002.
2016-05-18 13:52:10 +02:00
Greg Littlefield cd8124cdcf JS: Use direct function invocation when possible for calls with 4 or 5 args (#26268)
* Use direct function invocation when possible for calls with 4 or 5 args

* Add test for Function.apply called with 0-5 arguments
2016-05-13 10:13:46 -07:00
Florian Loitsch e19addf23e Make dart:collection strong-mode clean.
R=leafp@google.com

Review URL: https://codereview.chromium.org/1937103002 .
2016-05-11 16:28:43 +02:00
Stephen Adams 230824610f Split int_parse_radix_test into strong and non-strong parts.
R=vsm@google.com

Review URL: https://codereview.chromium.org/1950413002 .
2016-05-05 14:36:05 -07:00
Stephen Adams 8938f98fc1 Fix test to not reach out of current dir
This lets us use the same test for DDC

TBR=vsm@google.com

Review URL: https://codereview.chromium.org/1946973002 .
2016-05-03 21:38:24 -07:00
Florian Schneider bef7b117d6 Fix a test expectation that current year is >= 2011.
This causes test failures on devices where the date is set to earlier
than 2011.

BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/1942263002 .
2016-05-03 14:28:21 +02:00
Florian Loitsch b19e00c2d4 Fix Set.from which still had a generic type on the incoming Iterable.
Follow-up fix for http://dartbug.com/21731
Also see https://codereview.chromium.org/838463002/

R=lrn@google.com

Review URL: https://codereview.chromium.org/1887883006 .
2016-04-28 15:01:04 +02:00
Zachary Anderson 3d7202bad3 DBC: Adds simdbc64 target, adds arm64 arithmetic overflow logic
There were differences between linux gcc, android gcc,
MacOS clang, and 32 vs. 64-bit w.r.t the __builtin
functions for detecting arithmetic overflow. I couldn't get
them all working at the same time. Instead, I removed them,
and changed to always use the inline assembly. This works
in all the configurations above.

This change also adds a simdbc64 target for building simdbc
for 64-bit, and sets up the android targets. simdbc targets
arm, and simdbc64 targets arm64. You can build them with:

$ ./tools/build.py -m release -a simdbc{64} --os=android runtime

R=iposva@google.com

Review URL: https://codereview.chromium.org/1904153003 .
2016-04-25 12:48:34 -07:00
Florian Loitsch 84ec63e9fc Make dart:core strong-mode clean.
R=leafp@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/1895473004 .
2016-04-21 14:01:48 +02:00
Vyacheslav Egorov ee0f608ce4 Dart Byte Code interpreter.
This version is Clang/GCC only and does not support Windows because it uses computed goto's.

Only unoptimized mode is supported.

Architecture is described in constants_dbc.h and stack_frame_dbc.h.

R=fschneider@google.com, zra@google.com

Review URL: https://codereview.chromium.org/1858283002 .
2016-04-18 23:02:01 +02:00
Ryan Macnak 36d0cfced8 Triage some precompilation failures, mostly related to the service isolate no longer being started.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1855473002 .
2016-04-01 10:28:53 -07:00
Florian Schneider 15f23eedc9 VM: Fix --no-use-field-guards.
Fields read from the snapshot must be initialized in the same way
as when allocated with Field::New.

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

Review URL: https://codereview.chromium.org/1842853002 .
2016-03-29 17:40:58 -07:00
Sigmund Cherem c5ae911e4e Update status on safari tests that started passing after the update.
BUG=

Review URL: https://codereview.chromium.org/1843883002 .
2016-03-29 17:37:03 -07:00
Sigmund Cherem 76a77d8b42 Skip tests in cpsir+checked mode until it is implemented
TBR=sra@google.com

Review URL: https://codereview.chromium.org/1780843002 .
2016-03-09 17:21:49 -08:00
William Hesse f5d284ca9c Update status for a slow test and a crashing test.
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/1768193002 .
2016-03-07 17:59:16 +01:00
William Hesse 7f9e4b7456 Update status for dart2js --cps_ir --host_checked.
BUG=https://github.com/dart-lang/sdk/issues/25911
BUG=https://github.com/dart-lang/sdk/issues/24485
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1773523002 .
2016-03-07 11:35:11 +01:00
Ryan Macnak 167616b83e Skip mirror tests more generally for $mode == product instead of $runtime == dart_product.
Reduces failures in tools/test.py -mproduct.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1760043002 .
2016-03-03 10:06:59 -08:00
William Hesse 15f8618c1c Update status for dart2js host-checked mode tests.
BUG=https://github.com/dart-lang/sdk/issues/25911

Review URL: https://codereview.chromium.org/1760173002 .
2016-03-03 17:29:25 +01:00
Srdjan Mitrovic b3405d5ebc Add --no-background-compilation to tests that expect to run code in optimized form
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1759973002 .
2016-03-02 16:30:58 -08:00
Ryan Macnak 3fd5ffdbd4 Make tools/build.py -cprecompiler -rdart_precompiled green:
- Create a separate compilation output directory for each VMOptions varient so they can run in parallel.
- Run both the snapshotter and assembler from the test harness instead of a wrapper script so crashes in the snapshotter are correctly identified by the test harness.
- Delete the assembly source for the precompiled shared library as we go to limit space required to run the test suite (now 61GB for X64 release).
- Remove the VMOption --optimization-counter-threshold in when running precompilation tests.
- Don't look at a library prefix's import list during load(), it was removed by tree-shaking.
- Trace types of TypeParameters.
- Trace types of a Function's owner and parent.
- Update status file for remaining 4 failures under http://dartbug.com/25892.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1732323005 .
2016-03-01 15:19:11 -08:00
Ryan Macnak ad01f0fb41 Don't expand inline frames in stacktraces under noopt to match full precompiled behavior.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1748793002 .
2016-02-29 13:28:09 -08:00
Siva Annamalai 5c53e14d55 - Skip tests which use dart:mirrors in product mode
Review URL: https://codereview.chromium.org/1728663002 .
2016-02-24 18:13:20 -08:00
William Hesse bb6b9bda4a Remove unused builder-tag on mac builders.
BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org/1726583002 .
2016-02-23 11:18:11 +01:00
Siva Annamalai 809c205cae - Fix --run-fullsnapshot flag processing issue in non product mode.
- Adjust status files for product mode issues (Process.run, SpawnUri,
  test expecting line numbers)

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1720193002 .
2016-02-22 15:33:34 -08:00
William Hesse 270ad3f552 Remove ContentShellOnAndroid from status files
Dartium and content_shell are no longer built or tested on Android.
A separate issue is filed to remove support from the test scripts:
https://github.com/dart-lang/sdk/issues/25832

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org/1720813002 .
2016-02-22 10:20:22 +01:00
Kevin Millikin fc839c7139 Update dart2js CPS test expectations.
corelib/data_resource_test had an expectation of RuntimeError or Crash due
to overlapping test expectations.  It should not crash.

corelib/package_resource_test had the same expectation.  It should crash.

BUG=
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1709573003 .
2016-02-18 12:47:43 +01:00
Asger Feldthaus 3e5c643fb1 dart2js cps: Add flaky test to status file.
See issue 25795.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1705003002 .
2016-02-18 10:46:22 +01:00
Siva Annamalai 64a5845d19 Fix status files to account for dart_product runtime.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1688423002 .
2016-02-17 12:22:35 -08:00
Asger Feldthaus 1c698c183b dart2js cps: Fix inlining of stringify.
The rewrite Stringify(x) -> x.toString() is only safe when the toString
method is known to return a string.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1697373002 .
2016-02-17 10:57:58 +01:00
Asger Feldthaus 0d02f5ccca dart2js cps: Update status files.
BUG=

Review URL: https://codereview.chromium.org/1696323002 .
2016-02-16 11:03:58 +01:00
Kevin Millikin fd9603d1d2 dart2js CPS: implement special handling of the Symbol constructor.
There is a 'const' Symbol constructor that is not expressible as a Dart
const constructor because it performs validation of its input.  This is
implemented in the libraries by using a dummy const constructor definition
that does not validate its input and replacing calls to 'new Symbol' with
calls to 'new Symbol.validated' in the compiler.

Without replacing calls to 'new Symbol', the non-validating dummy
implementation will be used, which is not correct.

Closes #24878.

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

Review URL: https://codereview.chromium.org/1639313002 .
2016-01-28 08:55:35 +01:00
Stephen Adams 1673a64849 Add type info to JSArray.
JSArray<E>.typed has a specially generated body. We should be able to inline this. This makes all of the "new List.xxx()" paths work.

Literal lists are treated like maps - we generate a call to JSArray<E>.typed.  I need to change that to JSArray<E>.markGrowable.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/1642493002 .
2016-01-27 13:47:12 -08:00
Lasse R.H. Nielsen 75d1366dbd Use WeakMap to support Expando if available.
Retains the existing code as fallback for settings without WeakMap for now.

Fixes issue #5144

BUG= http://dartbug.com/5144
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1599393003 .
2016-01-25 12:06:06 +01:00
Stephen Adams 33ac12a5a4 Lower map literals to constructor or function calls in builder
Remove LiteralMap from cps_ir and tree_ir.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/1616143003 .
2016-01-21 19:32:13 -08:00
Stephen Adams 7d3b6b1827 Triage 3 cps_ir tests
TBR=sigmund@google.com

Review URL: https://codereview.chromium.org/1617973002 .
2016-01-21 10:56:47 -08:00
Lasse R.H. Nielsen f70bef4a2c Support the same parameter key more than once in Uri query parameters.
R=floitsch@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org/1520943002 .
2016-01-13 13:07:18 +01:00
Stephen Adams 4fc394c96d js_runtime: streamline stringReplaceAllUnchecked
Use a literal RegExp to avoid creating new uncompiled RegExp each time.

R=floitsch@google.com

Committed: be1b32207b

Reverted: 0d23ec2f7a

Review URL: https://codereview.chromium.org/1557673002 .
2016-01-05 13:37:20 -08:00
Stephen Adams 0d23ec2f7a Revert "js_runtime: streamline stringReplaceAllUnchecked"
I missed a use of the REGEXP in another file.
I will recommit with the REGEXP replaced with a function.

Review URL: https://codereview.chromium.org/1559953002 .
2016-01-04 09:29:29 -08:00
Stephen Adams be1b32207b js_runtime: streamline stringReplaceAllUnchecked
Use a literal RegExp to avoid creating new uncompiled RegExp each time.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/1557673002 .
2016-01-04 08:26:01 -08:00
Ryan Macnak 6b964b83ac Add ./tools/test.py -c precompiler -r dart_precompiled.
- Make --gen/run-precompiled-snapshot take a directory to use for the snapshot pieces.
 - Throw on Platform.executeable to prevent tests from becoming fork-bombs.
 - Update status files so 'dart_precompiled' is generally expected to behave the same as 'vm'.

Currently multitests will fail unless run with --jobs=1 because the test harness assigns them the same temporary directory.

Running this also requires a great deal of space. My out directory is 380G.

BUG=http://dartbug.com/24975
R=fschneider@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org/1507943002 .
2015-12-18 12:08:10 -08:00
William Hesse 6485590527 Remove old java-based analyzer from test scripts and status files
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1537653002 .
2015-12-17 14:44:57 +01:00
Ryan Macnak d71b98cfe7 Further triage --noopt failures.
- Explain slow bigint tests.
 - Note that deferred loading tests are failing for a valid reason.

BUG=http://dartbug.com/24676
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1531903002 .
2015-12-16 16:24:36 -08:00
Stephen Adams 5d74a7a958 Upgrade confuse() function in corelib tests
TBD=floitsch@google.com

Review URL: https://codereview.chromium.org/1513373002 .
2015-12-10 12:59:31 -08:00
Florian Loitsch c95b4e46ff Enable more DateTime tests on dart2js.
Review URL: https://codereview.chromium.org/1520613002 .
2015-12-10 19:49:30 +01:00
Lasse R.H. Nielsen fa025f3337 Make int_parse_radix_test run ~30% faster.
BUG= https://github.com/dart-lang/fletch/issues/46
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1510843002 .
2015-12-10 11:06:20 +01:00
Florian Loitsch 581392cf17 Fix datetime test.
R=lrn@google.com

Review URL: https://codereview.chromium.org/1511773003 .
2015-12-09 20:24:40 +01:00
Florian Loitsch db643f5ae2 Fix datetime test.
Review URL: https://codereview.chromium.org/1514483003 .
2015-12-09 02:57:05 +01:00
Florian Loitsch 6c84c42e67 Add microsecond support to DateTime.
R=iposva@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/1493033003 .
2015-12-09 00:46:46 +01:00
Lasse R.H. Nielsen 027b8dca39 Add StackTrace.current getter.
R=floitsch@google.com, iposva@google.com, sra@google.com

Review URL: https://codereview.chromium.org/1448003002.
2015-11-24 08:26:03 +01:00
Karl Klose b0b841d976 corelib: Do not print value in ArgumentError.notNull
R=lrn@google.com

Review URL: https://codereview.chromium.org/1460903003 .
2015-11-23 12:25:58 +01:00
Lasse R.H. Nielsen 50aa43569d Add "growable" parameter to List.filled constructor.
Fixes issue #24884
BUG= http://dartbug.com/24884
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1440663003 .
2015-11-13 09:30:46 +01:00
Lasse R.H. Nielsen ed0b187d58 Add data-URI support class to dart:core (next to Uri).
R=floitsch@google.com, fschneider@google.com

Committed: bbc66c2c41

Review URL: https://codereview.chromium.org/1381033002 .
2015-11-12 13:02:20 +01:00
William Hesse df5ef1b136 Revert "Add data-URI support class to dart:core (next to Uri)."
This reverts commit bbc66c2c41.

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org/1432203002 .
2015-11-11 11:42:04 +01:00
Kevin Millikin d20d3f6419 dart2js CPS: Triage an issue in the corelib tests.
R=asgerf@google.com
BUG=https://github.com/dart-lang/sdk/issues/24878

Review URL: https://codereview.chromium.org/1434933002 .
2015-11-11 11:32:49 +01:00
Lasse R.H. Nielsen bbc66c2c41 Add data-URI support class to dart:core (next to Uri).
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1381033002 .
2015-11-11 10:27:08 +01:00
Ryan Macnak 371a5dc932 Get tools/test.py --noopt green.
More specifically ./tools/test.py --noopt -mall -ax64,simarm,simarm64,simmips --exclude-suite=pkg

 - Add missing dart:io entry point.
 - Add checks that Dart_FinalizeLoading, Dart_Precompile, Dart_CreatePrecompiledSnapshot are called in order.
 - Add checks for --precompilation flag.
 - Add checks for dropped class in Dart_New/Allocate/AllocateWithNativeFields.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1407393005 .
2015-10-21 10:35:01 -07:00
Lasse R.H. Nielsen a8e3eb4e10 Fix bug in Uri.removeFragment.
It used the external getters for the existing port and query, which
are non-null even when the port or query are absent. This introduced
a new default-valued/empty part.

Also reordered declarations to have fields > constructors > rest.

Fixes issue #24593
BUG= http://dartbug.com/24593
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1396973004.
2015-10-15 12:42:36 +02:00
Asger Feldthaus a50105543f dart2js cps: Add a pass for eliminating bounds checks.
The analysis uses a watered-down octagon domain which reduces range
analysis to a graph problem.

There are more ideas to try out to improve on this, but I think this is
a nice baseline to work from.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1353443002 .
2015-10-13 16:40:54 +02:00
Asger Feldthaus f1a40e23c1 dart2js cps: Status updates and minor fixes for host checked mode.
CPS should now run the test suite cleanly in host-checked mode. Let's keep it that way.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1377323003 .
2015-10-02 15:36:21 +02:00
Lasse R.H. Nielsen 4e94938f7e Fix some cases where Map.containsValue did not accept Object as argument.
Add tests.
Also remove a left-over check in SplayTreeMap.

BUG= https://github.com/dart-lang/dev_compiler/issues/344
R=wibling@google.com

Review URL: https://codereview.chromium.org//1360053003 .
2015-09-23 11:26:55 +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
Karl Klose d9caf4a725 Move cps-ir section to the end of the file and update test expectations.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1312583008 .
2015-09-07 15:37:39 +02:00
Mads Ager 7ae093a3b8 Split double_parse_test into more multitests.
The 03 multitest cases are the ones that fail on arm using the
system strtod. Separating them out makes it easier to do suppresions
of only the parts of the tests that fail in a given configuration.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1312903010 .
2015-09-01 16:27:01 +02:00
Mads Ager bb25ca8215 Update jsshell expectations for double parsing now that the problematic cases are separated out.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1313333003 .
2015-09-01 12:09:17 +02:00
Mads Ager bb8ca393e1 Split two string to double corner cases into a separate multitest.
When using a simpler version of the doubleconversion library that
uses the system strtod to parse strings these cases fail on MacOS.
Splitting them out allows us to mark only these corner cases as
failing on MacOS.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1312893007 .
2015-09-01 10:20:04 +02:00
Asger Feldthaus 0216e21efc dart2js cps: Use 'this' instead of receiver-arg when possible.
This fixes a bug in how intercepted super calls were handled,
and enables the redundant receiver optimization.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1312393002 .
2015-08-26 16:06:41 +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
Karl Klose 6820b95c1c dart2js cps: update test expectations.
TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1303333003 .
2015-08-24 10:59:15 +02:00
Asger Feldthaus 689ea4f24a dart2js: Update status files.
dart2js/http_test passes when run in isolation, but always times out
on my machine when run in a large batch. I marked it as slow in
unchecked mode (was already marked as slow in checked mode).

Some timeouts that were fixed in dart2js cps but somehow were added to
the status file again.

Some tests in corelib fail in CPS.

BUG=

Review URL: https://codereview.chromium.org//1292223003 .
2015-08-18 10:35:47 +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
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
Lasse R.H. Nielsen 8301c6e7b2 Don't expect analyzer to fail resource tests.
Also make package have `publish_to:"none"` on pubspec.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1286713002 .
2015-08-11 11:35:36 +02:00
Lasse R.H. Nielsen c26095b1b3 Add resource tests.
R=sgjesse@google.com, whesse@google.com

Review URL: https://codereview.chromium.org//1276263002 .
2015-08-11 10:07:10 +02:00
Karl Klose 7eb3bb82b7 dart2js cps: update test expectations for new tests.
TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1280603003 .
2015-08-07 08:36:47 +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
Asger Feldthaus 7d8067135c dart2js cps: Support 'on T' clauses without a 'catch'.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1247333003.
2015-07-23 12:39:10 +02:00
Karl Klose 1b7053bcf6 dart2js cps: Use CPS IR for patched functions and typed data.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1241303003 .
2015-07-22 13:07:35 +02: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
Karl Klose 04dacd24f4 Remove functions white-listed for use of try-finally and switch, add JS_SET_CURRENT_ISOLATE.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1237573002 .
2015-07-14 10:26:38 +02:00
Karl Klose 3fe9309c96 dart2js cps: Implement compilation of redirecting factory constructors for reflection.
Without reflection, redirecting factory constructor invocations are shortcut at the instantiation site.  With reflection, code like
  reflectClass(Foo).newInstance(const Symbol(''), [])
can hit a redirecting factory constructor and we need to emit a function that does the redirection and type substitution.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1227873004 .
2015-07-09 14:54:23 +02:00
Karl Klose 71e2bec0a5 dart2js cps: Support JS_CURRENT_ISOLATE.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1222913003 .
2015-07-07 15:55:13 +02:00
Lasse R.H. Nielsen 469d541f31 Don't expect 0.gcd(0) to throw in bigint test.
Review URL: https://codereview.chromium.org//1224643003.
2015-07-07 11:11:42 +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
Asger Feldthaus 61f47e7384 dart2js cps: Ensure JSArray is emitted when we see a type cast.
This is a workaround to resolve an issue that is affecting a lot
of tests.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1214123003.
2015-07-03 14:32:01 +02: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
Asger Feldthaus 34302b1320 dart2js cps: Translate synthesized mixin constructors.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1216593002.
2015-06-29 15:28:40 +02:00
Asger Feldthaus ec55d46148 dart2js cps: Fix translation of local constants.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1211393003.
2015-06-29 14:32:49 +02:00
Lasse R.H. Nielsen 3a0edfba72 Add tests for gcd, modInverse and modPow that also run on dart2js.
R=regis@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1205363003.
2015-06-26 11:05:11 +02:00
Asger Feldthaus fceb7f00dc dart2js cps: Handle checks against mutable and extendable lists.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1206873003.
2015-06-25 15:03:00 +02:00
Kevin Millikin 089ed2965b Implement try/finally by inlining the finally code.
Try/finally is implemented by inlining.  There is a try/catch to catch
exceptions in the try block.  The catch body contains the finally code
followed by a rethrow.  The code for finally is translated again after the
normal exit of the try block.  Break, continue, and return exits in the try
block have the finally code inlined just before the exit is taken.

Try/catch/finally is not yet supported, it requires some changes to the
assigned variables analysis.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1201983002.
2015-06-24 10:12:42 +02:00
Srdjan Mitrovic 28594e455d Disable guessing 'other' cid; this prevents an issue in range analysis. It is not clear if guessing the 'other' cid optimization is the right thing to do as it may bring the flow graph in an unexpected state
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1203773002.
2015-06-23 13:23:02 -07:00
Srdjan Mitrovic e91b99b66d Fix crash in modPow (issue 23693); various bigint knowledge missing.
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1197263002.
2015-06-22 15:11:36 -07:00
Ivan Posva d0d5185550 - Status file tuning.
BUG=

Review URL: https://codereview.chromium.org//1199593004.
2015-06-22 12:47:18 -07:00
Ivan Posva d9da805f07 - Split big integer tests into pieces.
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1198993003.
2015-06-22 12:22:14 -07:00
Srdjan Mitrovic aa8ea6da27 Enable TryCreateICData optimization, disable crashing test in status file
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1198333004.
2015-06-22 10:58:51 -07:00
Kevin Millikin bf595224d5 Implement simple switch statements as nested if/else.
Simple switch statements that do not have continue to labeled cases
are compiled into a chain if/else comparisons.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1191193005.
2015-06-22 11:29:31 +02: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
Karl Klose 3f46181244 cps-ir: Support foreign code.
R=kmillikin@google.com

Committed: a120ee7c90

Reverted: 40ed0daaaf

Review URL: https://codereview.chromium.org//1185633003.
2015-06-19 13:44:58 +02:00
Karl Klose 40ed0daaaf Revert "cps-ir: Support foreign code."
This reverts commit a120ee7c90.

TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1196443002.
2015-06-18 13:37:52 +02:00
Karl Klose a120ee7c90 cps-ir: Support foreign code.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1185633003.
2015-06-18 13:09:50 +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
Karl Klose a842f6dff2 Update dart2js-cps_ir test expectations.
TBR=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1188183006.
2015-06-17 09:41:50 +02:00
Karl Klose bb45376735 Update dart2js-cps_ir status files.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1191433002.
2015-06-15 12:50:58 +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 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 6cffe227fe Update dart2js-cps_ir test expectations after bac7481d3d.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1171773004.
2015-06-09 15:12:18 +02:00
Asger Feldthaus d01d394af7 dart2js cps: Type casts and related changes to type propagation.
We now optimize type casts that always fail or always pass.
Type propagation has been refactored a bit to make this work.

A new IR node Unreachable has been added. This is an node that is known
to be unreachable and is ultimately compiled to an empty statement.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1153603006
2015-06-08 17:02:47 +02:00
Srdjan Mitrovic c0824e7725 Fix 23563: double unary- operator unstable for NANs
BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org//1160453003
2015-06-03 11:00:28 -07:00
Johnni Winther 411246ccc7 Handle .fromEnvironment and incompatible constructor invocations
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1161823004
2015-06-02 10:44:19 +02:00
Asger Feldthaus bd4e1d726f dart2js cps: Track underlying value of interceptors in type propagation.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1154173002
2015-06-01 11:19:36 +02: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
Karl Klose 993338408e cps_ir: Handle malformed type arguments and type checks.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1156373008
2015-05-29 09:53:35 +02:00
Asger Feldthaus f1bbc3bb2d dart2js cps: 'is' checks on types with type arguments.
R=karlklose@google.com

Committed: 00c33fb134

Reverted: f0c4e31174

Review URL: https://codereview.chromium.org//1161683002
2015-05-27 14:14:07 +02:00
Asger Feldthaus f0c4e31174 Revert "dart2js cps: 'is' checks on types with type arguments."
This reverts commit 00c33fb134.

TBR=karlklose@google.com

BUG=

Review URL: https://codereview.chromium.org//1161793002
2015-05-27 13:54:07 +02:00
Asger Feldthaus 00c33fb134 dart2js cps: 'is' checks on types with type arguments.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1161683002
2015-05-27 13:45:39 +02:00
Asger Feldthaus f42a0ef25c dart2js cps: Always use interceptors and type tags for 'is' checks.
"x is Foo" will become getInterceptor(x).$isFoo

Testing against a type with type arguments is still a giveup().

This test always works, but is not very fast. For instance, testing
against an int should be "typeof x === 'number' && Math.floor(x) === x".

Following an offline discussion with Karl, the plan is to rewrite
'is'-checks to more fine-grained tests in a CPS optimization pass,
probably the type propagator.

Concretely, we plan to introduce IR nodes like TypeOfTest, FloorTest,
InstanceofTest, etc, which optimization phases can introduce under the
right circumstances. That way, the code generation phase remains simple.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1144163004
2015-05-26 17:50:48 +02:00
Karl Klose bd612bbec3 cps-ir: Add test suppressions for new tests.
TBR=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1156673002
2015-05-22 12:43:19 +02: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
Karl Klose 36d3e0d0e6 Update cps-ir test expectations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1152133003
2015-05-22 09:58:58 +02:00
Asger Feldthaus ccee558a5b dart2js cps: Access to lazily initialized fields.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1136843006
2015-05-19 10:05:09 +02: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
karlklose@google.com 9b32c9e673 Implement raw list checks.
R=asgerf@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45762 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 11:58:45 +00:00
asgerf@google.com f5f1eb643d dart2js cps: Introduce GetStatic/SetStatic.
The GetStatic is used for reading static fields and tearing off
static methods.

Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.

BUG=
R=karlklose@google.com

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

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45738 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 14:19:40 +00:00
asgerf@google.com 961c805398 Revert "dart2js cps: Introduce GetStatic/SetStatic."
This reverts commit 28e4518df87c72cb8e23fe6d73b7750ad0f2183a.

TBR=karlklose@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45737 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:53:15 +00:00
asgerf@google.com 2c90643171 dart2js cps: Introduce GetStatic/SetStatic.
The GetStatic is used for reading static fields and tearing off
static methods.

Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.

BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45735 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:35:49 +00:00
karlklose@google.com a31ba4242c Adjust test expectations for dart2js_cps-ir.
TBR=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45705 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 18:33:14 +00:00
floitsch@google.com f4a1b28077 Move isolate tests to lib/isolate.
Moves most tests that require dart:isolate to the isolate-directory in the tests section.

Also enables the string_from_environment_default_value_test which didn't have "_test" in its name.

R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45701 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 17:59:51 +00:00
karlklose@google.com 0eaa4d4717 cps-ir: Support compilation of methods that use interceptor calling convention.
This is a modified version of sra@'s CL https://codereview.chromium.org/1020243002/ with kmillikin@'s comments addressed.

R=sigurdm@google.com, kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45680 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 12:38:14 +00:00
kmillikin@google.com 6ab3c55366 Fix an assertion failure in dart2js.
In the CPS translation we assert that a mutable variable added to the CPS
term belongs to the function currently being compiled, which is reasonable.
However, in the JS backend this didn't work as written.  The variable
element can report that it belongs to a Dart function, and the function
currently being compiled can be a synthesized .call method of a closure
class representing that Dart function.

The solution presented here is to plumb the mapping from Dart function to
closure class .call methods through to where the mutable variables are
created.  It might be better, but a lot more complicated, to make the
variable elements able to correctly report their owner after closure
conversion.

R=asgerf@google.com, karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45636 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:58:00 +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 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 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
karlklose@google.com e8fa15c30a Update dart2js-cps_ir test expectations.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45371 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 08:40:49 +00:00
johnniwinther@google.com 19c838f3eb Fix dart2dart new backend status.
BUG=
R=karlklose@google.com

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

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45334 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 10:48:22 +00:00
lrn@google.com b4d052c5da Fix bug in DateTime.parse.
Used unescaepd "." to match "." in RegExp.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45274 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-20 10:27:24 +00:00
karlklose@google.com 7dd2608820 Adjust test expectations for dart2js-cps-ir.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45236 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 11:45:51 +00:00
kmillikin@google.com 00e4ba52ea CPS implementation of throw and rethrow.
Throw and rethrow are implemented as CPS expressions in tail position.

The CPS translation assumes that all expressions translate to a primitive
that is the value of the expression, and throw is an expression in Dart.
For simplicity of the translation, a non-tail throw Primitive is sometimes
used as a placeholder during the translation and removed immediately
afterward.

Both throw and rethrow are represented in the Tree IR.  In the Dart backend,
throw translates to throw and rethrow translates to rethrow.  In the JS
backend, throw translates to JS throw of a wrapped value.  Rethrow is not
currently implemented for the JS backend, it bails out of the compiler.

R=asgerf@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45235 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 11:15:45 +00:00
lrn@google.com a412878666 Fix typo in test, add check of error thrown.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45233 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 10:55:30 +00:00
lrn@google.com d8dbb4a60f Add Uri.directory constructor.
Make Directory.uri getter use the new constructor.
This also fixes that the uri getter doesn't work correctly on Windows.

Add uri getter on file system entity.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45227 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 08:56:03 +00:00
sra@google.com 39dfecbfb5 Revert "Change ListIterator to only check for concurrent modification at each iteration"
Revert "Fix ListIterator.iterator function hash for VM."

This is not as easy to optimize for dart2js as initially thought.
Revert this change while we discuss.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45216 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 18:53:39 +00:00
lrn@google.com 5a79c03e09 Change ListIterator to only check for concurrent modification at each iteration
in checked mode.

It also checks at the end in all cases.

Iteration only goes from 0 to the original length of the list.
This ensures that iterating a list while adding to it (like by x.addAll(x))
is caught instead of growing until out-of-memory.
For well-behaved programs this makes no difference since length and original
length stay the same.
Also, it means that calling moveNext again later, after increasing the length,
will not make iteration continue. After returning false, iteration is always
done.
However, it means that reducing the length causes an out-of-range read before
reaching the end, and before a concurrent modification error can happen.

R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45198 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 09:07:58 +00:00
sra@google.com 6467b4302d dart2js implementation of StringBuffer.writeAll that optimizes better.
Sometimes we can avoid the StringBuffer object:

    t1 = new P.StringBuffer(leftDelimiter);
    t1.writeAll$2(parts, ", ");
    t1 = t1._contents += rightDelimiter;
    return t1.charCodeAt(0) == 0 ? t1 : t1;
-->
    t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter;
    return t1.charCodeAt(0) == 0 ? t1 : t1;

Also updated tests with missing cases.

R=lrn@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45188 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 23:13:29 +00:00
sra@google.com 18dd1aa826 Revert "dart2js implementation of StringBuffer.writeAll that optimizes better."
StringBuffer.writeAll is expected by pub tests to not be patched or inlined.  I'll fix that and redo.

TBR=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45186 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 22:55:05 +00:00
sra@google.com 54718dc6e2 dart2js implementation of StringBuffer.writeAll that optimizes better.
Sometimes we can avoid the StringBuffer object:

    t1 = new P.StringBuffer(leftDelimiter);
    t1.writeAll$2(parts, ", ");
    t1 = t1._contents += rightDelimiter;
    return t1.charCodeAt(0) == 0 ? t1 : t1;
-->
    t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter;
    return t1.charCodeAt(0) == 0 ? t1 : t1;

Also updated tests with missing cases.

R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45184 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 22:02:05 +00:00
zra@google.com 86bfd7cb30 Adds a simarmv5te build and test target.
Also:
- Removes command line flags to choose simulated arm version.
  I think we should use build targets instead, like in this change,
  to make building and testing more obvious.
- Skips pkg tests on all simulators.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45181 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 20:44:43 +00:00
lrn@google.com 5cbb84dfa2 Add normalizePath to Uri class.
The algorithm for removing '.' and '..' from a path is only available through the [resolve] method.
This change makes it available directly as a function on a Uri, returning a new Uri if necessary.
The current workaround is to do:
  var normalizedUri = new Uri().resolveUri(originalUri);

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45163 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 11:56:35 +00:00
karlklose@google.com d839c64766 Establish test expectations for dart2js running with the CPS based backend.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45162 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 11:44:02 +00:00
lrn@google.com 68dd6f6338 Add StackTrace.fromString constructor.
Remove _RemoteStackTrace from dart:isolate and use the new version instead.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45088 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 09:17:13 +00:00
lrn@google.com 83376079f6 Add start/end to Uri.parse, allowing you to parse a substring without creating a new String object.
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44993 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-09 08:01:15 +00:00
lrn@google.com 2da1a00f3d Clean up apply2-test.
It was quite unreadable.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44679 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 07:01:46 +00:00
herhut@google.com 0ad152ebac Fix implementation of Function.apply with optional positional arguments.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44666 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 14:17:10 +00:00
lrn@google.com f80cfe1401 Fix DoubleLinkedQueue so that appending to entries also update the queue length.
The extra non-queue features of this class are probably unnecessary, and are not proper naming (some functions should be getters).

Keeping unchanged for backwards compatibility, but it should probably either be removed or be suitably updated for 2.0.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44451 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 09:40:57 +00:00
sra@google.com 31993af4bf There was a weird dead expression that should have been used but was not, letting all upper case letters be 'accepted' for any radix over 10. The result was NaN values flowing into the program.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44304 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 21:34:02 +00:00
koda@google.com 784c1e4f88 Replace Linked{Identity,Custom}Hash{Map,Set} with compact implementation; remove old code and flag.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44294 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 15:13:01 +00:00
herhut@google.com f19447b972 Fix status files after jsshell update.
BUG=
R=floitsch@google.com
TBR=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44289 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 13:40:51 +00:00
karlklose@google.com 3b5acff24d Change test to detect checked mode.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44167 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 13:25:10 +00:00
karlklose@google.com a3b20b5cbe Mark corelib/hash_set_type_check_test as failing on except the VM.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44165 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 12:31:54 +00:00
koda@google.com 6add62d1b0 Correct typing of LinkedHashSet.add. Add unit test.
BUG=dart:22605
R=skybrian@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44155 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 00:44:31 +00:00
lrn@google.com 20653fc1fb Add String.replaceRange and use it in replaceFirst{,Mapped}.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44022 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 12:17:27 +00:00
lrn@google.com 385d753c7a Fix bug in RangeError.value. Add tests.
BUG= http://dartbug.com/22505
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43990 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 14:16:54 +00:00