Commit Graph

554 Commits

Author SHA1 Message Date
sra@google.com cbd9a090ab Fix for Issue 8460.
Review URL: https://codereview.chromium.org//12221162

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18556 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 03:10:33 +00:00
karlklose@google.com 20d911ddff Share addTypeVariableReference between factory calls and is-checks.
Review URL: https://codereview.chromium.org//12261006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18507 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 10:15:09 +00:00
ngeoffray@google.com 5a2d74ca50 Start work on a non-complete type inferrer. Currently only analyzes return types.
Review URL: https://codereview.chromium.org//12211112

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18447 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 14:43:45 +00:00
erikcorry@google.com c666438c6c dart2js: In minified mode shorter getter and setter names.
Now a field called x has a getter called gx and a setter called sx in minified
mode.  Previously the getter was get$x and the setter was set$x (as in
unminified code).

This CL also fixed an assert caused by using a getter to access a
variable that is a closure object.

R=karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18436 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 08:48:38 +00:00
karlklose@google.com 759bf01d3c Implement substitution for type variables.
Review URL: https://codereview.chromium.org//12218007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18376 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 11:20:50 +00:00
floitsch@google.com 3f7146707d Rework Timer interface.
Review URL: https://codereview.chromium.org//12213092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18326 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 19:22:16 +00:00
ngeoffray@google.com c2018c8ff7 Compiler is not accessible.
Review URL: https://codereview.chromium.org//12209095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18316 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 17:52:36 +00:00
ngeoffray@google.com 1de69df67f Fix typo and add a regression test.
Review URL: https://codereview.chromium.org//12225118

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18314 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 17:36:41 +00:00
ngeoffray@google.com da51aac292 Add a type kind to TypedSelector. A typed selector can either be
- EXACT: it knows the exact type of the receiver (e.g. new Map()).
- SUBCLASS: the type is in the subclass hierarchy (e.g. 'this')
- INTERFACE: any type that implements the receiver type is a target.
Review URL: https://codereview.chromium.org//12207081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18311 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 16:42:27 +00:00
ngeoffray@google.com 244007e424 Cleanup universe to not have backend related things.
Review URL: https://codereview.chromium.org//12226074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18245 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 11:39:16 +00:00
ngeoffray@google.com 7f5b624e00 Always explicitely give a type to HInvokeStatic, and make the literal map know it's a map.
Review URL: https://codereview.chromium.org//12223036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18210 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 09:55:53 +00:00
johnniwinther@google.com 381472b101 Check arguments counts.
Review URL: https://codereview.chromium.org//12217036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18170 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 13:33:31 +00:00
ngeoffray@google.com aa9215f490 Allow intercepted calls to have typed selectors.
Review URL: https://codereview.chromium.org//12211013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18165 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 10:37:22 +00:00
ngeoffray@google.com 2fda3e0e8d Fix size problem spotted by sra@, where iae and ioore were always put in the codegen work list.
Review URL: https://codereview.chromium.org//12226032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18164 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 09:05:39 +00:00
johnniwinther@google.com c5a83b2061 Improve checking of patches.
Review URL: https://codereview.chromium.org//11864010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18137 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 13:33:36 +00:00
ahe@google.com 8d585f815e Allow metadata on script tags.
Review URL: https://codereview.chromium.org//12207017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18136 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 13:29:36 +00:00
ahe@google.com 85cc11f62f MetadataAnnotation should be spannable.
Review URL: https://codereview.chromium.org//12184017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18129 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 11:27:43 +00:00
ngeoffray@google.com db98396375 Allow private selectors to be typed, and fix ClassElement.isSubclassOf to take patches into account.
Review URL: https://codereview.chromium.org//12223004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18126 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 11:18:11 +00:00
ngeoffray@google.com 124f19a793 Turn getters and setters that we know are not intercepted into regular getter and setter calls.
Review URL: https://codereview.chromium.org//12087101

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18121 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 09:11:35 +00:00
johnniwinther@google.com 1499e8362e Fix VariableDefinitions.endToken for formal parameters.
This makes the end token point to that parameter name instead of the next token (comma or right parenthesis).
I could not find a way to test the unparsing of a parameter outside its context, that is outside the parameter list it resides in. All tests unparser(2)_test test parameters in their context.

Token positions for operator - arity checks updated now that parameter positions are precise.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18120 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 09:03:42 +00:00
ngeoffray@google.com edd8c17c02 Properly register types on the JS foreign instruction.
Review URL: https://codereview.chromium.org//12095011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18045 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 12:58:24 +00:00
ngeoffray@google.com 0e2c62f66c It can also timeout in checked/host-checked.
Review URL: https://codereview.chromium.org//12192013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18044 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 11:39:02 +00:00
ngeoffray@google.com 688d6f8fd2 Mark this test as slow in debug mode, to make the FYI BB happy.
Review URL: https://codereview.chromium.org//12192010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18037 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 09:36:35 +00:00
lrn@google.com 9b23dff467 Reapply "Rename mappedBy to map."
This reverts commit r17907.

