Uninitialized instances (e.g. closures) can't be printed using ToCString.
Print just the class instead.
Print values/addresses consistently with our disassembly output (no leading zeros)
This makes searching in the trace output easier.
Limit printing source lines to max 80 chars. Otherwise the trace output for
minified Dart code gets unreadable.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//658773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41134 260f80e4-7a28-3924-810f-c04153c831b5
Using the implicit initial null value makes the comparison in the dispatch
prologue of async closures polymorphic (Null|Smi). Initializing to it -1
eliminates the unnecessary class check for null.
Small clean up of scopes and internal variables used for async functions:
Capture them in the parser, so that there is no need to do this later in the
async-transformer.
R=hausner@google.com
Review URL: https://codereview.chromium.org//655773003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41123 260f80e4-7a28-3924-810f-c04153c831b5
The expression ‘await e’ always suspends the enclosing function. If e does not
evaluate to a an object o of type Future, a new Future is created using Future.value(o).
A small change in the backend allows a return instruction to be followed by
other instructions. In async functions, a return can suspend the function and the
continuation point is in the same code block after the return.
Other small changes:
- More user-friendly error message if async/await is not enabled.
- Programs no longer need to import dart:async when using async/await.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//634603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41105 260f80e4-7a28-3924-810f-c04153c831b5
The stack slots of captured parameters must be skipped when
generating sync code in optimized try-catch. Since those parameters
are initially copied into the context, their values are not recorded
in the environment.
Store-to-load forwarding may though use the original initial value
from the stack and therefore it must not be overwritten by try-sync
code that predeeds every call inside optimized try-blocks.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//653073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41099 260f80e4-7a28-3924-810f-c04153c831b5
When an async function is compiled, it creates a closure that contains the code of the async function’s body. Before this change, a new function object is created each time the async function is compiled. This change looks up previously created closures and reuses them, similar to what the parser does for local functions.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//651013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41084 260f80e4-7a28-3924-810f-c04153c831b5
raw_ptr() now returns a const*, and all writes within objects must be routed through a well-defined set of methods on Object.
Note: This also includes writes to non-pointer fields, to enable low-level verification of all writes. Additionally, it allows enforcing a NoGCScope around such writes to protect against moving objects.
Add a bunch of these (now required) NoGCScopes.
R=iposva@google.com
Review URL: https://codereview.chromium.org//612133004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41058 260f80e4-7a28-3924-810f-c04153c831b5
The motivation behind this change is that very large functions could
cause stack overflows in the (previously recursive) DiscoverBlocks
function. This commit introduces replaces recursive traversal by
iterative algorithms. Postorder traversal had to be removed from
DiscoverBlocks and is now done in a separate pass.
BUG=21109
R=vegorov@google.com
Review URL: https://codereview.chromium.org//617933003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41016 260f80e4-7a28-3924-810f-c04153c831b5
replace it with a sequence of checks that guarantee
0 <= LowerBound(index) < UpperBound(index) < length
and hoist all of those checks out of the enclosing loop.
Upper/Lower bounds are symbolic arithmetic expressions with +, -, *
operations and are computed based on discovered simple induction variables.
Simple induction variable is a variable that follows the pattern v1 <- phi(v0, v1 + 1)
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//619903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40969 260f80e4-7a28-3924-810f-c04153c831b5
Since Register is an enum type, it is automatically
coerced to integer types when passed as a parameter to
functions expecting an integer argument. This change
expands the use of Immediate and Operand wrappers
for Assembler instructions and macros to avoid this
automatic coercion.
I've also added dummy constructors to Address and
FieldAddress classes to address the same problem,
but in a way that does not increase verbosity,
since Address and FieldAddress are much more
prevalent in the code.
A cleaner solution would involve making Register
no longer coercable to integer types, but this
would likely require many changes to the Assemblers.
R=regis@google.com
Review URL: https://codereview.chromium.org//593363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40905 260f80e4-7a28-3924-810f-c04153c831b5
First step towards complete audit of all writes to the heap for write barrier compliance (at least on simulator debug builds).
This first CL is a semi-mechanical refactoring to route most Object field writes through StoreNonPointer and StoreSmi methods.
A few stores were converted to StorePointer (skipping the write barrier check is premature optimization for those cases).
Next step will be to make raw_ptr() return a const pointer and use the constness to clean up remaining writes in C++.
R=iposva@google.com
Review URL: https://codereview.chromium.org//295863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40889 260f80e4-7a28-3924-810f-c04153c831b5