Commit Graph

432 Commits

Author SHA1 Message Date
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
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
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
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 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
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
polux@google.com 9ad1462c67 Naive handling of List#[] and List#[]=
Review URL: https://codereview.chromium.org//11414130

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17568 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 14:05:57 +00:00
ngeoffray@google.com 2a108bf5d3 Fix braino that lead to dead code that contained a typo. Also add a regression test.
Review URL: https://codereview.chromium.org//12035079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17567 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 14:03:19 +00:00
floitsch@google.com ed938af868 Rename new Uri.fromString to Uri.parse.
Review URL: https://codereview.chromium.org//12052038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17562 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:26:18 +00:00
johnniwinther@google.com ad846b23c9 Fix error message for library name mismatch.
Review URL: https://codereview.chromium.org//11879039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17560 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:18:40 +00:00
ngeoffray@google.com a67627efb3 Implement "one-shot" interceptors.
Review URL: https://codereview.chromium.org//12033056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17558 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:09:15 +00:00
johnniwinther@google.com 229036fa8b Internal libraries supported.
Review URL: https://codereview.chromium.org//11967010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17556 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:01:56 +00:00
johnniwinther@google.com 545cabd5e8 Add --analyze-only flag to dart2js
Committed: https://code.google.com/p/dart/source/detail?r=17538

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17545 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 11:58:07 +00:00
ngeoffray@google.com 1711b18989 Fix unit test after namer change.
Review URL: https://codereview.chromium.org//12047078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17537 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 11:03:44 +00:00
ngeoffray@google.com 5139dcb231 Cleanup the namer, and add a test with fields that used to clash with internal names used by the compiler.
Review URL: https://codereview.chromium.org//12049036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17535 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 10:59:17 +00:00
karlklose@google.com 5c2a912228 Implement InterfaceType.asInstanceOf.
Review URL: https://codereview.chromium.org//11567009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17454 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 13:20:16 +00:00