ager@google.com
6d8365e90f
Update more fingerprints.
...
I'm sorry about all these individual changelists. Runs all debug
mode tests now, so this should be better.
R=srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//13843006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21879 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 13:09:38 +00:00
ager@google.com
a52499abd8
Fixing more fingerprints. What is the right way to find all of these?
...
R=srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14424009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21877 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 12:41:10 +00:00
ager@google.com
4f1a6eccc4
More fixes. Thanks to Slava for reminding me of check-function-fingerprints flag.
...
R=asiva@google.com , floitsch@google.com , srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14042012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21875 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 12:23:27 +00:00
johnmccutchan@google.com
d41cdc6d61
Mark Float32x4List as fixed length array.
...
Review URL: https://codereview.chromium.org//13932038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21841 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 21:35:31 +00:00
hausner@google.com
9ae17640bf
Handle built-in function identical correctly
...
The parser, rather than the backend, recognizes the built-in function identical
and replaces is with the old token for the === operator. This fixes compile
time constant handling of calls to identical.
Review URL: https://codereview.chromium.org//14366007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21753 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 16:26:05 +00:00
srdjan@google.com
67cdbd0653
Detect leaf optimized methods and skip stack check overflow test in those, unless it is in a loop (to be able to stop it).
...
Review URL: https://codereview.chromium.org//14308009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21692 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 18:37:24 +00:00
kmillikin@google.com
54e54f4194
Refactor the code for making inlining decisions.
...
Separate the decision to inlin, which produces a graph to inline, from the
act of inlining itself. For polymorphic inlining we need such a separation.
Change the function that integrates an inlined function graph into a caller
graph so that it operates on a graph entry and set of inlined exits rather
than on an entire flow graph. Flow graphs represent a whole function so
this change allows us to replace an instruction with an arbitrary subgraph.
Change the name of the InliningContext class to InlineExitCollector to more
accurately reflect what it does.
Review URL: https://codereview.chromium.org//13932005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21539 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 08:40:27 +00:00
srdjan@google.com
2e0bba73fe
Do not set growable array length unnecessarily.
...
Review URL: https://codereview.chromium.org//14265015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21526 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 23:00:06 +00:00
hausner@google.com
54dde7ce89
Implement rethrow statement
...
Or: how to turn a 5 minute task into a 2 hour ordeal.
The actual business of the change is one line in token.h and one line in parser.cc.
Review URL: https://codereview.chromium.org//14012005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21371 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:32:37 +00:00
kmillikin@google.com
067b9ff8d5
Reapply "Incrementally recompute dominators when inlining."
...
Including a fix for a silly off-by-one bug. GrowableArray::TruncateTo takes
the new length, not the new last index.
Review URL: https://codereview.chromium.org//14135006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21353 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:41:10 +00:00
vegorov@google.com
9f3783186f
Ensure that all goto instructions have deoptimization target.
...
R=kmillikin@google.com
BUG=
Review URL: https://codereview.chromium.org//12457034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21351 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:19:34 +00:00
kmillikin@google.com
40002d8663
Revert "Incrementally recompute dominators when inlining."
...
This reverts svn commit r21268 due to dart2js test failures.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org//13910003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21270 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 11:49:07 +00:00
kmillikin@google.com
9cb005c517
Incrementally recompute dominators when inlining.
...
Before: we marked the entire graph's dominator tree invalid in case there
were multiple exits from an inlined function and recomputed dominators after
inlining. Now: in case there are multiple exits we collect them in a fresh
join block and compute its immediate dominator as the nearest common
ancestor in the dominator tree over all predecessors.
Review URL: https://codereview.chromium.org//14067002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21268 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 11:44:36 +00:00
srdjan@google.com
60e57ecfe1
Optimizes 'as' operation in similar way as 'instanceof': collect type feedback in unoptimized mode and try to convert it to a simple classcheck in optimized code.
...
Review URL: https://codereview.chromium.org//13190014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20783 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 15:30:14 +00:00
asiva@google.com
ec0ec36e62
More preparation for removal of dart:scalarlist
...
- remove the intrinsification of scalarlist functions
- changed class Ids to TypedData class Ids
Review URL: https://codereview.chromium.org//13004017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20595 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 23:15:27 +00:00
hausner@google.com
89346f3e3a
Remove legacy syntax support for library import
...
Remove legacy syntax for #import, #library and #source
Update test programs
Recalc fingerprints of inlined functions that were apparently
affected by the change of library name from "dart:io" to dart.io.
Review URL: https://codereview.chromium.org//12880023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20466 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 18:11:08 +00:00
vegorov@google.com
1c9d22d75c
Collect type feedback for fields.
...
BUG=
Review URL: https://codereview.chromium.org//12529008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20235 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 20:15:10 +00:00
regis@google.com
7b5a610084
Make allocation of Dart parameters and local variables architecture independent.
...
Enable a couple more vm tests on ARM.
Fix function usage counter access on ARM.
Review URL: https://codereview.chromium.org//12776006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20048 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 21:33:03 +00:00
kmillikin@google.com
74d4e1fe75
Remove virtual functions on class InliningContext.
...
There is only one implementation of InliningContext, so there is no need for
virtual dispatch.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//12518009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19917 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 10:06:14 +00:00
fschneider@google.com
ef6251908c
Add a new, separate block entry instruction for catch-blocks.
...
This is a preparation CL for supporting try-catch in optimized code. Until
now, we used normal TargetEntryInstr for catch blocks.
This meant carrying around handler_types_ and catch_try_index_ for blocks
that are not catch blocks which is not needed.
For now, CatchBlockEntry behaves the same as TargetBlockEntry except for
the additional members needed for catch blocks.
Review URL: https://codereview.chromium.org//12600012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19864 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 13:51:32 +00:00
fschneider@google.com
c94a722177
Remove unused context-level from LoadLocal/StoreLocal IL instructions.
...
This is left-over code that is not used anymore.
Review URL: https://codereview.chromium.org//12440015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19789 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 13:03:46 +00:00
fschneider@google.com
d0959080ab
Inline ByteArray setters like setUint8 in the optimizer.
...
Review URL: https://codereview.chromium.org//12378039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19781 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 12:16:54 +00:00
srdjan@google.com
dd6691ab27
The complete fix for issue 8919.
...
Review URL: https://codereview.chromium.org//12643004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19661 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 23:09:47 +00:00
srdjan@google.com
5135d46cbf
Fix crash in issue 8919. The test still fails.
...
Review URL: https://codereview.chromium.org//12628003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19657 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 21:59:02 +00:00
regis@google.com
f644ba9791
Complete implementation of bounds checking in the vm, by introducing a vm object
...
BoundedType that represents a type that could not be checked against an upper
bound at compile time. A BoundedType is verified at run time when used,
typically when it (and/or its bound) gets instantiated.
This fixes issues 7075 and 7625.
Added one test.
Review URL: https://codereview.chromium.org//12473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19519 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 22:04:23 +00:00
srdjan@google.com
d5084b7561
Recognize more list factories. Recognizing list factories (Array, Bytearrays, etc) allows the type and range to be determined. Add byte array factories to the list of recognzied factories and intrinsify them early. If not intrinisified they may be inlined and not recognized. Keeping the recognition at API level is more stable as internal implementation may change.
...
Review URL: https://codereview.chromium.org//12377082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19422 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 21:38:35 +00:00
srdjan@google.com
ba7597afb4
Fix factory name to result cid mapping, run type propagation once more after constant propagation.
...
Review URL: https://codereview.chromium.org//12374024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19256 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 20:54:15 +00:00
fschneider@google.com
86d5e856a5
Use enum instead of bool parameter in IL instructions to indicate if a store barrier is needed.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//12377017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19232 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 14:30:37 +00:00
kmillikin@google.com
9ee9cfb78d
Remove dead phis as soon as they are discovered.
...
Previously we removed dead phis late, in the register allocator. This
change removes them as soon as they are discovered to be dead and packs the
phi array to squeeze out NULLs. This speeds iteration but doesn't save
space because the phi array is zone-allocated.
The PhiIterator is used everywhere to iterate phis except a few places that
need to know the phi index (e.g., SSA construction, phi elimination).
R=vegorov@google.com
Review URL: https://codereview.chromium.org//12340108
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19206 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 08:25:58 +00:00
lrn@google.com
6b4f4b1bab
Change new List(n) to return fixed length list.
...
Deprecate List.fixedLength, add List.filled.
Make Iterable.toList and List.from take "growable" argument,
defaulting to false.
Review URL: https://codereview.chromium.org//12328104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
kmillikin@google.com
bfdad288d9
Set instruction/use_index when adding an input to an IL instruction.
...
When setting an input (including in the constructor) of an IL instruction,
automatically set the input use's instruction and use_index fields.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//12316065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18961 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 11:24:08 +00:00
iposva@google.com
c900112af7
- Improve the message for NoSuchMethodErrors that are
...
determined statically at compile time.
Review URL: https://codereview.chromium.org//12328019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18848 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:53:27 +00:00
kmillikin@google.com
509261dd45
Reapply "Change the SSA construction pass to also construct def-use chains."
...
This reapplies svn commit 18813 with a bug fix. In the case of an
inlined call whose value is not used, the inliner hase inserted a use
of the return value's definition, which must be removed.
R=vegorov@google.com
BUG=
Review URL: https://codereview.chromium.org//12334007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18827 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 12:57:43 +00:00
kmillikin@google.com
733a05c801
Revert "Change the SSA construction pass to also construct def-use chains."
...
This reverts svn revision 18813 due to dart2js test failures.
TBR=kasperl@google.com
BUG=
Review URL: https://codereview.chromium.org//12313033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18817 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:06:31 +00:00
kmillikin@google.com
85c27b7733
Change the SSA construction pass to also construct def-use chains.
...
Also modify constant propagation to preserve def-use chains. Fix a small
bug in the def-use chain for definitions of inlined function return values.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//12326012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18813 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 10:09:10 +00:00
vegorov@google.com
7243a64bbf
Trust declared type of the receiver to compute its initial compile type.
...
Fix a bug in the ToNullableCid which was leaving cid_ uninitialized when class has subclasses.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//12304009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18641 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 15:45:55 +00:00
srdjan@google.com
5694a140e3
Fix allocation of array tables (use store barrier if needed, store values directly instead of via stack).
...
Review URL: https://codereview.chromium.org//12212050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18464 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 18:44:27 +00:00
vegorov@google.com
baa0347253
Reapply r18377 it was reverted due to the unrelated bug it surfaced.
...
Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields.
Replace multiple fields (result_cid_, propagated_cid_, propagated_type_, reaching_cid_) with a single field of type CompileType which represents an element of type analysis lattice and incorporates information about: value's nullability, concrete class id and abstract super type. This ensures that propagated cid and type are always in sync and complement each other
Implement a new FlowGraphPropagator that propagates types over the CompileType-lattice.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//12260008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18456 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 17:16:35 +00:00
vegorov@google.com
487c73e01f
Revert "Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields."
...
This reverts commit r12365.
Reason: failure on vm-mac-debug (debug_ia32 standalone/io/file_fuzz_test).
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org//12221139
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18378 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 12:36:21 +00:00
vegorov@google.com
f8d9a90b2c
Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields.
...
Replace multiple fields (result_cid_, propagated_cid_, propagated_type_, reaching_cid_) with a single field of type CompileType which represents an element of type analysis lattice and incorporates information about: value's nullability, concrete class id and abstract super type. This ensures that propagated cid and type are always in sync and complement each other
Implement a new FlowGraphPropagator that propagates types over the CompileType-lattice.
BUG=
Review URL: https://codereview.chromium.org//12221119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18377 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 12:06:47 +00:00
asiva@google.com
80e281a078
Fix for issues 6080 -
...
- Read the saved context from the entry frame when straddling across C++ frames while iterating over a stack trace in the debugger. This ensures that the correct context is setup in the ActivationFrame structure in these scenarios (instead of the empty context).
- Read the saved context from the caller's frame when iterating over a stack trace in the debugger. The compiler saves the context in the caller frame before invoking closures, we read this saved context when iterating the stack trace.
Review URL: https://codereview.chromium.org//12179020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18235 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 22:43:16 +00:00
asiva@google.com
cd7b9395b6
Rename the accessor functions saved_context_var and set_saved_context_var to saved_entry_context_var and set_saved_entry_context_var so that it matches the local variable name used. This avoids confusing this with the saved_context_var variable which is used by try statements.
...
Review URL: https://codereview.chromium.org//12207023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18157 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 20:42:33 +00:00
srdjan@google.com
6392b0b9b2
Added result cids to some natives (byte array _new).
...
Review URL: https://codereview.chromium.org//12090010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17730 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 20:46:16 +00:00
kmillikin@google.com
27af144369
Move code around in preparation for better inlining.
...
To inlining calls in a test context, the code to plug the inlined
function graph into the caller graph should be dispatched on the type
of the inlining context.
This change moves code around without otherwise changing it.
Review URL: https://codereview.chromium.org//11953076
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17569 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 14:13:02 +00:00
srdjan@google.com
76dffe600c
Removed loop depth info tracking at graph build time.
...
60% compilation speed improvement on pathological case. Improvements for dart2js
The loop depth signal was made unnecessary by the call frequency signal.
Review URL: https://codereview.chromium.org//11975061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17408 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 16:15:54 +00:00
vegorov@google.com
a77fc9701c
When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
...
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.
BUG=
Review URL: https://codereview.chromium.org//11642003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
srdjan@google.com
37a715bbbf
Lookup functions by name that contains the private key, except for dart_api which allows ignoring the private key.
...
Review URL: https://codereview.chromium.org//11968022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17178 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 00:42:03 +00:00
hausner@google.com
245c0e2c3e
Collect debugging info for catch clauses
...
Collect info about try-statement nesting, and a list of
handled types in each catch clause. This will be used by
the debugger to determine whether an exception is handled
by any handler on the stack.
Review URL: https://codereview.chromium.org//11883023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17100 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 22:43:00 +00:00
kmillikin@google.com
0f65888e88
Change the inlining context from an enum to a class.
...
To support inlining in test contexts, the inlining context needs to have its
dispatched behavior and state. This change introduces a context class
representing calls inlined for their value or solely for their effects. The
intermediate array of exits is moved from the graph to the inlining context.
The implementation behavior is otherwise the same as before.
Review URL: https://codereview.chromium.org//11856010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16965 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 11:43:48 +00:00
regis@google.com
34df344e36
Fix context chaining to prevent memory leak (issue 7681).
...
Review URL: https://codereview.chromium.org//11806003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16757 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 22:24:11 +00:00