Commit graph

416 commits

Author SHA1 Message Date
regis@google.com 989aa3348a Fix an undetected Smi overflow on ARM.
Fix wrongly triggered overflow in optimized code on Intel.
Add a test.
Address a few TODOs.

R=zra@google.com

Review URL: https://codereview.chromium.org//281823002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36186 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 19:57:04 +00:00
srdjan@google.com ff45a972b5 Refactor and improve code for pow.
R=zra@google.com

Review URL: https://codereview.chromium.org//270743004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35946 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 22:18:04 +00:00
fschneider@google.com 7dd023595b VM: Emit better code for CheckEitherSmi if both operands are the same.
In that case we only need one smi check, instead of checking
both operands.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//266373004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35844 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 09:57:09 +00:00
fschneider@google.com 4289f6e968 Remove unreachable code from the code generator.
The case of constant array bounds check can only occur for the
overflow case. Otherwise, the compiler eliminates those checks
already before code generation.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//263083010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35793 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 09:23:24 +00:00
srdjan@google.com a9ecc2118c Use xorps xmm1, xmm1 to creat a 0.0 cconstant. Add to utils a bitwise double test.
R=zra@google.com

Review URL: https://codereview.chromium.org//267793005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35718 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 23:50:22 +00:00
srdjan@google.com 1cfd7fa9e3 Convert BinadryDoubleOp to MathUnaryInstr double-square if both inputs are the same. Uses less registers.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//262823009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35714 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 22:38:18 +00:00
srdjan@google.com 1844986898 For nullable/double typed fields compare with null for deoptimization, else assume double.
R=vegorov@google.com

Review URL: https://codereview.chromium.org//264953004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35690 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 15:55:15 +00:00
srdjan@google.com f18d761b87 Merge ConstantInstr -> UnboxDouble to UnboxedConstant. Reduces register usage and allows for various optimization with constants.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//266633007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35663 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 22:03:21 +00:00
fschneider@google.com 1933c126c8 VM: Explicitly load function and context before calling a closure.
Before these were implicitly loaded as part of the closure calling code sequence.

This CL makes those loads canditates for load elimination. The context is also
explictly stored before the call.

R=regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//265443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35595 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 20:14:02 +00:00
regis@google.com 8868058d60 Enums cleanup.
R=iposva@google.com

Review URL: https://codereview.chromium.org//259393002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35559 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 01:26:14 +00:00
regis@google.com e0ab99b0b2 Remember all deopt reasons in ic_data, not just the last one.
Remember if a JS warning was issued in ic_data.
Save a word in ic_data on 64-bit platforms.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//254723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35457 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:45:14 +00:00
srdjan@google.com 0c2b0af123 Copy of Issue 231383002 after hard disk crash: First step in improving instance of test for a fixed set of value cids returning different results.
Review URL: https://codereview.chromium.org//258563004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35455 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:21:12 +00:00
fschneider@google.com 79a5307d5b VM: Implement closure calls as instance calls.
Conceptually f() becomes f.call() where the .call method performs the actual
closure call. The closure call itself is implemented without a stub.

The check if the object called is a closure becomes a class-id check
which can be hoisted out of loops.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//227723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34917 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 10:56:00 +00:00
turnidge@google.com 1eba6be2b2 Implement new stacktrace and deoptimization stress testing flags:
--deoptimize-every=N
--deoptimize-filter=FunctionName
--stacktrace-every=N
--stacktrace-filter=FunctionName

Add a word of stack_overflow_flags to the Isolate.  Use a bit in this
word to indicate whether or not a function is being compiler for OSR.
This allows us to distinguish an OSR overflow from a stress-testing
overflow.

BUG=
R=johnmccutchan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//226543007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34887 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 18:27:37 +00:00
johnmccutchan@google.com 3834c9a869 Support for multiple register values
- Adds a PairLocation type (Location is still a single word but now has two tags one for constants and one for pairs).
- New representations: kPairOfTagged & kPairOfUnboxedDouble.
- Register allocator uses second SSA index for Definitions that use two registers.
- Fix LiveRange shape for kWritableRegister inputs.
- Updated MergedMathInstr that returns a kPairOfTagged or kPairOfUnboxedDouble (depending on the merged math kind).
- A new instruction (ExtractNthOutput) for extracting a single register from an instruction that has a output register pair.

