Commit Graph

398 Commits

Author SHA1 Message Date
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
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
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
zra@google.com daf539e2f9 Fixes a couple problems with GC of unoptimized code.
1. Instead of making a pass before the Marking phase,
   this change does not visit code pointers in functions
   during marking. Then after marking, if the code has
   still not been marked, code pointers in functions
   are nulled out.
2. Since code pointers in functions may be nulled out,
   functions are no longer used as proxies for code in
   deoptimization info.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30600 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-23 00:17:28 +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
regis@google.com db2cec593d Distinguish between malformed and malbounded types more efficiently using the
recently introduced LanguageError 'kind' field.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30383 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 23:31:12 +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
fschneider@google.com fef2c347db Reland bug fix from r29800 for merging into branch.
TBR=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29887 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 10:46:39 +00:00
fschneider@google.com 9dc8bb0a01 Revert a bug fix included in r29800 to re-land it for merging.
Review URL: https://codereview.chromium.org//59623002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29886 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 10:43:55 +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
asiva@google.com 545bec0843 Cleanup StaticResolveType, it does not seem to be used anywhere.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29696 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:41:59 +00:00
zra@google.com 413cc1a24d Fixing fingerprint.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29683 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 17:32:06 +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 8e7c6a5fae Move Stringinterpolation constant folding from constant propagator to canonicalizer. StrinIterpolateInstr cannot directlly refer to interpolation arguments but only to the array that holds them, therefore constant propagation cannot be applied.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29118 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 20:37:18 +00:00
johnmccutchan@google.com 4ebeadba11 This CL enables the polymorphic inliner to inline loads on typed array views.
It also contains a small cleanup so that the signatures of BuildByteArrayViewLoad and BuildByteArrayViewStore match.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29066 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 09:18:52 +00:00
fschneider@google.com e227dbd349 VM: Fix bug in optimization of identical comparisons.
When the propagated type information of a value refers to a generic
type parameter, assume that it can be a number. In that case we can't
eliminate the number check.

TBR=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28856 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 12:56:47 +00:00
fschneider@google.com 8779bc8d7f Optimize identical-comparisons based on propagated type information.
If the propagated type allows, eliminate the check for numbers at
identical operations in optimized code.

The previous optimizaton was done before full type propagation was run
and was therefore not very effective.

* Made flow-graph printing having no side-effects: calling Type() lazily
initializes the type_ and reaching_type_ fields of Value and Definition.
Access fields directly when printing instead.

Also, fixed two random spelling mistakes.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28851 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 11:13:59 +00:00
fschneider@google.com ee2678893c Improve canonicalization of strict comparisons and bool negation.
This CL generalizes the existing optimization to handle all combinations

expr === true
expr !== true
expr === false
expr !== false

including lhs and rhs swapped. It also adds canonicalization of boolean
negation.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28802 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 14:01:04 +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
fschneider@google.com b5465cf7ef VM: Fix bug in canonicalization of identical in the optimizing compiler.
Make sure that BranchInstr::Canonicalize does not mutate it's input before
all conditions for the optimzations to take place are met. Otherwise, bailing out
leaves the affected comparison instruction in an invalid state.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28646 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 15:15:47 +00:00
srdjan@google.com 2f0a906dbf Cleanups, refactoring in anticipation of new string interpolation nodes. Removed unnecessary code.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 23:21:52 +00:00
regis@google.com 299b95c1ab Skip AssertAssignable in code generator if optimizer could establish that
destination type is dynamic or Object (issue 13795).

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28235 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 18:32:09 +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 e9f0b93eb1 Revert r28050 due to crashes with --optimization-counter-threshold=5.
TBR=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28052 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 14:29:44 +00:00
fschneider@google.com acb389dbf9 Optimize conditional branches that have same true/false targets.
Branches that have the same true/false target, or where both
target blocks reach the same common join block via empty blocks
can be replaced by a goto to the common join block.

In code like this

var a = unknown();
var b = null;
if (a == null || b == null) {
  ...
}

