regis@google.com
163db76189
Hook up simulator (if needed) when calling Dart code.
...
Merge identical InvokeDynamic and InvokeStatic to InvokeFunction.
Remove redundant argument from InvokeClosure.
Review URL: https://codereview.chromium.org//12315087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18994 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 19:30:29 +00:00
vegorov@google.com
51c4652bca
null value can be the receiver of methods on Object (e.g. hashCode).
...
Fix wrong assumption in the type propagator that marked the receiver as never nullable.
R=srdjan@google.com
BUG=dart:8739
Review URL: https://codereview.chromium.org//12330113
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18991 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 18:48:49 +00:00
vegorov@google.com
cfbb242830
Add machine readable markers around code and flow graph output printed for --print-flow-graph and --disassemble-optimized.
...
This allows to quickly preparse large IR/code dumps when loading then into the tools instead of parsing them line by line and figuring out where things start and end.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//12321111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18966 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 13:09:17 +00:00
kmillikin@google.com
bfdad288d9
Set instruction/use_index when adding an input to an IL instruction.
...
When setting an input (including in the constructor) of an IL instruction,
automatically set the input use's instruction and use_index fields.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//12316065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18961 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 11:24:08 +00:00
lrn@google.com
3c0ac360e7
Remove deprecated string features.
...
Make String.codeUnits return a List.
Review URL: https://codereview.chromium.org//12282038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18960 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 10:48:09 +00:00
srdjan@google.com
6970cce40c
Making CompileType a Value object.
...
Review URL: https://codereview.chromium.org//12315063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18937 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-23 00:58:41 +00:00
sra@google.com
039864883a
Revert "Revert "Use browsers JSON.parse for parsing JSON ( #3 )""
...
Fix more IE special cases
Review URL: https://codereview.chromium.org//12320072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18933 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-23 00:21:24 +00:00
srdjan@google.com
ad6a87d6ad
Improve performance of String::ToCString for OneByteStrings and parsing of doubles. Leads to significant speedups in json parsing.
...
Review URL: https://codereview.chromium.org//12317076
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18925 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 22:43:36 +00:00
sra@google.com
0d95ced3dc
Revert "Use browsers JSON.parse for parsing JSON ( #3 )"
...
Review URL: https://codereview.chromium.org//12313069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18911 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 19:34:08 +00:00
sra@google.com
1b988548de
Use browsers JSON.parse for parsing JSON ( #3 )
...
Original CL: https://codereview.chromium.org//12114021
This version modified to take advantage of dart:json being moved to VM.
Review URL: https://codereview.chromium.org//12314055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18908 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 19:21:18 +00:00
vegorov@google.com
3464bf935c
Fix arm and mips build.
...
TBR=kmillikin@google.com
Review URL: https://codereview.chromium.org//12340028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18896 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 16:39:52 +00:00
vegorov@google.com
339c914f2c
Ensure that compile time types for comparisons are recomputed once comparison are specialized.
...
Turn CompileType into a value object instead of zone object. Provide a transparent zone allocated wrapper for CompileType. This simplifies code paths that recompute and update type and reduces number of allocated zone objects.
Split ComputeInitialType into ComputeInitialType and ComputeType.
ComputeType returns values type as a value object. ComputeInitialType returns a pointer and by default it delegates to ComputeType.
This split reflects differences between instructions: majority of them have their own type, but some can return the type of an input which should not be unwrapped and rewrapped again because this will destroy the connection between types.
R=kmillikin@google.com
BUG=
Review URL: https://codereview.chromium.org//12330072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18895 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 16:33:37 +00:00
fschneider@google.com
d4fc4b291d
Insert missing test for unboxed mint support when inlining _setIndexed, getInt32, getUint32.
...
Int32Array and Uint32Array can only be optimized on ia32 when SSE 4.1
is supported.
Review URL: https://codereview.chromium.org//12328055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18890 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 13:41:24 +00:00
asiva@google.com
97ef3c86d3
Move json, uri, utf and crypto libraries into the VM.
...
This should ensure that we would not need a patch per embedder for these libraries in case somebody decides to patch these.
Review URL: https://codereview.chromium.org//12318031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18865 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 01:24:57 +00:00
srdjan@google.com
19995faa3a
Recognize pattern (a << b) & c with c being a positive Smi and allow left shift to truncate the result.
...
Review URL: https://codereview.chromium.org//12218181
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18859 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 22:24:42 +00:00
iposva@google.com
c900112af7
- Improve the message for NoSuchMethodErrors that are
...
determined statically at compile time.
Review URL: https://codereview.chromium.org//12328019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18848 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:53:27 +00:00
asiva@google.com
f930e3856b
Add typed data interface to Dart API, this only changes the C++ API as dicussed in a previous email. The dart code in the library has not been changed yet.
...
Review URL: https://codereview.chromium.org//12255018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18846 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:43:44 +00:00
zra@google.com
ddb1f60210
Adds ARM arm assembler tests.
...
Review URL: https://codereview.chromium.org//12340006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18844 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:36:34 +00:00
kmillikin@google.com
87a04450c2
Weaken a bogus assertion in use list verification.
...
It is allowed for a phi to refer to itself as input without violating
properties of SSA form.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//12317043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18830 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 13:56:40 +00:00
kmillikin@google.com
509261dd45
Reapply "Change the SSA construction pass to also construct def-use chains."
...
This reapplies svn commit 18813 with a bug fix. In the case of an
inlined call whose value is not used, the inliner hase inserted a use
of the return value's definition, which must be removed.
R=vegorov@google.com
BUG=
Review URL: https://codereview.chromium.org//12334007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18827 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 12:57:43 +00:00
kmillikin@google.com
c3e1db1af7
Fix broken use lists in branch instructions.
...
BranchInstr::ReplaceWith is used in two different places that have different
expectations about the use lists of their argument. Split it into two
separate functions.
R=fschneider@google.com
BUG=dart:8657
Review URL: https://codereview.chromium.org//12310040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18826 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 12:51:01 +00:00
sgjesse@google.com
488b016a2f
Merge IO v2 branch to bleeding edge
...
R=ager@google.com , ajohnsen@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//12316036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18820 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:58:11 +00:00
fschneider@google.com
8fa3140676
Inline ByteArray._setIndexed in the flow graph optimizer.
...
Review URL: https://codereview.chromium.org//12317011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18818 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:35:19 +00:00
kmillikin@google.com
733a05c801
Revert "Change the SSA construction pass to also construct def-use chains."
...
This reverts svn revision 18813 due to dart2js test failures.
TBR=kasperl@google.com
BUG=
Review URL: https://codereview.chromium.org//12313033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18817 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:06:31 +00:00
kmillikin@google.com
85c27b7733
Change the SSA construction pass to also construct def-use chains.
...
Also modify constant propagation to preserve def-use chains. Fix a small
bug in the def-use chain for definitions of inlined function return values.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//12326012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18813 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 10:09:10 +00:00
iposva@google.com
8e93d20303
- Disable source_filter.gypi.
...
- Adjust some more OS dependent files.
Review URL: https://codereview.chromium.org//12313021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18797 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 23:40:32 +00:00
vegorov@google.com
f8d373d85b
Ignore definitions that do not have SSA index in FlowGraphAllocator::CollectRepresentations.
...
SSA building does not assign an index to definitions without uses and the rest of the allocator can cope with this treating output produced by such an instruction as temporary value.
R=srdjan@google.com
BUG=dart:8655
Review URL: https://codereview.chromium.org//12315017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18793 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 22:38:22 +00:00
iposva@google.com
9046a44a37
Prepare for removal of source_filter.gypi:
...
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
vegorov@google.com
bb0c073ff9
Strengthen type assertions post-dominated by checks during type propagation.
...
If a type assertion for a value is post-dominated by a class or smi check over the same value then raise the check over the assertion.
This allows to eliminate type assertions in the cases like:
AssertAssignable(x, int)
CheckSmi(x)
Currently post-domination is computed within a single block because post-dominators are not available.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//12317013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18777 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 19:40:26 +00:00
regis@google.com
8d24d2b98a
Implement ARM disassembler.
...
Implement ARM call patcher.
Review URL: https://codereview.chromium.org//12301042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18769 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 17:28:35 +00:00
fschneider@google.com
3a41f53bc2
Remove optional CompileType parameter in the constructor of Value.
...
It is only needed in one place inside the Value class anyway,
so there is no reason to have it visible to the outside.
Review URL: https://codereview.chromium.org//12319017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18767 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 17:11:41 +00:00
kmillikin@google.com
f2053df219
Remove two more places where we computed use lists and add verification.
...
Remove computation of use lists after type propagation which was
unnecessary, and a call per inlined function after ApplyICData which was
also unnecessary.
Add verification code after all compiler passes.
R=vegorov@google.com
BUG=
Review URL: https://codereview.chromium.org//12317007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18750 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 13:01:25 +00:00
hausner@google.com
5eba0b69e4
Fix static name resolution in mixing code
...
In mixin code, static names need to be looked up in the mixin class.
OTOH, in patch classes, we need to resolve static names in the
class into with the code is patched. I'm all for simplicity!
Review URL: https://codereview.chromium.org//12308005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18710 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-19 18:26:55 +00:00
fschneider@google.com
d9667c75c4
Copy propagated type info when inserting conversion.
...
Use propagated type info to improve smi-checking before
double operations (CheckEitherNonSmi)
Review URL: https://codereview.chromium.org//12298034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18692 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-19 15:25:47 +00:00
kmillikin@google.com
622efda5fb
Convert some compiler passes to preserve valid def-use chains.
...
Change the ApplyICData, ApplyClassIds, Canonicalize, and
SelectRepresentations passes to preserve valid use lists.
Review URL: https://codereview.chromium.org//12212093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18676 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-19 12:09:01 +00:00
fschneider@google.com
9a12ca4450
Use compile type to improve stores to Int32List and Uint32List on ia32.
...
If the value stored is a smi, we just untag and store it. There is no
need to unbox it into an XMM register first.
Review URL: https://codereview.chromium.org//12295017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18647 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 16:52:36 +00:00
vegorov@google.com
a3b051a662
Fix compilation error: enumeral and non-enumeral type in conditional expression.
...
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//12288030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18645 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 15:56:59 +00:00
vegorov@google.com
7243a64bbf
Trust declared type of the receiver to compute its initial compile type.
...
Fix a bug in the ToNullableCid which was leaving cid_ uninitialized when class has subclasses.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//12304009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18641 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 15:45:55 +00:00
fschneider@google.com
266a36eb5d
Optimize _getIndexed on byte arrays.
...
Until now we only optimize the [] operator, but don't have a
fast path for polymorphic invocations of [] on byte arrays.
I also added additional test coverage for Uint8Clamped list.
Review URL: https://codereview.chromium.org//12282029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18624 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-18 13:18:28 +00:00
regis@google.com
8c44be4313
Add support for object pool that will be used on ARM and MIPS architectures.
...
Modify code patching infrastructure to accept code object, which is necessary to
get to the object pool containing patchable target addresses.
Modify assembler test infrastructure to provide associated code object.
Review URL: https://codereview.chromium.org//12260026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18604 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 23:55:31 +00:00
srdjan@google.com
5d42e63bd1
Optimize left shift of a constant: compute max value of right that does not overflow into Mint/Bigint.
...
Review URL: https://codereview.chromium.org//12212175
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18525 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 18:10:21 +00:00
fschneider@google.com
0a1d6d15f9
Fix bug in optimizing string .length loads.
...
We're not allowed to hoist a .length load if the corresponding
class-check is not also hoisted out of a loop.
TEST=tests/language/optimized_string_charcodeat_test.dart
Review URL: https://codereview.chromium.org//12256037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18519 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 15:59:18 +00:00
fschneider@google.com
e2a0c8f7ca
Optimize stores to ExternalUint8Array and ExternalUint8ClampedArray in the optimizer.
...
This CL adds support for these two array types to the StoreIndexed instruction.
Review URL: https://codereview.chromium.org//12263010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18517 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 12:59:51 +00:00
fschneider@google.com
352cb5bd78
Use writable register policy to avoid explicit restoring input register after untagging.
...
This CL produces more compact code if the writable input
register is the last use by avoiding unnecessary re-tagging.
In that case no extra temp generated by the register allocator.
Review URL: https://codereview.chromium.org//12114008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18515 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 11:41:08 +00:00
hausner@google.com
d3a1050ebc
Minor improvement in mixin application
...
Build list of functions and attach it to mixing application
class on one call. Takes care of a review comment by Siva.
TBR=asiva
Review URL: https://codereview.chromium.org//12261029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18495 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:48:18 +00:00
johnmccutchan@google.com
9fb0984c9d
SSE Assembler + Linux build fixes
...
Review URL: https://codereview.chromium.org//12223115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18493 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:05:17 +00:00
srdjan@google.com
39713f0efc
The code size does not scale with architecture word size, set code size cutoff limit to 200,000 bytes for all architectures
...
Review URL: https://codereview.chromium.org//12256028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18492 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:00:09 +00:00
srdjan@google.com
4f285ac0a8
Add flag to block optimizations of large implicit getters. Implicit getters have a 0 size in tokens, therefore also check the size of unoptimized code to decide if a function is optimizable. Print more data with --trace-compiler.
...
Review URL: https://codereview.chromium.org//12263017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18485 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:52:02 +00:00
hausner@google.com
b4527a7465
First stab at mixins in VM compiler
...
Things not yet supported:
- Type parameters for super class and mixin class
- super call limitation check
Review URL: https://codereview.chromium.org//12210127
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18479 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:08:15 +00:00
srdjan@google.com
5694a140e3
Fix allocation of array tables (use store barrier if needed, store values directly instead of via stack).
...
Review URL: https://codereview.chromium.org//12212050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18464 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 18:44:27 +00:00