Open issues that need to be addressed in a follow up CL:

- Adjust PhiInstr and handling of PhiInstr in the register allocator to work with output pairs (once unboxed mints are in GPRs).

R=fschneider@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//215363004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34833 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 16:13:43 +00:00
turnidge@google.com d358d84eb7 Begin implementing flag --deoptimize-filter=FUNC for ia32.
Currently not functional - committing so that srdjan can investigate
why it doesn't work.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//226303002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34737 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 18:05:37 +00:00
srdjan@google.com 6d56854a9a Add optimization for pow(base, 0.5) to the other architectures as well.
R=zra@google.com

Review URL: https://codereview.chromium.org//220723017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34717 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 19:44:18 +00:00
srdjan@google.com 883486f303 Fix builds for finicky compilers.
Review URL: https://codereview.chromium.org//221623002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34625 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 23:39:56 +00:00
srdjan@google.com 4fed01aef9 Optimize pow(x, 0.5) to use sqrt instead.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//221433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34624 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 23:25:06 +00:00
zra@google.com c323e2ac13 Implements unboxed Mints on ARM.
R=johnmccutchan@google.com, regis@google.com

Review URL: https://codereview.chromium.org//206503005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34256 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 16:26:21 +00:00
johnmccutchan@google.com e255df56ed Refactor to support multiple outputs in location summary
R=srdjan@google.com

Review URL: https://codereview.chromium.org//207063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34250 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 14:40:30 +00:00
johnmccutchan@google.com 801c26beb4 Unboxed Float64x2 fields and some misc fixes
R=srdjan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//195333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33542 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 17:59:45 +00:00
johnmccutchan@google.com 08b77f2a1f Inline Float64x2 methods that take 1 argument
BUG=
R=srdjan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//193183003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33506 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 22:34:56 +00:00
johnmccutchan@google.com 29a0556de7 Inline Float64x2 methods with zero arguments
BUG=
R=srdjan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//192573008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33504 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 20:58:04 +00:00
johnmccutchan@google.com 115cad1945 Inline of Float64x2 operations round 1
BUG=
R=srdjan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//183923026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33459 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 21:43:49 +00:00
fschneider@google.com 468eb1d8e0 Inline context allocation in optimized code.
Instead of just calling the generic stub in optimized code, there is now
inlined code to handle allocation and initialization of the context. A
deferred code path handles inline allocation failure.

R=regis@google.com

Review URL: https://codereview.chromium.org//182303005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33203 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 10:24:59 +00:00
johnmccutchan@google.com c4875a11d6 Stop creating dummy call frames when calling out to C functions
R=asiva@google.com, regis@google.com

Review URL: https://codereview.chromium.org//180243013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33122 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 17:39:04 +00:00
regis@google.com 8d5dae7798 Allocate instance closures similarly to regular closures, i.e. without a
specific stub and runtime call.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//178233003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33074 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 18:38:47 +00:00
fschneider@google.com 53abcebbf9 VM: Replace StoreVMField with StoreInstanceField.
This simplifies a lot of code in the optimizer and avoids the confusion
and errors due to mismatch input operands when using StoreVMField.

I added a separate constructor for LoadFieldInstr to avoid having
to explicily set the associated field there.

R=regis@google.com

Review URL: https://codereview.chromium.org//179443004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33059 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 12:12:40 +00:00
fschneider@google.com 974fdb6a9a Explicit conversions for Float32 array loads/stores.
Added two new IL instructions: DoubleToFloat and FloatToDouble.

This enables store-to-load forwarding for Float32 arrays which was
not working before because of the implicit conversions.

Loads are now translated as:

v3 <- LoadIndexed(v2, v1)
v4 <- FloatToDouble(v3)

Stores:

v5 <- DoubleToFloat(v4)
      StoreIndexed(v7, v6, v5)

There is no explicit representation for float values because
they are never used in a deoptimization environment. The only
real uses are at FloatToDouble and StoreIndexed.

