srdjan@google.com
cd92319223
Optimize string length one comparisons by comparing char codes only. Implemented for one byte strings only at the moment. Will add other string types/mixed compares later.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//105143011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31347 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 20:11:38 +00:00
johnniwinther@google.com
f8ad3f2a43
Update dart2dart status.
...
BUG=
Review URL: https://codereview.chromium.org//112373004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31334 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 12:56:05 +00:00
johnniwinther@google.com
b28b79eb72
Add substitutions even when type arguments are fixed.
...
BUG=http://dartbug.com/14145
R=karlklose@google.com
Review URL: https://codereview.chromium.org//77993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31333 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 12:29:45 +00:00
johnniwinther@google.com
daa2057744
Handle typedefs in registerRequiredType.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//118273004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31327 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 10:15:23 +00:00
brianwilkerson@google.com
4b4bf1cf08
Constant evaluation support. This fixes most of the open issues related to constants and makes it (theoretically) possible to fix the rest.
...
R=jwren@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//113143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31303 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 21:26:54 +00:00
ngeoffray@google.com
00518ed8fe
Fix a bug in the type inferrer, where a getter call was not seen as a potential closure call.
...
R=kasperl@google.com
Review URL: https://codereview.chromium.org//119123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31267 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 12:51:21 +00:00
ngeoffray@google.com
73010db294
double * int returns a double can be simplified to an int if both operands are constants. Therefore the optimization in the instruction simplified to narrow the type should not be done for numbers, or we would end up using an empty type.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//114613003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31266 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 12:43:54 +00:00
jwren@google.com
a5d70e7b95
Fix for 15028.
...
R=brianwilkerson@google.com , pquitslund@google.com
Review URL: https://codereview.chromium.org//114473004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31239 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 21:05:35 +00:00
srdjan@google.com
761d4d04cd
Constant propagation in LoadIndexed when inputs are array/string and index constants.
...
R=fschneider@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//102973007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31230 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 16:55:12 +00:00
ngeoffray@google.com
1f8f38f953
Make the analyzer happy.
...
Review URL: https://codereview.chromium.org//118313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31228 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 15:31:41 +00:00
ngeoffray@google.com
777a6efc03
Short curcuit the inlining when code in the middle of an expression is aborting.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//98643009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31226 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 15:18:17 +00:00
karlklose@google.com
c317023d4c
Emit a compile-time error for initializers of the form this.foo and super.foo.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//107103007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31219 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 10:47:34 +00:00
ngeoffray@google.com
23f3027905
Fix a bug in the container tracer, where the returned value of a closurized method was not traced correctly.
...
R=kasperl@google.com
Review URL: https://codereview.chromium.org//110643006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31185 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 11:35:28 +00:00
rmacnak@google.com
e5d7ada6e9
VM: Support calling through getters in InstanceMirror.delegate.
...
Implement without accessing private members of dart:core. Fix language test expecting wrong return value.
BUG=http://dartbug.com/15138
R=fschneider@google.com
Review URL: https://codereview.chromium.org//114713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31140 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 18:33:45 +00:00
srdjan@google.com
98a1355ef9
Restoring the remaining CL 104893003. For instance call representing numerical comparisons and binary operations (double and Smi supported for now) that were never visited before optimization occurs, we guess the cids if one of the argument cids is known, e.g. ‘a == 1’ we guess that a is also going to be 1 thus avoiding emitting an IC-call in optimized code and propagating the type accordingly.
...
Remove AssertAssignableInstr::RecomputeType as it may cause incorrect behavior: it changes the type of its value based on input, the graph below will then incorrectly remove CheckSmi.
v27 <- BinaryMintOp:14(..
v28 <- AssertAssignable(v27)
CheckSmi(v28)
v17 <- BinarySmiOp:86(+, v28, v12)
R=fschneider@google.com
Review URL: https://codereview.chromium.org//114543004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31137 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 17:15:05 +00:00
regis@google.com
fb6d24945f
Introduce class TypeRef in the VM to fully support recursive types.
...
Fix issues 15244, 15148, 14869, 14000, and 13688 (was closed, but fragile).
Note that the current solution is not final as it may not be correct in more
complex cases not yet covered by language tests.
The final solution will require a 'trail' instead of a simple mark bit to
prevent operations involving recursive types to diverge.
R=asiva@google.com
Review URL: https://codereview.chromium.org//103913005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31087 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-11 22:51:19 +00:00
srdjan@google.com
92c6188860
Revert r31036, because of bit redness.
...
Review URL: https://codereview.chromium.org//101373006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31039 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 21:16:02 +00:00
srdjan@google.com
07775d340e
For instance call representing numerical comparisons and binary operations (double and Smi supported for now) that were never visited before optimization occurs, we guess the cids if one of the argument cids is known, e.g. ‘a == 1’ we guess that a is also going to be 1 thus avoiding emitting an IC-call in optimized code and propagating the type accordingly.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//104893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31036 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 19:09:44 +00:00
ngeoffray@google.com
a8a535a8bb
Optimize num::~/, num::>> and num::<< for some cases.
...
R=floitsch@google.com , kasperl@google.com
Review URL: https://codereview.chromium.org//106973008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31023 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 15:59:19 +00:00
kustermann@google.com
e898028b18
Attempt to deflake our status files
...
R=whesse@google.com
Review URL: https://codereview.chromium.org//109893004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31022 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 15:37:34 +00:00
ngeoffray@google.com
37aa03129b
Add a new node in the inferrer to materialize literal maps.
...
R=kasperl@google.com
Review URL: https://codereview.chromium.org//111423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31016 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 11:38:47 +00:00
johnniwinther@google.com
1f1ecff14d
Handle @proxy classes in type checker.
...
BUG=http://dartbug.com/15049
R=karlklose@google.com
Review URL: https://codereview.chromium.org//98533005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31011 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 09:34:25 +00:00
kustermann@google.com
a943ae0ed3
Remove status file entries refering to non-existent files
...
R=whesse@google.com
Review URL: https://codereview.chromium.org//110343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30989 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 15:18:24 +00:00
ngeoffray@google.com
e32a290e6b
We run phases in-between GVN and code motion, so we have to handle cases in the SsaCodeMotion phase where two instructions can be GVN'ed.
...
Review URL: https://codereview.chromium.org//108363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30977 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 08:37:26 +00:00
scheglov@google.com
fb66f5d516
New analyzer snapshot.
...
Mainly to add support for the new options.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//107833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30960 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-06 19:43:15 +00:00
ngeoffray@google.com
b3525db9a9
Fix a crash in the compiler.
...
joinedLocals is populated with phis and the [thisValue], but [thisValue] could be a phi as well. So the check has to be whether the element of the local is the this element.
R=kasperl@google.com
Review URL: https://codereview.chromium.org//108293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30949 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-06 15:55:58 +00:00
ahe@google.com
53d500dee0
Implement dynamic function checks.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//50313007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30932 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-06 06:47:07 +00:00
hausner@google.com
2e3b0fd8bf
Detect illegal assignable expressions
...
The AST cannot distinguish between (x) and x. Adding a check
to the VM compiler that detects syntactically illegal assignments
like (x) = 0. The existing checks only analyze the AST so we
didn’t detect some illegal cases.
Looking at the source to detect syntactically illegal left hand
expressions is a bit ugly because we can’t easily look at
previous tokens. This change rewinds the token iterator a few
positions and then moves forward to check whether the last token
of the expression is an identifier or a closing bracket ].
Added new test. We did not have a single test case for this :)
R=regis@google.com
Review URL: https://codereview.chromium.org//106843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30904 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-05 18:15:21 +00:00
fschneider@google.com
5aa02dce31
Small cleanup and more test coverage for guarded fields.
...
Some cases of field guards for guarded length were not covered by our tests.
Otherwise I removed redundant conditions that are either impossible
or always true from the code generator for GuardFieldInstr.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//104583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30887 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-05 11:17:06 +00:00
scheglov@google.com
0cd8cd4006
New analyzer snapshot.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//103233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30862 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 17:57:44 +00:00
srdjan@google.com
a8f549dbc3
Merge sin(a), cos(a) into one instruction. On IA32 use x87 fsincos operation, on x64 call runtime routine whihc merges sin/cos intos sincos.
...
TODO: Implement for ARM and MIPS.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//92433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30827 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 22:00:27 +00:00
ahe@google.com
a49b45cb6a
Make test async safe
...
R=kustermann@google.com
Review URL: https://codereview.chromium.org//97203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30794 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-02 12:14:57 +00:00
ahe@google.com
2e609634ab
Fix crashes in scanner.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//87813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30782 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-29 12:50:11 +00:00
johnniwinther@google.com
06f6041c8a
Update status.
...
BUG=
Review URL: https://codereview.chromium.org//91133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30702 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 09:47:42 +00:00
johnniwinther@google.com
4ff13b1b24
Check compiler exitCode.
...
R=ahe@google.com
Review URL: https://codereview.chromium.org//80793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30696 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 08:18:33 +00:00
srdjan@google.com
6bf9cc2850
Fix dart2js (div by 0 not handled correctly, issue 15246).
...
Review URL: https://codereview.chromium.org//89613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30684 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 23:34:57 +00:00
srdjan@google.com
cf53988cf6
Use range information to omit checks in TRUNCDIV/MOD operations.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//81623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30673 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 18:18:24 +00:00
ngeoffray@google.com
ba8dea6bfc
Fix crash in dart2js on type literal sends.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//87773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30664 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 09:04:36 +00:00
johnniwinther@google.com
8541952510
Implement least upper bound.
...
As a side-effect disallow multiple inheritance with different type arguments.
R=karlklose@google.com
Review URL: https://codereview.chromium.org//52263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30661 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 08:32:08 +00:00
johnniwinther@google.com
aae87520cf
Handle parenthesized expression in type promotion.
...
BUG=http://dartbug.com/14363
R=karlklose@google.com
Review URL: https://codereview.chromium.org//85633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30660 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 07:56:29 +00:00
ngeoffray@google.com
0539146534
Make sure the SSA codegen visit constants used in a switch through the 'visitConstant' method, to ensure they are registered to the compile time constant handler.
...
R=kasperl@google.com
Review URL: https://codereview.chromium.org//85593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30627 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 13:41:12 +00:00
fschneider@google.com
8b0b3fde4d
Generalize if-conversion to arbitrary smi comparisons.
...
Until now only == and != comparisons were supported.
Further changes are:
Remove flag FLAG_new_identity_spec: It is not needed anymore.
Invoke Canonicalize another time before branch optimizations.
Fixes support for TestSmiInstr with the branch-simplifier pass.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//78733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30622 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 12:57:21 +00:00
johnniwinther@google.com
461de403db
Fix function subtyping bug.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//82693004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30609 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 07:30:08 +00:00
srdjan@google.com
3485989ae7
Do not eagerly finalize classes in CHA, instead regard unfinalized classes as ’non-existent’ and only invalidate optimized code at finalization of the class.
...
Rename FinalizePendingClasses to FinalizePendingClassInterfaces as the class finalization occurs lazily.
TODO: add dependency information to deoptimize/remove only relevant optimized code.
R=regis@google.com
Review URL: https://codereview.chromium.org//81333003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30582 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-22 17:59:23 +00:00
regis@google.com
d1e945994e
Improve type test and type equality for generics (issue 15148).
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//81363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30546 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 21:30:51 +00:00
srdjan@google.com
4915a9f3a9
Update status file for dart2js (not throwing exception wuth divide by 0).
...
Review URL: https://codereview.chromium.org//80953003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30541 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 19:22:28 +00:00
jwren@google.com
fad4adae84
Fix for 11987.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//62523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30540 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 18:59:31 +00:00
srdjan@google.com
3165e204e3
Merge TRUNCDIV and MOD into one instruction. Icorporated feedback from CL https://codereview.chromium.org/68663003
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//79653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30536 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 17:56:54 +00:00
kustermann@google.com
aaa1d67a1b
Removed status file entries which refer to non-existent tests
...
Review URL: https://codereview.chromium.org//80913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30518 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 13:46:36 +00:00
kustermann@google.com
4489c3e7dc
Mark language/vm/optimized_identical_test as Pass,Crash on simarm/simmips
...
Review URL: https://codereview.chromium.org//80593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30503 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 10:02:55 +00:00