Commit Graph

362 Commits

Author SHA1 Message Date
mlippautz@google.com bfbc0c1118 Fix scoping async functions.
This CL fixes several scoping/context issues:
* Do not reuse scopes in SequenceNode_s as they might introduce a new context
  level. In that case we would trigger context allocationg multiple times
  resulting in scope/contexts being out of sync.
* Properly save and restore saved_try_context in try/catch/finally blocks and
  nesting closures. For this we need to keep track of async closures top scopes.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39775 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-02 20:25:35 +00:00
mlippautz@google.com c65636490f Fix conditionally parsing await as keyword.
BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39602 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 16:22:52 +00:00
mlippautz@google.com d7943b4029 Revert "Fix scope/context behavior in await transformer."
This reverts commit fb220928acc36cc9078f905bb185b4c32b9a5608.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39573 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 00:10:45 +00:00
mlippautz@google.com 3a46e60f17 Fix scope/context behavior in await transformer.
We are not allowed to reuse LocalScope in different SequenceNode_s. The problem is that if a context needs to be created for that scope the FlowGraphbuilder will insert context creation code at all SequenNoce_s that use this scope. This results in scopes and contexts being out of sync and writing garbage. The fix is to just chain a new scope that is on the same function- and loop-level.

Also fix recognizing of "await" in async functions. A follow up CL will enable await in loops, if, return, ...

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39571 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 23:01:58 +00:00
hausner@google.com 6e637eb27f Initializing a final instance is a runtime error
If a final instance variable is initialized at the point of declaration, it
is a runtime error if it is initialized again in a constructor’s initializer
list or by an initializing formal.

If any instance field is initialized more than once in the initializer list of
a constructor, or by an initializing formal parameter, it is a compile time
error.

Adding a new test to cover the expected runtime error.

Fixes issue 13335.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39562 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 19:37:36 +00:00
mlippautz@google.com 7c7919f8ef Await it!
Add support for awaiting futures. This leaves us with a non-structural CFG.

TODOs:
* Forwarding exceptions through futures in async functions and rethrowing them using await.
* Known bug with nested contexts (will be fixed in following CL)
* await is not recognized at all expressions specified (yet)

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39559 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 17:35:56 +00:00
hausner@google.com 0bbf6c5b16 Runtime support for evaluation of static field initializer expressions
Eliminates the generation of field initializer functions by the parser.
Adds a runtime call that creates a one-shot function to evaluate the
initializer of a static field. The runtime function gets called from
the implicit static getter function for the field.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39387 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:53:44 +00:00
mlippautz@google.com 5f02ceed86 Introduce await.
This CL adds basic infrastructure needed for awaitable expressions. Implementation of continuations is not part of this CL.

Expressions containing ``await'' are transformed into a series of operations on intermediates, effectively getting rid
of the temporary expression stack. Currently only expressions evaluating to an actual value (read: non-future) are supported.

Also, not all kinds of statements support awaitable expressions yet.

Missing:
 * Capturing all (needed) variables
 * Continuations (connecting a preamble with await statements; re-adding the closure to the run queue)

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39345 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 18:41:12 +00:00
srdjan@google.com 5d27559bd4 Fix issue 20476: creating multiple LocalVariables with same name (finally_ret_val35), confuses the compiler. token_pos is not enough to guarantee unique name for inlined finally-s. Instead of uniques names per inlined return node, use one function level local.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39206 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 17:03:49 +00:00
mlippautz@google.com 47c8f8b3e2 Reland transformation of async functions.
Reland https://codereview.chromium.org/362153002/

Additions:
 * Fixes for parsing async "keyword".
 * Further tests.

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38715 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 23:50:33 +00:00
mlippautz@google.com be3e426f27 Revert async changes.
Revert "Transform functions marked as async"
This reverts commit 79cbaaf60143babcb29bb0ed74a0da87fd998c39.

Revert "Fix snapshot test"
This reverts commit ee892aa105daccc74c734eb18934814b76a415bb.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38690 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 18:42:53 +00:00
mlippautz@google.com dfc33496a4 Transform functions marked as async
In a nutshell:

  foo(params) async { <body> return result; }

