lrn@google.com
a8720a6d9c
Change signature of noSuchMethod to take an InvocationMirror.
...
Requires VM and dart2js/dart2dart changes to work.
Committed: https://code.google.com/p/dart/source/detail?r=14198
Committed: https://code.google.com/p/dart/source/detail?r=14254
Review URL: https://codereview.chromium.org//11231074
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14324 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 10:32:54 +00:00
lrn@google.com
895d155ab1
Revert "Change signature of noSuchMethod to take an InvocationMirror."
...
TBR=ager@google.com
Review URL: https://codereview.chromium.org//11339042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14260 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:47:42 +00:00
lrn@google.com
4a24ddc1d4
Change signature of noSuchMethod to take an InvocationMirror.
...
Requires VM and dart2js/dart2dart changes to work.
Committed: https://code.google.com/p/dart/source/detail?r=14198
Review URL: https://codereview.chromium.org//11231074
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14254 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:04:12 +00:00
kmillikin@google.com
3d684dcc70
Compress deoptimization information by sharing common suffixes.
...
For all the deoptimization entries in a function, build a suffix trie. Add
a new deoptimization instruction that indicates the rest of the translation
is a fixed-length suffix of another entry.
BUG=
Review URL: https://codereview.chromium.org//11040058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14252 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 09:50:35 +00:00
lrn@google.com
778b0dc5e5
Revert "Change signature of noSuchMethod to take an InvocationMirror."
...
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//11336011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14199 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 14:07:10 +00:00
lrn@google.com
0bcd2f4f7b
Change signature of noSuchMethod to take an InvocationMirror.
...
Requires VM and dart2js/dart2dart changes to work.
Review URL: https://codereview.chromium.org//11231074
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14198 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 13:34:58 +00:00
iposva@google.com
dc2c8b3707
- Consolidate code into the old generation.
...
- Record pointers between code objects.
- Collect unreferenced code objects.
Review URL: https://codereview.chromium.org//11265026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14113 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 23:46:01 +00:00
asiva@google.com
1bf642129d
- Get rid of RawClosure class and use RawInstance for closures.
...
- Simplify SetRaw to not require an access to the Current Isolate.
Review URL: https://codereview.chromium.org//11087070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13581 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 20:34:08 +00:00
srdjan@google.com
8e7aee9048
Address Florian's comments.
...
Review URL: https://codereview.chromium.org//11090027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13427 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 18:46:25 +00:00
tball@google.com
76d7c9b105
Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return what was called the BaseZone instead of its wrapper. The GetBaseZone() methods were not renamed, to help the next CL.
...
BUG=
Review URL: https://codereview.chromium.org//11040062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13314 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 19:52:55 +00:00
srdjan@google.com
717e3c0396
Support for mixed null/smi equality: do not deoptimize, emit same optimized code as if that was smi-equality only.
...
Moved assert for duplicate class checks into ICData.
Allow CheckClassInstr to check for Smi as well.
Review URL: https://codereview.chromium.org//11048032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13254 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 19:35:23 +00:00
zerny@google.com
c0418b9d52
Don't inline functions above the deoptimization threshold.
...
Moved deoptimization counter increment code into the PcMarker instruction where it executes on each occurring function in the optimized frame.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//11031040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13223 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 12:24:25 +00:00
srdjan@google.com
9dd3e6229c
Split flag --trace-deopt into --trace-deoptimization and --trace-deoptimization-verbose. Print source line and function where deoptimization occured.
...
Review URL: https://codereview.chromium.org//11054002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13138 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 20:40:26 +00:00
asiva@google.com
27e1b05914
Add isolate event handler setup in order to be able to propagate isolate
...
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
fschneider@google.com
6632f191c4
Support for unboxed 64-bit integer bitwise operations and equality on ia32.
...
This CL adds AND, OR, XOR and == operations on unboxed 64-bit integers
(aka. mints).
Unboxed mints are stored in xmm registers. Each xmm register location
has an additional bit to keep track of its value representation.
Unboxed mints are materialized on the heap on deoptmization in the same way as
unboxed doubles.
The SSE instructions used are available on all CPUs that support SSE 4.1.
Review URL: https://codereview.chromium.org//10968059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13112 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 11:25:53 +00:00
kmillikin@google.com
d7115e5eda
Remove deoptimization index PC descriptors.
...
Put the PC (offset) of the deoptimization point and the deoptimization
reason in the DeoptInfo table. The table entries are now triples of
(PC offset, info, reason).
R=srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//10982088
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13056 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 10:16:22 +00:00
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