Catch entries must record a lazy deoptimization descriptor because we patch catch entries if exception reaches a frame that has a pending lazy deoptimization.
StringInterpolate instruction was recording an incorrect lazy deoptimization environment - on DBC we drop arguments from it because it is a part of the return sequence and not a part of the calling sequence like on other architectures. This means one needs to pass correct argument count down to RecordAfterCall(Helper). StringInterpolate however has argument count of 0 but internally emits a call with a single argument leading to a mismatch if RecordAfterCall is used. Use
RecordAfterCallHelper instead.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2595553002 .
On DBC calls return value on the stack instead of a dedicate register but not all calls have a return value (e.g. CheckStack does not) and such calls don't push anything. Implementation of a lazy deopt however assumed that value is always present and tried to manually preserve it by popping and pushing it back after the frame was rewritten. This of course damaged the frame if we performed a lazy deoptimization after the call that did not push anything.
Instead of manually preserving result value value use frame translation to handle it. This allows to handle calls that return value and those that do not uniformly in the Deopt bytecode. Compiler takes care of creating the right deoptimization environment instead.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2587133002 .
Insert Redefinition instructions to prohibit unsafe code motion. If we propagate
the receiver type downwards from a call to a unique selector, we must not hoist
instructions that were optimized using this type information across the call.
R=vegorov@google.com
Review URL: https://codereview.chromium.org/2498073004 .
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 .
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 .
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 .
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 .
With catch blocks appearing as additional function entry blocks,
there can be phis for the receiver (parameter 0).
This CL fixes the problem that the receiver type information
was lost in the presence of try-catch.
BUG=
R=vegorov@google.com
Review URL: https://codereview.chromium.org/1841073003 .
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 .
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 .
- 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 .
The new flag --enable-debug-break turns the otherwise illegal Dart statement
break "message";
into a break instruction preceded with a debug message, the equivalent of
emitting an Assembler::Stop("message").
Add a language test expecting a syntax error without the flag.
Change expected break instruction in arm64 simulator.
Remove constants related to now deleted simulator tracing on mips and arm64.
R=johnmccutchan@google.com, srdjan@google.com
Review URL: https://codereview.chromium.org//1087383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45218 260f80e4-7a28-3924-810f-c04153c831b5
LoadOptimizer computes KILL sets in assumption that place X[C] can alias place X[K] if and only if K == C. This however does not hold for TypedData where X[0] can alias X[1] if we are reading 32bit value at X[0] and 8bit value at X[1]. The only thing that TypedData guarantees is that all accesses are done with byte offsets aligned by the size of the data type.
This change incorporates TypeData elements aliasing rules into LoadOptimizer:
- Place hierarchy was extended with constant index places for TypedData X[C|S]:
- C is a byte offset to the element being read instead of an unscaled index that was used before;
- S size of the element being read.
- KILL set computation ensures the following aliasing rule:
X[C|S] aliases X[RoundDown(C, S')|S'] for all sizes S' > S
R=fschneider@google.com
BUG=http://dartbug.com/22120
Review URL: https://codereview.chromium.org//868283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43137 260f80e4-7a28-3924-810f-c04153c831b5