Commit Graph

133 Commits

Author SHA1 Message Date
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
asiva@google.com a576fec3c0 Allow the native resolver to setup whether it needs the Dart API scope to
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.

R=hausner@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +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
fschneider@google.com 5aa02dce31 Small cleanup and more test coverage for guarded fields.
Some cases of field guards for guarded length  were not covered by our tests.

Otherwise I removed redundant conditions that are either impossible
or always true from the code generator for GuardFieldInstr.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30887 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-05 11:17:06 +00:00
srdjan@google.com cf53988cf6 Use range information to omit checks in TRUNCDIV/MOD operations.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30673 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 18:18:24 +00:00
fschneider@google.com 8b0b3fde4d Generalize if-conversion to arbitrary smi comparisons.
Until now only == and != comparisons were supported.

Further changes are:
 Remove flag FLAG_new_identity_spec: It is not needed anymore.
 Invoke Canonicalize another time before branch optimizations.
 Fixes support for TestSmiInstr with the branch-simplifier pass.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30622 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 12:57:21 +00:00
srdjan@google.com 3165e204e3 Merge TRUNCDIV and MOD into one instruction. Icorporated feedback from CL https://codereview.chromium.org/68663003
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30536 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 17:56:54 +00:00
fschneider@google.com 05b8012333 Remove dead code from IfThenElse and StrictCompare in the compiler.
The code for these cases is either completely unused or can only be hit with
canonicalization and constant propagation turned off. Since this is not tested,
and does not bring any performance benefit for the default configuration it is
best to just remove it.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30393 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 10:38:37 +00:00
fschneider@google.com 88726f7f70 Streamline code generator for branches and comparisons.
This is another refactoring step. It turn all comparisons
 to be generated after the same pattern and removes duplicated
 code from each of the different comparisons (smi, mint, double, etc.)

A comparison as an expression now follows the same patterns as a comparison
inside a branch. It just adds a common epilogue to materialize the boolean
result.

In another CL this common epilogue will be generated by reusing the IfThenElse
IL instruction.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30243 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-13 18:21:27 +00:00
fschneider@google.com ee554e199d Cleanup of code generation for StrictCompare.
The case of two constant operands does not occur unless certain optimizations
are turned off. It is not necessary to have a special handling in the code
generator for this case.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30153 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 13:01:54 +00:00
srdjan@google.com b97c8e894c Inline integer modulo operation.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30075 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 21:50:26 +00:00
fschneider@google.com b324e06153 VM: Fix identical comparisons with bigints.
The optimizing compiler did not properly preserve registers across
the runtime call that occurs when using identical with bigints.

BUG=http://dartbug.com/14903
TEST=tests/language/vm/regress_14903_test.dart
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30058 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 17:27:16 +00:00
fschneider@google.com b15bd6fe04 Cleanup of branch code generation (no change in functionality).
This CL is the first step in refactoring the way branches and comparisons
are generated.

1. Move helper functions from flow_graph_compiler_xyz.cc to
intermediate_language_xyz.cc.

2. Remove IL class ControlInstruction. It was only implemented by BranchInstr.
All functions provided are moved to BranchInstr.

3. When generating branch code for comparisons, pass the successor labels explicitly
instead of getting them from the branch. This will allow us to provide different labels
when materialize a bool value of a comparison.

4. Move some common code for IfThenElseInstr from the platform-specific files
into intermediate_language.cc and simplify it.

The goal is to enable if-conversion of arbitrary comparisons. Right now,
the code for == is hard-coded in IfThenElseInstr (and duplicated, too). This
means that e.g. "a < b ? 0 : 1" cannot be optimized.

