Commit Graph

60 Commits

Author SHA1 Message Date
ngeoffray@google.com e1b2e12850 Give an argument to the List constructor: the List is non extandable.
Review URL: https://chromiumcodereview.appspot.com//10113011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6751 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 16:46:41 +00:00
ngeoffray@google.com 14de207c4e A generative consutructor on an interface can default to a factory constructor.
Review URL: https://chromiumcodereview.appspot.com//10127011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6750 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 16:34:31 +00:00
ngeoffray@google.com 4001dc59ea We must use the original element and not the default implementation element when checking if the constructor is the List constructor.
Review URL: https://chromiumcodereview.appspot.com//10113007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6748 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 16:17:58 +00:00
ngeoffray@google.com 73c33f3770 Special case mangling for a variable named 't'.
Review URL: https://chromiumcodereview.appspot.com//10035059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6747 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 15:56:51 +00:00
ngeoffray@google.com 5834118e29 New shot at mangling: try cleaning this up a bit.
Review URL: https://chromiumcodereview.appspot.com//10127010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6746 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 15:48:18 +00:00
ngeoffray@google.com fc58ad3555 Fix mangling of local variables when their name conflict with Dart2JS's temporaries.
Review URL: https://chromiumcodereview.appspot.com//10123009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6742 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 13:34:28 +00:00
lrn@google.com 036b16afd7 Better detection of logical and/or inlining opportunities.
Now allows the conditions to be moved by code motion or global-value numbering.
Also allow sequences of empty blocks with gotos between the branch and the
negation of an || construct.

Review URL: https://chromiumcodereview.appspot.com//10126005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6741 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 13:18:48 +00:00
ngeoffray@google.com 914220315e Remove dead code.
Review URL: https://chromiumcodereview.appspot.com//10126006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6740 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 13:10:50 +00:00
floitsch@google.com a24a4ae2d7 Fix typo.
Review URL: https://chromiumcodereview.appspot.com//10025036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6739 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 13:00:48 +00:00
floitsch@google.com fc4b954a84 Fix some type warnings.
Review URL: https://chromiumcodereview.appspot.com//10122005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6738 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 12:47:43 +00:00
floitsch@google.com af87074ea0 Improve tracer output for bailouts.
Review URL: https://chromiumcodereview.appspot.com//10041033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6737 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 12:06:57 +00:00
ngeoffray@google.com 226f9ae1b3 Don't forget to add the HStatic to the graph.
Review URL: https://chromiumcodereview.appspot.com//10078010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6732 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 09:27:06 +00:00
ngeoffray@google.com 614537ab80 Fix folding of == when a type defines operator=.
Review URL: https://chromiumcodereview.appspot.com//10078008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6730 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 08:57:11 +00:00
ngeoffray@google.com c516e990de VM just changed: access to a static from a super class must be qualified.
Review URL: https://chromiumcodereview.appspot.com//10126003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6729 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 08:33:51 +00:00
ngeoffray@google.com fc16e635d6 Start propagating non-primitive types in the backend, and fold instructions that know about the type of their receiver.
Review URL: https://chromiumcodereview.appspot.com//10119010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6728 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 08:23:42 +00:00
ngeoffray@google.com 35d7b79fcc Give a sourceElement to SSA instructions so that if they end up being 'define' in the codegen (ie needing a variable), they can use one related to the original source.
Review URL: https://chromiumcodereview.appspot.com//10035032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6727 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 07:15:30 +00:00
floitsch@google.com 83cc399204 Don't rely on any speculative type in the bailout version.
Review URL: https://chromiumcodereview.appspot.com//10116023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6702 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 17:38:51 +00:00
ngeoffray@google.com 71df4c89bb Remove restriction when computing instructions that can be generate at use site.
Review URL: https://chromiumcodereview.appspot.com//10119006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6685 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 13:26:13 +00:00
lrn@google.com 54cab43f3a Reapply "Refactoring if block-information."
Fix error in conditional expression handling.

Review URL: https://chromiumcodereview.appspot.com//10041026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6684 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 13:16:27 +00:00
floitsch@google.com dbab92e737 Reapplies (again) "Don't try to box immutable objects."
This reapplies commit 6631 plus a fix, so that captured fields in closures are
mangled correctly.

Original CL: https://chromiumcodereview.appspot.com//10091036

Review URL: https://chromiumcodereview.appspot.com//9969212

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6679 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 10:57:52 +00:00
floitsch@google.com ab277988f4 Use only single characters for ssa types.
The c1visualizer doesn't like it when the prefix is not just one char.

Review URL: https://chromiumcodereview.appspot.com//10041004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6678 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 10:55:06 +00:00
kasperl@google.com 02ba487148 Fix remaining warnings.
R=floitsch@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10091048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6648 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:25:11 +00:00
floitsch@google.com 7626a83bc4 Revert "Reapply "Don't try to box immutable objects."
This reverts commit 6639 (again).

Review URL: https://chromiumcodereview.appspot.com//10108019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6642 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 15:11:11 +00:00
floitsch@google.com 144860c0d9 Reapply "Don't try to box immutable objects."
This reapplies (a fixed version of) commit 6631 which was reverted in commit 6632.

Fix tests (types were wrong).

Review URL: https://chromiumcodereview.appspot.com//10091039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6639 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:47:29 +00:00
floitsch@google.com ddd7475724 Revert "Refactoring if block-information."
This reverts commit 6630.

Review URL: https://chromiumcodereview.appspot.com//9956172

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6635 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:29:29 +00:00
floitsch@google.com 2bde3de690 Revert "Don't try to box immutable objects."
This reverts commit 6631.

