Commit Graph

165 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
kmillikin@google.com a56dba2628 Use the VM's graph builder nesting stack for loop depth and context level.
Use the code's nesting to maintain the context level rather than explicitly
tracking it in the graph builder.  Nested blocks know their scope and the
nesting stack can be searched to find the current context level.

Nested loops now increment and decrement the graph builder's loop depth
while they are on the nesting stack, though the loop depth state is still
kept in the graph builder itself.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30397 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 11:37:11 +00:00
kmillikin@google.com 98b5d17d9d Introduce a nesting stack to the flow graph builder.
Statically track nested blocks, loops, and switches while constructing
the flow graph.  Use the nesting stack as a mapping from source labels
(class SourceLabel) to their flow-graph targets (class JoinEntryInstr).

This removes the indirect dependence of the AST on the intermediate
language and the mutable compiler state from the AST.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30336 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 11:39:14 +00:00
srdjan@google.com 2b9fad92c7 In preparation of inlining remainder and modulo binary Smi operations:
- Add REM token
- Fix checking of function fingerprints.
- Remove unused intrinsic for remainder (the function gets inlined and intrinsic is not generated)

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29929 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 19:27:46 +00:00
kmillikin@google.com a8f542c306 Restore 0-based temporary index numbering in the VM compiler.
Compiler temporary indexes (used for printing) were inadvertently changed to
1-based numbering.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29815 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 16:05:08 +00:00
kmillikin@google.com 28e4e52a7c Move temp_index from the graph visitors to the graph builder.
This is the only bit of state that besides the current instruction
that is threaded through the visitors.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29801 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 11:48:45 +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
regis@google.com 9ec07853c5 Report correct error message in case of super invocation (fix issue 8208).
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29042 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 22:12:07 +00:00
iposva@google.com e7e2e4bf03 - Rename arrays to lists:
_ObjectArray -> _List
  _GrowableObjectArray -> _GrowableList
  _ImmutableArray -> _ImmutableList

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28189 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 00:15:14 +00:00
srdjan@google.com 008229fa11 Optimize string interpolation by running it at compile time if all inputs are constant. This is done during constant propagation, however, the argument construction instructions must be removed manually. It is unclear how safe it is to modify graph during constant propagation.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28175 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 17:49:14 +00:00
fschneider@google.com b7afb65a10 Clean up handling of guarded fields in the flow graph builder.
FlowGraphBuilder has a zone-allocated list of fields and passes it
on to the FlowGraph.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27699 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:14:06 +00:00
fschneider@google.com 1072bc1c60 Reland: Fix bug in field type tracking and polymorphic inlining.
Original CL: https://codereview.chromium.org/24096018/

This fixes the bug by changing FlowGraphBuilder to a zone object
because it is needed by the inliner later in the pipeline.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27695 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 10:35:01 +00:00
mlippautz@google.com 4fa46b7148 Introduce newline tokens into the token stream.
CL only introduces the tokens into the compressed token stream. We do not
use the newline tokens (yet).

Overhead:
snapshot: 6.4% (860k/808k)
compressed token stream (gen_snapshot): 21% (314312/259907)

BUG=
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27677 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 21:46:50 +00:00
asiva@google.com 53a1ec9456 Revert
https://code.google.com/p/dart/source/detail?r=27655
as it is causing dartium build breakage.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27675 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 20:32:16 +00:00
hausner@google.com f3baeeb6a5 Implement symbol literals in the VM compiler
Issue 12171

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27668 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 17:39:16 +00:00
fschneider@google.com 7dea1d8a2c Fix bug in field type tracking and polymorphic inlining.
When inlining implicit getters via the polymorphic inliner
(and not through the flow graph optimizer) the fields loaded
must be added to the list of guarded fields that trigger
deoptimization when a store violated the field type guard.

Also, this CL avoids adding fields to the list from inlining
candidates that do not get inlined after all. Previously, the
optimizer pass on the callee graph would add guarded fields
even if the final graph does not get inlined.

TEST=tests/language/vm/optimized_guarded_field_test.dart
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27655 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 11:21:11 +00:00
kmillikin@google.com e9eec70cad Change --print-ast output to be more regular.
The print-ast output is useful for debugging front end issues.  It is a mix
of fully-parenthesized prefix notation (i.e., Lisp S-expressions) with some
infix.

It is not valid S-expressions for various other reasons.  Most obviously, it
uses ' (single quote) instead of " (double quote) to delimit strings.

This change makes the print-ast output a valid Scheme S-expression.  It can
be pretty printed by copying it, quoting it (by preceding it with a single
quote), and evaluating it at the REPL of a Scheme implementation.

Also, the AST node pretty names are changed to predictably match the class
name.  It doesn't seem helpful to have them be arbitrary.

BUG=
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27282 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:20:55 +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
zra@google.com c012196222 Evaluates arguments before throwing a NoSuchMethodError in constructor
calls and static function calls.

Fixes issue 12820.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 23:39:43 +00:00
mlippautz@google.com b708a455d1 Fix Function.end_token_pos() and implement MethodMirror.source getter.
Move .source getter from ClosureMirror to MethodMirror (as the TODO already suggested) and provide an implementation.

