Commit Graph

5559 Commits

Author SHA1 Message Date
Martin Kustermann 61c0467d41 Implement instance field guards for kernel-based FlowGraphBuilder
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2469703002 .
2016-11-01 16:09:22 +01:00
Ryan Macnak 26245de7a5 Support unaligned integer loads on ARM and MIPS.
Fixes SDK build with SIMARM/SIMARM64/SIMMIPS.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2452453002 .
2016-10-31 17:41:53 -07:00
John McCutchan d62e41fcea Use old assertion text script in precompiled mode
BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2466533003 .
2016-10-31 09:13:55 -07:00
John McCutchan 8007a98b5b Produce the correct assertion failure expression in the face of inlining
Fixes #27671

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2453263002 .
2016-10-27 07:29:22 -07:00
Vyacheslav Egorov eb8c24e133 Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov 12968edb9c Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e.

Windows bots are broken now.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov 4e7a31262e Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov cf7ff42e60 Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This reverts commit 2fed1c3905.

SDK builds are failing

TBR=zra@google.com

Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov 2fed1c3905 Merge more Kernel infrastructure from kernel_sdk SDK fork.
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
  Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
  not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.

- bring test script modifications that allow to test Kernel pipeline

BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Lasse R.H. Nielsen 9c2306c7dc Adapt analyzer to new warnings around switch-case fallthrough.
Fixes issue #27664.
BUG= http://dartbug.com/27664
R=brianwilkerson@google.com

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

Committed: https://github.com/dart-lang/sdk/commit/1322877f5b3a8c741d73df861169c494311073e8
Committed: https://github.com/dart-lang/sdk/commit/1f7d8924c6e724e11dab4c266d79aac9441a3bd3
2016-10-26 12:56:54 +02:00
Lasse R.H. Nielsen 1322877f5b Adapt analyzer to new warnings around switch-case fallthrough.
Fixes issue #27664.
BUG= http://dartbug.com/27664
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2446093003 .
2016-10-26 10:51:50 +02:00
Lasse R.H. Nielsen 1d4657f3d4 Add test for warning-conditions around switch cases.
Only tested on analyzer.

R=eernst@google.com