transforms to

  foo(params) async {
    var c = new Completer();
    var async_body = () { <body> completer.complete(result); }
    new Future(async_body);
    return c.future;
  }

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38681 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 17:16:00 +00:00
srdjan@google.com 9c8a395f6f More PcDescriptor cleanups, compress recors if no try index is needed (frequent).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38242 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 17:07:03 +00:00
hausner@google.com f58745f751 Fix parsing and resolving of prefixed names
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37631 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 23:26:26 +00:00
regis@google.com 32f3e11d99 Cleanup of error and warning reporting.
R=hausner@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37468 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 22:30:34 +00:00
srdjan@google.com 3480ac4a0e Fix deferred library code disabling for inlined functions.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37107 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 22:14:40 +00:00
rmacnak@google.com fc3ce06a95 VM: Use a fake parsed function when parsing metadata.
BUG=http://dartbug.com/18976
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36903 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 22:06:28 +00:00
regis@google.com b7c5f90bf0 Address TODOs and remove obsolete ones.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36813 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 23:06:02 +00:00
srdjan@google.com ce2d52f111 Pass isolates explicitly.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36740 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 14:24:53 +00:00
srdjan@google.com 2b06c73841 Remove unused code, improve speed of Parser::CurrentToken (improvement seen in measurements and profile).
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36710 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 21:12:24 +00:00
fschneider@google.com b9c3553964 Eliminate some unnecessary handle allocations in the compiler.
Eliminate duplicate code from PushArgumentInstr by using TemplateDefinition.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36626 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-26 09:53:42 +00:00
regis@google.com dec11d8b7b Add support for javascript incompatibility warnings (work in progress).
For now, warnings are only issued when applicable for type tests, type casts,
and toString.
Fix newly reported lint errors.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36001 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 22:42:10 +00:00
fschneider@google.com dfa5c809f5 Simplify flow graph building for instantiator.
The instantiator is always loaded from a local variable which
is determined in the parser. There is no need to create an AST a fresh
ValueGraphVisitor for it since the flow graph builder can just emit a
load-local.

This also makes it clear that the instantiator is not an arbitrary expresssion.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35699 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 17:58:01 +00:00
rmacnak@google.com 7ba8ca5753 Reapply "Mark private functions in dart:* that are native or constructors as not visible (omitted from stack traces and ineligible for reflective enumeration or invocation)."
With fix for uninitialized is_dart_scheme_ when read from snapshot.

BUG=http://dartbug.com/15274
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35289 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 00:05:08 +00:00
rmacnak@google.com 7840906011 Revert "Mark private functions in dart:* that are native or constructors as not visible (omitted from stack traces and ineligible for reflective enumeration or invocation)."
Review URL: https://codereview.chromium.org//246173002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35238 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 00:08:52 +00:00
rmacnak@google.com 69d82c334b Mark private functions in dart:* that are native or constructors as not visible (omitted from stack traces and ineligible for reflective enumeration or invocation).
Ensure invocation_fuzz_test doesn't exit prematurely.

Also visit instance methods defined in superclasses.

Complete blacklist so invocation_fuzz_test passes on the VM.

B=http://dartbug.com/15274
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35234 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 23:24:17 +00:00
fschneider@google.com 79a5307d5b VM: Implement closure calls as instance calls.
Conceptually f() becomes f.call() where the .call method performs the actual
closure call. The closure call itself is implemented without a stub.

The check if the object called is a closure becomes a class-id check
which can be hoisted out of loops.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34917 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 10:56:00 +00:00
hausner@google.com 2b4e3c7c99 Implement deferred constant support
Compile time constants lose their const-ness if they are referred
to through a deferred prefix. This CL adds a flag to some ast node
types that remembers whether a field or closure was referred to
via a deferred prefix. If so, the compile-time const analysis flags
the value as non-const.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34785 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 17:31:32 +00:00
rmacnak@google.com f0626388f5 VM: Evaluate metadata on a class in the scope of its library not the scope of the class.
BUG=http://dartbug.com/17795
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34537 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 22:38:32 +00:00
hausner@google.com ed24226376 Support deferred library prefix syntax
First step towards deferred library support:
- Parse the “deferred as” import clause.
- Implement p.loadLibrary() which returns a future that
  completes when the library is loaded.
- Treat type annotations of deferred types as malformed.
- Throw NoSuchMethodError when calling functions from
  unloaded libraries.
- Libraries are still read synchronously, but items in the
  library won’t be visible through the deferred prefix until
  the future returned by loadLibrary() completes.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34481 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 21:20:47 +00:00
fschneider@google.com 37b30ab2ac Alternative fix for .call invocation of closures.
This also covers "closurization" of the .call method.
This relies on the fact that f.call === f if f is a closure.
This means that adding a simple getter to _FunctionImpl that
 returns this is enough. No need for a separate dispatch.

This CL reverts the previous fix for issue 12602 (modulo the
additional tests).

BUG=dartbug.com/17473, dartbug.com/12602
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33736 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 10:31:33 +00:00
fschneider@google.com f75ef2e6ab Fix invocation of closures via .call in the VM.
Calling closures via .call does now work in the VM - it was working in
dart2js already.  Calling .call on a closure is implemented to go through
a dispatcher method. These dispatcher methods are automatically created and
cached in the same way as NoSuchMethod- or field-invocation dispatchers.

This CL does not change the way regular closure invocation works in
the VM. It is therefore performance-neutral for normal closure calls.

