srdjan@google.com
81d8099650
Redesign inlining interval computation.
...
Review URL: https://codereview.chromium.org//904763003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43622 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:11:05 +00:00
iposva@google.com
6898a10c93
- Make sure to fail early if an non-stacktrace is passed into the VM
...
where we expect one.
Review URL: https://codereview.chromium.org//908433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43546 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 09:23:57 +00:00
koda@google.com
96bed4dd79
Add missing call to VerifiedMemory::Accept when initializing Smi field.
...
BUG=dart:22224
R=asiva@google.com
Review URL: https://codereview.chromium.org//898453009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43533 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 00:02:29 +00:00
hausner@google.com
2487c76886
Add support for sync* and yield and yield*
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//888463004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43516 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 18:36:40 +00:00
johnmccutchan@google.com
e1d3dbcd8c
Reduce isolate startup time in debug mode by 20 millis
...
Before:
CorelibIsolateStartup(RunTime): 34280
After:
CorelibIsolateStartup(RunTime): 14836
R=koda@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//884793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43252 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-28 18:54:18 +00:00
fschneider@google.com
b79f717e89
VM: Use PC offset instead of absolute PC in exception handler info.
...
Similar to the change I did for PC descriptors: We can save space by
using a uint32_t for the offset, instead of a uword for the absolute pc.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//868103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43138 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 15:40:06 +00:00
fschneider@google.com
14d28360d0
Attempt to fix clang build another time.
...
This error is not reproducible with my local clang build.
Review URL: https://codereview.chromium.org//867223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43106 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 13:47:42 +00:00
fschneider@google.com
d88a27c978
Fix another clang compiler warning.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//868033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43103 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 13:31:10 +00:00
fschneider@google.com
35f3c194ca
Fix clang compiler warning.
...
TBR=vegorov@google.com
Review URL: https://codereview.chromium.org//869203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43101 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 13:00:11 +00:00
fschneider@google.com
dd824bd017
Store pc offset instead of absolute pc in the pc descriptors.
...
This saves space on 64-bit platforms as the offset is stored
as a uint32_t compared to a pointer-size absolute address.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//875443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43100 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 12:30:11 +00:00
asiva@google.com
ca1c3241c4
Fix for issue 21398.
...
Accept only 'literal-like' objects when sending messages to isolates
spawned using spawnURI. Allow all objects for isolates spawned using
spawnFunction.
R=iposva@google.com
Review URL: https://codereview.chromium.org//834233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42793 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 23:14:30 +00:00
koda@google.com
0b85873fc8
Deletion barrier preparation: validate overwritten references.
...
With the upcoming deletion barrier, every update of a pointer field must know whether the previous value was a valid pointer.
Currently, we always use StorePointer/StoreSmi, both for initialization and updates.
Initialization, and thus the potential for overwriting garbage values, appears in three places:
1. Object::Allocate/Foo::New.
2. Creating isolate from full snapshot.
3. Allocation in generated code.
Case 1 already null-initializes all underlying memory.
Case 2 is addressed by this CL by exploiting that:
i) fresh pages are zero-filled by OS, and
ii) freelist headers use only even values.
Case 3 is remains a TODO for future CLs.
(An alternative solution for case 2 would have been to add an init_foo method for every set_foo called.)
R=iposva@google.com
Review URL: https://codereview.chromium.org//792163003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42584 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-02 18:16:13 +00:00
srdjan@google.com
4c8545557a
Add inlining ranges/intervals to code objects so that we can map a pc to the inlined stack. The mapping is not fast, used only for disassembly.
...
Copied from other CL: https://codereview.chromium.org/790213004/
Review URL: https://codereview.chromium.org//817823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42522 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 20:03:27 +00:00
koda@google.com
1480e901d9
Use compare and swap when updating tag word in all C++ runtime code that might run concurrently.
...
This was done back in r39731, but then partially reverted in r39734, and has been broken ever since.
Also distinguish between sync/unsync versions. While old-space GC marker is non-concurrent, it uses unsync versions for efficiency.
Add a template to share code between sync versions and avoid unintentional discrepancies.
R=iposva@google.com
Review URL: https://codereview.chromium.org//804673003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42409 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 21:31:29 +00:00
vegorov@google.com
0e1479d2cb
Merge RawICData::range_feedback_ field into RawICData::state_bits_.
...
We were using a lot of bits in state_bits for recording deoptimization reasons, never asked about presence of those bits.
Ultimately optimizer cares only about 3 different deopts, so most all of those bits were wasted.
R=srdjan@google.com , zra@google.com
BUG=
Review URL: https://codereview.chromium.org//807593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42388 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 13:12:35 +00:00
vegorov@google.com
aa48bd4759
Range feedback for arithmetic operations.
...
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
2014-12-15 18:48:15 +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
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
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
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
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
rmacnak@google.com
2b51264dcf
Make deserialization more regular as prep for deferring canonicalization for types/instances.
...
BUG=http://dartbug.com/21079
R=asiva@google.com
Review URL: https://codereview.chromium.org//624103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41089 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 01:16:00 +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
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
rmacnak@google.com
09e372d480
Don't use the size-zero array hack to access variable data in Snapshot.
...
Avoids C4200 from MSVS "nonstandard extension used : zero-sized array in struct/union".
R=asiva@google.com
Review URL: https://codereview.chromium.org//604553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40657 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 22:51:32 +00:00
asiva@google.com
3f6e337e87
Fix issue 20983 ( https://code.google.com/p/dart/issues/detail?id=20983 )
...
The check for load error on completion of async load was very inefficient.
Added a Hash set to ensure we don't repeatedly traverse through a library
when trying to establish transitive load errors.
R=iposva@google.com
Review URL: https://codereview.chromium.org//573293004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40422 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 02:01:26 +00:00
srdjan@google.com
4bb01949bc
Fix to allocation stub invalidation: we cannot just remove it as it will be collected even though code still may reference it. Since we should probably have two different allocation stubs, keep two in the class and switch between them. Future work will put intelligence in the allocation stub selection. Added Daniel's test flag & code.
...
R=koda@google.com
Review URL: https://codereview.chromium.org//566853005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40327 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 17:01:17 +00:00
hausner@google.com
48807614ee
Eliminate 99% of allocated ExceptionHandler objects
...
The vast majority of functions have no exception handlers, thus they can all
share a single ExceptionHandler descriptor.
This CL reduces the number of ExceptionHandler objects on the heap from
about 8400 to 16, from 132KB to less than 1KB, when running dart2js.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//575663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40323 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 16:27:04 +00:00
hausner@google.com
d8a70f2932
Save more memory by compacting LocalVarDescriptors
...
(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
2014-09-15 21:34:58 +00:00
ricow@google.com
941403f9c7
Revert revision 40228
...
This is making us crash across platforms in debug mode, see e.g.,
http://build.chromium.org/p/client.dart/builders/vm-linux-debug-x64-be/builds/2967
Review URL: https://codereview.chromium.org//564143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40231 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 06:37:18 +00:00
hausner@google.com
acf28bc37e
Save more memory by compacting LocalVarDescriptors
...
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//566053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40228 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 23:53:03 +00:00
hausner@google.com
2f2cedfa42
Optimize LocalVarDescriptor objects for functions that have no local variables
...
Allocate a canonical “empty” variable descriptor object. Saves about 10% of
variable descriptor space when running dart2js.
R=asiva@google.com
Review URL: https://codereview.chromium.org//565513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40158 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 16:08:59 +00:00
regis@google.com
0220e41d72
New bigint implementation in the vm.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//509153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
zra@google.com
c686b2c624
Finishes removing intptr_t from raw object fields.
...
Also removes {Read,Write}IntptrValue from the snapshot reader and writer.
R=asiva@google.com
Review URL: https://codereview.chromium.org//343803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40048 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 19:51:22 +00:00
iposva@google.com
d854884590
- Revert parts of r39731 as they cause conflicting results.
...
Review URL: https://codereview.chromium.org//534433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39734 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-01 20:28:43 +00:00
iposva@google.com
50652300dc
- Add AtomicOperations::CompareAndSwapWord
...
- Make AtomicOperations inlineable.
- Use atomic tag word updates from C++ where necessary.
Review URL: https://codereview.chromium.org//529823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39731 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-01 18:18:44 +00:00
koda@google.com
a6802d85d8
Optimize "smi or old" filter in scavenger into a single branch.
...
Consistently speeds up SplayHarder by ~3-6% on ia32. Impact on ARM varies greatly between runs...
R=iposva@google.com
Review URL: https://codereview.chromium.org//504953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39557 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 17:05:53 +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
asiva@google.com
bf9906cf51
Revert r39246 which reverted r39101
...
R=koda@google.com
Review URL: https://codereview.chromium.org//474073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39272 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 22:06:54 +00:00
zra@google.com
5d3f4708ec
Fixes to support ARMv5 lego mindstorm.
...
1. Deopts on division when neither vfp nor idiv are present.
In a subsequent CL, I can add a leaf runtime call for this.
2. Uses a different PC read offset in STR and STM instructions.
On ARMv5 and earlier, the PC read offset is 8 except in STR
and STM instructions, where it is implementation defined. On
lego mindstorm it is 12. This requires changing
kEntryPointToPcMarkerOffset to be a function.
3. Uses a dummy struct to compute the size of a compressed
pc descriptor to avoid alignment issues. sizeof(PcDescriptorRec)
is 16 on ia32 and arm. Subtracting sizeof(int16_t) gives 14,
which creates alignment problems on ARM, i.e. poor performance on
ARMv6 and later, and wrong results on ARMv5 and earlier.
R=regis@google.com
Review URL: https://codereview.chromium.org//467103005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39250 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 15:42:00 +00:00
ricow@google.com
c92b022598
Revert revision 39101 "Avoid linear search for function lookup."
...
This is causing breakage of the pop pop win sample.
For details see issue 20517
This revert had a minor merge conflict for a todo comment
R=kasperl@google.com
Review URL: https://codereview.chromium.org//471843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39246 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 12:39:07 +00:00
regis@google.com
861f4a57d9
Add support for TypedData in full snapshot.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//468423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39232 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 23:21:50 +00:00
koda@google.com
df87039699
Avoid linear search for function lookup.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//421913010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39101 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-11 19:27:59 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +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