it eliminates the test (a == null) if b is known to be null. Until now,
the compiler could only eliminate the test for b, if a was known.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28050 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 12:41:28 +00:00
srdjan@google.com db2516d7c2 Add a is_recognized bit to function kind field. Improves performance of method recognizer and thus the compilation speed.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28026 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 21:00:59 +00:00
fschneider@google.com ac08babf45 Polymorphic inlining of [] operations.
This CL adds the necessary parts to enable polymorphic
inlining of recognized methods. For now it handles only
[]-calls. This helps code that deals with e.g. growable
and fixed-length lists.

The basic idea is to adapt the code in the flow graph
optimizer so that it can be used from the generic inliner.
Currently this adds a bit of boilerplate code which I intend
to reduce when adding more recognized methods to be handled.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27627 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 15:41:45 +00:00
johnmccutchan@google.com 28a09f3b80 Do not eliminate GuardFieldInstr when guarding list length.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27420 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 07:29:20 +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 57a245c01d Replace guarded list length field loads with constants
R=fschneider@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27280 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 05:48:01 +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 dff262d761 Remove inlining restriction of calls to the == operator.
This CL is the first step in enabling full inlining of == calls.
Previously, calls to any function with the name "==" were not considered
for inlining because super-calls were not handled correctly. Instead
  of implementing == semantics for super calls in the back-end, the parser
now expands super calls to == into 

let t1 = left, t2 = right {
  (t1 === null  || t2 === null) ? t1 === t2
                                : static_call(super.==, t1, t2)
}

This change removes a bit of platform-specific assembly. Normal instance calls
to == are still translated as before. Expanding those at the AST level would
incur a too high cost in terms of (unoptimized) code size, and also would be
an obstruction for optimizations of equality. The plan is to expand those
only at optimization time if there is an inlineable instance call to ==.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27248 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:55:24 +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
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
johnmccutchan@google.com 794936d02e Remove LoadFieldInstr with no uses
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26705 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 11:22:17 +00:00
kmillikin@google.com 7f81e17d6f Cleanup of deoptimization environment copying functions.
Change the deoptimization environment copying functions so that they
crash rather than safely copying NULL environments.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26634 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:56:24 +00:00
johnmccutchan@google.com 6d59f5d25a Fold Box(Unbox(v)) and Unbox(Box(v)) for Float32x4 and Uint32x4
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26480 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 22:22:53 +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
fschneider@google.com ba0f59d1bc Polymorphic inlining for some recognized methods in the optimizing compiler.
The optimizing compiler currently recognizes a certain frequent native methods
like array length or string length and provides an inlined implementation.
Inlining does currently not work for polymorphic call sites of these methods.  
This CL enables also polymorphic inlining in the case of .length getters for
arrays and strings.

1. The method is recognized at flow graph build time. The builder creates
 the body of the method for both compilers (non-optimizing and optimizing).
 Native methods that are not recognized, are translated as before using a NativeCall
 IL instruction.

2. The flow graph inliner handles recognized methods in the same manner as normal methods.
Until now intrinsic and recognized method could not be inlined. This CL enables it.

3. There is no need for an intrinsic assembly implementation because recognized methods
have an IL implementation that does not call into the C++ runtime. I left the intrinsics
in for now, but they can be removed if there is not noticable performance benefit anymore.

4. The inlining heuristics are tweaked in a way that enables more aggressive inlining
of recognized methods: +1 level of inlining depths, call sites of recognized methods are
not counted in the inlining heuristic.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26429 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 12:58:08 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
srdjan@google.com 70983cf599 Add a performance assert that we do not emit a null check for smi class-ids. Instead we should use CheckSmiInstr which does a bit test.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25928 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 16:19:23 +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
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
srdjan@google.com 7e313fa96a Recognize Math's min and max function for doubles and inline the operation.
R=regis@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25287 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 17:27:45 +00:00
fschneider@google.com aba90e3763 Always try to inline certain core library functions.
Inlining moveNext and get:iterator enables the iterator
object for allocation sinking.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25057 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:45:27 +00:00