- don't manually truncate values before passing them to TypedData._[set|get]<Type> - these methods already have truncating semantics;
- don't call into runtime for endianess conversion, implement it in pure Dart instead (with an intent to provide optimized version on platforms that support fast byte-swapping instructions);
- force inlining of these methods (change the order of checks in the ShouldWeInline to guarantee inlining of whitelisted methods).
Unrelated change:
- tweak output of Function::CheckSourceFingerprint to be immediately copy&paste useful.
R=fschneider@google.com
BUG=http://dartbug.com/22107
Review URL: https://codereview.chromium.org//860963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43038 260f80e4-7a28-3924-810f-c04153c831b5
An invisible function is hidden from stack traces, will not be enumerated
by mirrors, and cannot be directly invoked by mirrors. Note that private
classes remain accessible.
Fix a few internal dart:io functions that should be private.
Fix bug where mirrors would enumerate top-level invisible functions.
Mark observatory test that was using such private functions through
mirrors as failing.
BUG=http://dartbug.com/15274R=hausner@google.com
Review URL: https://codereview.chromium.org//816353012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43019 260f80e4-7a28-3924-810f-c04153c831b5
Simplify debugger logic. Any function can be marked as
non-debuggable when is is created. The debugger no longer
needs a heuristic which functions are debuggable.
Mostly used for synthetic, generated functions that
have no source code, e.g. async code, implicit getters and
setters, implicit constructors, forwarding constructors,
dispatcher functions.
Review URL: https://codereview.chromium.org//789643006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42570 260f80e4-7a28-3924-810f-c04153c831b5
In addition to tracking input and output ranges in the IC-stubs with a Smi fastpath (SmiAdd and SmiSub, currently) this CL also introduces two IC stubs that have no fast-path by still track ranges and update the range feedback.
We are able to distinguish between the following ranges (encoding of the lattice is shown in the parens):
- u-smi (0000)
- smi (0001)
- uint31 (0010)
- int32 (0011)
- uint32 (0100)
- int64 (1xxx) and (x1x1)
BUG=
R=fschneider@google.com, srdjan@google.com, zra@google.com
Review URL: https://codereview.chromium.org//735543003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42370 260f80e4-7a28-3924-810f-c04153c831b5
This change makes CTX available by not caching the current
context while in Dart code. Instead the current context
is held in a local variable (:saved_current_context_var) and
is passed as argument in CTX at calls.
This also simplifies a lot of code in the debugger: As a result,
Isolate::top_context is not needed anymore since the current context
can always be extracted from a Dart frame.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//678763004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41422 260f80e4-7a28-3924-810f-c04153c831b5
By moving all stubs that do runtime calls into the isolate
we don't need to cache the current isolate in each context
object.
This saves space on each context at the cost of duplicating stubs
in each isolate. Most stubs are already isolate-specific and the total number
of stubs is small enough for this to be a good trade-off.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//668193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41279 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
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
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
Introduce base classes for binary and unary integer operations and move all shared logic (e.g. canonicalization) into these classes.
Start removing special cases dispatch from instructions patterns - it goes into Canonicalization pass.
Start removing duplication between instruction patterns where meaningful and possible.
Cleanup the notion of truncation in the operations: is_truncating implies !can_overflow, not the other way around.
BUG=
R=johnmccutchan@google.com, srdjan@google.com
Review URL: https://codereview.chromium.org//564843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40375 260f80e4-7a28-3924-810f-c04153c831b5
(Re-landing this change after assertions fixed.)
Instead of allocating an array for the names of local variables,
store the names in the LocalVarDescriptors structure directly.
Using dart2js to compile a small dart program results in about 7200
LVDs on the heap.
Retained memory before: 568KB
Retained memory after: 432KB (75%)
R=asiva@google.com
Review URL: https://codereview.chromium.org//577443003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40276 260f80e4-7a28-3924-810f-c04153c831b5