srdjan@google.com
a8f549dbc3
Merge sin(a), cos(a) into one instruction. On IA32 use x87 fsincos operation, on x64 call runtime routine whihc merges sin/cos intos sincos.
...
TODO: Implement for ARM and MIPS.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//92433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30827 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 22:00:27 +00:00
regis@google.com
3fa7a61efc
Implement latest spec changes regarding malformed types (see issue 14006):
...
- a malformed type used in a is, as, or catch type test results in a dynamic
type error being thrown.
- a malformed type is not mapped to dynamic anymore.
For now, this applies to type tests in checked mode as well, but discussion is
still on-going.
R=hausner@google.com
Review URL: https://codereview.chromium.org//53583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29608 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 23:30:32 +00:00
regis@google.com
09bcdc6d6d
Fix VM implementation of CastError not to extend TypeError (issue 5280).
...
Remove non-compliant fields in various Error classes (issue 10144).
Remove implicit constructor when patching in a constructor (issue 12217).
Patch corelib Error classes instead of declaring subclasses.
Update tests and status files.
R=asiva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//21832003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25782 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 18:35:04 +00:00
zra@google.com
40394904bb
Enables unboxed mints in ia32 javascript int compatability mode.
...
Also checks range information before emitting checks on x64.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21885003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25740 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 18:37:20 +00:00
fschneider@google.com
3933db4a7b
Simplify allocation stub for closures.
...
The compiler never generates code for allocating implicit static closures
using the allocation stub.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21067002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25573 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 16:56:39 +00:00
srdjan@google.com
5781d7cc84
Collect both arguments for math's min/max static functions. Later that information will be used to inline the operation if possible.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//19774007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25225 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 16:49:29 +00:00
regis@google.com
e8a722870b
Support type parameters and classes as expression in the vm.
...
Turn many compile-time errors into runtime errors per latest spec.
Triage affected tests.
R=hausner@google.com
Review URL: https://codereview.chromium.org//18801007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24861 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 19:35:56 +00:00
hausner@google.com
1e955965df
Better single stepping in VM debugger
...
Single stepping now steps into the next dart code that the
user is interested in, including from one asynchronous task
to the next.
R=asiva@google.com
Review URL: https://codereview.chromium.org//17846009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24632 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 17:29:18 +00:00
srdjan@google.com
47de186e76
Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call site (the ones using ICData).
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//17421003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24239 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 16:29:39 +00:00
hausner@google.com
4b497b0c17
Consolidate debug stubs
...
The new debug stub BreakpointRuntime gets the original stub address
from the debugger. With this scheme, we don't need a new debug stub
for every runtime stub that the debugger patches.
R=asiva@google.com
Review URL: https://codereview.chromium.org//15743019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23094 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 18:42:03 +00:00
hausner@google.com
7349a6d611
Make breakpoints on == fire reliably
...
Add breakpoints in the path taken if one of the operands
in a == b is null.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14991010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22857 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 17:08:09 +00:00
hausner@google.com
80c7ad1070
Implement breakpoint for closure calls
...
Introduce a new PcDescriptor kind to distinguish closure calls from other runtime calls. The debugger can patch these calls to set a breakpoint. When stepping into a closure call, the debugger must fish out the closure object from the stack, find the function and set breakpoints in it.
Arm and Mips breakpoint stubs are not implemented yet. ia32 and x64 stubs tested by hand. Automated test to follow.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14858033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22596 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 21:06:04 +00:00
vegorov@google.com
2565ca222f
Implement a variation of scalar replacement for non-escaping allocations.
...
AllocationSinking pass discovers non-escaping allocations that have no input uses other than uses in the stores into its own fields.
Every environment use of such allocation is replaced by a state snapshot (MaterializeObject instruction) that describes the state of each initialized field in the object. State snapshots are computed through an additional round of load-forwarding.
Once snapshots are computed allocations are removed from the graph.
MaterializeObject instructions are not compiled into native code but produce deoptimization instructions instead that describe how object should be materialized at deoptimization.
Deoptimization instructions now follow the following format:
[mat obj #1 ]...[mat obj #N][ret addr][... mat arguments ...][... real frames ...]
- the prefix describes each object to materialize on deopt via kMaterializeObject instruction;
- actual values that are needed for materialization are emited as a part of bottom-most stack frame. This is done to simplify implementation: they need to be discoverable by a GC during materialization phase. At the end of deoptimization they will be removed from the stack;
- normal stack slots can refer to materialized objects via kMaterializedObjectRef instruction.
Additionally this change contains fixes in load-forwarding that are needed to guarantee that all artificial LoadField instructions inserted during AllocationSinking are correctly replaced with actual values.
Limitations of the current implementation:
- can't eliminate allocations that flow into phis but otherwise don't actually escape;
- can't sink allocations out of loops;
- allocation with type arguments are not handled.
R=regis@google.com , srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//14935005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22485 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 23:40:42 +00:00
iposva@google.com
6c4ac09cb9
- Remove heap tracing.
...
Review URL: https://codereview.chromium.org//14179015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21844 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 21:43:57 +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
srdjan@google.com
35ef4ddbd5
Enable correct optimized double modulo operation. (TODO: enable remainder optimization).
...
Review URL: https://codereview.chromium.org//12082063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17859 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 17:40:28 +00:00
srdjan@google.com
6e26ea871d
On Ia32 optimistically assume that results from int32 and uint32 array loads fit into Smi. Only if the instruction caused deoptimization will we assume mixed Smi/Mint operations. In absence of precise tracking of deoptimization history (location/reason) conservatively assume that a method that was deoptimized once may have been deoptimzied because of uint32/int32 loads.
...
Significant improvement for MeshDecompression on ia32.
Review URL: https://codereview.chromium.org//12086045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17810 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 21:16:44 +00:00
srdjan@google.com
18b376a8ad
Add DoubleToSmi optimistically, preventing boxing/unboxing of doubles and propagate smi-nessof the result.
...
Review URL: https://codereview.chromium.org//11568044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16272 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 18:43:29 +00:00
cshapiro@google.com
49f6f9f36d
Merge the Merlin heap tracing to top-of-trunk.
...
Review URL: https://codereview.chromium.org//11428067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16199 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 19:58:45 +00:00
kmillikin@google.com
1610d7d2ac
Refactor the InstanceFunctionLookupStub.
...
The stub is used in the case that an IC miss handler cannot find a
cacheable target. It handles implicit closures, calls to instance
fields, and no such method.
Refactor the stub to make a single call into the runtime.
BUG=
Review URL: https://codereview.chromium.org//11316353
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16057 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 19:52:47 +00:00
regis@google.com
697550b2a2
Support call operator in the vm.
...
Review URL: https://codereview.chromium.org//11316343
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16009 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 00:48:58 +00:00
kmillikin@google.com
a119414b2f
Cache lookups at megamorphic call sites in optimized code.
...
The function name and argument descriptor are mapped to a lookup cache
at compile time. The cache maps class id to target function. It is
resizable.
Review URL: https://codereview.chromium.org//11299298
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15889 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 09:48:52 +00:00
srdjan@google.com
d6772016eb
Cleanups based on Kevin's and Florian's suggestions.
...
Review URL: https://codereview.chromium.org//11481002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15850 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 17:59:53 +00:00
kmillikin@google.com
3dabe31e91
Reapply "Do not call ResolveCompileInstanceFunction from the lookup stub."
...
With a fix for a crash bug on x64. The near jump encoding could fail on
some platforms due to platform-specific code.
BUG=
Review URL: https://codereview.chromium.org//11476021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15845 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 13:00:38 +00:00
kmillikin@google.com
1ddeb10349
Revert "Do not call ResolveCompileInstanceFunction from the lookup stub."
...
This reverts svn revision 15842 due to a snapshot build failure on Mac.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org//11467015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15843 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 11:21:13 +00:00
kmillikin@google.com
c9bab9efaa
Do not call ResolveCompileInstanceFunction from the lookup stub.
...
The InstanceFunctionLookup stub is only called after the inline cache miss
handler. The miss handler ensures that ResolveCompileInstanceCallTarget is
called.
BUG=
Review URL: https://codereview.chromium.org//11451036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15842 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 11:13:51 +00:00
kmillikin@google.com
8c4e214722
Pass IC data and arguments descriptor to IC miss runtime functions.
...
Before, we obtained them by pattern matching backwards on the machine
instructions at the call site. This previous approach becomes unwieldy when
we need to use to use multiple instance call patterns.
R=vegorov@google.com
BUG=
Review URL: https://codereview.chromium.org//11438017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15737 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 15:35:18 +00:00
regis@google.com
f19052e037
Remove ClosureArgumentMismatch runtime entry in vm and
...
replace with call to noSuchMethod.
Review URL: https://codereview.chromium.org//11421134
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15472 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 21:14:43 +00:00
srdjan@google.com
99ff4cef45
Address Florian's comments: use restricted lazy deoptimization, fix typo.
...
Review URL: https://codereview.chromium.org//11364245
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14938 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 01:36:04 +00:00
srdjan@google.com
7375693321
In optimized code use IC calls for instance calls that have no IC data instead of deoptimizing. The optimized IC call increments usage counter and reoptimizes optimized function if the threshold is met.
...
Recognize closure calls and mark them in ICData. Closure calls do not populate ICData, i.e., number of checks is always 0 (unless mixed closure calls with regular instance calls). Therefore closure IC calls do not count for reoptimization.
Review URL: https://codereview.chromium.org//11361225
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14860 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 18:34:05 +00:00
fschneider@google.com
a42474ba37
Reland: Improve smi shift operations and avoid repeated deoptimizations.
...
This CL includes a bug fix where a NULL check of the pc was missing.
Also change the dart2js test status of arithmetic_test from Skip to Fail.
Review URL: https://codereview.chromium.org//11369158
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14755 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 19:54:55 +00:00
fschneider@google.com
a830c7c091
Revert r14711 and r14709 because of test failures.
...
TBR=srdjan@google.com
Review URL: https://codereview.chromium.org//11363151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14712 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:37:26 +00:00
fschneider@google.com
0f251088ec
Improve smi shift operations and avoid repeated deoptimizations.
...
Smi left shifts do not contain a call now. Only after deoptimizing
at a smi operation we we generate mint code or a generic call to
avoid repeated deoptimization.
Added a test case for the code that was not covered by existing tests.
Review URL: https://codereview.chromium.org//11363141
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14709 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:03:47 +00:00
fschneider@google.com
85a2dca687
Inline native String.charCodeAt in optimized code and fix a bounds-check bug.
...
Introduce a new IL instruction that does charCodeAt from
1- and 2-byte character strings. The existing CheckArrayBound
instructions is extended to be used for string bounds checking.
Also fix a bug with a missing compile-time bounds-check on constant
arrays.
TEST=tests/language/optimized_string_charcodeat.dart,
tests/language/optimized_constant_array_string_access.dart
Review URL: https://codereview.chromium.org//11360033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14441 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 22:47:41 +00:00
fschneider@google.com
058f8105d6
Small IL cleanup.
...
1. Remove manual inlining and intrinsification of Double.toDouble
and Integer.toInt. The flow graph inliner can handle these since
they are not native library functions.
2. Remove unused member instance_call_ from UnarySmiOp.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//11267043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14079 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 14:31:44 +00:00
srdjan@google.com
64a5b5f609
In optimized code always deoptimize if we encounter an instance call without type feedback (ICData has no checks).
...
Fix a bug in inliner: do not inline methods that have no compiled code as we can not deoptimize into them. This is the simplest fix, more complex fixes can be implemented if we see a need for them.
This improves the speed of Meteor by 15% and NavierStokes by 40% (Mac OS X).
Review URL: https://codereview.chromium.org//11186007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13712 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 23:46:27 +00:00
fschneider@google.com
3efefbd582
Faster 64-bit right-shift for the ia32 compiler.
...
Review URL: https://codereview.chromium.org//11027060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13295 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 14:42:00 +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
fschneider@google.com
f60ebcc5fb
Add fast 64-bit bitwise negation to the IA32 optimizing compiler.
...
Review URL: https://codereview.chromium.org//11043020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13221 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 12:01:12 +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
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
fschneider@google.com
d25bfcb4c5
Revert r11772: Add check for non-smi to the IL and use it for class checks.
...
In its current state this causes some performance regressions because
we can't eliminate non-smi checks properly in the optimizer.
TBR=vegorov@google.com
Review URL: https://chromiumcodereview.appspot.com//10905065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11774 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 16:56:31 +00:00
fschneider@google.com
c045c3aff1
Add check for non-smi to the IL and use it for class checks.
...
Review URL: https://chromiumcodereview.appspot.com//10911057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11772 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 15:19:27 +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
srdjan@google.com
5f5150e031
Emit deoptimization information at stati calls (preparation for full deoptimization). Currently we use Deoptimization stubs to maintain the deoptimization info, do not emit stubs though for static calls.
...
Any instruction that calls out of Dart code and into other Dart code or C++ may deoptimize.
Review URL: https://chromiumcodereview.appspot.com//10880079
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11467 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 17:25:10 +00:00
fschneider@google.com
e450dfb95a
Add a smi-check instruction for arithmetic smi operations.
...
The flowgraph optimizer inserts smi checks for the inputs of
arithmetic smi operations:
PushArgument v0
PushArgument v1
v2 <- InstanceCall(+, v0, v1) IC[1: Smi, Smi]
becomes
CheckSmi(v0)
CheckSmi(v1)
v2 <- BinarySmiOp(+, v0, v1)
Each input operand is checked separately. This avoids using a temp
register for a combined smi check. It also allows us to easily eliminate
the checks for left and right input separately.
There are two ways to eliminate smi checks:
1. By common subexpression elimination: if the value checked is already
checked for smi-ness before.
2. By class-id propagation: If the input value is guaranteed to be a smi.
Review URL: https://chromiumcodereview.appspot.com//10867012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11216 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 08:24:29 +00:00
fschneider@google.com
f5ec253dec
Split BinaryOp into BinarySmiOp and BinaryMintOp.
...
This refactoring is a preparation for inserting explicit
class checks for arithmetic operations.
Review URL: https://chromiumcodereview.appspot.com//10879005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11132 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 11:17:57 +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