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
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
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
srdjan@google.com
f5b544c948
Equality compare should record two arguments in IC data. Inline double equality comparison.
...
Review URL: https://chromiumcodereview.appspot.com//10702195
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9644 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 20:17:42 +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
srdjan@google.com
5f509dc665
Removing more IC calls in optimized code.
...
Review URL: https://chromiumcodereview.appspot.com//10572050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8950 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 23:19:02 +00:00
srdjan@google.com
f26f243476
Improve equality operation (inline, direct calls).
...
Review URL: https://chromiumcodereview.appspot.com//10545186
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8700 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 00:40:58 +00:00
srdjan@google.com
0d74d13f2b
Implement polymorphic instance calls.
...
Review URL: https://chromiumcodereview.appspot.com//10539145
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8678 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 18:07:43 +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
srdjan@google.com
6fc1247bb6
Using SubtypeTestCache object instead of an array, that way we do not need to patch and can communicate to type tests if there is a cache to update (quicker than looking up code).
...
Review URL: https://chromiumcodereview.appspot.com//10352012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7304 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 22:00:52 +00:00
regis@google.com
7793191032
Check upper bounds of type arguments when allocating objects of a generic type
...
at run time when they cannot be checked at compile time.
Review URL: https://chromiumcodereview.appspot.com//10280007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7211 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 01:57:22 +00:00
srdjan@google.com
33b4d35412
Simpler and better inlined type checks as discussed. Changed inline type test cache arrays to contain instance class, instance type argument and instantiator type argument (not yet used).
...
Review URL: https://chromiumcodereview.appspot.com//10243013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7113 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-28 00:06:37 +00:00
asiva@google.com
e360e4d1c9
Second set of changes for implementation of stack map support.
...
- Added functionality to be able to build stack maps in the compiler and register them into the Code object during Code finalization.
- Merged code_generator_ia32_test.cc and code_generator_x64_test.cc into code_generator_test.cc as the two files were identical.
Review URL: https://chromiumcodereview.appspot.com//9721006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5764 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 01:27:35 +00:00
hausner@google.com
6d9abc5e3b
StepOver, StepInto, StepOut
...
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00:28 +00:00
srdjan@google.com
1eaef108b9
Move CodeGenerator::DescriptorList into shared part.
...
Review URL: https://chromiumcodereview.appspot.com//9465028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4582 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-24 23:27:24 +00:00
srdjan@google.com
d525130469
More optimizations and cleanups.
...
Review URL: http://codereview.chromium.org//8972005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2548 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 23:16:00 +00:00
srdjan@google.com
bdb48aefb4
Use deopt on some instructions that have not collected type feedback when optimizing compierl kicks in. Optimize SAR.
...
Review URL: http://codereview.chromium.org//8972002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2487 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-15 22:39:21 +00:00
srdjan@google.com
7b61cef42b
Implement two-arguments-check inline cache. Use it first for Smi binary operations.
...
Review URL: http://codereview.chromium.org//8827015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2345 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 17:24:47 +00:00
hausner@google.com
b122f27eac
Debugger step 2
...
Add ActivationFrame and StackTrace classes.
Add Breakpoint info: url and line number.
Fix breakpoint stub so breakpoints don't get patched over by PatchStaticCall
Review URL: http://codereview.chromium.org//8775060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2089 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:11:39 +00:00
hausner@google.com
b7cf1328a1
Very first steps for a debugger
...
- Introduce Debugger class.
- Each isolate has a debugger object.
- Introduce stubs that can be put in place of static or dynamic
Dart function calls.
- Very rudimentary command line option to place a breakpoint
at the beginning of a function.
Review URL: http://codereview.chromium.org//8687037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1928 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 17:04:45 +00:00
srdjan@google.com
7397762688
Better tracing of deoptimization (added a reason id and printing of source). Fix a bug with excessive deoptimization for null receiver -- caused by (null).toString().
...
Review URL: http://codereview.chromium.org//8588002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1593 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:38:05 +00:00
hausner@google.com
f59e679860
Capturing for loop variables correctly
...
Re-introduce a "fresh copy" of the for loop variable(s) in each iteration. Adding a minimal test to check that closures capture the value of the particular loop iteration.
Review URL: http://codereview.chromium.org//8490019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1273 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 22:36:28 +00:00
srdjan@google.com
5f43c05de7
Implement new inline cache. Delete a lot of unused code (most of change).
...
Review URL: http://codereview.chromium.org//8379013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@706 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 18:35:49 +00:00
regis@google.com
19208574f0
Inline allocation of implicit closures.
...
Consolidate generation of closure allocation stubs into one function.
Fix type name printing when printing ast.
Review URL: http://codereview.chromium.org//8234016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@357 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-11 23:42:20 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00