Commit Graph

1142 Commits

Author SHA1 Message Date
hausner@google.com 8ece5c1b84 Allow Symbols in switch and maps
Allow Symbol literals (and const Symbol instances) as switch expression
and as key values in const Maps.

This implements the most recent Spec changes.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42230 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 00:24:07 +00:00
johnmccutchan@google.com f216834af8 Expose set_source service command for functions
- Can change signatures
- Currently only works for unexecuted functions.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42124 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 23:35:24 +00:00
zerny@google.com 4fb54d853d Support use of external strings as inputs to LoadCodeUnitsInstr.
R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42099 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 09:26:48 +00:00
rmacnak@google.com dd3c1fa32e Remove several entries from invocation fuzzer blacklist.
Add event loop, isolate startup, and symbol helper functions to the invisible list.

Include doubles as a target.

BUG=http://dartbug.com/15274
BUG=http://dartbug.com/20583
BUG=http://dartbug.com/21707
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42092 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 22:08:32 +00:00
fschneider@google.com a49870e721 VM: Remove use of IterableMixinWorkaround from _List, _ImmutableList and _GrowableList.
_List, _ImmutableList and _GrowableList now extend ListBase which uses ListMixin.

Note that typed data lists are still using IterableMixinWorkaround for now.
They will be changed in a separate CL since it involves a few more changes
to the VM.

BUG=dartbug.com/13647
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42061 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 10:38:51 +00:00
zerny@google.com 8e807c8550 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

Committed: https://code.google.com/p/dart/source/detail?r=41949

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41983 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 09:32:43 +00:00
zerny@google.com 84a4135901 Revert "Integrate the Irregexp Regular Expression Engine."
This reverts commit https://code.google.com/p/dart/source/detail?r=41949

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41950 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:36:40 +00:00
zerny@google.com 43ac0c6f33 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41949 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:10:21 +00:00
regis@google.com 57888924c4 Resubmit bigint changes of r41817 that were later reverted.
An inliner issue was fixed in r41840.
A missing length increment is added by this cl.
Minor improvements and comments.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41873 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 23:18:03 +00:00
regis@google.com bbf3bfc0cd Revert bigint changes of r41817 until dart2js failures are understood and fixed.
Keep x64 assembler additions.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41820 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 02:00:07 +00:00
regis@google.com 925f0b6292 Process two 32-bit digits as one 64-bit digit in bigint absAdd and absSub
intrinsic on x64. More to follow.
Added assembler instructions and tests.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41817 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 00:12:25 +00:00
hausner@google.com 4bf624ebc0 Implement enum types in VM
Fully support enum types as per language spec version 1.6.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41815 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 23:10:07 +00:00
vegorov@google.com 2e8791fe38 Fix overflow check in the Smi::ShiftOp.
It did not work correctly for the corner case like -1 << 63.

BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41740 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 13:19:56 +00:00
fschneider@google.com b26ff22adf Allocation sinking for contexts.
Improved aliasing computation in presence of Redefinition and AssertAssignable.

Added possibility for inlining annotations via --enable-inlining-annotations flag.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41713 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 13:53:58 +00:00
koda@google.com 8479136580 Support verified heap pointer writes on ia32.
With --verified_mem, use VerifiedMemory to duplicate all pointer writes in the heap, and verify that no unaccounted writes occurred.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41700 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 23:47:42 +00:00
koda@google.com fe2d2d5c3d Add more missing StorePointer/StoreSmi calls.
Also move these to RawObject (as privates), for when handles are unavailable.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41609 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:24:47 +00:00
koda@google.com dd2bbd3da9 Add missing StorePointer/StoreSmi in ContextScope.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41592 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 01:51:17 +00:00
vegorov@google.com 41bc926f6c Suppress inlining of complex Bigint intrinsics.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41558 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 13:56:19 +00:00
regis@google.com 5c55e61647 Resubmit fix for Function::Clone() and Field::Clone() to adjust the class owner
of type parameters (issue 18630).
Make sure to clone the parameter type array as well.
Add regression tests.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41474 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 23:16:33 +00:00
regis@google.com 1571d85271 Clarify comment explaining assert in Function::SetParameterTypeAt.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41447 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 20:14:56 +00:00
fschneider@google.com 7bec3edaef Remove saving/restoring of the context at function entry.
This is not needed anymore after I changed the current context
to always reside in a local variable.

Further simplifications and cleanup in the debugger.

This also fixes a bad memory retention problem with
non-capturing closures.

