Commit Graph

5559 Commits

Author SHA1 Message Date
Stephen Adams a23c0c2fb5 Triage a few cps-ir failures
Added similar tests that don't rely on instances of List<T> carrying T.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1575273002 .
2016-01-11 18:51:57 -08:00
Asger Feldthaus e876b9aba9 dart2js cps: Update status files.
BUG=

Review URL: https://codereview.chromium.org/1563183005 .
2016-01-07 12:07:25 -08:00
Florian Loitsch e0fe0c0ed8 Add support for configuration-specific imports to the VM.
R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org/1380383002 .
2016-01-06 20:16:09 +01:00
Sigmund Cherem e2623f1aea cpsir: add support for deferred code
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1558353002 .
2016-01-06 10:24:52 -08:00
Florian Schneider e9968ca5ff Fix VM bug with try-catch inside of try-finally.
There were two exception handlers with the same index added to the code so that only the one added
last was executed. In case of an exception that means that a re-throw may be omitted, causing invalid
control flow.

Also, add assertion to ensure unique try-index for exception handlers.

BUG=#25333
R=hausner@google.com

Review URL: https://codereview.chromium.org/1569523002 .
2016-01-06 18:50:53 +01:00
Matthias Hausner 11a101a325 Canonicalize expressions that may be used as constants
Evaluate and canonicalize the parameters to the built-in function
identical(a,b) if they are strings. This guarantees that
identical(“ab”, “a”+”b”) evaluates to true.

Note: when the parser parses “a”+”b”, it doesn’t know whether the
expression will be used in a context that may require a
constant value. The canonicalization is thus deferred until it is
known that it is required.

BUG=25024
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1558033002 .
2016-01-05 08:51:52 -08:00
Kevin Millikin 044b283a3c dart2js: Initial implementation of inlining.
Perform a depth-first postorder traversal of the call graph of known
functions.  Make an inlining decision based on the vector of argument
types at the call site, and cache inlining decisions.  For positive
inlining decisions, cache the optimized function body specialized to
the receiver and argument types at the call site.

Future work:
  * Real inlining heuristics.
  * Propagate result types of inlined calls.
  * Specialized for constant arguments when it makes sense.
  * Performance improvements.

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

Committed: https://github.com/dart-lang/sdk/commit/d63053fea8731d2fb380022c1c3d296489d1c017

Review URL: https://codereview.chromium.org/1537663002 .
2015-12-23 10:12:19 +01:00
Kevin Millikin 75eb350abc Revert "dart2js: Initial implementation of inlining."
This reverts commit d63053fea8.

Reverted due to test failures for compiler expected output.  Those tests
need to be rebaselined to reflect the effects of inlining.

TBR=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/1542003003 .
2015-12-22 13:48:36 +01:00
Kevin Millikin d63053fea8 dart2js: Initial implementation of inlining.
Perform a depth-first postorder traversal of the call graph of known
functions.  Make an inlining decision based on the vector of argument
types at the call site, and cache inlining decisions.  For positive
inlining decisions, cache the optimized function body specialized to
the receiver and argument types at the call site.

Future work:
  * Real inlining heuristics.
  * Propagate result types of inlined calls.
  * Specialized for constant arguments when it makes sense.
  * Performance improvements.

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

Review URL: https://codereview.chromium.org/1537663002 .
2015-12-22 12:50:23 +01:00
Matthias Hausner f51f96816d Move super initializer to end of list.
Introduce --warn_super flag to print a warning when a super call is found that is not at the end of the initializer list.

Mark failing tests as Fail, OK.

In a later step, we can eliminate the implicit 'phase' parameter in constructors.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1540673002 .
2015-12-18 15:37:07 -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
Matthias Hausner 8293e9665b Fix owner of mixin forwarding constructors
Not sure why the new test appears to be a change to existing files, rather than an new files. I'm too dumb for git.

BUG=25246
R=regis@google.com

Review URL: https://codereview.chromium.org/1533823004 .
2015-12-17 14:16:40 -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
Florian Loitsch 1ffc230bf0 Update status file.
Review URL: https://codereview.chromium.org/1520703004 .
2015-12-11 09:47:52 +01:00
Florian Loitsch be8c141e75 Dartium and the VM don't report the same error.
Just fail instead of specifying compile/runtime error.

Review URL: https://codereview.chromium.org/1518753004 .
2015-12-11 07:36:59 +01:00
Florian Loitsch af4983c6b2 dart2js: add support for configuration-specific imports.
R=johnniwinther@google.com, rnystrom@google.com

