Commit Graph

92 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
ager@google.com 37b82247ac Remove need to instantiate Platform and make methods static.
This will require an update of the stable test binary. I will upload
a new build when done with the review process.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6682 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 11:39:16 +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
karlklose@google.com 038964d52c Check number of type arguments.
Review URL: https://chromiumcodereview.appspot.com//10105031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6675 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 10:27:32 +00:00
lrn@google.com 4277b826ea Fix bugs in cascade implementation.
Some token.next got lost at some point.
And tests weren't running.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6672 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 08:53:01 +00:00
karlklose@google.com 562981ee1b Clean up handling of types.
This CL includes changes that address comments in http://codereview.chromium.org/9431029/.

- Do not explicitly check for var and Dynamic when resolving types.
- Support isSubType on type variables.
- Fix reflexivity of interface types.
- Check that required classes can be resolved in the core library. Provide all necessay core library classes for DummyCompilerTest.dart and MockCompiler.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6671 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 08:29:42 +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
karlklose@google.com 2cccd55714 Remove SimpleType.
Review URL: https://chromiumcodereview.appspot.com//10105027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6644 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:05:09 +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
kasperl@google.com 43ff9be2fa Add extends clause to the type parameter for AbstractScanner.
This gets rid of a warning when using the result of calling utf8String inside the implementation.

R=ahe@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6627 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 12:09:41 +00:00
ngeoffray@google.com cd0a23b68b Truley compute direct subtypes of native classes.
Review URL: https://chromiumcodereview.appspot.com//10106019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6625 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 11:37:56 +00:00
kasperl@google.com 192bc8795e Minor fixes to remove some warnings.
R=ngeoffray@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6624 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 11:26:25 +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 908ce3b4df Fix for issue 2468: also convert Dart closures to Js closures in stubs for native methods.
Review URL: https://chromiumcodereview.appspot.com//10108012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6620 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 09:32:22 +00:00
ngeoffray@google.com fdcd0cb5c4 Fix for issue 2433: for stubs on native classes, only call a method with a non-mangled name when the method is a JS method.
Review URL: https://chromiumcodereview.appspot.com//10108013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6618 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 09:28:44 +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 f1f869fbd3 The element of an InterfaceType can also be a TypedefElement.
Committed TBR to fix the build.

TBR=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6589 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 15:38:29 +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
floitsch@google.com b61c2bf15b Resolve implicit super calls.
Review URL: https://chromiumcodereview.appspot.com//10083007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6574 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 13:53:23 +00:00