Commit Graph

879 Commits

Author SHA1 Message Date
iposva@google.com ca6b378934 - Update status file for dart2js. Tests have been updated to not
use ? operator and thus now "Pass" instead of "Fail,OK".

Review URL: https://codereview.chromium.org//18117003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24542 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 19:22:21 +00:00
kasperl@google.com 56d2e0ed07 Fix Element.findMyName for named constructors.
R=ahe@google.com
BUG=

Review URL: https://codereview.chromium.org//18072002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24516 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 13:48:53 +00:00
jmesserly@google.com f08c9d860a remove warning that is no longer in dart:html
TBR to fix dart2js bot.

Review URL: https://codereview.chromium.org//17982002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24503 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 00:45:10 +00:00
ahe@google.com 6414d819f4 Implement hashCode on objects stored in a set or used as map keys.
R=johnniwinther@google.com, ngeoffray@google.com

Review URL: https://codereview.chromium.org//17569004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24464 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 11:49:43 +00:00
ahe@google.com 4976228c46 Warn about overriding operator== but not hashCode.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17588005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24463 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 11:20:04 +00:00
kasperl@google.com 1e6c3a1998 Remove support for 'argument definitions test' from dart2js.
R=ngeoffray@google.com
BUG=

Review URL: https://codereview.chromium.org//17825002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24455 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 08:02:25 +00:00
ahe@google.com 2d285cac9a Generate less code when importing dart:mirrors.
BUG=http://dartbug.com/11340
BUG=http://dartbug.com/11218
R=johnniwinther@google.com, kasperl@google.com

Review URL: https://codereview.chromium.org//17315012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24453 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 07:09:55 +00:00
iposva@google.com 11632110c6 - Revert r24441 until issues found have been addressed.
Review URL: https://codereview.chromium.org//17769004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24443 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 23:38:45 +00:00
iposva@google.com ddc3e13f8a - Trial balloon for removal of argument definition test.
This change removes the support for the ? operator.

R=asiva@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//17765003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24441 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 23:04:19 +00:00
sgjesse@google.com 887c8e7596 Move getters from Options to Platform
The getters for executable, script and version are now statics on
Platform. I kept them on Options for now, but updated most tests to
use Platform.

R=ajohnsen@google.com, floitsch@google.com, iposva@google.com
BUG=

Review URL: https://codereview.chromium.org//17406010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24401 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:56:23 +00:00
ngeoffray@google.com e4cf5cda8a Add a TypeInformation abstraction in the inferrer, that holds information per element, to get rid of some maps.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17635006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24386 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 08:34:03 +00:00
kasperl@google.com 9f6e5773a0 Update status files.
TBR'ed.

R=ngeoffray@google.com
BUG=

Review URL: https://codereview.chromium.org//17573013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24336 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 14:09:59 +00:00
ngeoffray@google.com bc9547b163 Change test to use JSExtendableArray instead of =List.
Review URL: https://codereview.chromium.org//17590006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24322 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 10:54:36 +00:00
johnniwinther@google.com 2432ac4647 Support runtime check of function types.
New scheme for checking function subtyping:

1) Generate an $isX predicate on objects that are statically known subtypes of a given function type
2) Generate a signature encoding the whole function type on objects when a runtime check is needed.

A check succeeds if either 1) or 2) is true.

If too many predicates are needed a signature is generated instead, and if a signature is needed, no predicates are generated. Maximum number of predicates is currently determined by the magic constant MAX_FUNCTION_TYPE_PREDICATES in emitter.dart.

R=karlklose@google.com

Committed: https://code.google.com/p/dart/source/detail?r=24286

Review URL: https://codereview.chromium.org//12334070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24309 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 06:58:55 +00:00
johnniwinther@google.com 90bf6203ee Revert "Support runtime check of function types."
This reverts commit r24286.

BUG=

Review URL: https://codereview.chromium.org//17413013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24288 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 14:02:47 +00:00
johnniwinther@google.com 2ce76ed94a Support runtime check of function types.
New scheme for checking function subtyping:

1) Generate an $isX predicate on objects that are statically known subtypes of a given function type
2) Generate a signature encoding the whole function type on objects when a runtime check is needed.

A check succeeds if either 1) or 2) is true.

If too many predicates are needed a signature is generated instead, and if a signature is needed, no predicates are generated. Maximum number of predicates is currently determined by the magic constant MAX_FUNCTION_TYPE_PREDICATES in emitter.dart.

R=karlklose@google.com

Review URL: https://codereview.chromium.org//12334070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24286 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 13:35:56 +00:00
ngeoffray@google.com c2ef58b8d8 Doing a call on a getter does not yield the return type of that getter.
Review URL: https://codereview.chromium.org//17502003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24250 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 20:24:30 +00:00
ngeoffray@google.com 28feceacab Use the inferred return type of the factory instead of the inferred type.
Review URL: https://codereview.chromium.org//17482005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24248 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 20:01:19 +00:00
ngeoffray@google.com bf5ab71d1e Also deal with List.filled in the backend, not just the inferrer and list tracer.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//16847006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24221 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 12:13:00 +00:00
ngeoffray@google.com ce833ccd3a Introduce an ElementTypeMask to recognize simple constraints like "the type of parameter foo is the type of parameter foo".
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17017003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24186 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 13:59:41 +00:00
ngeoffray@google.com f05b646b8f Fix test after inferrer change.
Review URL: https://codereview.chromium.org//17450003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24182 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 13:29:12 +00:00
johnniwinther@google.com 9da2be3648 Correctly type check type variable expressions.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//17447003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24177 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 09:57:05 +00:00
ngeoffray@google.com 3417f63ca3 Do not treat elements of lists allocated through new List() and new List.filled() as potentially null.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17334003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24176 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 09:35:08 +00:00
ngeoffray@google.com 8ebaffeefe Fix an off by one AST node error, when fetching the type of a new List constructor.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17112020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24171 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 08:26:10 +00:00
jmesserly@google.com 125dac4178 fix dart2js analyze_api test -- the warning moved to a different file.
TBR=ahe,johnniwinther