Committed: https://github.com/dart-lang/sdk/commit/64edfaf21af3153f32e1229dd97c9b3d40cbfb2b
Reverted: https://github.com/dart-lang/sdk/commit/f38b810d334900317ee6c919b45ebd0c673fdb02

Review URL: https://codereview.chromium.org/1388523002 .
2015-12-11 06:17:15 +01:00
Florian Loitsch f38b810d33 Revert "dart2js: add support for configuration-specific imports."
This reverts commit 64edfaf21a.

Review URL: https://codereview.chromium.org/1517013003 .
2015-12-11 00:49:38 +01:00
Florian Loitsch 64edfaf21a dart2js: add support for configuration-specific imports.
R=johnniwinther@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org/1388523002 .
2015-12-11 00:25:01 +01:00
Ryan Macnak 5111482ab9 Fix stack overflow check in InvokeClosure.
Isolate::saved_stack_limit() answers the limit of the Dart stack, which
is different from the C stack when using the simulators. Since we are
recursing in C, we want to check against the C stack's limit.

This overflow check is only needed to support --no-lazy-dispatchers,
which is part of precompilation.

BUG=http://dartbug.com/24659
R=regis@google.com

Review URL: https://codereview.chromium.org/1513993004 .
2015-12-10 14:06:19 -08:00
Sigmund Cherem 18299203bb Update issue number
Review URL: https://codereview.chromium.org/1518873002 .
2015-12-10 12:51:06 -08:00
Johnni Winther 8e467be6b0 Add missing compile-time errors for async/await.
Closes #22324
Closes #23716

R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1504403005.
2015-12-10 11:24:09 +01:00
Stephen Adams e78c269603 Use annotations on confuse() in null_test
Verified no material code changes.

TBR=floitsch@google.com

Review URL: https://codereview.chromium.org/1511293003 .
2015-12-09 13:38:47 -08:00
Stephen Adams 947d4db5fc Change confuse() for range_analysis3_test to return non-null int
The change was not material, but now main() is identical to before.

TBR=floitsch@google.com

Review URL: https://codereview.chromium.org/1504333005 .
2015-12-09 12:51:27 -08:00
Stephen Adams efba1086d7 Update confuse() on syncstar_less_than_test
Verified essential generated code is the same.

TBR=floitsch@google.com

Review URL: https://codereview.chromium.org/1516673002 .
2015-12-09 12:40:48 -08:00
Stephen Adams ec5e0c3d29 Use annotations on confuse() functions
TBR=-floitsch@google.com

Review URL: https://codereview.chromium.org/1518553002 .
2015-12-09 12:30:01 -08:00
Kevin Millikin 42809b52b1 dart2js: Fix an issue with erroneous for-in.
In the CPS backend, when a for-in loop has an erroneous variable (interpreted
as an unresolved static setter), then we should call NoSuchMethod and not try
to call the setter.  This is what the SSA backend does.

BUG=
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1518473002 .
2015-12-09 18:33:27 +01:00
Johnni Winther a48dbfefd8 Static/instance getter/setter override is a warning.
Closes #11496

R=karlklose@google.com

Review URL: https://codereview.chromium.org/1508343002.
2015-12-09 11:57:20 +01:00
Johnni Winther 116a96bea5 Disallow const getters.
Closes #8750

R=karlklose@google.com

Review URL: https://codereview.chromium.org/1512573002.
2015-12-09 10:46:04 +01:00
Regis Crelier baab9fe07e The newly added regression test may actually not crash under dart2js.
Review URL: https://codereview.chromium.org/1507933005 .
2015-12-08 15:55:56 -08:00
Regis Crelier 173c1aed51 Improve upper bound finalization in VM and fix #25122.
Add regression test.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1513493002 .
2015-12-08 14:38:27 -08:00
Johnni Winther c9a1e1c1b1 Update analyzer status.
BUG=

Review URL: https://codereview.chromium.org/1510753003.
2015-12-08 12:00:07 +01:00
Johnni Winther 73d269ad1f Handle const loop variable.
Closes #9824

R=karlklose@google.com

Review URL: https://codereview.chromium.org/1503063002.
2015-12-08 11:30:00 +01:00
Alan Knight e4f1784690 Update more Chrome 47 test statuses
BUG=