As a result, IfThenElseInstr can be used to materialize the boolean  value of
a comparison. This way the complication of having ComparisonInstr both as a
normal instruction and as wrapped inside a BranchInstr can be simplified.
Comparisons would no longer appear as plain instructions in the IL, but only
wrapped inside either a Branch or an IfThenElse(true, false).

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30042 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 11:47:04 +00:00
fschneider@google.com aa789a7b27 Merge (x & y) == 0 pattern to emit a single test instruction.
This is based on a previous uncommitted CL by vegorov@
(https://codereview.chromium.org/14251023/).

It is rebased and fixes a bug in the MIPS implementation: BranchOnCondition
requires the comparison result in fixed registers CMPRES1/CMPRES2.

Remove register alias TMP1 (=TMP) and CMPRES (=CMPRES1). It is confusing to
have them around and easy to forget that they are actually the same.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29966 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 12:13:29 +00:00
zra@google.com ca82c461a0 Impelments IfThenElse instruction for ARM and MIPS.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29933 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 20:45:25 +00:00
johnmccutchan@google.com 29c01044bc This is the final breaking change in dart:typed_data needed for Dart 1.0. We need this change because the ECMAScript SIMD specification only includes Int32x4 and Int32x4List and our types must match.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29849 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 21:56:59 +00:00
fschneider@google.com 9031c80c88 Change == into an instance call to allow polymorphic inlining of ==.
In unoptimized code equality is now just another instance call.

The optimizer replaces it with a specialized implementation based on static
 type information and type feedback.

Many of the manual optimizations of == in the optimizer are now just handled
 by the generic inliner, plus polymorphic inlining of == calls is now possible.
This also eliminates the need for a lot of duplicated code in the backend.

I adapted the inlining heuristics to compensate for the slightly larger
inital flow graph size.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29800 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 11:32:52 +00:00
johnmccutchan@google.com 5f63715d47 SIMD shuffle API changes
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29723 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 07:09:54 +00:00
johnmccutchan@google.com 8a0fd8ce4d Add Uint32x4List to typed_data
R=asiva@google.com, srdjan@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29639 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 04:57:38 +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
kmillikin@google.com 253fc69ecc Record a correct deoptimization environment for slow-path code.
Slow-path code is not marked as a call, so the deoptimization environment
built by the register allocator can contain unspilled registers.  However,
all registers are spilled before the call.  Compute the spill slot for all
registers and change the ones in the deoptimization environment to be
spilled.

BUG=https://code.google.com/p/dart/issues/detail?id=13995
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29239 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 10:17:10 +00:00
srdjan@google.com b83bda9e0e Add new style of string interpolation optimization: new nodes, working constant folding.
TODO: partial constant fold of incoming arguments.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28741 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 18:12:08 +00:00
kmillikin@google.com e375053d2f Pattern match on generated code to find edge counters.
In unoptimized code, use platform-specific pattern matching on generated
code to find edge counter arrays.  Previously we searched pointer offsets,
but that does not work on platforms that encode the edge counters as indexes
into an object pool (i.e., x64, ARM, MIPS).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28085 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 10:22:47 +00:00
fschneider@google.com a329b0e6bc Dart VM: Simplify code generation for equality operators.
By inserting the necessary checks for null inside the callee
at the AST level, the code generation of == operations can be
greatly simplified.

This is a performance-neutral change and a step for allowing
generic inlining of arbitrary == methods. So far we could only
inline them for a common set of types in the flow graph
optimizer.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28084 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 10:10:50 +00:00
kmillikin@google.com 94ca56a774 Fix a bug in block reordering/block compaction.
The compiler assumes (a) the graph entry is followed in the block order by
its normal entry, and (b) the normal entry block is non-empty.  There is not
necessarily true, so stop assuming it.

BUG=https://code.google.com/p/dart/issues/detail?id=13101
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27377 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 12:32:58 +00:00
johnmccutchan@google.com 0c0bb73f35 Fix large performance regression in Box2D, MD5, and SHA1 benchmarks caused by https://codereview.chromium.org/22915008/
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27288 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 12:39:52 +00:00
johnmccutchan@google.com e571ecdf87 Tests for GuardField length check along with bug fixes
R=regis@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27279 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-08 21:44:42 +00:00
srdjan@google.com aa8b03e7d7 For trigonometric functions call to C-libraries: they are faster than x87 operations (3% on Box2D). This also enables quicker trigonometrics on ARM and MIPS. TODO: Make InvokeMathCFunction more flexible so that it can handle both static and instance calls
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27256 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 18:14:53 +00:00
fschneider@google.com 40013fe1c0 Simplify compilation of relational operators.
Instead of having a separate IL instructions relational comparisons
are built as normal instance calls initially. When optimized, we replace
the instance call with a smi/double/mint comparison instruction.

This enables generic inlining of relational operator calls and simplifies
code generation, too.

Merging comparisons with branches is done in the optimizing compiler's
branch simplification phase.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27058 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 14:02:53 +00:00
fschneider@google.com e174a4c18e Fix a compiler bug caused by Utils::IsPowerOfTwo treating zero as a power of two.
The IsPowerOfTwo function is used together with ShiftForPowerOfTwo.  Both function
do not work with zero. This caused the optimizing compiler to generate invalid code
for the expression

x ? 0 : 0

where it assumed that if one of the constants is a power-of-two, it can
be computed by (1 << n). We check for 0 in a number of places, but instead
I decided to fix Utils::IsPowerOfTwo itself and remove unnecessary checks
for the zero case.

TEST=tests/language/vm/if_conversion_vm_test.dart, runtime/vm/utils_test.cc
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27033 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 09:28:34 +00:00
srdjan@google.com 97891ce193 If a rethrow is encountered in the catch block, then its handler must be marked that it needs stacktrace. Fix issue r12584.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26963 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-31 00:26:47 +00:00
regis@google.com 8171570100 Fix the previously ineffective assert checking the number of arguments passed to
a runtime entry in the VM.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26826 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 23:07:14 +00:00
srdjan@google.com e06ea63b60 Mark exception handlers if they have a stacktrace specified. Do not build a stacktrace if the handler has no stacktrace.
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26823 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:42:21 +00:00
kmillikin@google.com 00f20f3ffc Collect edge count profiling data and reorder basic blocks.
In unoptimized code, collect edge counts for all edges.  Use the counts
to reorder basic blocks in optimized code.  Basic blocks are reordered
by using Pettis and Hansen's "Profile Guided Code Positioning" bottom-up
algorithm.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26773 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 09:17:07 +00:00
kmillikin@google.com 4f80ef09df Change Bool::Get to return a handle instead of a pointer to a raw object.
Replace occurrences of 'expr ? Bool::True() : Bool::False()' with simply
'Bool::Get(expr)' and analogously for its negation.  The pointer to the raw
object can still be extracted with 'Bool::Get(expr).raw()'.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26770 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:38:56 +00:00
srdjan@google.com 255a28369c Fix corner cases for double pow operation.
R=regis@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26662 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:38:51 +00:00
srdjan@google.com 03111ecbeb Fix performance regression on Tracer: recognize _doublePow in Math.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26470 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 20:36:08 +00:00
johnmccutchan@google.com c8b370ab50 Initial support for length guards on final fields.
R=regis@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26433 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 15:32:45 +00:00
johnmccutchan@google.com 6d11a8fa15 Add signMask getter to Float32x4
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26394 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 21:35:53 +00:00
zra@google.com da9b56f789 Fixes bug in MIPS IL.
TBR: regis, srdjan

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26197 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 16:12:38 +00:00
srdjan@google.com 266b9cb305 Add double unary operation (negate). This is a replica of the destrpyed CL https://chromiumcodereview.appspot.com/23219002/
Review URL: https://codereview.chromium.org//22999011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26169 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 23:45:13 +00:00
fschneider@google.com 2793f7ad63 Fix bug with optimized try-catch on ARM/MIPS.
The constant pool pointer must be restored before any parallel
moves at the catch-entry block.

In addition, this CL removes CatchEntryInstr and folds its
functionality into CatchBlockEntryInstr. Until now every catch-block
started with CatchBlockEntryInstr followed by a CatchEntryInstr.

This simplifies a lot of code in the compiler and avoids issues
with allocator-move code inserted between the two instructions.

BUG=https://code.google.com/p/dart/issues/detail?id=12291
TEST=tests/language/try_catch4_test.dart
R=regis@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25918 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 08:20:10 +00:00
srdjan@google.com 1b12859a7e Implement IsNullCheck for CheckClassInstr. If input is nullable expected type, then check for null only.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25907 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 23:01:43 +00:00
asiva@google.com b4d9e0d620 Auto create ApiLocalScope before calling native functions, this ensures that
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.

Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
srdjan@google.com bd74c66970 Inline fsin/fcos. Huge speedup on Box2D.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25816 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 15:46:28 +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
fschneider@google.com ee0aaf0453 Enable allocation sinking for non-implicit closures.
In optimized code we can eliminate the allocation of closures that are not
escaping and where all calls are inlined.

Closures are currently allocated with a special IL instruction (CreateClosure).
This CL changes this for non-implicit closures and allocates them
like normal objects. The fields for the function and the context are
initialized like instance fields. This way object allocation sinking can
handle closures like any other objects.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25706 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 12:03:21 +00:00