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
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
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
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
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
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
jmesserly@google.com
be50531723
Treat assignment to final as an error
...
Fixes http://code.google.com/p/dart/issues/detail?id=329
Review URL: http://codereview.chromium.org//8586020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1603 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 05:07:11 +00:00
jmesserly@google.com
2df4bd027d
Add implicit super() call
...
Fixes http://code.google.com/p/dart/issues/detail?id=283
Review URL: http://codereview.chromium.org//8589016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1602 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 04:04:16 +00:00
jmesserly@google.com
03fc558ef1
fix initialization of null in loops
...
http://code.google.com/p/dart/issues/detail?id=468
Review URL: http://codereview.chromium.org//8587021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1599 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 02:58:17 +00:00
regis@google.com
3c64ffe9a3
Support correct factory syntax in the VM as decribed in the spec.
...
Change the default value of --silent_warnings from true to false, so that
warnings are visible when legacy factory syntax is used.
In order to facilitate transition of libraries and user programs, legacy factory
syntax is still supported by 2 workarounds, but warnings are printed.
The first workaround allows the factory clause to omit the type
parameter list, which otherwise has to match exactly with the list of
type parameters in the factory class declaration.
The second workaround allows a factory method to omit the type
parameter list. In that case, the type parameter list of the enclosing
class is used instead.
Workarounds will be removed to enforce correct factory syntax at a later time.
Review URL: http://codereview.chromium.org//8585004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1595 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:49:04 +00:00
efortuna@google.com
bb83c227fe
Made changes to the test architecture so that we can run frameworks other than
...
just Firefox from WebDriver.
Review URL: http://codereview.chromium.org//8566021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1555 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 00:42:18 +00:00
srdjan@google.com
92f177896b
Fix throwing ObjectNotClosure instead of null exception if closure is null.
...
Fix integer compareTo if other is a double NaN.
Fix Expect.stringEqual to accept null as arguments.
Update co19 status file.
Review URL: http://codereview.chromium.org//8528050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1539 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 18:02:12 +00:00
scheglov@google.com
f53a4aa109
Report errors for default parameter values, issue 351
...
http://code.google.com/p/dart/issues/detail?id=351
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8564027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1536 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 16:58:28 +00:00
jmesserly@google.com
5a8a4b3cce
Fix dispatch on MemberSets to always go dynamic if needed.
...
And a bug where we'd put a dynamic toString and == on Object that conflicts with the one that is actually on Object.
Review URL: http://codereview.chromium.org//8540030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1494 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 01:32:50 +00:00
nweiz@google.com
feb92073e0
Only set initializer fields as fields, not properties.
...
This should fix issue 422.
TBR=jimhug
Review URL: http://codereview.chromium.org//8540023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1489 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 00:17:42 +00:00
srdjan@google.com
0a87f0b9f1
FactoryNegativeTest is now correct for dartium as well.
...
Review URL: http://codereview.chromium.org//8491059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1483 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 23:46:00 +00:00
srdjan@google.com
1ea6e2e0de
Stop building blind: report errors with factories and parametrized types.
...
Enable test. This CL expects the frog/leg changes to be submitted first.
Review URL: http://codereview.chromium.org//8511070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1479 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 22:23:45 +00:00
srdjan@google.com
81be68ae18
Giving up on the change to report errors with factories and generic types.
...
This means that you will continue to have crashes in Debug mode, but you will be able to "run" in Release mode. Best solution is to get rid of generic types in Link until factories and generic types have been fully implemented. Until then we do not know what can happen when running in release mode.
Still trying to figure out how to test frog and leg correctly.
Review URL: http://codereview.chromium.org//8540013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1469 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 18:52:53 +00:00
srdjan@google.com
6ff41ed334
Require legacy form of type parameters in factories and report errors if a factory class does not have a required parametrized type (fixes crashes in VM). Fix frog code, however, there are frogs problem with --compileall:
...
leg/util/link_implementation.dart:38:12: error: wrong number of arguments, expected 0 but found 2
return new Link<T>(element, this);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Review URL: http://codereview.chromium.org//8515024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1464 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 17:04:00 +00:00
sigmund@google.com
e024570e01
Adding frogium: a frog-chromium architecture that runs tests in chromium that
...
were compiled with frog.
Review URL: http://codereview.chromium.org//8523024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1440 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 02:07:02 +00:00
srdjan@google.com
f61f3d99ed
Dartium debug mode runs with VM in release mode.
...
Review URL: http://codereview.chromium.org//8469020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1438 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 01:29:14 +00:00
efortuna@google.com
87b9e83041
Adding in-browser correctness testing via selenium.
...
Do not, I repeat, DO NOT enable these to run by default on the buildbot yet
(Currently they do not run by default). I am checking this in in its raw state
so that my fellow frog developers can start making fixes to frog for running in
other browsers. You can run these test by running:
Install WebDriver stuff by following these instructions:
http://code.google.com/p/selenium/wiki/PythonBindings
Then start the server:
java -jar selenium-server-standalone-2.11.0.jar -browserSessionReuse
../tools/test.py --component=webdriver --report --timeout=10 --progress=color
--mode=release language
Frog generates code that fails in Firefox, but passes in Chrome (for example). We
need to fix this eventually, but it shouldn't cause our entire tree to turn red.
Note also that to run selenium, you will need to install the selenium python
library, and ChromeDriver.
Review URL: http://codereview.chromium.org//8469016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1436 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 01:24:50 +00:00
srdjan@google.com
bc3a18b330
Fix test.
...
Review URL: http://codereview.chromium.org//8523017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1433 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:45:31 +00:00
srdjan@google.com
f94b8b0095
Fix failures.
...
Review URL: http://codereview.chromium.org//8525013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1432 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:37:38 +00:00
srdjan@google.com
b6be92c2b3
Add FactoryNegativeTest.
...
Review URL: http://codereview.chromium.org//8525010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1431 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:25:44 +00:00
jimhug@google.com
90cd616329
Adds source information to all values (with no detectable perf impact). Uses Value more consistently for operations in gen. Starts down the path of cleaning up this type.
...
Review URL: http://codereview.chromium.org//8523012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1430 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:23:18 +00:00
sigmund@google.com
0ca2044217
Additional fixes for the bot
...
Review URL: http://codereview.chromium.org//8505040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1378 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 23:08:32 +00:00
ahe@google.com
e08f3fd125
Allow error-recovery in top-level nodes.
...
Also fix a bunch of broken stuff: presubmit and scanner bench.
Review URL: http://codereview.chromium.org//8497042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1352 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 13:10:44 +00:00
hausner@google.com
120d154d76
Eliminate obsolete SuperNegativeTest
...
Dart automatically inserts a super() call if none is present
in the initializer list. This test has become obsolete.
Review URL: http://codereview.chromium.org//8499043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1335 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 00:49:10 +00:00
ahe@google.com
8b1b9e2276
Parse formal parameters.
...
This change also deletes the Parameter node class.
Review URL: http://codereview.chromium.org//8497011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1307 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 13:09:03 +00:00
ahe@google.com
7f942cf185
Update status file with bug numbers.
...
Review URL: http://codereview.chromium.org//8502013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1292 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 09:37:03 +00:00
ahe@google.com
b137d6023d
Test implicit this on fields.
...
Review URL: http://codereview.chromium.org//8438032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1289 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 09:02:46 +00:00
sigmund@google.com
28d55d0340
Isolates in frog - tweaks in existing js code to make it run. I plan to do an
...
actual cleanup on a second CL.
Review URL: http://codereview.chromium.org//8467034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1279 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 01:27:19 +00:00
hausner@google.com
f59e679860
Capturing for loop variables correctly
...
Re-introduce a "fresh copy" of the for loop variable(s) in each iteration. Adding a minimal test to check that closures capture the value of the particular loop iteration.
Review URL: http://codereview.chromium.org//8490019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1273 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 22:36:28 +00:00