regis@google.com
777625235f
Support qualified factory names (fix issue 514).
...
Review URL: http://codereview.chromium.org//8804019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2085 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 19:22:27 +00:00
sra@google.com
e493abe738
Add test where X is defined differentlty in co-importing libraries
...
AFAIK this should work because the imports use prefixes.
Frog: passes
Dartc: passes
VM:
'/usr/local/google/home/sra/dart-all/dart/tests/language/src/LibrarySameNameUsedLib2.dart': Error: Class 'X' is used where an interface is expected
BUG=
TEST=
Review URL: http://codereview.chromium.org//8806019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2083 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 19:03:16 +00:00
ahe@google.com
f0ea6ebcf4
Various scanner fixes:
...
* tokenize string interpolation
* handle 1.toString() and 2.dynamic better
* don't group <> across semicolon
* tokenize keywords that is a prefix of another keyword.
Review URL: http://codereview.chromium.org//8805008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2068 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 13:45:48 +00:00
sigmund@google.com
c1d1e3e6dd
Check constness of default args
...
BUG= http://code.google.com/p/dart/issues/detail?id=635
Review URL: http://codereview.chromium.org//8772070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2051 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 02:29:52 +00:00
jmesserly@google.com
a00c2af2ea
Fix "extends" checks. Move them out of resolve phase and do them on demand.
...
We now do the check when we first notice a type is used. This gets us back to a state where we don't depend on the order that resolve() happens. (this order varies on VM vs node.js)
Review URL: http://codereview.chromium.org//8789008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2050 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 02:24:40 +00:00
jmesserly@google.com
ca64ec8bf6
Fixing factories.
...
Review URL: http://codereview.chromium.org//8788004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2043 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 23:58:35 +00:00
ngeoffray@google.com
e00d4fbb1f
Start resolving classes and default constructors.
...
Review URL: http://codereview.chromium.org//8769012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2026 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 15:43:10 +00:00
ager@google.com
3bf558018e
Allow single-dash options to be specified without a space before value.
...
./tools/test.dart -mdebug,release
Make the patterns given to the test script more restrictive. A pattern
has to specify the test suite as the first component. The rest is used
as a pattern on all tests within that suite:
./tools/test.dart -mrelease leg co19/leg
will run the leg tests and the co19 tests that contains the substring
'leg' somewhere in the full path name of the test.
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8772007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2014 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 11:50:05 +00:00
sra@google.com
7954dd7d6d
Fix for Issue 622
...
Inhibit parsing a lambda expression only at the top level of an initializer.
Parse parenthesized expression explicitly to give better errors on
malformed expressions:
* No longer blindly accept "(x: a)" as (a).
* In "(a, b)" complain about comma at the comma rather than the close paren.
BUG=
TEST=
Review URL: http://codereview.chromium.org//8774039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2012 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 09:11:36 +00:00
jmesserly@google.com
3bbfbdb214
Fixed escaping of const values
...
http://code.google.com/p/dart/issues/detail?id=323
Review URL: http://codereview.chromium.org//8773021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2001 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:16:43 +00:00
whesse@google.com
3eda34cb77
Split PrivateMemberTest multi-test into separate tests.
...
BUG=http://code.google.com/p/dart/issues/detail?id=353
Review URL: http://codereview.chromium.org//8585028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1978 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 13:13:52 +00:00
jmesserly@google.com
6e25de7297
Fix NamingTest on all Frog configurations:
...
* throw the right exception even if the missing method was call$1
* fix a nasty escape bug in replaceAll ($ is a meta-char in the second argument of String.prototype.replace, so it must be escaped as "$$"). This bug is especially meta because the code that failed was str.replaceAll("$", "$$") ... but the bug could be triggered any time the "to" argument to "replaceAll" contained "$". See this link for more info:
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/replace
Review URL: http://codereview.chromium.org//8763018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1966 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 03:59:17 +00:00
jmesserly@google.com
e36306f19e
Update status file to make Frog green. I'll look at getting this test working on all configs. It looks like it's tripping over different exception mapping on frog/checked, and some kind of selfhost issue on frogsh/*
...
Review URL: http://codereview.chromium.org//8763012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1960 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 01:49:02 +00:00
sra@google.com
23998581cd
Add test for Object.dynamic.
...
Currently failing on Frog.
BUG=
TEST=
Review URL: http://codereview.chromium.org//8761009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1956 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 00:24:29 +00:00
sigmund@google.com
545c4cd917
.status file change: make presubmit.py green again.
...
Review URL: http://codereview.chromium.org//8765001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1949 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:54:35 +00:00
jmesserly@google.com
254a4c0d88
Fix names with '$' to not conflict with operators or internal helpers.
...
Does two things:
* In our Dart type system, we track special names with ":" instead of "$". So ":add" and "get:foobar" "set:foobar". In "jsname" we change this back to $
* in jsname, mangle $'s from Dart identifiers into $$. It's not perfect, but should avoid conflicts with our various helpers.
http://code.google.com/p/dart/issues/detail?id=639
Review URL: http://codereview.chromium.org//8763001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1948 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:52:59 +00:00
scheglov@google.com
bb1c53ac58
Fix for resolving interface constructors in factory, issue 521.
...
http://code.google.com/p/dart/issues/detail?id=521
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8747016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1945 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:37:44 +00:00
hausner@google.com
a2b19753dd
More test list changes for dartc
...
language/ToplevelCollision2/01 and /02 pass, but for the wrong reason.
The are negative tests that produce the wrong compile-time error.
Review URL: http://codereview.chromium.org//8749013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1937 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 19:25:59 +00:00
hausner@google.com
da69c9a79c
Update test list for dartc
...
Review URL: http://codereview.chromium.org//8748016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1935 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 19:14:01 +00:00
hausner@google.com
51bb1d4e4c
Properly detect name collisions at library level
...
Fixing issue 592
Review URL: http://codereview.chromium.org//8724015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1934 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 18:55:37 +00:00
jmesserly@google.com
fab57b1ee4
Fix status to mark StringConcatTest as failing in unchecked mode
...
Review URL: http://codereview.chromium.org//8744008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1917 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 06:31:04 +00:00
jmesserly@google.com
b6543c04f1
Fix a bunch of issues with 'hidden' DOM types.
...
Hidden DOM types are types whose prototype is not accessible until you have an instance--they cannot be used at init time.
Issues fixed for these types include:
* "is", type assertions, and getters/setters are now inserted on the prototype lazily
* now patches correct prototype when binding these
* handles incompatible hidden native overloads (rare in practice, but we have a test case for it)
Also some other type check fixes:
* Type checks handle false correctly
* Dart TypeError is now used (before--would pick up the JS one)
* TypeError has an actually usable error message
These last fixes cause some code bloat (lots of type check fallbacks on Object.prototype), but for right now I think it's more important to give good errors.
Review URL: http://codereview.chromium.org//8746005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1916 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 06:17:00 +00:00
sra@google.com
8ba5d3517a
Frog: Fix parsing of hex literals with >31 bits
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8739002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1912 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 02:14:07 +00:00
sigmund@google.com
502d497e14
Fixing string compile-time constant evaluation
...
Review URL: http://codereview.chromium.org//8729018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1905 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:48:44 +00:00
ager@google.com
38c6bf8659
Support batch running of dartc tests.
...
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8729030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1890 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 12:38:14 +00:00
srdjan@google.com
35916f5eb2
More --use_slow_path tests, add that VMOption to two tests.
...
Review URL: http://codereview.chromium.org//8725009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1881 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 23:38:39 +00:00
sra@google.com
7172f72d66
Add tests for is-checks on hidden native classes.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8680042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1832 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 03:18:30 +00:00
hausner@google.com
0ef3609ec0
Allow optional initializing formals again
...
After removing optional initializing formal parameters from the VM
yesterday, the language team decided that they should be allowed
and made usable.
- The name of an optional initializing formal is the name of
the field it initializes.
- The parameter is only visible at the call site of the constructor,
to name the parameter.
- The parameter is NOT visible in the constructor's initializer list
and body.
class A {
A([this.x = 10]);
A.bad([this.x = 10]) : y = x; // Error: parameter x not in scope
A.ok([this.x = 10]) { print(x); } // Refers to field x, not parameter x.
var x, y;
}
o = new A(x: 50); // o.x == 50.
o = new A(); // o.x == 10.
Review URL: http://codereview.chromium.org//8682025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1819 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 22:31:09 +00:00
sra@google.com
36f7d87a02
Test for finding correct method for overriden native method of hidden native class.
...
I think the current implementation of $patchMethod has bugs that make it 'mostly work'. It patches one step too high (either the object or the prototype of the subclass). That is why I needed to add test#2 to exhibit the behaviour I thought I would see on the first test.
BUG=
TEST=
Review URL: http://codereview.chromium.org//8674009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1815 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 20:22:45 +00:00
regis@google.com
6191ea8088
Fix build breakage.
...
Check type of list and map literals in checked mode only, and with an
"assignable to" test rather than a "instance of" test.
Review URL: http://codereview.chromium.org//8677019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1814 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 20:14:27 +00:00
regis@google.com
9f230a34c6
Implement type checking of list literals (issue 220).
...
Remove expose_core_impl flag.
Add tests.
Fix tests.
Cleanup type checking of map literals.
Review URL: http://codereview.chromium.org//8676001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1809 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 19:34:23 +00:00
scheglov@google.com
73cf5451f1
Support for parsing returning qualified type. Issue 513.
...
http://code.google.com/p/dart/issues/detail?id=513
R=codefu@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8662019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1805 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 18:52:33 +00:00
regis@google.com
a2bb53c7af
Implement type checking of map literals (issue 221).
...
Support proper syntax for map literals (at most one type argument is allowed)
and give a warning when legacy syntax is used.
Add tests.
Fix tests.
Review URL: http://codereview.chromium.org//8637018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1764 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 21:42:07 +00:00
hausner@google.com
b9cf297c15
Initializing formals can't be optional parameters
...
Add new error message to VM compiler.
Remove all optional initializing formals from library
and tests.
Review URL: http://codereview.chromium.org//8619008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1755 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 19:09:54 +00:00
zundel@google.com
ccad2889cd
Don't allow invoking a constructor as 'const' if it wasn't declared 'const'.
...
BUG=5142545
Review URL: http://codereview.chromium.org//8624001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1751 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 17:07:49 +00:00
asiva@google.com
f844cef89e
Update language status file for library prefix negative tests.
...
Review URL: http://codereview.chromium.org//8547016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1721 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 22:17:47 +00:00
regis@google.com
314a89e16c
Update comments in core lib showing proper factory syntax.
...
Improve error messages reported from class finalizer.
Fix parser error reporting to be thread safe.
Reformat type error and failed assertion messages to be consistent.
Add one more new factory syntax test.
Review URL: http://codereview.chromium.org//8549033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1708 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:06:52 +00:00
jmesserly@google.com
5e4805a30a
Parser fix for lambdas. All the heavy lifting courtesy of Stephen :)
...
(http://codereview.chromium.org/8400017/ )
Only difference in this version is using a List instead of a Map (due to Maps having not so great performance at the moment when the keys are numbers. And we could get even better perf by tweaking this to cache the lookahead on the Token, if we really wanted to)
Review URL: http://codereview.chromium.org//8545003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1683 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 01:46:51 +00:00
sra@google.com
a58b347f0b
Add test for scope accessed by multiple closures.
...
Currently fails on frog.
TBR=jmesserly
BUG=
TEST=
Review URL: http://codereview.chromium.org//8602013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1682 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 01:36:04 +00:00
sigmund@google.com
e8939015d8
Add a regression test.
...
Review URL: http://codereview.chromium.org//8558028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1673 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 22:07:53 +00:00
srdjan@google.com
ef28b12301
Added a factory test that fails in frog and dartc. Will add bug numbers to status file once the correctness of the test has been confirmed.
...
Review URL: http://codereview.chromium.org//8586040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1666 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 18:33:45 +00:00
zundel@google.com
0ea6fba5fd
Addresses a ClassCastException seen in the editor from MemberBuilder
...
Added a simple test to protect against the class cast exception and a JUnit test to
exercise it.
BUG=413
Review URL: http://codereview.chromium.org//8588038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1663 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:49:40 +00:00
zundel@google.com
0afd79a58c
Sort the status lines in language.status for dartc.
...
Adding new ones at the end always causes conflicts, and the sort order has no logic behind it.
Review URL: http://codereview.chromium.org//8588055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1660 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 16:00:34 +00:00
nweiz@google.com
a4297bff0d
Dynamically dispatch getters and setters on dynamically-typed variables.
...
This breaks MethodBindingTest, but only because first-class methods aren't
really supported by Frog in the first place. The fundamental issue is that Frog
doesn't know to compile a property-syntax getter for a method (e.g.
"get$methodName"). Teaching it to do so is outside the scope of this change.
This would technically fix ConstObjectsAreImmutableTest, but only because it
causes what used to be "a.x = 499" to become "a.set$x(499)", which raises an
error not because a is const but because A doesn't have a "set$x" method. Thus
this change adds a type declaration to the test so it continues to use "a.x =
499".
Review URL: http://codereview.chromium.org//8567010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1641 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 23:57:55 +00:00
srdjan@google.com
3bad587ddd
Update language.status for the VM.
...
Review URL: http://codereview.chromium.org//8588043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1640 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 23:51:53 +00:00
jmesserly@google.com
3a321d88f6
Fixes issues in string interpolation tests
...
This started as my attempt to add a test for http://codereview.chromium.org/8591010/ , but it snowballed into fixing other issues when I discovered that StringInterpolateTest was failing already.
Review URL: http://codereview.chromium.org//8585044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1634 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:48:39 +00:00
regis@google.com
80d89cc93b
Fix parsing of factory calls (issue 500).
...
Add test.
Fix test.
Adjust co19 status file.
Review URL: http://codereview.chromium.org//8591025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1633 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:42:55 +00:00
zundel@google.com
5b1797ece4
Fix the dartium build: CTConst4Test did not include library directive
...
Review URL: http://codereview.chromium.org//8587048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1630 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:05:39 +00:00
zundel@google.com
5c0361579f
Compile Time Constants cycle check
...
http://code.google.com/p/dart/issues/detail?id=120
This adds a check to compile time constants to make sure there
are no cycles. This turned out to be a bit more difficult than
I had hoped, due to interaction with incremenatal compile, when
only a diet parse tree was available for modules that did not
need a full compile. To fix this, I added a lite resolution step
(CompileTimeConstantResolver) to be performed on all units.
Review URL: http://codereview.chromium.org//8523034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1625 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 20:52:48 +00:00
jmesserly@google.com
8dbbe798c0
Add a test for "is Object", fix try-catch of null
...
Regression test for: http://codereview.chromium.org/8590017/
Review URL: http://codereview.chromium.org//8574066
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1622 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 19:12:03 +00:00