Review URL: https://codereview.chromium.org/2446923003 .
2016-10-26 09:02:58 +02:00
Regis Crelier 3342380ff8 Avoid parsing formal type parameters a second time from inside an async body,
as default values may not be resolved correctly and may conflict with already
parsed formal parameters (fixes #27659).
Added regression test.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2452623002 .
2016-10-25 08:11:37 -07:00
Florian Schneider a74262c0e9 Enable now-passing tests for Android precompilation
Remove other obsolete entries.

Fixes #26373.
Fixes #27378.

R=rmacnak@google.com, whesse@google.com

Review URL: https://codereview.chromium.org/2431163007 .
2016-10-21 12:16:47 -07:00
Matthias Hausner f73ea62c99 Add check for constness in constructor redirection
Const constructor can only redirect to another const constructor.

BUG=#27617
R=regis@google.com

Review URL: https://codereview.chromium.org/2439593003 .
2016-10-19 15:15:02 -07:00
Johnni Winther 37afcd5197 Change TypeInference to handle super calls as direct invocations.
This also makes calls of known target registered as static uses and thus
removes the need for misusing type masks to select super methods.

Closes #25716

R=sigmund@google.com

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

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

Reverted: https://github.com/dart-lang/sdk/commit/5397c5427e9102a8ea7602174be2664d4c15bb8b
2016-10-18 14:02:55 +02:00
Erik Ernst b5d2b38aa3 Relaxes treatment of method type parameter in as expressions.
This CL changes the semantics of `dart2js --generic-method-syntax`
generated code for `e as T` where `T` is a method type parameter.

The old behavior was to raise a `TypeError` at runtime when such an
expression was evaluated. The new behavior is to consider `T` as an
alias for `dynamic`, i.e., `e as T` will then always succeed.

Addresses part of issue 27460, omits a part that is not yet agreed upon.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2388843002 .
2016-10-18 11:11:44 +02:00
Johnni Winther 5397c5427e Revert "Change TypeInference to handle super calls as direct invocations." and "Optimize needNoSuchMethodHandling computation"
This reverts commit 70159b7418.
This reverts commit a8b2bfb5eb.

Review URL: https://codereview.chromium.org/2425933002 .
2016-10-18 11:00:42 +02:00
Johnni Winther 70159b7418 Change TypeInference to handle super calls as direct invocations.
This also makes calls of known target registered as static uses and thus
removes the need for misusing type masks to select super methods.

Closes #25716

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2423953002 .
2016-10-18 09:46:28 +02:00
Lasse R.H. Nielsen 523da59d56 Add reference to invalid typedef so dart2js will detect it.
R=floitsch@google.com

Review URL: https://codereview.chromium.org/2417223002 .
2016-10-14 12:56:40 +02:00
Lasse R.H. Nielsen efb9a12811 Add = as default-value separator for named parameters.
Fixes issue #27559.

BUG= http://dartbug.com/27559
R=asiva@google.com, eernst@google.com, floitsch@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2411633002 .
2016-10-14 11:25:25 +02:00
Florian Schneider 1ebde18da6 Fix and dedup entries in language.status.
Correct mistakes from my previous CL and simplifications.

TBR=rmacnak@google.com,
BUG=

Review URL: https://codereview.chromium.org/2412323004 .
2016-10-13 14:49:27 -07:00
Florian Schneider 701b91eb31 VM: Save one bool when serializing library prefixes.
When loading a snapshot all library prefixes should be considered not
loaded. This makes code running from a JIT snapshot throw the correct
error when using a deferred prefix before it is loaded.

Also, update test status and avoid skipping tests.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2416963003 .
2016-10-13 13:36:19 -07: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 d9b1bc93af Fix product mode noSuchMethod with library prefix.
Update analyzer status of test that has a static warning expected.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2413033003 .
2016-10-12 19:10:27 -07:00
Florian Schneider d99229026e Fix issues with argument evaluation order and noSuchMethod errors.
Fix tests to conform to spec bahavior.

Update dart2js test status.

BUG=#27572
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2416513003 .
2016-10-12 17:04:55 -07:00
John McCutchan 7fd9df4d91 Improvements to NoSuchMethodError.toString
This makes the following improvements:

* Always show the call that was made, with arguments.
* ...and show the actual arguments in more cases.
* Be less confusing in the case of a call on the null receiver.
* Be less redundant in the output.
* Report when a constructor is called with the wrong number of arguments.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2405353002 .
2016-10-12 09:52:51 -07:00
Florian Schneider e25461c151 VM Propagate receiver type from calls to unique selectors in AOT compilation.
If there is no override of noSuchMethod in any class, we can
propagate the receiver type downwards from calls that call a unique
selector.

This speeds up dart2js by around 3%, a particle simulation benchmark by around 10%.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2412653002 .
2016-10-11 13:17:47 -07:00
Florian Schneider a292de544f DBC: Support large offsets in optimized field access.
Added two new bytecodes: LoadFieldExt, StoreFieldExt that
store the field offset in the following nop-instruction that
is skipped.  This allows offsets up to 16 bit.

BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2399333003 .
2016-10-07 14:03:34 -07:00
Ryan Macnak 46bd89847b Mark language/number_identity_test as passing with app jit snapshots.
Review URL: https://codereview.chromium.org/2406543002 .
2016-10-07 11:19:25 -07:00
William Hesse 2512e5b340 Update status for windows ie11 and firefox tests
BUG=https://github.com/dart-lang/sdk/issues/27533
BUG=https://github.com/dart-lang/sdk/issues/27535
R=lrn@google.com

Review URL: https://codereview.chromium.org/2401803003 .
2016-10-07 15:15:52 +02:00
William Hesse b3d354238c Update status for Windows browser tests
BUG=

Review URL: https://codereview.chromium.org/2402553004 .
2016-10-07 11:42:37 +02:00
Ryan Macnak 1cba150307 Fix bad canonicalization for strings whose utf32->utf16 conversion is lossy.
Changes String::Equals(utf32) from string.AsUtf32().Equals(utf32) to string.Equals(utf32.AsUtf16()).

Fixes #27433.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2400523003 .
2016-10-06 16:16:51 -07:00
Konstantin Shcheglov 26cc95d8b4 Issue 27515. Report DUPLICATE_PART when the same library contains two part directives with the same URI.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/27515

Review URL: https://codereview.chromium.org/2401463004 .
2016-10-06 11:28:05 -07:00
Erik Ernst 2a08f36ff8 Updating status file to fix issue with 1c7e4d8.
Review URL: https://codereview.chromium.org/2394863002 .
2016-10-05 16:46:13 +02:00
Erik Ernst 1c7e4d8346 Corrects tests/language/initializing_formal_promotion_test.dart.
Said test was created for scope rules that do not apply now, but it had
never been updated. This CL moves the relevant expression to the scope
where promotion can take place.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2332253003 .
2016-10-05 16:05:41 +02:00
Florian Schneider b5f92d2bfc Fix try-catch optimizer.
When identifying constants in the catch-environment, make sure
that the environment refers to the same constant definition at
all throwing instructions.

BUG=#27483
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2390423002 .
2016-10-04 14:39:49 -07:00
Matthias Hausner 43e338d437 Treat generic method parameters as dynamic in all contexts in the VM (fixes #27460)
Review URL: https://codereview.chromium.org/2383993002 .
2016-10-03 09:11:34 -07:00
Ryan Macnak e1a252a017 Fix a throw returning to a frame marked for lazy deopt that captures the stacktrace.
A lazy deopt via a return needs to preserve one value (the result), but via a throw needs to preserve two values (the exception and stacktrace).

Fixes #27446.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2374273002 .
2016-09-28 16:51:45 -07:00
Ryan Macnak e3420eab29 Revert "Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code object."
This reverts commit 3413e052b3.

Review URL: https://codereview.chromium.org/2374173002 .
2016-09-28 13:00:00 -07:00
Ryan Macnak 3413e052b3 Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code object.
This is prep work for lazy deopt without code patching.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2376843002 .
2016-09-28 10:15:09 -07:00
Florian Schneider 4bd534191a VM: Avoid allocating strings when disassembling code.
For code objects, don't allocate symbol strings when printing the disassembly.

Don't try to make disassembling work with background compilation -- instead make sure that we don't allocate on the Dart heap while disassembling.

Add NoSafepointScope around disassemble functions to assert that no allocation happens.

Also, remove some dead code from object.cc.

BUG=#27430
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2363413004 .
2016-09-27 12:43:05 -07:00
Siva Annamalai bb02e814dc Skip string_literals_test (see Issue 27433)
BUG=

Review URL: https://codereview.chromium.org/2377563002 .
2016-09-26 21:03:27 -07:00
Florian Schneider 7ca3da1a3a Fix lazy deoptimization in the presence of exceptions
Catch block entries need to be considered when doing lazy deoptimization.

In addition to the return, also patch all catch entry blocks in a function scheduled for lazy deoptimization.

Also, move restoring the pool pointer to the jump-to-handler stub to simplify patching the catch entry.

BUG=#27419
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2357343003 .
2016-09-26 16:24:23 -07:00
Lasse R.H. Nielsen 574ae435f3 Allow surrogates in string literals.
Fixes issue #26620
BUG: http://dartbug.com/26620

R=asiva@google.com, brianwilkerson@google.com, floitsch@google.com, hausner@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2304923002 .
2016-09-26 13:23:41 +02:00
Lasse R.H. Nielsen caf208a543 Make StreamIterator not delay pausing between requests.
The current implementation of StreamIterator has a one-element buffer which
allows it listen for the next even eagerly, and only pause if consumption
doesn't keep up with production.
However, StreamIterator is also used by both VM and dart2js implementations
of "await for", and according to the specification, the iterated stream
must be paused between loop iterations.

The CL removes the one-element buffer and forces a pause after each event.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2149893002 .
2016-09-26 09:35:46 +02:00
William Hesse 80572c4038 Update status for browser tests
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2358583002 .
2016-09-20 16:36:01 +02:00
Regis Crelier 11562f6874 Support generic method syntax (fixes #25869).
Function type parameters are parsed and resolved, but mapped to malformed types
(i.e. dynamic) until full support is implemented.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2349593003 .
2016-09-19 15:17:33 -07:00
Terry Lucas 79f406443d Update status for expected failures in Dartium.
TBR=whesse@google.com

Review URL: https://codereview.chromium.org/2341653005 .
2016-09-15 09:38:55 -07:00
Matthias Hausner 3e60d48842 Fix parsing of generic closure formal parameter
BUG=#27299
R=regis@google.com

Review URL: https://codereview.chromium.org/2341493002 .
2016-09-13 15:11:10 -07:00