Commit Graph

379 Commits

Author SHA1 Message Date
hausner@google.com fd57843900 Update handling of ambiguous name references
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.

Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.

Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.

Fixes 12915, 12913, 12724.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +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
kmillikin@google.com 2b19ed632d Disentangle AstNode::Name and AstNode::ShortName.
The Name function is used for pretty printing except that for a few
node types we rely on a specific name for implementation correctness.
Overriding the pretty printing function to get out a type name, or a
variable name, or an operator symbol name, is risky.

1. Code that relies on the semantics of the name will break if the
   pretty name is changed.

2. Pretty printing is less useful.  For instance, LoadLocalNode just
   prints the variable name (twice, once as the AST constructor and
   once in quotes as the variable name).  This is confusing if the
   variable happens to have the same name as one of the other pretty
   names, e.g., args or seq.

Now, there is a virtual function to get the pretty name but classes do
not change it to communicate other information (type names, variable
names, operator names).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27244 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 11:54:26 +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
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
fschneider@google.com 1a3ef7b16b Allow inlining of methods that have an intrinsic translation.
This works because I changed the compiler so that it always emit
the full unoptimized code for all intrinsic methods in a previous CL
As a result deoptimization works for those methods like for normal
methods.

Also, code for some recognized getter methods is moved to the flow
graph builder, so that there is no need for special handling in
the flow graph optimizer. This part of the change is
should be performance-neutral.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26867 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 12:32:05 +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
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
regis@google.com 81bcb1f18a Distinguish between malformed and malbounded types (fix issues 12552 and 12554).
Add test.
Update status files.

Explanation of change: A malbounded type argument should not be mapped to
dynamic, as is a malformed type argument.
This change also adds a bunch of TODOs related to the encounter of malbounded
types in unexpected places.
A follow-up change will address these TODOs, add more tests, and may simplify
code that is still handling malformed types where they cannot occur anymore
after the spec simplified their handling.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26665 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:56:02 +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 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
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
lrn@google.com 14a75969c3 Add Null class to dart:core.
Make dart2js accept this class as the type of `null`.

Dart2js still fails on tests on the form: x is Null
VM does not recognize Null as the type of `null`.

BUG= http://dartbug.com/12382
R=fschneider@google.com, karlklose@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26175 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 09:12:19 +00:00
zra@google.com a810497666 Fixes scanning of Utf16 surrogate pairs in string literals.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26130 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 17:34:31 +00:00
srdjan@google.com 1f31dcc424 Fix for running with --throw_on_javascript_int_overflow: recognize pattern (a << b) & mask and test for overflow only after the mask.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26122 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 15:12:39 +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
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 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
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
regis@google.com 9581071936 Refactor resolution code in the vm to properly handle ambiguity errors.
Add test.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25324 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 00:19:39 +00:00
fschneider@google.com e317ca8fe0 Replace ChainContextInstr with existing IL instructions.
v0 <- AllocateContext(...)

      ChainContext(v0)

is changed into 

v1 <- CurrentContext
      StoreField(v0.parent = v1)
      StoreContext(v0)

Since v0 is used twice, I used a TempLocalScope in
the graph builder to store the allocated context.
As a result ChainContextInstr can be completely removed
from the compiler.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25200 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 09:15:28 +00:00
regis@google.com 191d2673c8 Use proper internal name for implicit static final getters.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25053 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:29:59 +00:00
regis@google.com e8a722870b Support type parameters and classes as expression in the vm.
Turn many compile-time errors into runtime errors per latest spec.
Triage affected tests.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24861 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 19:35:56 +00:00
kmillikin@google.com 5f9331e20c Fix a VM bug in the handling of try/catch/finally.
In the case that code in the catch block threw in any fashion, the
finally block was not executed.  Fix this by properly treating the
finally block of try/catch/finally as an exception handler for the
catch block.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24583 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 12:28:56 +00:00
iposva@google.com 50fc824be9 - Remove arguments definition test from the VM.
- Update tests still referring to it.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24539 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 18:37:53 +00:00
kmillikin@google.com 56c4a4a5e2 Remove an unused field in the AST.
The try_index of catch clauses was set but never read.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24465 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 12:36:44 +00:00
srdjan@google.com 7defd2255c Use call counts to determine which static calls to inline.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24436 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 22:12:49 +00:00
srdjan@google.com 47de186e76 Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call site (the ones using ICData).
R=asiva@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24239 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 16:29:39 +00:00
kmillikin@google.com 632ac9f2c9 Fix a bug in graph construction for for loops.
A refactoring in SVN r24088 introduced a bug in for loops.  Loops with
continue in the body and an empty update expression list will lose the
edge from the continue to the loop entry.

R=fschneider@google.com
BUG=11375

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24214 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 10:17:34 +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
srdjan@google.com b9b689d20a Split LoadStatic into two instructions: load static field, load value from static field. This allows to canonicalize loads, thus reducing the number of inlined constants. Has large benefit on x64 (DeltaBlue). Note different register allocation spec for ia32, otherwise large regression in DeltaBlue is introduced.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24044 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 18:15:49 +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 d3469400fe Fix warning about an unused private field.
TBR=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23402 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 12:25:39 +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
fschneider@google.com 8c0cef03b3 Streamline IL for instantiating type arguments.
In some cases we would emit a InstantiateTypeArguments IL instruction
that was a no-op. This CL avoids this instruction when building the
graph, instead of emitting an empty instruction in the back-end.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23209 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-27 10:19:49 +00:00
hausner@google.com 2ec6f419c3 Allow breakpoints on strict equal
The compiler turns equality checks with null into
strict equal comparisons. Make the compiler backend
create a pc descriptor for the runtime call so that
the debugger can break on x == null and x != null.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23153 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 16:26:42 +00:00
fschneider@google.com 063027cf7c Support inlining function containing throw in the optimizer.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23142 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 12:52:44 +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
fschneider@google.com 59dc47ba9d Further improve and simplify IL for building constructor type arguments.
Generate constants in the IL directly if possible and avoid temporary
local store/load completely in some cases.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22931 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-21 11:09:34 +00:00