TBR.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17918 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 15:12:56 +00:00
johnniwinther@google.com b83a499aa6 Revert "Take type arguments into account in interface type subtype check."
This reverts commit r17912.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17915 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:58:23 +00:00
johnniwinther@google.com 8171115947 Take type arguments into account in interface type subtype check.
BUG=http://dartbug.com/7342

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17912 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:40:41 +00:00
polux@google.com 6f6acd0ddc Handle is checks (in a naive way: no narrowing for now).
Review URL: https://codereview.chromium.org//12086083

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17908 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:14:52 +00:00
floitsch@google.com b1a118d5ce Revert "Rename mappedBy to map."
This reverts commit 17899.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17907 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:02:27 +00:00
johnniwinther@google.com 13365d453a Perform substitution on the unaliased type of a typedef.
Review URL: https://codereview.chromium.org//12082051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17905 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 13:45:58 +00:00
ngeoffray@google.com d4676b580b Restrict some JS names that we might use in our JS blocks. It doesn't break for now because our JS blobs don't clash with local names.
Review URL: https://codereview.chromium.org//12049067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17904 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 13:32:49 +00:00
lrn@google.com 0dc2f4b1ba Rename mappedBy to map.
Retain a deprecated mappedBy for now.
Change return type of mappedBy, skip and take on List to Iterable.

BUG= http://dartbug.com/8063
BUG= http://dartbug.com/8064
BUG= http://dartbug.com/6739
BUG= http://dartbug.com/7982

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17899 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 12:37:13 +00:00
johnniwinther@google.com 9e6659ab52 Implement Types.isSubtype for FunctionType with optional and named parameters.
Review URL: https://codereview.chromium.org//12087052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17832 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 10:46:10 +00:00
karlklose@google.com cfa28ac117 Import dart_types in resolver and type_equals test.
Review URL: https://codereview.chromium.org//12090069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17829 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 10:14:25 +00:00
karlklose@google.com 8a2f57b3e7 Import dart_type in tests, too.
Review URL: https://codereview.chromium.org//12082071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17826 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 09:50:17 +00:00
johnniwinther@google.com 928065f8d4 Add optional and named parameters to FunctionType.
Intentionally omit equals/hashCode implementation for a later CL which updates Types.isSubtype.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17760 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 13:54:31 +00:00
erikcorry@google.com 858aa5ac78 dart2js: Don't emit static const fields since they are inlined where they are used
R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17753 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 11:21:29 +00:00
ahe@google.com fc1c049c20 Extend compiler API to support multiple outputs.
Review URL: https://codereview.chromium.org//11828043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17749 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 09:24:00 +00:00
johnniwinther@google.com 396edf6273 Use named arguments for messages.
Review URL: https://codereview.chromium.org//12082024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17745 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 08:05:49 +00:00
johnniwinther@google.com 47d201ad36 Revert "Fix VariableDefinitions.endToken for formal parameters."
This reverts commit r17705.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17710 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 13:43:22 +00:00
johnniwinther@google.com ff913eda66 Report external without patch as an error.
Review URL: https://codereview.chromium.org//11881021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17707 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 12:38:00 +00:00
kasperl@google.com 38696c07a0 Fix minified version of mixin field test.
R=ngeoffray@google.com,sra@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17706 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 12:34:02 +00:00
johnniwinther@google.com 1cd1c1e68d Fix VariableDefinitions.endToken for formal parameters.
This makes the end token point to that parameter name instead of the next token (comma or right parenthesis).
I could not find a way to test the unparsing of a parameter outside its context, that is outside the parameter list it resides in. All tests unparser(2)_test test parameters in their context.

Token positions for operator - arity checks updated now that parameter positions are precise.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17705 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 12:23:40 +00:00
ngeoffray@google.com 40c1560805 Fix issue https://code.google.com/p/dart/issues/detail?id=8106: save the sourceElement in the one shot interceptor call to preserve source variable names.
Review URL: https://codereview.chromium.org//12088019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17704 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 12:12:06 +00:00
kasperl@google.com 8123e8fa3a Add test for native mixin fields and fix the implementation.
R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17701 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 10:23:12 +00:00
kasperl@google.com 2e7da75aab Extends native mixin tests.
R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17700 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 09:58:35 +00:00
ahe@google.com 2f974584dc Add dart2js option to select library categories.
By default, the compiler will only accept the Client category, meaning that it will be an error to import dart:io.

During testing on d8, the compiler will support all library categories to continue supporting so called "mock compilation".

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17637 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 12:08:26 +00:00
johnniwinther@google.com f02c12f3c3 Private libraries used.
Review URL: https://codereview.chromium.org//11973006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17634 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 09:05:22 +00:00
johnniwinther@google.com f5c4771c64 Fix analyze_api_test.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17632 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 08:54:06 +00:00
kasperl@google.com 3dfe130fdc Allow native classes to mixin behavior from an ordinary Dart class.
This is a little bit wonky so let me know if you have great ideas
on how to make this cleaner. Clearly, we're going to need more test
cases too.

Note that trying to call mixed in methods using super will fail. If
we want that to work we have to introduce aliases for such methods.

R=sra@google.com,ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17631 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 08:50:00 +00:00
johnniwinther@google.com fc87995d5b Add dart2js unittest to analyze the API.
Review URL: https://codereview.chromium.org//11887015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17574 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 14:35:40 +00:00