Commit Graph

3219 Commits

Author SHA1 Message Date
ngeoffray@google.com b5fe256172 Improvements for checked mode: check when intializing fields, and when assigning to fields.
Review URL: https://chromiumcodereview.appspot.com//10910092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11962 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 16:03:25 +00:00
ahe@google.com 87a9716d82 Update co19 to r328.
Review URL: https://chromiumcodereview.appspot.com//10915121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11952 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 14:18:21 +00:00
srdjan@google.com 8f313942ed Do not append input value of AS comparison if the check is eliminated. Fixes issue 4944, crash caused by incorrect stack size at exit.
Review URL: https://chromiumcodereview.appspot.com//10919119

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11929 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 09:21:35 +00:00
ahe@google.com 02f8350189 Remove stale co19 lines.
Review URL: https://chromiumcodereview.appspot.com//10907091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11923 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 08:02:29 +00:00
ahe@google.com c3bac61805 Update co19 status for checked test
Review URL: https://chromiumcodereview.appspot.com//10928019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11919 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 06:50:25 +00:00
ahe@google.com 87f632ee07 Update co19 to r327.
Review URL: https://chromiumcodereview.appspot.com//10917106

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11916 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 06:04:06 +00:00
floitsch@google.com 1011c58bf9 Use JavaScript runtime semantics when constant folding.
Fixes issue 4551.
Fixes issue 2887.

Review URL: https://chromiumcodereview.appspot.com//10825386

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11883 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 16:13:58 +00:00
floitsch@google.com a0f8e3db29 Lazy implementation of final variables.
Fixes issue 3559.

Depends on CL https://chromiumcodereview.appspot.com/10832351/

Review URL: https://chromiumcodereview.appspot.com//10855174

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11870 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:28:38 +00:00
brianwilkerson@google.com efaa2a1d4b Old catch syntax is now an error (issue 4905)
Review URL: https://chromiumcodereview.appspot.com//10913068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11834 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 18:11:19 +00:00
kasperl@google.com ab814d4d46 Disallow legacy try-catch syntax.
R=karlklose@google.com,ahe@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10917070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11807 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 12:21:40 +00:00
kasperl@google.com 7a535d3226 Disable all support for legacy try-catch in the VM.
R=ngeoffray@google.com,hausner@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10910060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11754 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 10:15:47 +00:00
hausner@google.com 35d7793891 Throw AbstractClassInstantiationError if an abstract class is instantiated
This is the second try to my previous attempt to implement the
new abstract class handling. Instead of a compile-time error,
the VM now throws an AbstractClassInstantiationError at runtime
if an abstract class is instantiated. Added the new error class
to the core library.

For now I'm still using the rule that a class is abstract if it is explicitly
marked as abstract, or if it defines a new abstract method.
Review URL: https://chromiumcodereview.appspot.com//10916039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11708 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 18:06:42 +00:00
hausner@google.com b3a2c41d02 Revert change 11558
I learnt that instantiating an abstract class is a runtime error, not a compile time error.

TBR=regis
Review URL: https://chromiumcodereview.appspot.com//10894048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11567 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 22:49:52 +00:00
hausner@google.com 28d88d4b2d Add compiler error when instantiating abstract class
Also, make abstract keyword on methods optional.
Review URL: https://chromiumcodereview.appspot.com//10899039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11558 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 22:13:06 +00:00
dominich@google.com 0f3a1569be Update expectation for dartc.
BUG=2771
TBR=floitsch@google.com

Review URL: https://chromiumcodereview.appspot.com//10896035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11523 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 15:20:02 +00:00
dominich@google.com 494e5b228e Updated VM and JS versions of Date to allow underflow and overflow.
Added many tests to check everything is working as expected.

BUG=2771

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

Review URL: https://chromiumcodereview.appspot.com//10832166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11522 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 15:09:14 +00:00
ajohnsen@google.com 3a6daefd99 Expose remaining 'errors' in an unified dart:core.
This is a follow-up on my previous move of AssertionError.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10896007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11513 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 11:57:37 +00:00
karlklose@google.com 544b754a7d Throw a runtime error when trying to call a constructor of a class that could not be resolved.
TESTS=language/call_constructor_on_unresolved_class_test
BUG=3802

Review URL: https://chromiumcodereview.appspot.com//10868069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11497 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 08:52:53 +00:00
ahe@google.com 25139ee7e5 Support unary - operator.
Committed: https://code.google.com/p/dart/source/detail?r=11444 (first attempt failed)

Review URL: https://chromiumcodereview.appspot.com//10870066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11496 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 08:39:02 +00:00
kasperl@google.com 33e009db5f Update tests after removing #resource support from dart2js.
R=ahe@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10899028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11490 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 07:13:18 +00:00
aprelev@gmail.com b15aa52677 Fix lowercasing output filenames for dart:3320 as well as fix for co19 test
BUG=dart:3320
TEST=

Review URL: https://chromiumcodereview.appspot.com//10825434

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11488 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 02:55:34 +00:00
ahe@google.com 8a347d7bcd Revert "Support unary - operator."
This reverts r11444.

Review URL: https://chromiumcodereview.appspot.com//10892005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11446 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 14:15:16 +00:00
ahe@google.com 11e4924af4 Support unary - operator.
Review URL: https://chromiumcodereview.appspot.com//10870066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11444 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 13:55:11 +00:00
scheglov@google.com 6ef7aa818d Issue 3904. Allow using class literal in expressions
http://code.google.com/p/dart/issues/detail?id=3904

R=brianwilkerson@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10873096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11440 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 13:16:21 +00:00
whesse@google.com 4789857341 Remove List.copyFrom from VM and from tests. It was removed from the List interface in r941.
BUG=dart:1953

