srdjan@google.com
428dea19dc
Fix crash with --no-use-cha: the optimizer expects a concrete type for array creation, not dynamic as is the result because we cannot determine without CHA if a class is guaranteed to have no sublcasses and has not been implemented. Regardless of use_cha, always rely on known information for internal classes that are not subtype or implemented by other clases.
...
R=asiva@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//15141004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22655 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-13 23:19:20 +00:00
srdjan@google.com
0acfcf21e7
A load static of an initialized static final field can be converted to its value, as long as it is in old space or Smi, and can therefore be a literal node.
...
Add special objects to mark non_constant and unknown_constant in constant propagator so that there is no confusion with sentinels used in the graph.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14969019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22600 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 21:33:14 +00:00
hausner@google.com
80c7ad1070
Implement breakpoint for closure calls
...
Introduce a new PcDescriptor kind to distinguish closure calls from other runtime calls. The debugger can patch these calls to set a breakpoint. When stepping into a closure call, the debugger must fish out the closure object from the stack, find the function and set breakpoints in it.
Arm and Mips breakpoint stubs are not implemented yet. ia32 and x64 stubs tested by hand. Automated test to follow.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14858033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22596 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 21:06:04 +00:00
vegorov@google.com
2565ca222f
Implement a variation of scalar replacement for non-escaping allocations.
...
AllocationSinking pass discovers non-escaping allocations that have no input uses other than uses in the stores into its own fields.
Every environment use of such allocation is replaced by a state snapshot (MaterializeObject instruction) that describes the state of each initialized field in the object. State snapshots are computed through an additional round of load-forwarding.
Once snapshots are computed allocations are removed from the graph.
MaterializeObject instructions are not compiled into native code but produce deoptimization instructions instead that describe how object should be materialized at deoptimization.
Deoptimization instructions now follow the following format:
[mat obj #1 ]...[mat obj #N][ret addr][... mat arguments ...][... real frames ...]
- the prefix describes each object to materialize on deopt via kMaterializeObject instruction;
- actual values that are needed for materialization are emited as a part of bottom-most stack frame. This is done to simplify implementation: they need to be discoverable by a GC during materialization phase. At the end of deoptimization they will be removed from the stack;
- normal stack slots can refer to materialized objects via kMaterializedObjectRef instruction.
Additionally this change contains fixes in load-forwarding that are needed to guarantee that all artificial LoadField instructions inserted during AllocationSinking are correctly replaced with actual values.
Limitations of the current implementation:
- can't eliminate allocations that flow into phis but otherwise don't actually escape;
- can't sink allocations out of loops;
- allocation with type arguments are not handled.
R=regis@google.com , srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//14935005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22485 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 23:40:42 +00:00
iposva@google.com
083c9e5e95
- Remember the fact that an object has been added to the
...
store buffer by a bit in the header.
- This bit can be used to filter out redundant additions
into the store buffer making the dedup sets not needed.
- Remove the need for a HashSet when remembering old to
new references.
Review URL: https://codereview.chromium.org//14307013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22393 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 20:59:42 +00:00
srdjan@google.com
706e79d074
Fix error reporting when calling static methods and closures withh mismatched arguments.
...
Closures BEFORE:
----
Unhandled exception:
Class '(dynamic, dynamic, dynamic) => dynamic' has no instance method 'call'.
NoSuchMethodError : method not found: 'call'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Arguments: [2]
Closures NOW:
----
Closure call with mismatched arguments: function 'A.foo'
NoSuchMethodError: incorrect number of arguments passed to method named 'A.foo'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Tried calling: A.foo(2)
Found: A.foo(a, b, c)
Statics BEFORE:
----
Unhandled exception:
No top-level method 'foo' declared.
NoSuchMethodError : method not found: 'foo'
Receiver: Type: class '::'
Arguments: []
Statics NOW:
----
Unhandled exception:
No top-level method 'foo' with matching arguments declared.
NoSuchMethodError: incorrect number of arguments passed to method named 'foo'
Receiver: top-level
Tried calling: foo(...)
Found: foo(a, b, c)
R=regis@google.com
Review URL: https://codereview.chromium.org//14652008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22209 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 22:05:14 +00:00
regis@google.com
0e030b6f5c
Further improve type optimization reusing the type argument vector of the
...
instantiator of generic objects (fixes issue 10149).
This optimization considers the generic type argument vector of the instance
being allocated as well as the generic type argument vector of the compile
time type of the instantiator.
If the instance vector is a prefix of the instantiator vector, the instantiator
vector can be shared by the new instance.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14106013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22155 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 23:39:46 +00:00
asiva@google.com
04cb8721ad
First step towards loading the core library scripts directly from the sources
...
instead of concatenating all the scripts and linking them into the executable.
- Refactor the bootstrap script loading and compilation part to use a
custom bootstrap library tag handler
R=iposva@google.com
Review URL: https://codereview.chromium.org//14520010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22154 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 22:00:18 +00:00
srdjan@google.com
dd899432cd
Fix recognition of factories (for setting result cid) and add them to checks.
...
Review URL: https://codereview.chromium.org//14386011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22088 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 21:20:49 +00:00
asiva@google.com
8ab46889e1
Fix some minor nits:
...
- Float32x4 and Uint32x4 were using the wrong script (corelib script).
- Uint32x4 was not being registered.
Review URL: https://codereview.chromium.org//14455009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22077 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 18:01:43 +00:00
regis@google.com
2de2e615e6
Improve type optimization reusing the type argument vector of the instantiator
...
of generic objects:
Do not require anymore that the vector be of the same length. A longer vector
with a compatible prefix is acceptable. This saves a class id check and length
check.
We still require that the uninstantiated type argument vector be the identity
vector, i.e. consisting only of type parameters with consecutive indices
starting at zero. We will relax this requirement in a later change.
Review URL: https://codereview.chromium.org//14238036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22062 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 00:04:13 +00:00
asiva@google.com
fbc931e6a6
Report OOM errors instead of asserting on allocation failures when sending
...
messages to other isolates.
Review URL: https://codereview.chromium.org//14273021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21980 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 20:52:22 +00:00
vegorov@google.com
c34810fd26
Preserve aggregate count when creating unary checks ICData.
...
We were reseting it to 1 which leads to worse inlining decisions for example for user defined binary operators. Inliner considered them all cold.
R=srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14474007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21964 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 17:51:10 +00:00
ager@google.com
431954b584
Rename dart:typeddata to dart:typed_data.
...
R=asiva@google.com , floitsch@google.com , srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14426006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:54:54 +00:00
kustermann@google.com
e2216f61bf
Fast copy between TypedData and ExternalTypedData
...
Until now, copying data from TypedData to TypedData and from ExternalTypedData
to ExternalTypedData was fast. But copying between TypedData and
ExternalTypedData was not handled in a fast way.
Review URL: https://codereview.chromium.org//14296006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21791 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 08:27:15 +00:00
zra@google.com
dae5068650
Enables cross-compilation of the VM for ARM.
...
Uses the "toolset" feature of gyp to build the dart VM
for ARM, but restricts building of snapshot generation
to the host machine.
For generated source files, it also changes to using
LIB_DIR instead of SHARED_INTERMEDIATE_DIR to avoid
generation of duplicate Makefile rules (gyp doesn't
know that generated source files from toolchains it
thinks are different will be the same.)
Review URL: https://codereview.chromium.org//12726011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21757 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 18:05:44 +00:00
srdjan@google.com
9b53a42536
Add flag --check-function-fingerprints, it checks all function fingerprints of the intrinsifier and method recognizer. Added flag to a test so that the fingerprints will be tested during a regular test.
...
Review URL: https://codereview.chromium.org//14247005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21711 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 23:18:13 +00:00
asiva@google.com
70ef44f1c2
Fix for issue 9871 - Object::empty_array() returns a broken handle.
...
Review URL: https://codereview.chromium.org//14298012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21587 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 22:51:24 +00:00
iposva@google.com
9ac0c8d7c9
- Allow for experimentation with different header sizes.
...
Review URL: https://codereview.chromium.org//13951019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21505 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 19:46:21 +00:00
ahe@google.com
45ad548837
Update dart:mirrors to use Symbol.
...
Review URL: https://codereview.chromium.org//14173005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21460 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:00:45 +00:00
hausner@google.com
54dde7ce89
Implement rethrow statement
...
Or: how to turn a 5 minute task into a 2 hour ordeal.
The actual business of the change is one line in token.h and one line in parser.cc.
Review URL: https://codereview.chromium.org//14012005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21371 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:32:37 +00:00
vegorov@google.com
9f3783186f
Ensure that all goto instructions have deoptimization target.
...
R=kmillikin@google.com
BUG=
Review URL: https://codereview.chromium.org//12457034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21351 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:19:34 +00:00
johnmccutchan@google.com
968e805cfc
Unboxed load/store indexed of Float32x4
...
Review URL: https://codereview.chromium.org//13818006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21274 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 12:50:46 +00:00
hausner@google.com
226b3f4ce4
Fix issue 9744
...
Allow for debugger stack frames that have no corresponding pc descriptor
entry, i.e. the PC is not at a known safe point. In that case, we cannot
return a code location nor variables.
Fixes 9744
Review URL: https://codereview.chromium.org//13948009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21175 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 23:36:51 +00:00
vegorov@google.com
a273179ac8
Use locale insensitive method to parse double literals.
...
Using strtod does not work because Dart grammar does not necessary match grammar used by strtod. Some locales (e.g. Russian and Danish) use comma instead of dot for radix point.
R=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//13529014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21074 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 14:32:46 +00:00
regis@google.com
158d90d50f
Prevent expensive and unnecessary error formatting in the case a bound check is
...
postponed to run time (issue 9106).
Eliminate bound check at compile time in some cases.
Fix bound checking of mutually referencing bounds.
Added test.
Review URL: https://codereview.chromium.org//13653005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20938 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 20:24:49 +00:00
iposva@google.com
4dff6b8e2b
- Remember objects (not addresses) in the old generation containing new pointers.
...
Review URL: https://codereview.chromium.org//13406004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20828 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 22:45:18 +00:00
srdjan@google.com
60e57ecfe1
Optimizes 'as' operation in similar way as 'instanceof': collect type feedback in unoptimized mode and try to convert it to a simple classcheck in optimized code.
...
Review URL: https://codereview.chromium.org//13190014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20783 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 15:30:14 +00:00
kasperl@google.com
f15b6960c0
Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables.
...
I'll start refactoring the implementation to make it a bit more
maintainable, but I wanted to get your first impressions.
R=erikcorry@google.com ,lrn@google.com ,srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//12827018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20770 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 11:51:36 +00:00
asiva@google.com
2f7ca6843f
Remove support for 'dart:scalarlist' in the Dart VM.
...
Review URL: https://codereview.chromium.org//13139002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20680 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-29 18:33:54 +00:00
regis@google.com
3e4d359fce
Fix an F-bounded quantification bug (issue 9291).
...
Add regression test.
Review URL: https://codereview.chromium.org//13119022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20576 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 20:42:02 +00:00
johnmccutchan@google.com
5b140f8452
Really remove SIMD types from dart:scalarlist. Fixes build.
...
Review URL: https://codereview.chromium.org//12907023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20563 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 17:06:41 +00:00
johnmccutchan@google.com
d516a7acde
Review changes
...
Review URL: https://codereview.chromium.org//12982010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20559 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 14:44:15 +00:00
asiva@google.com
8dde962f6d
More cleanup in preparation for removing support for dart:scalarlist in the VM.
...
Review URL: https://codereview.chromium.org//13093012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20547 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 22:01:31 +00:00
asiva@google.com
29cea159bf
Fix some of the scalarlist tests to use TypedData VM classes.
...
This is in preparation for removing dart:scalarlist support from the VM.
Review URL: https://codereview.chromium.org//12907010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20532 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 18:46:44 +00:00
johnmccutchan@google.com
e07063f389
Revert 12534006
...
Review URL: https://codereview.chromium.org//13093005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20526 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 17:40:25 +00:00
johnmccutchan@google.com
7b1d3b9134
Port SIMD types from dart:scalarlist to dart:typeddata.
...
Review URL: https://codereview.chromium.org//12534006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20522 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 16:50:26 +00:00
regis@google.com
5eeaba1d98
Update function subtyping rules to latest spec (issue 9057).
...
Update language tests and status files (and filed co19 issue 392).
Review URL: https://codereview.chromium.org//12940010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20493 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 22:14:17 +00:00
regis@google.com
b8bf4159b5
Do not use object pool for VM heap objects on ARM.
...
Update decoding of call pattern accordingly.
Add missing store barrier when storing object pool in instructions object.
Work with GrowableObjectArray in old heap space when assembling object pool.
Review URL: https://codereview.chromium.org//13070003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20483 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 20:29:47 +00:00
asiva@google.com
5642025044
Handle TypedDataView objects in Dart_TypedDataAcquireData and
...
Dart_TypedDataReleaseData
Review URL: https://codereview.chromium.org//12937010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20482 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 20:18:44 +00:00
asiva@google.com
01cc7d3cd2
- Canonicalize types, type_arguments only when the object is marked as being from the core libraries.
...
- adjust the snapshot write buffer growth policy
- turn off the heap growth rate adjustments when reading from a snapshot.
Review URL: https://codereview.chromium.org//12578009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20423 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 22:43:46 +00:00
regis@google.com
0c27ffc6a4
Implement optional parameter handling in ARM vm.
...
Enable FindCodeObject test on ARM (production mode only for now).
Make sure the object pool is allocated in the old space.
Some more code cleanup on IA32 and X64 (use named constants).
Review URL: https://codereview.chromium.org//12663024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20399 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 18:30:35 +00:00
hausner@google.com
d4872a1499
Support initialized mixin fields across scripts
...
Add capability to set parser to read tokens from different
scripts and token positions. This is used when the initializer
expression of a field resides in a different script.
Review URL: https://codereview.chromium.org//12827007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20388 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 17:06:42 +00:00
johnmccutchan@google.com
3d4778e2c2
SIMD plumbing
...
Review URL: https://codereview.chromium.org//12871015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20287 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 20:29:00 +00:00
asiva@google.com
68d1955b88
Translate raw strings to regular strings during source code generation. This should hopefully avoid issues with deciding when to escape special characters and when not to.
...
Review URL: https://codereview.chromium.org//12568007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20248 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 21:32:35 +00:00
vegorov@google.com
1c9d22d75c
Collect type feedback for fields.
...
BUG=
Review URL: https://codereview.chromium.org//12529008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20235 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 20:15:10 +00:00
hausner@google.com
ed2e198b99
Mixins with Generics
...
This change adds support for generics to mixins. It's not a particularly elegant
implementation, so I expect to change how it works internally in later checkins.
Also, there is still one aspect of the implementation that is incorrect. In the
case of typedef, the newly introduced name is not yet an alias for the
mixin application. Instead, the MA is a superclass of the typedef name. That
will need to be fixed in a later checkin. I don't want to make this change
bigger.
Review URL: https://codereview.chromium.org//12779008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20084 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 15:59:24 +00:00
asiva@google.com
453e8fe924
Add the native intrinsic TypedData_setRange to optimize the setRange call when the destination and source of setRange are of the same typeddata type.
...
Review URL: https://codereview.chromium.org//12881006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20078 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 13:33:11 +00:00
asiva@google.com
e723d17796
Fix source generation for strings that have \$ in them.
...
Review URL: https://codereview.chromium.org//12605009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20025 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 14:12:36 +00:00
asiva@google.com
6b8987e55b
Add a command line option to generate source code for a script
...
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00