For example when copying a value from one Float32 array to another
there is no intermediate conversions anymore

a[0] = b[0] before:

  movss xmm1,[ebx+0x7]
  cvtss2sd xmm1,xmm1
  cvtsd2ss xmm2,xmm1
  movss [edx+0x7],xmm2

after:

  movss xmm1,[ebx+0x7]
  movss [edx+0x7],xmm1

Also in this change:
  Eliminate GuardField based on cid information of list factories.
  GC unused symbols

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//172293004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32891 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 12:12:29 +00:00
johnmccutchan@google.com ed5894d0cf Unbox/Box Float64x2 and inline typed array loads and stores
R=fschneider@google.com

Review URL: https://codereview.chromium.org//172653002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32869 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 20:41:54 +00:00
regis@google.com d599ea7d9b Simplify type argument instantiation cache lookup by introducing an array
of 1 zero Smi.

Review URL: https://codereview.chromium.org//169223005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32756 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 19:30:03 +00:00
fschneider@google.com 13f2d115ef Simplify generated code for object allocation with type arguments.
The motivation for the change is to make allocation sinking more
general when type arguments are in play. As a result I cleaned up the code
dealing with constructor type arguments as follows:

* Remove ExtractConstructorTypeArguments and ExtractConstructorInstantiator
from the intermediate language.

* The allocation stub takes now 1 argument (instead of 2) for parameterized
classes.

* The allocation stub always get an instantiated type arguments object
as input. It does not need to do a lookup in the instantiations array anymore.

* The code for looking up cached instantiated type arguments is moved
to the InstantiateTypeArguments instruction. This instruction is now also
used for object allocation. I'm not sure how relevant the cache lookup is
performance-wise. dart2js compilation did not show any regression without it.

R=regis@google.com

Review URL: https://codereview.chromium.org//163683006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32697 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 13:03:35 +00:00
srdjan@google.com 2c37517875 Disable hoisting CheckClass due to excessive deoptimization (issue 16285). Detect that a deoptimization was caused by hoisted check class instruction and disable hoisting of CheckClassInstr for that function. This is a short-term solution to fix excessive deoptimization causing slow start-ups.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//157833004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32460 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-08 00:02:22 +00:00
regis@google.com 7830430adf Implement eager instantiation and canonicalization of type arguments at run
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//154393003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
johnmccutchan@google.com e1ba48aea0 Extend StoreInstanceFieldInstr and LoadFieldInstr to support reusable Float32x4 boxes on IA32, X64, and ARM.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//150063004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32429 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 15:30:25 +00:00
johnmccutchan@google.com 15090664ba Refactor unboxed fields code in preparation of reusable SIMD boxes.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//136753012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32199 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 16:45:23 +00:00
fschneider@google.com bb4869e3bb Inline recognized List factory in the flow graph optimizer.
The call to the native List factory is lowered into IL instructions if
the length is known to be a valid smi.

This is mostly performance neutral. The acutal allocation now takes place
in the array allocation stub instead of the intrinsic code (and the runtime
List_allocate in case the fast case path fails).

This is a preparation for enabling allocation sinking for arrays and will
be extended to handle type list allocation as well. This way the allocation
site is explicitly represented as a CreateArrayInstr, instead of just being
a static call.

Another benefit is that this allows to simplify the special handling of
recognized factory calls in the optimizer once all array types are handled
this way.

R=johnmccutchan@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//138523004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32194 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 13:26:48 +00:00
fschneider@google.com 6ffa061fdf Fix stack height assertion code and free up a bit in the Function tag bits.
The bit has_finally was only used to skip the checking of the stack height
at return statements: There was an unused value floating on top of the
expression stack in unoptimized code if the finally block preceded a normal
return statement. Normallyi, that does not cause harm. Optimized code is not
affected since it has a fixed stack size for expression evaluation.

This CL fixes the stack height for functions with try-finally by introducing
a temporary local where the return value is saved before an inlined
finally-block.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//149603003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32157 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 12:12:31 +00:00
johnmccutchan@google.com 9ca09b50e7 Track live instance and allocation counts for classes.
R=iposva@google.com