BUG=dartbug.com/18886
TEST=tests/language/vm/closure_memory_retention_test.dart
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41433 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 07:35:51 +00:00
regis@google.com 71c8b1b210 Revert mixin fix r41424 until mirrors issue 21474 is fixed.
Review URL: https://codereview.chromium.org//691053004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41425 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 19:04:02 +00:00
regis@google.com 5a09dee193 Fix Function::Clone() and Field::Clone() to adjust the class owner of type
parameters (issue 18630).
Add regression tests.
Commented out 3 lines in mirror test (issue 21474 filed).

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41424 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 17:39:40 +00:00
fschneider@google.com 876193b31a Make CTX allocatable by the register allocator.
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
2014-10-30 15:42:38 +00:00
fschneider@google.com 1dc4e979d9 Remove isolate pointer from context objects.
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
2014-10-24 12:19:20 +00:00
koda@google.com ede485669b Fix test timeout; faster DEBUG String::CharAt by not using mutable accessor.
BUG=dart:21343
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41218 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 00:15:43 +00:00
iposva@google.com 6266f1d4a0 - Do not attempt to set parameter types if they
were already finalized.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41182 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 21:50:28 +00:00
iposva@google.com 39703863c4 - Add a separate step to finalize the VM isolate explicitly.
- Allocate the method extractor parameter types and names
  only once, namely in the VM isolate.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41173 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 17:02:19 +00:00
hausner@google.com 2f49f29c38 Await always waits
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
2014-10-14 19:58:06 +00:00
koda@google.com 1fbac47d9e Write barrier audit: const raw_ptr()
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
2014-10-11 00:26:54 +00:00
koda@google.com b7db007f71 Fix Object::Clone.
Exclude header when copying: default value for its tags will be that of a fresh object.
Correct logic for adding the clone to the store buffer.

BUG=21273

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41055 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 23:26:58 +00:00
vegorov@google.com e6113cc0f5 If bounds check 0 <= index < length is not redundant we attempt to
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
2014-10-07 18:50:29 +00:00
koda@google.com a6c75c3960 Fix Object::Clone heap corruption under concurrent sweeping.
Don't clone the mark bit; for details,
see https://code.google.com/p/dart/issues/detail?id=21236

BUG=21236
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40926 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 13:28:27 +00:00
koda@google.com 366ac688e3 Write barrier audit, part 1.
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
2014-10-02 20:47:45 +00:00
hausner@google.com e62533bcbe Fix corner case in partial script url matching
Fixes issue 21182

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40860 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-01 22:53:15 +00:00
regis@google.com f6c6ac61dd Second attempt at fixing warning on Windows.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40827 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-01 00:20:43 +00:00
regis@google.com 3cf27d550e Disable 2 intrinsics causing optimizer issues (under investigation).
Rename 2 intrinsics (was not the issue).
Added a static cast to eliminate a warning on Windows.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40825 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 23:01:40 +00:00
regis@google.com f7ac8841a9 Provide ia32 intrinsics for bigint add, sub, quotient digit estimation, and
Montgomery mulMod.
Refactored bigint dart code to allow for the above intrinsics.
Added support for unsigned  division on ia32 and added assembly tests.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40822 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 18:49:41 +00:00
regis@google.com 50086cbc75 Resubmit reverted r40623 unchanged after GC issue fixed.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40815 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 16:21:23 +00:00
koda@google.com 60b12996ec Track references to allocation stubs via static_calls_table, instead of keeping two referencers alive.
(Verbatim copy of srdjan's https://codereview.chromium.org/609893002/ )

TBR=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40738 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 20:17:53 +00:00
hausner@google.com b8499c27bb Allow setting breakpoints specifying the suffix of a file path
In this version, the VM does not set a breakpoint if the url given
matches the suffix of more than one loaded script.

Partial matches must start with a path separator or with the character immediately following a path separator.

E.g. d.dart will match /tmp/d.dart, but not /tmp/ed.dart.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40736 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 20:11:24 +00:00
koda@google.com a56293ab7d Break out WeakCodeReferences to own file in preparation to use it outside object.cc.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40656 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 22:43:05 +00:00
whesse@google.com 1f87b5feba Revert r40623, "Refactor bigint _sqrTo in preparation of intrinsification."
This reverts commit r40623, https://codereview.chromium.org//600533002, which
is failing snapshot generation on x64 and arm architectures.

BUG=dartbug.com/21061
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40628 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 09:40:19 +00:00
regis@google.com edd503f7d0 Refactor bigint _sqrTo in preparation of intrinsification.
Provide _sqrAdd intrinsic on ia32.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40623 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 01:51:04 +00:00
rmacnak@google.com 7899a9cc64 Mark _Bigint._mulAdd and conversion methods in typed_data as invisible. Strengthen the mirror invocation fuzzer.
BUG=http://dartbug.com/21046
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40609 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 22:01:45 +00:00
rmacnak@google.com 645b5a0d2b Revert "Add _Bigint._mulAdd to the invisible list. Strengthen the mirror invocation fuzzer."
Review URL: https://codereview.chromium.org//590703003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40580 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 00:01:33 +00:00
rmacnak@google.com 7e7d568be5 Add _Bigint._mulAdd to the invisible list. Strengthen the mirror invocation fuzzer.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40576 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 22:46:40 +00:00
asiva@google.com 8762719b28 Remove some of the unused classes stored in the object store.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40531 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 23:48:49 +00:00
asiva@google.com 302c93b050 1. Add user tag to the pointers traversed in the object store
2. Added support for UserTag objects in a full snapshot.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40508 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 18:00:13 +00:00
srdjan@google.com 5ef243e688 Make sure Bigint._digits is always a Uint32List and bever null. Adapt type information for get:_digits.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40463 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 21:18:25 +00:00