Commit Graph

497 Commits

Author SHA1 Message Date
fschneider@google.com b3098a263b Fix polymorphic inlining of method dispatchers.
Field dispatchers and noSuchMethod dispatchers are generated by the VM
compiler and should always be inlined - this CL fixes the case of polymorphic
inlining where dipatchers were not inlined in the same way as for monomorphic
calls sites.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35490 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 18:01:57 +00:00
srdjan@google.com 66c18e7c7d Address comments on Issue 258563004.
Review URL: https://codereview.chromium.org//252873003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35486 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 17:17:38 +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
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
fschneider@google.com 72bf78ffc7 Add aliasing disambiguation for typed data lists.
Typed list factories are now also recognized as allocation
instructions.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33640 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 08:41:14 +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
fschneider@google.com ac7e9e5c69 Add alias identity information to array allocations.
Loads/stores with non-escaping arrays can be disambiguated from loads/store
with unknown identity.

This enables better load elimination for non-escaping arrays.

For example in the following code:

test() {
  var a = new List(1);
  var b = new List(1);
  a[0] = 42;
  b[0] = 43;
  return a[0] + b[0];
}

we can now eliminate both loads a[0] and b[0] where before all stores to [0] were
considered to interfere with each other..

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33523 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 09:39:23 +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
fschneider@google.com b5b1be80fa Add alias disambiguation for VM fields.
This is needed for generalizing allocation sinking to
work with instance fields and plain field offsets.

MaterializeObject now works with  a set of Field/Smi objects
Right now this should be performance-neutral, but it already
simplifies the code be removing the fake fields previously used
for type arguments, closure function/context.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33478 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 09:59:49 +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 cb735217ad VM: Fix bug in aliasing computation.
Values flowing into arrays were not correctly computed as aliased.

TEST=tests/language/vm/load_to_load_forwarding_vm_test.dart
R=srdjan@google.com, vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33334 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 17:58:46 +00:00
fschneider@google.com e8000b60c1 Better inlining of type tests.
The optimizing compiler can replace a type test with a cid-comparison
under certain conditions. This CL translates the instance-of call
into a inline comparison in the optimizer and not - as previously -
in the code generator. This results in better generated code for
like

if (x is y) {...}

when y does not have sub-classes and does not have type arguments.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33231 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 18:08:59 +00:00
fschneider@google.com 5bd036b0ad Fix bug in load elimination with multiple phis.
The in-set has to be computed on the out-sets of the predecessors with
the phi-moves of the predecessor applied. This is now done on a temporary
copy of out, instead of the out-set itself - otherwise the phi-moves may
 be applied more than once to the same set.

BUG=http://dartbug.com/17159
TEST=tests/language/vm/load_to_load_forwarding_vm_test.dart
R=vegorov@chromium.org

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33118 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 16:31:58 +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
zra@google.com fd366da1cf Updates refactoring of CPU feature detection
with fix that uses cpuid for Intel/Linux.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32980 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 19:28:30 +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
johnmccutchan@google.com 95dc06ae34 Enable polymorphic inlining of StringBase [] and StringBase codeUnitAt.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32749 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 17:41:11 +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
johnmccutchan@google.com e7948f110e Only inline Int32/Uint32 list view stores if we can unbox integers.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32672 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-13 20:53:35 +00:00
johnmccutchan@google.com 45cee25fc3 Inline polymorphic typed array view stores
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32656 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-13 15:54:33 +00:00
zra@google.com 3693beeb6b Reverts refactoring of CPU feature detection for
assertion failure in Dartium.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32560 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 16:05:43 +00:00
fschneider@google.com 9c2cd1168e Improve constant propagation for type arguments.
The instruction to extract type arguments are now fully supported
in constant propagation.

I also added cid-information to non-instance constants (like e.g.
type arguments).  This will enable more opportunities
for allocation sinking because it requires the type arguments to
 be known constant.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32489 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 10:30:07 +00:00
zra@google.com 6f2096face Refactors some CPU feature detection into new class CpuInfo, and uses new information in VM service.
This change rewrites the code from the ARM assembler for parsing /proc/cpuinfo on Linux and Android, and collects it into a CpuInfo class that can be used for other architectures as well. This code is in cpuinfo_*.cc. /proc/cpuinfo equivalents are used for Mac and Windows. CpuInfo is used by the VM service to report on the hardware dart is running on. In the future CpuInfo can also be used here to provide more information.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32468 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-08 22:27:27 +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
srdjan@google.com 3c36c374e9 Fix issue 16592: Do not attempt to merge operations that do not have uses, otherwise we add force uses to them (temporary array to hold two results) and the graph verification fails(no SSA temp but has uses).
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32381 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 19:55:53 +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 dfa664dbe4 Fix bug in aliasing computation for constant index.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32016 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-27 12:02:37 +00:00
fschneider@google.com 21214c0f16 Improve aliasing info for load elimination of array loads.
The optimizer can now track side effects to array locations
at a constant index when eliminating array loads. Stores to
arrays with a constant index affect loads from arrays
at the same constant index _and_ loads from an unknown (non-constant)
index. Stores to an array with an unknown index affect all array loads.

For instance code like

var a = new List(2);
a[0] = 123;
a[1] = 456;
print(a[0] + a[1]);

we can now eliminate both loads from a[0] and a[1], where before
only the loads from a[1] was eliminated.

I changed the internal encoding of Alias to use BitField instead of
plain integers. This makes it a little easire to extend.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32014 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-27 11:06:48 +00:00
fschneider@google.com fb5e6077bd Undo workaround for a bug with compile-type of the context value.
I think this was fixed already with https://codereview.chromium.org/102053010/.

BUG=dartbug.com/15652
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31885 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 14:13:24 +00:00
srdjan@google.com 27934ab40b Similar fix to merging trunc-div/mod: only one merge for now.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31862 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 00:15:02 +00:00
srdjan@google.com 76b526875c Fix issue 16103: incorrect merging of sin/cos.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31858 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 23:12:41 +00:00
johnmccutchan@google.com 057e483d51 Support unboxed SIMD types in AllocationSinking
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31752 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-13 18:41:08 +00:00
fschneider@google.com 13bddfc997 Fix bug in specialization of IC-data.
My previous change to use constants for OSR values if possible
uncovered a bug when narrowing IC-data based on type information:

If the exising IC data don't agree with the static type information,
don't specialize.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31607 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 13:07:53 +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 8fac397169 Fix instruction removal for 'as' test; the bug caused us to stop optimizing after an 'as' test.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31395 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-27 21:36:26 +00:00
srdjan@google.com 47b1f54ca9 Fix typo: enable cid guessing for equality operators as well.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31377 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-26 22:15:37 +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 21d0b251e0 Update double unboxing heuristic.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31324 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 09:18:40 +00:00
srdjan@google.com 761d4d04cd Constant propagation in LoadIndexed when inputs are array/string and index constants.
R=fschneider@google.com, johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31230 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 16:55:12 +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