Review URL: https://codereview.chromium.org/1509703003 .
2015-12-07 14:05:35 -08:00
Florian Schneider 2b7ff6dfab Fix test by removing the --noopt flag from the test file.
Not all platforms (ia32) support --noopt, and test.py --noopt will run the test
with this option anyway.

TBR=rmacnak@google.com

BUG=

Review URL: https://codereview.chromium.org/1497213002 .
2015-12-04 13:08:14 +01:00
Florian Schneider eee0e6d8c3 Fix optimizations on static fields in precompiled code.
Don't perform LICM / or load elimination of static fields in precompiled
code since they may not be initialized and we don't record an explicit
dependency between the initialization and the load of a static field.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1497783002 .
2015-12-04 12:42:39 +01:00
Sigmund Cherem 346e0da5db Fix status files: this marks a new test with the correct expectations for
analyzer, and it adds a temporary suppression for a co19 test (tracked in issue
25111).

Review URL: https://codereview.chromium.org/1494383002 .
2015-12-03 18:19:50 -08:00
Sigmund Cherem 9b75b248ad AbstractClassInstantiationError beats NoSuchMethodError
When both errors are determined at compile time,
AbstractClassInstantiationError must win.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1499793002 .
2015-12-03 16:56:26 -08:00
Florian Schneider 94fcce2b0c Fix analyzer warning in a unit test.
Add initializer for a final field.

TBR=rmacnak@google.com

BUG=

Review URL: https://codereview.chromium.org/1494233003 .
2015-12-03 21:45:00 +01:00
Florian Schneider dff13bef8d VM: Fix bug in type propagation at conditionals.
Propagating type/cid at conditional branches is not possible because
it may cause invalid code motion.

For this to be safe we need to explicitly represent the dependency
between checks eliminated in a branch and the condition that constrains the type/cid.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1491373005 .
2015-12-03 21:14:35 +01:00
Asger Feldthaus f77a6815c6 dart2js cps: Clean up and avoid processing unreachable code.
Primitives now have a getter 'hasValue' to distinguish primitives that
don't return a value, such as SetField.

The interceptor for TypeTestViaFlag is now inserted on-demand.

Non-instantiated intercepted classes are removed the set of
intercepted classes. This avoids an assertion failure, although it
would be better to avoid adding them in the first place.

The type of closure fields for boxes and type variables no longer go
through the global type inference.

A test fails because the type inference infers an empty type for a
closure field for a torn-off `.call` method. It's an existing problem
that we now have at least one failing test for.

CreateFunction has been removed from CPS and Tree.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1474713002 .
2015-11-30 15:28:45 +01:00
Asger Feldthaus 3b289d4436 dart2js cps: Extend type masks to handle reflective invocations.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1430453002 .
2015-11-27 10:48:37 +01:00
William Hesse 38acf9dc27 Update status for passing language test on content_shell
BUG=dartbug.com/23244

Review URL: https://codereview.chromium.org/1478153002 .
2015-11-26 11:21:41 -05:00
Alan Knight 50b1ea35e9 Fix a couple more tests related to Isolate.spawn semantics change
BUG=

Review URL: https://codereview.chromium.org/1481693002 .
2015-11-25 16:28:59 -08:00
Alan Knight c480c7beec Fix tests that don't catch asynchronous errors from isolate spawning. Update co19 status.
BUG=

Review URL: https://codereview.chromium.org/1477043002 .
2015-11-25 14:33:09 -08: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
Todd Turnidge bd2b840be0 Revert my recent changes to the Dartium test status files.
We have restored blocking isolate spawning under a flag.

--------

Revert "Update test status files.  Issue #24990."

This reverts commit 05bf1d6bb6.

Revert "Skip isolate spawning tests on Dartium."

This reverts commit c6c6f121ed.

BUG=

Review URL: https://codereview.chromium.org/1472783004 .
2015-11-23 15:15:55 -08:00
Todd Turnidge 05bf1d6bb6 Update test status files. Issue #24990.
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1454143005 .
2015-11-19 12:42:58 -08:00
Johnni Winther aa16622d8d Handle prefix as expression in SendSet.
Closes #23611

BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1449343003.
2015-11-17 13:45:13 +01:00
Srdjan Mitrovic 4600d37dc1 Background compilation work:
- Defer deoptimization from optimizing compiler to code installation in mutator thread.
- Defer registration of field and leaf class dependency until code is installed in mutator thread.
- Cleanup.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1433243003 .
2015-11-12 11:25:58 -08:00