Review URL: https://codereview.chromium.org//51653006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31978 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-22 19:21:22 +00:00
hausner@google.com 0c434b3073 Rename kDummyTokenIndex to kNoSourcePos
Addresses comment to previous change list.

R=regis@google.com

Review URL: https://codereview.chromium.org//144343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31969 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 23:46:26 +00:00
fschneider@google.com 6d90edebc3 Generate smaller unoptimized code for local variable loads.
Use memory operands in unoptimized code on ia32 and x64 to
push local variables on the expression stack.

Instead of

mov eax, [ebp+index]
push eax

generate

push [ebp+index]

ARM/MIPS are unchanged. They don't have an instruction
for pushing a memory operand directly.

R=zra@google.com

Review URL: https://codereview.chromium.org//113893010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31600 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 10:27:01 +00:00
fschneider@google.com 15dfa97ab6 Fix bug and refactor optimized try-catch.
When untagged values flow into a exception-throwing instruction
 they need to be converted eagerly. Catch block entries assume all
 values are tagged at the entry.

 I changed the generation of moves at throwing
 instructions in try-catch: Instead of manuallu emitting moves,
 construct a parallel move and use the resolver to emit the native code.
 This eliminates a lot of duplicated code from all platforms.

 It will also allow to re-use stack space that is currently allocated
 separately for each individual try-catch in a function.

 I added a few more unrelated minor changes in various parts of the VM
 * Simpilify guard code generation
 * Resolve refactoring TODO in deoptimization
 * Improve names

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//125103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31536 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 09:58:45 +00:00
hausner@google.com c571528323 Make return statements single steppable
Replace the code smashing breakpoints at function returns with a call
to a runtime stub that checks whether the debugger is single stepping.
The call to the stub is only emitted in unoptimized code.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//106053011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31435 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 23:31:52 +00:00
srdjan@google.com 594206f36a Less register pressure: allow stack location for index argument of array bound check instruction. Implement on ia32 only, since only few registers are available there.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//103333006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31428 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 20:11:41 +00:00
srdjan@google.com cd92319223 Optimize string length one comparisons by comparing char codes only. Implemented for one byte strings only at the moment. Will add other string types/mixed compares later.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//105143011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31347 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 20:11:38 +00:00
fschneider@google.com e994d8b697 Revert r31326.
TBR=johnmccutchan@google.com,

Review URL: https://codereview.chromium.org//118133004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31332 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 12:21:09 +00:00
fschneider@google.com fe726e1971 Use parallel move resolver for optimized try-catch.
This CL has no change in functionality and is purely clean up and
refactoring. Instead of manually generating the moves at throwing
instructions in try-catch, construct a parallel move and use the resolver
to emit the native code. This eliminates a lot of duplicated code
from all platforms.

It will also allow to re-use stack space that is currently allocated
separately for each individual try-catch in a function.

I added a few more unrelated minor changes in various parts of the VM
* Simpilify guard code generation
* Resolve refactoring TODO in deoptimization
* Improve names

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//119213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31326 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 09:41:42 +00:00
fschneider@google.com f7149b05c8 Fix bug in double unboxing.
The state bit that record if a field is unboxed or not has to be checked
in unoptimized code as well, since that code does not change when deoptimizing.

I also compacted the kind_bits bit field in the Field class to start from bit 0.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//106623006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31229 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 15:46:39 +00:00
fschneider@google.com 6abd6e326e Add mutable double boxes for fields.
This allows the optimizing compiler to generate unboxed loads/stores
to fields containing double values. The double value is stored
in a reusable double object.

Unboxed loads/stores are generated for optimized code. Unoptimized code
allocates a new double on loads. To avoid performance regressions
for fields that are only written few times (e.g. only in the constructor)
I put a heuristic in place that
compares the usage count of setters and getters. Unboxed operations
are only generated if the setter is invoked a significant amount of
times (threshold is 10% of getter invocations).

The CL is so big because it changes the way LocationSummmary
is allocated: We now have a bit to generate different summaries
for optimized and unoptimized code.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//99573005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31164 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 15:11:31 +00:00