Review URL: https://chromiumcodereview.appspot.com//10106020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6632 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:20:39 +00:00
floitsch@google.com ccccad3360 Don't try to box immutable objects.
Review URL: https://chromiumcodereview.appspot.com//10091036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6631 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:09:44 +00:00
lrn@google.com 567f1e4beb Refactoring if block-information.
Generalizes block information handling and adds (yet unused) info blocks
for if and logical-and/or.

Review URL: https://chromiumcodereview.appspot.com//10100001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6630 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:02:07 +00:00
lrn@google.com 8531ffaa1e Fix type warnings and a few other warnings, and probably even an error.
Mostly warnings introduced by cascade implementation.

Review URL: https://chromiumcodereview.appspot.com//10091028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6621 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 09:33:16 +00:00
ngeoffray@google.com 6843835778 Fix issue 2358: dart methods on native classes must also check if the current prototype has the method. If not, we need to re-do the dynamic dispatch to actually hit the subclass implementation of the method.
Review URL: https://chromiumcodereview.appspot.com//10092012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6617 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 08:04:42 +00:00
floitsch@google.com 9ffbf450c6 Reapply "Refactor type propagation."
This reapplies (a corrected version of ) commit 6599 which had been reverted in commit 6600.

Original CL: https://chromiumcodereview.appspot.com//10098001

Review URL: https://chromiumcodereview.appspot.com//9956152

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6601 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 20:13:49 +00:00
floitsch@google.com ec2bc38e45 Revert "Refactor type propagation."
This reverts commit r6599.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10106004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6600 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 20:06:00 +00:00
floitsch@google.com 31e2a0b5ee Refactor type propagation.
Review URL: https://chromiumcodereview.appspot.com//10098001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6599 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 20:00:02 +00:00
karlklose@google.com 3fb96bb8f8 Recommit 'Implement interface types'.
Reviewed as https://chromiumcodereview.appspot.com/9431029

TBR=ahe@google.com

Review URL: https://chromiumcodereview.appspot.com//10095014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6586 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 15:23:41 +00:00
floitsch@google.com 6bf1414a24 Reapply "Use default values of named arguments when invoking the default super constructor."
This reapplies (a fixed version of) commit 6580 which had been reverted in commit r6582.

Old issue: https://chromiumcodereview.appspot.com//9930005

Review URL: https://chromiumcodereview.appspot.com//10094013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6583 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 15:00:27 +00:00
floitsch@google.com 898f9293ed Revert "Use default values of named arguments when invoking the default super constructor."
This reverts commit 6580.

Review URL: https://chromiumcodereview.appspot.com//10101001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6582 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 14:46:55 +00:00
floitsch@google.com fdb46e99f7 Use default values of named arguments when invoking the default super constructor.
Review URL: https://chromiumcodereview.appspot.com//9930005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6580 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 14:33:28 +00:00
floitsch@google.com 07024492b5 Many type fixes.
Review URL: https://chromiumcodereview.appspot.com//10001008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6576 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 13:58:20 +00:00
lrn@google.com 5b430d34c5 Implement cascaded calls.
Review URL: https://chromiumcodereview.appspot.com//9958009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6570 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 12:42:25 +00:00
lrn@google.com 5a85f11115 Add the first phi's input as possible generate-at-use-site.
May remove some extraneous temporary variables, if the values are computed
in an opportune order (read: Room for improvement).

Review URL: https://chromiumcodereview.appspot.com//10084002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6517 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 13:11:51 +00:00
karlklose@google.com 955e04bf65 Revert "Implement interface types."
This reverts commit r6514.

TBR=ahe@google.com

Review URL: https://chromiumcodereview.appspot.com//10080003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6515 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 13:01:29 +00:00
karlklose@google.com edb70a0cb5 Implement interface types.
Review URL: https://chromiumcodereview.appspot.com//9431029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6514 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 12:42:13 +00:00
lrn@google.com 0b2ff11e81 Avoid some unnecessary variables for phis.
Detects some cases where the value of a phi is only used as input to another
phi, and avoids creating an intermediate variable.

Review URL: https://chromiumcodereview.appspot.com//10050010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6407 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 11:57:04 +00:00
floitsch@google.com be5ff89c9f Fix instance compound assignment.
We compiled a.y.x += 1 into a.y.x = a.y.x + 1.
Similarly foo().x++ was compiled into foo().x = foo().x + 1.
Now we store the receiver and reuse it on both sides.

Review URL: https://chromiumcodereview.appspot.com//9979021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6365 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:52:13 +00:00
floitsch@google.com 3695be92d7 Make constant lists immutable.
Review URL: https://chromiumcodereview.appspot.com//9965047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6360 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:19:46 +00:00
floitsch@google.com df78d6220b Some cleanups.
Review URL: https://chromiumcodereview.appspot.com//9969039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6359 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 14:52:55 +00:00
floitsch@google.com bf9e80617e Fix bug where constants were not correctly canonicalized.
Review URL: https://chromiumcodereview.appspot.com//9967001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6056 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 18:12:06 +00:00
floitsch@google.com ec60610969 During bailout construction add condition instructions to list of live variables.
Review URL: https://chromiumcodereview.appspot.com//9958007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6054 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 17:54:41 +00:00
floitsch@google.com 266d3a8c98 Don't use === instead of equality-method call for user class constants.
Review URL: https://chromiumcodereview.appspot.com//9956012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6048 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 17:04:40 +00:00
floitsch@google.com a8d1e46fc7 Fix bug where a parameter was mutated while it was still used.
Review URL: https://chromiumcodereview.appspot.com//9963005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6047 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 17:03:31 +00:00