BUG=dartbug.com/12602
TEST=language/call_test
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33576 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 14:02:27 +00:00
rmacnak@google.com 57dd1321d1 Reapply "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
Regenerate snapshot test due to change in the size of Namespace. Relate the types source mirror libraries dependencies to the runtime library dependencies.

BUG=http://dartbug.com/10360

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33441 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 19:00:20 +00:00
rmacnak@google.com 62ad4b82ce Revert "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
Review URL: https://codereview.chromium.org//189293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33402 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:45:29 +00:00
rmacnak@google.com 2d0e54a94d Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors.
BUG=http://dartbug.com/10360
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33397 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:02:29 +00:00
regis@google.com 7830430adf Implement eager instantiation and canonicalization of type arguments at run
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
hausner@google.com ac559f643a Introduce cache of resolved names in library
A name that is not resolved in the local scope gets looked up
in the global scope of the library to which the code being compiled
belongs. The local name dictionary gets searched first, then the
dictionary of each imported library (and and their re-exported
libraries.) Each dictionary lookup includes the lookup of the
mangled getter and setter names, which means that we concatenate
the same name many times.

This change introduces a cache that stores the result of a previous
name lookup, including negative lookup results. The latter is important
to speed up the resolution of names that are not in the global name
space, e.g. class members like .length in lists.

Experiments running dart2js (with VM option --compile_all) show
that this reduces the number of name mangling calls by a factor of 10
and speeds up compiling dart2js by 15%.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32385 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 21:32:31 +00:00
hausner@google.com baf16bac5e Make safe points in generated code invisible to the debugger
- remove some PC descriptors that are part of implicit, synthesized
  code, e.g. generated null checks in == methods, implicit constructors,
  implicitly generated code in user constructors, etc.
- ignore single step callbacks on PC descriptors that are part of
  synthesized code.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31966 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 21:49:42 +00:00
hausner@google.com 2e3b0fd8bf Detect illegal assignable expressions
The AST cannot distinguish between (x) and x. Adding a check
to the VM compiler that detects syntactically illegal assignments
like (x) = 0. The existing checks only analyze the AST so we
didn’t detect some illegal cases.

Looking at the source to detect syntactically illegal left hand
expressions is a bit ugly because we can’t easily look at
previous tokens. This change rewinds the token iterator a few
positions and then moves forward to check whether the last token
of the expression is an identifier or a closing bracket ].

Added new test. We did not have a single test case for this :)

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30904 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-05 18:15: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
rmacnak@google.com f76f7f7ecf Handle undefined field/getter access from arguments to const constructors in metadata, and related problematic cases.
BUG=http://dartbug.com/13817
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30385 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 01:02:26 +00:00
regis@google.com 2a355a7bb6 Lazily format LanguageError messages (fix issue 15069).
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30308 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 18:54:24 +00:00
regis@google.com 694401d38e Rename mixin typedef to mixin application alias in VM.
R=hausner@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30277 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 17:42:39 +00:00
kmillikin@google.com 2a87b7eb94 Simplify the desugaring of catch clauses.
Rather than if/then/continue (where the continue does not match the
semantics of Dart's continue), use if/then/else.  This removes the
unnecessary goto and label as a step toward streamlining support for
jumping in the compiler backend.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30227 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-13 14:08:11 +00:00
hausner@google.com 6f95dbae2e Fix try-catch for sure
Fix scoping of user-defined exception and stack trace variables in
catch clause.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30003 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 22:07:31 +00:00
hausner@google.com 2139b9d5f0 Undo change 29900
Undo a gratuitous change to the parser.

@kmillikin: please at least be courteous enough to ask one of the front-end
authors to review a change that is not a pressing issue, such as style preferences.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29954 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 01:21:32 +00:00
kmillikin@google.com a59e0881cf Clean up Parser::ParseTryStatement in the VM.
Streamline the implementation, factor out repeated code, rename some cryptic
identifiers, and fix a misspelling.

Also, disentangle an implicit include dependency: class_finalizer.cc was
getting code_generator.h implicitly from something included (unnecessarily
as it turns out) by parser.h.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29900 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 12:49:14 +00:00
fschneider@google.com ce9573722c VM: Fix checked mode crash (issue 13831).
The AST for static getters differs between parsing the first time, and
subsequent parsings. This leads to a mismatch in deoptimization-ids
between the optimized and the unoptimized code.

This CL avoids creating different ASTs for the same static getters. To allow
better inlining of these getters, the initialization expression is wrapped in a
hidden static initializer-function. As a result the size of such getters is
constant and does not depend on the initializer expression.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29680 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 16:49:55 +00:00
regis@google.com 65379851a8 Implement stricter rule about self referencing typedefs (fix issue 13675).
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29460 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:04:21 +00:00
regis@google.com 20badfb06e Register synthesized mixin application classes in the library and reuse them
when possible (fix issue 14318).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:46:32 +00:00