zerny@google.com
aa5281c88a
Reapply "Deoptimization support in inlined code."
...
This reapplies r12488 with a fix.
R=kmillikin@google.com ,fschneider@google.com
Review URL: https://codereview.chromium.org//10952002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12499 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 13:41:20 +00:00
zerny@google.com
e174be3f27
Revert "Deoptimization support in inlined code."
...
This reverts commit a78e33f178aae74a97f4231ca98183adf97fda71.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org//10948007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12492 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 12:18:04 +00:00
zerny@google.com
64a9ca2b81
Deoptimization support in inlined code.
...
Review URL: https://codereview.chromium.org//10928232
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12488 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 11:53:59 +00:00
srdjan@google.com
62a76d0783
Using type feedback, eliminate store barriers for indexed stores.
...
Review URL: https://chromiumcodereview.appspot.com//10910224
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12268 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 15:52:58 +00:00
srdjan@google.com
3051c69910
Improve moves of Smi and null objects. Add result cid to List constructor calls. Add tracing of inline cache misses in optimized code (a big no-no).
...
Review URL: https://chromiumcodereview.appspot.com//10933019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12208 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:41:34 +00:00
srdjan@google.com
67871d3098
Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot.
...
Review URL: https://chromiumcodereview.appspot.com//10912146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12093 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 15:00:51 +00:00
regis@google.com
7cc84c2892
Implement new optional parameters syntax in the vm (issue 4290).
...
Provide --reject_named_argument_as_positional flag to ease transition to new
syntax (default is false).
Add tests.
Review URL: https://chromiumcodereview.appspot.com//10910119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12004 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 01:13:27 +00:00
fschneider@google.com
725fe7b2d8
Implement loop invariant code motion for check instructions.
...
This CL adds a new optimization pass that hoist loop invariant
instructions upwards out of loops.
I'm adding a deoptimzation point at every Goto so that we
can move deoptimizing instructions like checks out of loops.
As a result there may be multiple deoptimization descriptors
with the same PC. The corresponding assert are removed.
Review URL: https://chromiumcodereview.appspot.com//10909094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11946 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 13:21:20 +00:00
zerny@google.com
7bd2eba770
Execute deoptimization instruction in reverse order.
...
This is in preparation for deoptimization of inlined calls where it simplifies
calculating the frame pointer for nested frames.
R=kmillikin@google.com
Review URL: https://chromiumcodereview.appspot.com//10915087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11928 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 09:12:32 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
srdjan@google.com
6eeeadecd6
Remove deprecated deoptimization code.
...
Review URL: https://chromiumcodereview.appspot.com//10911022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11668 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 23:20:47 +00:00
regis@google.com
9e00bd8ccb
Implement argument definition test in the vm.
...
Add tests.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10915022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11664 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 22:46:44 +00:00
vegorov@google.com
a573d2dec8
Unbox phis that were proven to be of type Double.
...
Eliminate Boxing/Unboxing pairs.
Allow boxing, unboxing and double binary operations to participate in CSE.
Allow double comparisons to operate on unboxed inputs.
Support XMM registers and double spill slots in deoptimization.
Save XMM registers when calling to runtime from WriteBarrier stub.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10919008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11652 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 20:39:48 +00:00
srdjan@google.com
caf04303f7
Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This assumption (verified with Todd and Gilad) simplifies the implementation of lazy deoptimization considerably.
...
Add flag --deoptimize-alot, which will lazily deoptimize all live optimized frames. Currently only the presence of deoptimization information is checked.
Add kDeoptAfter deoptimization point, which is the continuation for lazy deoptimization, after a call. Rename kDeopt to kDeoptBefore.
Removed a tests case that called into a native without properly setting up a Dart frame (Ok-d by Siva).
Native functions are not optimizable.
TODO: Split deoptimization information from DeoptimizationStubs. Check for redundant PcDescriptor information (what can be merged, especially at calls).
Review URL: https://chromiumcodereview.appspot.com//10885039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11642 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:53:46 +00:00
turnidge@google.com
14f614da12
Use the return value of vm native methods to set the return value,
...
based on Siva's earlier suggestion (he actually suggested putting it
in the generated stub, which I haven't done).
Added SetReturnUnsafe and use it exactly one place so far.
Review URL: https://chromiumcodereview.appspot.com//10874072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11633 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:41:19 +00:00
hausner@google.com
c7f5bcd0ca
Eliminate interface bool
...
Replace with concrete class bool instead, and getting rid of class Bool in core_impl library.
Review URL: https://chromiumcodereview.appspot.com//10874071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 21:09:23 +00:00
fschneider@google.com
253c3f8499
Implement class id checks as a separate instruction and add a local CSE optimization pass.
...
This CL contains:
A new CheckClassComp instruction. Currently it is used only for instance loads:
(LoadInstanceFieldComp)
A pass LocalCSE that performs block-local common subexpression elimination. To identify
redundant expressions I use a hash map per basic block. Computations that do not have
side effects can participate in CSE. For now, I only enabled it for CheckClass.
Any computation that participates in CSE must implement the AttributesEqual function.
Other smaller fixes:
Places where we can pass the correct initial size for GrowableArrays
that have a known size. We should consider having a FixedLengthArray for this purpose.
Made the accessors ic_data() and set_ic_data() use a const ICData*.
Review URL: https://chromiumcodereview.appspot.com//10824349
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10948 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:40:14 +00:00
iposva@google.com
dae2e8454f
- Remove unused variable.
...
Review URL: https://chromiumcodereview.appspot.com//10834340
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10765 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 19:57:32 +00:00
iposva@google.com
99d563982c
- Support for patching of class methods and fields.
...
Review URL: https://chromiumcodereview.appspot.com//10827288
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
asiva@google.com
00dd8aa761
Remove functions_cache_ and it's references as it is not being used anymore.
...
Review URL: https://chromiumcodereview.appspot.com//10824266
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10542 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 23:33:37 +00:00
asiva@google.com
5fd180cdfc
1. Register canonical names for internal VM classes and get rid of the method GetSingletonClassName
...
2. Create the empty_array object as a singleton in the VM isolate and remove it from the object store
3. Remove eager population of the functions_cache entry in the class. This results in a pretty impressive reduction of the initial isolate heap size:
- on IA32 it goes from 1331k to 1071k
- on X64 it goes from 2431k to 1911k
- snapshot size also is reduced from 859219 bytes to 789147 bytes.
(as a follow up change I will consider completely removing functions cache)
Review URL: https://chromiumcodereview.appspot.com//10827249
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10535 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:43:00 +00:00
vegorov@google.com
1cf5cc74aa
Put PushArgument into the environment instead of raw values.
...
This allows to shorten live ranges and avoid spilling when PushArgument is the last real use of the value.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10825282
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10508 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 14:28:02 +00:00
srdjan@google.com
b7f043bc6b
Replace deopt stubs location/register shuffling with using deopt-info. Added deopt instruction commands. Also fixes a crash in IA32 with use_ssa where the stack is incorrect after deoptimization. Tested IA32 with and without use-ssa.
...
Review URL: https://chromiumcodereview.appspot.com//10825236
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10469 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 23:46:38 +00:00
turnidge@google.com
312471dfed
Don't hard-code getter prefix in code_generator.cc.
...
Review URL: https://chromiumcodereview.appspot.com//10828213
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10448 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 16:20:46 +00:00
srdjan@google.com
32d5673c05
Move deopt reason into PcDescriptor so the EAX/RAX register is not destroyed. Some cleanups in PC descriptor.
...
Review URL: https://chromiumcodereview.appspot.com//10832214
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10424 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 22:15:38 +00:00
regis@google.com
6f5281c404
Get rid of ast node ids.
...
Rename cid to deopt_id.
Review URL: https://chromiumcodereview.appspot.com//10832150
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10306 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 20:24:03 +00:00
srdjan@google.com
d9c35db17c
Allow NULL classes in inline caches (for example for ==). Fixes a 22x regression with r9762 on a benchmark provided by Ryan.
...
Review URL: https://chromiumcodereview.appspot.com//10830154
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10206 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 00:23:52 +00:00
srdjan@google.com
ac8041f15d
First step toward deoptimization using deoptimization info: splits deoptimization into two steps: copy frame to buffer, fill unoptimized frame from buffer. The only changes in the frame are the return address and the PC marker.
...
Second step will add deoptimization info 'instructions' that will fill the unoptimized frames using the saved registers and frame data.
Review URL: https://chromiumcodereview.appspot.com//10836020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10071 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 17:27:15 +00:00
vegorov@google.com
c9e8d9594e
Add support for fixed parameters in the register allocator.
...
This remove bailout for functions with non-zero number of non-fixed parameters and increases our coverage.
SpillSlot location was renamed into StackSlot location and now allows to address spill slots (positive stack index) and incoming parameters (negative stack index).
Environment was reordered to match order of values on the stack (previously it was inversed).
Correctly reserve spill slots in the prologue of the code. Previously register allocator was allocating spill slots, but generated code did not reserve any space for them on the stack so they might have been overwritten by calls.
Fix off by one in DeoptimizationStub::GenerateCode - we were reserving one slot too many.
Change --optimization-filter flag to use substring search instead of prefix comparison, this is much more useful when VM prefixes function name with a path to the file.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10828018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9934 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 13:21:39 +00:00
asiva@google.com
ed8db0f611
Move more symbols to the vm isolate.
...
Review URL: https://chromiumcodereview.appspot.com//10808111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9905 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 20:31:26 +00:00
asiva@google.com
ec7f44f025
Create frequently used symbols in the vm isolate
...
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
iposva@google.com
7f843b0fc9
- Start using the collected store buffer entries to find
...
old->new references during Scavenge.
Review URL: https://chromiumcodereview.appspot.com//10797021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9791 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 21:41:55 +00:00
regis@google.com
318edd938c
Hide names of internal classes from the user by mapping them to the documented
...
interfaces they implement.
Review URL: https://chromiumcodereview.appspot.com//10800002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9748 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 21:51:27 +00:00
regis@google.com
b86a40f48f
Fix type checking of void type.
...
Fix library and tests accordingly.
Add new test.
Disable new test for dart2js.
Disable some now failing co19 tests (new issue 158 filed).
Hide internal VM String types from user (not complete).
Review URL: https://chromiumcodereview.appspot.com//10787021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9681 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 21:34:07 +00:00
srdjan@google.com
00c3067049
Fix problem of excessive attempts to optimize, fix excessive deoptimizations for load/store indexed, performance issue with non-inlineable instance setter (direct call instead of IC call). Add tracing of issues encountered when attepting to optimize a method (--trace_failed_optimization_attempts), rename flag --print_stacktrace_at_throw.
...
Review URL: https://chromiumcodereview.appspot.com//10704210
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9680 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 20:55:09 +00:00
regis@google.com
dc96874999
Revert fix for type checking of void type, because some top level tests fail.
...
Review URL: https://chromiumcodereview.appspot.com//10784020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9673 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 19:05:38 +00:00
regis@google.com
a8ceb243f6
Fix type checking of void type.
...
Fix library and tests accordingly.
Add new test.
Disable new test for dart2js.
Disable some now failing co19 tests (new issue 158 filed).
Hide internal VM String types from user (not complete).
Review URL: https://chromiumcodereview.appspot.com//10704216
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9672 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 18:05:55 +00:00
regis@google.com
a7b85ecff8
Provide better error message when passing wrong number of arguments.
...
Review URL: https://chromiumcodereview.appspot.com//10695137
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9602 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 17:46:55 +00:00
srdjan@google.com
94192b98a1
Use class id instead of class in subtype test cache.
...
Review URL: https://chromiumcodereview.appspot.com//10695136
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9559 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:16:30 +00:00
regis@google.com
1e055acce8
Stop passing location argument to run time calls, since it is stored in the pc
...
descriptor.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10701131
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9538 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 23:59:09 +00:00
regis@google.com
32c8564b0a
Add --trace_type_check_elimination flag for debugging purposes.
...
Review URL: https://chromiumcodereview.appspot.com//10689099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9471 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 16:59:15 +00:00
iposva@google.com
65d96de4e8
- Separate store buffer data in the isolate into the StoreBufferBlock and
...
the actual StoreBuffer.
- Add a HashSet class to use for the StoreBuffer data.
- Fix allocation sites for definite old objects.
- Remove obsolete leaf runtime entry StoreBuffer.
Review URL: https://chromiumcodereview.appspot.com//10702067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9323 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 00:10:23 +00:00
regis@google.com
d95cbc8d7f
Use VM type cast and save handles.
...
Review URL: https://chromiumcodereview.appspot.com//10693071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
regis@google.com
8997078334
Remove old code generator.
...
Review URL: https://chromiumcodereview.appspot.com//10665038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9122 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:43:44 +00:00
asiva@google.com
88243dfce2
Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor.
...
Review URL: https://chromiumcodereview.appspot.com//10592006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8881 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 23:57:40 +00:00
srdjan@google.com
60fa0b27ca
More ICData cleanups: try to use ICData instead of converting it to another intermediate representation. This sets the stage for more & simpler optimizations based on collected type feedback.
...
Review URL: https://chromiumcodereview.appspot.com//10594002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8877 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:49:11 +00:00
srdjan@google.com
7f8cbb12b7
This is https://chromiumcodereview.appspot.com/10581006/ that I forgot to submit, and messed up the original accidentally. Submitting as TBR
...
Review URL: https://chromiumcodereview.appspot.com//10580024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8871 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:19:00 +00:00
vegorov@google.com
959cf98b00
Implement a simple register allocator that tries to keep instruction results in registers.
...
Add --optimization-filter flag that allows to disbable optimizations for all function which do not match prefix. This allows to quickly localize problems with code generation.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10559035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8811 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 18:04:22 +00:00
cshapiro@google.com
e78250ca37
Generate code for store buffer updates in open-coded object field stores.
...
Review URL: https://chromiumcodereview.appspot.com//10536067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8755 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 23:45:15 +00:00
srdjan@google.com
69be8e6f0b
Add righ shift test for corner cases, use macro for deopt reasons (all suggested by Slava in a previous CL)
...
Review URL: https://chromiumcodereview.appspot.com//10539068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8459 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 18:20:45 +00:00