BUG=
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26659 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:14:07 +00:00
mlippautz@google.com 2187a8f63f Move the begin token (token_pos) of explicit functions to the start of the function declaration.
This fixes setting the breakpoints when the signature of function declarations is spread across multiple lines.

Example:
int
get
foo
=>
42;

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26080 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 20:11:23 +00:00
fschneider@google.com 086b60dada Fix a bug in compilation of try-finally.
When nesting try-finally, the outer finally was incorrectly executed
twice under certain conditions (a return in the inner try-block and a outer
finally-block that ends with throw)

This was because finally-code was inlined at return/break/continue statements
and it was associated with the wrong catch-handler when compiling.

This CL tracks indices of try-blocks in the parser so that each inlined
finally block has the correct catch handler index.

BUG=https://code.google.com/p/dart/issues/detail?id=11972
TEST=test/language/throw8_test.dart
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25767 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 13:49:48 +00:00
fschneider@google.com 6a8aa6f073 Reland r25551: Allow inlining of closures with a context change.
Review URL: https://codereview.chromium.org//21087002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25567 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 15:23:41 +00:00
fschneider@google.com 5da27dd763 Revert r25551 to help figure out mysterious build bot timeouts.
TBR=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25558 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 12:33:40 +00:00
fschneider@google.com 678dff7ea7 Allow inlining of closures with a context change.
This CL removes the remaining missing cases when inlining closure
calls.

In order to benefit for code using forEach, I added GrowableObjectArray.forEach
to the functions that should always be inlined.

I also renamed BuildLoadContext/BuildStoreContext helpers in the flow
graph builder to better match what they do.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25551 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 09:44:02 +00:00
hausner@google.com 4c629b9b50 Implement forwarding constructors for mixins
By popular demand, fixes issue dartbug.com/9339

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24977 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 22:09:18 +00:00
fschneider@google.com 965819aed9 Inline native setters for length and data in the optimizer.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24801 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-08 16:27:46 +00:00
kmillikin@google.com 1a9f9f691c Scale the OSR optimization threshold by loop nesting depth.
For on-stack replacement (OSR), code quality is better if we optimize at
the outermost hot loop.  Track loop nesting depth and scale the
threshold based on the loop depth to prefer outer loops over inner ones.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24175 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 09:21:25 +00:00
kmillikin@google.com 3e78b2ad4a Reapply "Initial implementation of on-stack replacement (OSR)."
This reapplies SVN r24024 with a bugfix.

After OSR compilation, restore the pre-OSR code (which might be already
optimized) rather than the unoptimized code (which might have its entry
patched).  When the optimized code entry is patched it is only safe to call
it as a static call, not as an instance call.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24088 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 11:05:15 +00:00
hausner@google.com 457bb1bdcb Remove support for + prefix in number literals
Also fix some tests that expected + prefix in hex numbers to be illegal. According to our documentation, int.parse() accepts + for numbers in all formats/radixes.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24051 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 21:16:46 +00:00
kmillikin@google.com d6f3eccdf2 Revert "Initial implementation of on-stack replacement (OSR)."
This reverts commit 24024.

TBR=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24025 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 10:30:53 +00:00
kmillikin@google.com 0b39927d30 Initial implementation of on-stack replacement (OSR).
Add profiling support to select OSR candidates and launch the compiler
for OSR, followed by entry to the function at the OSR entry point.

Implemented only on IA32 and X64.  The initial implementation can be
improved in various ways --- specifically: tuning of profiling
parameters and incorporation of feedback about the actual values seen
at OSR entry.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24024 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 10:10:55 +00:00
fschneider@google.com be806854c9 Simplify AST by extending LetNode and replace CommaNode.
LetNode now supports a list of expressions as the body.

The last expression is the result value of the let-expression.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23678 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 12:32:42 +00:00
fschneider@google.com 07966b62da Fix two bugs in the Dart VM's super-noSuchMethod invocation.
1. The result value of an expression 
"super.someMissingSetter = val" was incorrect in case of a noSuchMethod call.

To fix this I refactored the BuildStaticNoSuchMethod function. It now no longer
creates AST nodes and visits them, because the last argument may be needed saved
as a result value.

2. The evaluation order of "super[e1] = e2" was wrong in case of a noSuchMethod call.

BUG=dart:8917, dart:10965
TEST=tests/language/super_operator_index7_test.dart, tests/language/super_operator_index8_test.dart
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23553 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 17:09:09 +00:00
fschneider@google.com 9a6657cd4d Eliminate temporary locals for some expressions
This CL affects a subset of expressions that use temporary locals: constructor
calls, array literals and and instance getter postfix-ops.

For expressions that are de-sugared in the parser I added LetNode.
It creates a scoped temporary local bound to an initializing expression.

For expressions where we need a temporary local at graph-building time,
I added a helper class TempLocalScope to easily create a single temporary
local in the graph builder since this is a frequently recurring pattern.