Review URL: https://chromiumcodereview.appspot.com//10898003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11437 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 12:06:45 +00:00
ngeoffray@google.com b32a0c9e68 Change how runtime type information is being set in the backend.
Review URL: https://chromiumcodereview.appspot.com//10888003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11436 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 10:59:53 +00:00
ngeoffray@google.com f2f8b36de2 Static and top-level methods can be compile time constants.
Review URL: https://chromiumcodereview.appspot.com//10872059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11387 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 14:25:11 +00:00
ager@google.com 1cf5d4cc4b Unify Object implementation across dart2js and VM.
R=ajohnsen@google.com,lrn@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10878050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11372 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 08:54:55 +00:00
aprelev@gmail.com 71eb730149 Fixed whitespace
dart-3988: fix for class members cannot have the same name as the class in dart2js.

BUG=dart-3988
TEST=

Review URL: https://chromiumcodereview.appspot.com//10879091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11362 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-26 01:20:26 +00:00
ngeoffray@google.com 6ba45d9b0e We no longer crash this test.
Review URL: https://chromiumcodereview.appspot.com//10875050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11311 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 14:34:24 +00:00
ngeoffray@google.com 64df7e49ba Support non-const instance field initializers.
Review URL: https://chromiumcodereview.appspot.com//10873033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11305 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 13:04:29 +00:00
ngeoffray@google.com 454bf5963d Inlining of static functions: applying Florian's CL.
Review URL: https://chromiumcodereview.appspot.com//10873025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11226 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 13:01:14 +00:00
karlklose@google.com 6876052c30 Throw a NoSuchMethodException when attempting to call an undefined constructor.
R=ngeoffray@google.com
BUG=3802

Review URL: https://chromiumcodereview.appspot.com//10870037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11220 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 11:19:27 +00:00
ahe@google.com aa97f486e1 Mark test which uses Math as failing.
Review URL: https://chromiumcodereview.appspot.com//10874011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11176 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 17:14:44 +00:00
johnniwinther@google.com 7c61b110d8 Const variables handled as final
Review URL: https://chromiumcodereview.appspot.com//10879003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11170 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 16:15:15 +00:00
ager@google.com 722c1a3ce6 Deprecate Math object in corelib in favor of dart:math library.
Review URL: https://chromiumcodereview.appspot.com//10829459

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:33:01 +00:00
scheglov@google.com 305f5adaa7 Issue 4539. Tweaks for old/new spec compatibility
Temporary disables check for underscore in named optional parameters.
There are not way to know if user means old or new syntax.

Also makes "final" and "const" local variables a constant expressions.

R=brianwilkerson@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10824411

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11117 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 00:11:38 +00:00
ahe@google.com bf0aa4aa2e Update co19 status for dart2js.
Review URL: https://chromiumcodereview.appspot.com//10823412

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10972 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 15:01:13 +00:00
ahe@google.com 4487046f34 Update co19 status file for dart2js.
Review URL: https://chromiumcodereview.appspot.com//10825451

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10968 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 14:26:22 +00:00
ahe@google.com bda1a6981d Produce error when duplicate field initializers are found
Committing on behalf of Alexander Aprelev <aprelev@gmail.com>.

BUG=http://dartbug.com/1035

Review URL: https://chromiumcodereview.appspot.com//10860039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10947 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:40:03 +00:00
srdjan@google.com 031eab4ab9 Fix null-equality comparison for unoptimized branch code. Issue 2506.
Review URL: https://chromiumcodereview.appspot.com//10860018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10924 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 21:18:26 +00:00
hausner@google.com 9dc7ab8e1e Implement import scope
Implement the new scope rule for imports.

- Imported identifiers are in a scope that is shadowed
  by the importing library's top-level scope.
- Conflicting names imported from different libraries
  are not an error unless the name is referenced.
- Conflicting type names are only an error in checked mode.

In a follow-on change, I'll remove the "imported_into" pointers in libraries. They are no longer needed.


Issue 2945
Review URL: https://chromiumcodereview.appspot.com//10823396

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10923 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 21:06:16 +00:00
srdjan@google.com 2021c48ad0 Disable breaking tests correctly.
Review URL: https://chromiumcodereview.appspot.com//10831378

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10913 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 18:11:59 +00:00
srdjan@google.com 2cbf8aa785 Temporary disable two tests until investigation complete (make bots green).
Review URL: https://chromiumcodereview.appspot.com//10836315

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10911 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 18:04:02 +00:00
scheglov@google.com ca5e0d567c Issue 4553. Any constant is valid for 'case'.
Also check for 'operator =='.

R=brianwilkerson@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10829365

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10899 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 14:28:48 +00:00
johnniwinther@google.com ac5a4808d8 Skeleton typedef type implementation
Review URL: https://chromiumcodereview.appspot.com//10832136

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10880 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 11:15:44 +00:00
regis@google.com d9b0276a4c Require two type arguments for map literals (issue 4522).
Spec has been changed back.
VM temporarily accepts a single type argument and emits a warning.
Update tests, dart2js source, dartdoc, etc...
Disable failing co19 tests (issue 175 filed).
Review URL: https://chromiumcodereview.appspot.com//10854191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10861 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 20:44:32 +00:00
brianwilkerson@google.com a7e2599cfe Fix for issue 3550
Review URL: https://chromiumcodereview.appspot.com//10857041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10856 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 20:06:29 +00:00
ahe@google.com fe6c6324d3 Implement super.foo = expression.
Review URL: https://chromiumcodereview.appspot.com//10854163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10798 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 07:55:51 +00:00
brianwilkerson@google.com 53b93f854b Support unary minus operator (issue 3767)
Review URL: https://chromiumcodereview.appspot.com//10834334

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10745 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 15:50:46 +00:00