vegorov@google.com
7a6cdd92c7
Remove support for non-ssa optimizing code generation.
...
This kills FrameRegisterAllocator and related code.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10832411
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11045 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:58:57 +00:00
kmillikin@google.com
94a5b82f60
Make stackmaps store their actual length.
...
This allows stackmaps with varying lengths in the same function, necessary
for the way we plan to support bitmaps for saved live registers.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10837303
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11019 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 08:43:32 +00:00
srdjan@google.com
9db2823a00
Test functions do not have scripts associated with them. Prevent their optimization by marking any function without a script to be not optimizable.
...
Review URL: https://chromiumcodereview.appspot.com//10832397
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10998 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 20:04:25 +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
zerny@google.com
5cc78d2a33
Refactored FlowGraphBuilder into a separate FlowGraph representation.
...
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10857016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10807 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 12:06:17 +00:00
regis@google.com
4bc16ae3f7
Cleanup handling of NullType in type propagation.
...
Remove AssertAssignable type checks from graph (when possible), rather than just
marking them as eliminated.
Review URL: https://chromiumcodereview.appspot.com//10828319
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10782 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 23:49:12 +00:00
fschneider@google.com
c9e6717757
Split ToDouble into two IL instruction to make it work with SSA.
...
This CL removes the bailout from SSA on smi-to-double conversions.
The smi-to-double conversion is implemented as a call and requires
its operand pushed, the double-to-double conversion has normal input
operands.
Review URL: https://chromiumcodereview.appspot.com//10834311
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10710 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 11:31:51 +00:00
kmillikin@google.com
172ee045f3
Build and use stack maps in the SSA compiler.
...
Add a stack bitmap to the location summaries for calls that are GC
safepoints. The bitmap covers the spill slots. The register
allocator collects these bitmaps into a list and then marks live
pointer values during register allocation. When emitting code for a
call, a heap-allocated stackmap is built.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831261
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10618 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 06:59:24 +00:00
fschneider@google.com
94fa6055ab
Optimize expressions of the form (expr === true) when expr has boolean type.
...
This allows us to generate better code for many short-circuit
expressions like a || b, a && b if we can statically determine the type
of the subexpressions.
Also: Avoid disassembling optimized functions twice with --disassemble --disassemble-optimized.
Review URL: https://chromiumcodereview.appspot.com//10830275
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10568 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:10:00 +00:00
srdjan@google.com
6a7b1733d6
Enable SSA by default for IA32 as well.
...
Review URL: https://chromiumcodereview.appspot.com//10825301
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10529 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 20:48:18 +00:00
fschneider@google.com
ad2372aa04
Add flag --disassemble-optimized to selectively disassemble function with optimized code.
...
Review URL: https://chromiumcodereview.appspot.com//10827275
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10489 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 10:53:01 +00:00
srdjan@google.com
10b1928a3d
Add deopt info to code object and print it. Still missing is the code to 'execute' the deopt instructions and thus deoptimize.
...
Review URL: https://chromiumcodereview.appspot.com//10823131
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10308 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 21:15:26 +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
kmillikin@google.com
70bd677417
Reapply "Use platform-independent format specifiers when disassembling code objects."
...
This reapplies svn revision 10163 with a (tested) fix for Windows.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10834155
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10282 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 10:50:38 +00:00
regis@google.com
12de02cbab
Associate the correct type to method receivers (instead of Dynamic type).
...
Properly name the first implicit parameter to factories as ':type_arguments'
(instead of 'this', which made it accessible to user code).
Various cleanup.
Review URL: https://chromiumcodereview.appspot.com//10831142
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10203 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 23:00:55 +00:00
kmillikin@google.com
effc29cd25
Revert "Use platform-independent format specifiers when disassembling code objects."
...
This is still broken on Windows.
TBR=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10826116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10175 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:52:05 +00:00
kmillikin@google.com
b73d4d2af2
Reapply "Use platform-independent format specifiers when disassembling code objects."
...
This reapplies svn revision 10163 with a fix for Windows.
R=ager@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10174 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:45:00 +00:00
kmillikin@google.com
20083dfd85
Revert "Use platform-independent format specifiers when disassembling code objects."
...
Revert svn revision 10163 while working on a Windows fix.
R=ager@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10850017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10169 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:51:23 +00:00
kmillikin@google.com
515f92ea3f
Use platform-independent format specifiers when disassembling code objects.
...
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824144
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10163 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:19:28 +00:00
regis@google.com
ba83d02f9e
Add type propagation phase in optimizing compiler (work in progress).
...
Remove unused cid field from Instruction node and add it to nodes subclassing
Instruction that need it: BranchInstr, ReturnInstr, ThrowInstr, ReThrowInstr.
Remove unused icdata field from Instruction node and add it to BranchInstr.
Review URL: https://chromiumcodereview.appspot.com//10830109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10125 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 17:15:55 +00:00
turnidge@google.com
a3a73029f0
Consolidate a few fields in RawFunction using bitfields.
...
Remove kAbstract from the list of function kinds. It now has its own
dedicated bit. This allows us to distinguish abstract methods from
abstract getters and setters.
Review URL: https://chromiumcodereview.appspot.com//10796004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10087 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 21:26:28 +00:00
iposva@google.com
e5a314d222
- Allow parsing of external methods.
...
Review URL: https://chromiumcodereview.appspot.com//10821076
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10028 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 22:46:24 +00:00
vegorov@google.com
61dc368874
Fix kStoreBufferBlockProcessRuntimeEntry calling sequence.
...
Poping of volatile registers was performed without taking into account the fact that stack pointer could have been modified to ensure correct alignment _after_ volatile registers were pushed.
Enable --use-ssa on x64 again.
BUG=4221
Review URL: https://chromiumcodereview.appspot.com//10820053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10007 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 10:38:48 +00:00
asiva@google.com
79e33c6f0e
Turn off use-ssa temporarily until issue 4221 is fixed.
...
Review URL: https://chromiumcodereview.appspot.com//10825041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9955 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 18:22:52 +00:00
regis@google.com
4968398d2a
Nitpicking.
...
Review URL: https://chromiumcodereview.appspot.com//10807093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9863 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 20:39:21 +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
srdjan@google.com
9df3e4deaa
Add higher-level accesses to Environment. Print flow graph after register allocation. Most interesting with --print-flags --print-environments
...
Review URL: https://chromiumcodereview.appspot.com//10800080
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9826 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 20:29:51 +00:00
vegorov@google.com
1bd5a9b414
Skeleton of a linear scan register allocator.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10696151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9563 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:52:17 +00:00
fschneider@google.com
31dfb3d8da
Fix bailing out of SSA compilation and enable --use-ssa on x64 by default.
...
We need to re-parse the function when retrying compilation after bailing out
because of the side-effects to the AST (break-, continue-labels).
To improve test coverage I'm enbabling building of SSA on x64 now.
Review URL: https://chromiumcodereview.appspot.com//10694053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9291 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 15:41:37 +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
vegorov@google.com
30288c500e
Fix a bug in liveness analysis code and add more comments.
...
R=fschneider@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10657044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9106 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 12:14:02 +00:00
srdjan@google.com
a799978f11
Recognize leaf functions: skip stack check and populating the pc slot, store the pc slot lazily in case of deoptimization.
...
Review URL: https://chromiumcodereview.appspot.com//10668034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9095 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:50:37 +00:00
vegorov@google.com
2f23dc4b60
Simple iterative liveness analysis over SSA.
...
R=fschneider@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10666026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9069 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:07:16 +00:00
asiva@google.com
5cbd276939
Make the parser agnostic to the TokenStream implementation. This is the first step towards compacting the token stream.
...
Pull the data stream writer/reader code out of snapshot into a generic file so that it can be reused into the token stream compaction implementation.
Review URL: https://chromiumcodereview.appspot.com//10632009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9043 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 20:37:01 +00:00
fschneider@google.com
63d4ad7d5f
Add new files and data structures for the new register allocator.
...
This CL adds new files to hold the new register allocator and
adds a parallel-move instructions that will be used to insert
moves for register constraints, spills and phi-resolution.
No new functionality added yet.
Review URL: https://chromiumcodereview.appspot.com//10635020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9027 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 10:59:06 +00:00
fschneider@google.com
da7d212fef
Correctly reset global isolate state after bailout from the flow-graph compiler.
...
This CL fixes a bug where the global ic_data_array was not reset when a bailout happened.
Review URL: https://chromiumcodereview.appspot.com//10636004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8997 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 18:58:23 +00:00
srdjan@google.com
b8a988924d
Switch to the new compiler onIA32, making --use-new-compiler default true on IA32 as well.
...
Review URL: https://chromiumcodereview.appspot.com//10641002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8986 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 16:14:48 +00:00
hausner@google.com
5fb638b575
Support captured variables in debugger
...
- Add context level ranges to LocalVarDescriptors
- Add callee-saved context chain register to LocalVarDescriptors
- Add context level and context offset of captured variables
to LocalVarDescriptors
- Add context chain to ActivationFrame
- Add current context level to ActivationFrame
Review URL: https://chromiumcodereview.appspot.com//10579020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8863 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:52:34 +00:00
fschneider@google.com
e1640d96ca
Fix bailout from the optimizing-mode compiler and put SSA construction under a flag.
...
For now the flag is off by default.
Review URL: https://chromiumcodereview.appspot.com//10568007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8783 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 12:04:30 +00:00
iposva@google.com
9cc40c2b0c
- Back to old compiler for ia32.
...
Review URL: https://chromiumcodereview.appspot.com//10534112
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8551 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 14:14:24 +00:00
iposva@google.com
abca337990
- Temporarily enable the new compiler on ia32.
...
Review URL: https://chromiumcodereview.appspot.com//10535129
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8550 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 14:04:14 +00:00
srdjan@google.com
af3ea0de3d
Add more intrinsics, enable new compiler's optimized mode for ia32.
...
Review URL: https://chromiumcodereview.appspot.com//10541069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8442 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 15:13:56 +00:00
fschneider@google.com
5f8d4a1b6b
Temporarily disable FlowGraphOptimizer on ia32 to make tests pass with --use_new_compiler on.
...
Once we ported all instructions produced by the FlowGraphOptimizer to ia32 we
can remove this code again.
Review URL: https://chromiumcodereview.appspot.com//10462004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8200 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-01 15:55:01 +00:00
srdjan@google.com
eeda4b5810
First step toward an optimizing compiler:
...
- Fix ic-data instrumentation
- Optimize '+' for Smi-s only, by replacing the instance call with inlined operations.
- Add deoptimization stub
- Add deoptimzation support.
Review URL: https://chromiumcodereview.appspot.com//10431006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7952 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 16:50:57 +00:00
vegorov@google.com
f999f30052
Extend assembler with ability to produce comments for the generated code.
...
Extend x64 disassembler with ability to decode and output recorded comments.
Example output (currently comments are emitted only by flow graph compiler at block/instruction boundaries, once instruction printing is refactored and supports printing into buffer simple "instruction" comment will be replaced with the actual IL construct):
;; B0
;; B1
;; instruction
0x007f0fff812525 00000055 49 bb 21 00 b4 04 10 mov $0x7f1004b40021,%r11
0x007f0fff81252c 0000005c 7f 00 00
0x007f0fff81252f 0000005f 41 53 push %r11
R=srdjan@google.com
Review URL: https://chromiumcodereview.appspot.com//10407019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7723 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:56:16 +00:00
srdjan@google.com
0ed5a12568
Fix IC data insertion: do it before the graph is built.
...
Review URL: https://chromiumcodereview.appspot.com//10378099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7554 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 16:38:26 +00:00
srdjan@google.com
bdb733b800
With removal of increment operations, each node has a unique id.
...
Review URL: https://chromiumcodereview.appspot.com//10356108
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7517 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 20:23:15 +00:00
srdjan@google.com
92b9e64375
Adding collected type feedback to the IL nodes (only in optimized mode).
...
Review URL: https://chromiumcodereview.appspot.com//10378093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7509 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:04:09 +00:00
srdjan@google.com
48f28eebdb
Fix bugs in expression temp allocation, Kevin's CL 10302007 (Remove temporaries using explicit names) and merge with other temp.
...
Review URL: https://chromiumcodereview.appspot.com//10389041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7472 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 21:39:58 +00:00
srdjan@google.com
eaab5d38aa
Fixed compilation time measurement, restructure some code. Do not use slow ToFullyQualifiedCString in production backend (saves 10% in backend time with compile-all).
...
Review URL: https://chromiumcodereview.appspot.com//10389023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7435 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 00:03:25 +00:00