This simplifies code in the parser and the graph builder and also fixes a
bug with indexed-super invocation and NoSuchMethod.

BUG=dart:8918
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23401 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 12:19:21 +00:00
fschneider@google.com fa9885005a Remove pseudo-node from LoadLocalNode and replace it with a proper AST node.
The newly introduces CommaNode denotes a sequence of two nodes, the result
is the value of the second child node.

There are only two places where the pseudo-node was used, and therefore
it does not warrant adding an extra member to all LoadLocalNode objects.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23243 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 09:30:43 +00:00
kmillikin@google.com 1248115680 Remove the IC data array from the isolate.
Thread it as an argument rather than storing it in a global variable.  This
means the programmer does not have to implement a shadow stack to save and
restore the data array, and there is no special handling needed for GC.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22982 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 06:21:57 +00:00
fschneider@google.com c53d13adb0 Refactor the IL for object allocation with type arguments.
Two parts:

1. Change AllocateObjectWithBoundsCheck to a normal call that takes
four arguments on the stack using PushArgument IL instructions.
Before inputs were in registers and the instruction pushed them itself
before the runtime call. This make the code more compact and simplifies
the flow graph builder.

2. Simplify instructions for building constructor type arguments for another
special case to simplify the instruction pattern and generate smaller
code for that case.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22943 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-21 15:15:47 +00:00
kmillikin@google.com 7e31a88a0a Initial support for polymorphic inlining.
Consider each polymorphic variant separately for inlining in frequency
order.  Share inlined bodies for shared targets.

Insert an SSA redefinition of the receiver in each inlined variant to
prevent hoisting.  Hoisting code specialized to the receiver (e.g.,
direct access to internal fields of typed data arrays) out of the
inlined body is not safe.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22434 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 17:22:18 +00:00
regis@google.com 0e030b6f5c Further improve type optimization reusing the type argument vector of the
instantiator of generic objects (fixes issue 10149).
This optimization considers the generic type argument vector of the instance
being allocated as well as the generic type argument vector of the compile
time type of the instantiator.
If the instance vector is a prefix of the instantiator vector, the instantiator
vector can be shared by the new instance.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22155 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 23:39:46 +00:00
srdjan@google.com e06acc85a1 Move negative length checks from Dart into the native.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22096 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-27 00:04:21 +00:00
srdjan@google.com dd899432cd Fix recognition of factories (for setting result cid) and add them to checks.
Review URL: https://codereview.chromium.org//14386011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22088 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 21:20:49 +00:00
kmillikin@google.com 54e54f4194 Refactor the code for making inlining decisions.
Separate the decision to inlin, which produces a graph to inline, from the
act of inlining itself.  For polymorphic inlining we need such a separation.

Change the function that integrates an inlined function graph into a caller
graph so that it operates on a graph entry and set of inlined exits rather
than on an entire flow graph.  Flow graphs represent a whole function so
this change allows us to replace an instruction with an arbitrary subgraph.

Change the name of the InliningContext class to InlineExitCollector to more
accurately reflect what it does.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21539 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 08:40:27 +00:00
kmillikin@google.com 067b9ff8d5 Reapply "Incrementally recompute dominators when inlining."
Including a fix for a silly off-by-one bug.  GrowableArray::TruncateTo takes
the new length, not the new last index.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21353 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:41:10 +00:00
vegorov@google.com 9f3783186f Ensure that all goto instructions have deoptimization target.
R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21351 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:19:34 +00:00
kmillikin@google.com 40002d8663 Revert "Incrementally recompute dominators when inlining."
This reverts svn commit r21268 due to dart2js test failures.

TBR=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21270 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 11:49:07 +00:00
kmillikin@google.com 9cb005c517 Incrementally recompute dominators when inlining.
Before: we marked the entire graph's dominator tree invalid in case there
were multiple exits from an inlined function and recomputed dominators after
inlining.  Now: in case there are multiple exits we collect them in a fresh
join block and compute its immediate dominator as the nearest common
ancestor in the dominator tree over all predecessors.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21268 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 11:44:36 +00:00
srdjan@google.com 60e57ecfe1 Optimizes 'as' operation in similar way as 'instanceof': collect type feedback in unoptimized mode and try to convert it to a simple classcheck in optimized code.
Review URL: https://codereview.chromium.org//13190014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20783 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 15:30:14 +00:00
kmillikin@google.com 74d4e1fe75 Remove virtual functions on class InliningContext.
There is only one implementation of InliningContext, so there is no need for
virtual dispatch.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19917 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 10:06:14 +00:00
fschneider@google.com ef6251908c Add a new, separate block entry instruction for catch-blocks.
This is a preparation CL for supporting try-catch in optimized code. Until
now, we used normal TargetEntryInstr for catch blocks.

This meant carrying around handler_types_ and catch_try_index_ for blocks
that are not catch blocks which is not needed.

For now, CatchBlockEntry behaves the same as TargetBlockEntry except for
the additional members needed for catch blocks.
Review URL: https://codereview.chromium.org//12600012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19864 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 13:51:32 +00:00