Review URL: https://codereview.chromium.org//17239012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24168 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 02:51:36 +00:00
kasperl@google.com 29ba998e8f Update inferrer test after r24138.
TBR'ed.

R=ngeoffray@google.com
BUG=

Review URL: https://codereview.chromium.org//17290005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24139 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 12:55:39 +00:00
ngeoffray@google.com ed35e12421 Eagerly infer the element type of const lists in the simple inferrer.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17151007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24137 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 12:05:52 +00:00
ngeoffray@google.com 8d0f149bff Create a proper abstraction for field constraints, and handle inrisified selectors with it. This allows to infer that with this.foo = 0 and this.foo++, foo is of type int, and not just number.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17271005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24131 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 10:59:45 +00:00
ngeoffray@google.com 4ba58fdb81 Implement a list tracer phase, that tries to find element types in individual lists.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17028011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24093 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 12:34:47 +00:00
ahe@google.com 3ee496537e Be smarter about when to disable global type inference.
BUG=http://dartbug.com/11218
R=johnniwinther@google.com, ngeoffray@google.com

Review URL: https://codereview.chromium.org//16830002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24083 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 09:45:50 +00:00
ahe@google.com 0699e09fb0 Be smarter about when to disable tree-shaking.
BUG=http://dartbug.com/11218
R=johnniwinther@google.com, ngeoffray@google.com

Review URL: https://codereview.chromium.org//16817002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24027 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 12:43:31 +00:00
ngeoffray@google.com 235aa9529e Do LICM on loop header instructions. Also first instructions that throw in a loop can be LICM'ed.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17056002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24023 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 09:34:26 +00:00
ngeoffray@google.com 273806dcbb Change how we deal with manual inlining of argument error and NSM when propagating types. This change helps reducing bailout calls by doing more receiver and argument checks.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//16944004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24019 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 07:54:19 +00:00
ngeoffray@google.com bee28171f6 Make [HTypeConversion] with NO_CHECK code motion invariant to ensure no code is generated for it.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//16510003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23908 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 14:59:26 +00:00
ngeoffray@google.com 0d2d816970 Don't let HCheck instructions prevent GVN.
R=johnniwinther@google.com, karlklose@google.com, kasperl@google.com

Review URL: https://codereview.chromium.org//15917017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23906 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 14:14:33 +00:00
ngeoffray@google.com 1f791bdd69 Move array and string related HType from const to a field in the backend.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//15724021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23900 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 10:20:30 +00:00
ngeoffray@google.com c7d45a066f Refactor type inference visitor to move all the logic of locals handling in a specific visitor.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//16773003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23895 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 07:56:34 +00:00
ahe@google.com eeac55f800 Expose default constructors through ClassElement.localMembers.
R=ngeoffray@google.com

Review URL: https://codereview.chromium.org//15906010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23891 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 06:37:59 +00:00
ahe@google.com 7b0467ef19 Add compileAll internal compiler flag.
R=ngeoffray@google.com

Review URL: https://codereview.chromium.org//16162005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23858 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 15:43:21 +00:00
ngeoffray@google.com a682c566c3 Fix 2 host-checked error with the enqueuer:
- Register an exact selector when the target of a call is known at codegen
- Set the tree elements of a codegen item when actually needed: annotations are currently being processed during resolution, and enqueue in the codegen queue. So it might happen that when a helper is needed, it has not  been resolved yet.

R=ahe@google.com

Review URL: https://codereview.chromium.org//16035026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23841 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 09:10:03 +00:00
ngeoffray@google.com 7cef6db7e3 Rip-off the backend type inferrer.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//16077015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23811 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-10 14:07:34 +00:00
ahe@google.com 99e6d4f980 Don't create part.js when there is no deferred loading.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//16580014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23798 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-10 07:33:25 +00:00
johnniwinther@google.com 1ed367b311 Report warning on unresolved unqualified access.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//16278004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23726 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 06:55:57 +00:00
johnniwinther@google.com 1b7df13ae4 Type check field initializers.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//15759011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23725 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 06:39:25 +00:00
ahe@google.com 9265b75597 Print the location of duplicated elements.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//14031011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23684 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 13:56:42 +00:00
ahe@google.com 4bafe48b34 Update status file for CSP mode.
Review URL: https://codereview.chromium.org//16463006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23681 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 13:30:13 +00:00
polux@google.com f067bec4f1 Handle fields/getter of mixed-in classes.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//16188008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23672 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 11:06:49 +00:00
polux@google.com 969a1fe20b Use backend's types for native types. Handle "other dependencies". Gets rid of
"trusted classes" and pre-populated cache. Fixes a lot of small bugs discovered
along the way, in particular in augmentInferredSelectorType where the absence
of a key in some map and dynamic where wrongly conflated.

R=karlklose@google.com

Review URL: https://codereview.chromium.org//15949008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23668 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 09:24:40 +00:00
ahe@google.com ca332fba11 Update status file: dart2js_extra/mirror_test is passing in minified mode.
Review URL: https://codereview.chromium.org//16360011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23599 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 15:41:01 +00:00
ahe@google.com 90651648af Implement InstanceMirror.invoke (minified).
R=kasperl@google.com

Review URL: https://codereview.chromium.org//15979020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23596 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 14:21:34 +00:00