Commit Graph

3219 Commits

Author SHA1 Message Date
johnniwinther@google.com 5e4e991ded Const variable declarations accepted in the parser.
TEST=language/const_var_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10731 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 14:02:57 +00:00
sgjesse@google.com 90ef467e0e Track types for arguments passed to calls to static functions
This uses the same mechanism as is currently used for tracking the types of
arguments passed to non-static functions. The type collection has been
refactored to support both.

For static functions the type information for a function is invalidated if
the function is used for anything else than a direct call.

The test LibTest/core/int/operator_truncating_division_A01_t01 now has
the "problem" that the statement

  Expect.isTrue(actual is int);

never fails even though actual might not be an int in the generated JavaScript
even though the inferred type for actual is int.

R=floitsch@google.com, kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10726 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 13:52:06 +00:00
ager@google.com b22ae0cc5a Apparently these pass in the analyzer eventhough Clock cannot be resolved.
R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10722 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 12:59:09 +00:00
ager@google.com 35cd7b4f06 Fix status file syntax error.
R=ricow@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10717 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 12:22:53 +00:00
ager@google.com cce3060a81 Update test expectations after Clock removal.
R=ricow@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10716 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 12:19:08 +00:00
ricow@google.com 942e3cf4c1 Add a support for a slow marker in status files.
The reasoning for this is that we want to have a sufficiently low
timeout to catch performance regressions, but still want to maintain
the support for having a few tests that takes a longer time to
complete.

This cl adds 2 slow functions, I will add more if any additional tests timeout on the buildbot.
Review URL: https://chromiumcodereview.appspot.com//10854156

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10714 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 11:55:44 +00:00
ricow@google.com 6dbd076a54 Rename leg to dart2js for co19 test status file.
Review URL: https://chromiumcodereview.appspot.com//10823342

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10706 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 10:20:30 +00:00
brianwilkerson@google.com ee09a19368 Finalize support for new getter syntax, per issue 3607
Review URL: https://chromiumcodereview.appspot.com//10836252

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10682 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 22:03:30 +00:00
ahe@google.com 474a7d6d56 Check overrides.
Review URL: https://chromiumcodereview.appspot.com//10836235

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10677 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 20:23:58 +00:00
hausner@google.com b69319b6ce Allow non-const field initializers
Revision 0.11 of the spec allows arbitrary initializer expressions
for instance fields.

Issue 3848
Review URL: https://chromiumcodereview.appspot.com//10832283

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10672 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 19:52:00 +00:00
kasperl@google.com 1a36eb2c3e Mark test as passing.
TBR'ed.

R=ahe@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10642 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 13:17:30 +00:00
kasperl@google.com e8268dd78a Add name and library to selectors.
This is the first step towards improving the Selector as an
abstraction used by the resolver, builder, and enqueur. The
intent is to have the resolver construct selectors that can
be used for method lookup, tree shaking, and for simplifying
the logic we use to build the correct SSA instructions for
sends (some of which are quite complex).

Next step is to get rid of more of the adhoc selector building
that's done outside of the resolver and clean up how we resolve
sends. After that, I'll start removing the need for passing
around both a name and a selector in a lot of places.

R=ahe@google.com,sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10637 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 12:21:51 +00:00
ajohnsen@google.com 404f888f83 Refactor Library/CompilationUnit and how we define local Scope.
This also collapses members and constructors of a class into the same
map.

BUG=

Original URL: https://chromiumcodereview.appspot.com//10832203

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10632 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 11:35:17 +00:00
lrn@google.com 8972a0b9ad Add missing abort on duplicate class fields.
Review URL: https://chromiumcodereview.appspot.com//10832291

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10626 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 10:40:53 +00:00
hausner@google.com 8f2c8c35fb References to static functions are CT constants
A compile time constant expression may refer to top-level and
static closures.

Fix for issue 3406.
Review URL: https://chromiumcodereview.appspot.com//10823292

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10600 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 20:15:06 +00:00
ahe@google.com dbfb312dea Abort earlier on compilation errors
Review URL: https://chromiumcodereview.appspot.com//10823290

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10595 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 18:27:06 +00:00
antonm@google.com 1c7b096f4d Add suppressions.
TBR=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10593 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 18:17:07 +00:00
ahe@google.com 26f63f029a Ensure supertypes are loaded safely.
Review URL: https://chromiumcodereview.appspot.com//10855125

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10586 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 16:42:41 +00:00
ajohnsen@google.com 6fd7569718 Revert "Port the remaining of dart:coreimpl to the unified corelib."
This reverts commit 62ae23aac0ad5657980c0aac21bfed62cb6633d5.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10572 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:45:01 +00:00
ahe@google.com 8afeeccd07 Remove OK from tests that we should fix before M1.
Review URL: https://chromiumcodereview.appspot.com//10826244

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10570 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:31:12 +00:00
ajohnsen@google.com 83d00caf5e Port the remaining of dart:coreimpl to the unified corelib.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10569 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:14:51 +00:00
ajohnsen@google.com dd8585d5a2 Revert "Refactor Library/CompilationUnit and how we define local Scope."
This reverts commit 05718e680ca45ac26fcc0d0256fc98419fac1b2e.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10550 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 06:45:24 +00:00
ajohnsen@google.com ccc0ce3101 Refactor Library/CompilationUnit and how we define local Scope.
This also collapses members and constructors of a class into the same
map.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10549 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 06:22:24 +00:00
hausner@google.com 9b47d131bf Support new getter syntax (no formal parameter list)
Support both new and old getter syntax in the VM compiler.
One co19 test becomes invalid, as it expects a compile error
due to missing getter formal parameters.
Review URL: https://chromiumcodereview.appspot.com//10837208

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10541 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 22:53:34 +00:00
scheglov@google.com 929f158657 Issue 3800. Calling an undefined constructor via new is a warning, not an error
http://code.google.com/p/dart/issues/detail?id=3800

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10531 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:04:47 +00:00
brianwilkerson@google.com c395b13644 Fix for issue 4429 - remove #resource directive
Review URL: https://chromiumcodereview.appspot.com//10827286

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10530 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:03:36 +00:00
scheglov@google.com 89b6b69e9f Issue 3084. Generate warning, not error, for 'Unknown.unknown'
http://code.google.com/p/dart/issues/detail?id=3084

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10524 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 18:33:07 +00:00
hausner@google.com 6a1a13901d Support for new operator -
Implement unary operator -. Operator negate is still recognized,
but internally it is represented like unary -. In particular,
operator negate no longer implies an instance method named
negate.

Marked several co19 tests that use "negate" as failing and filed
co19 issue 169 to have these tests updated.
Review URL: https://chromiumcodereview.appspot.com//10830253

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10523 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 18:30:22 +00:00
brianwilkerson@google.com 28b3a4b574 Fix for issue 3756 - support new catch syntax
Review URL: https://chromiumcodereview.appspot.com//10854097

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10521 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 18:18:09 +00:00
ahe@google.com 3da6222373 Restore lazy parsing of classes.
Review URL: https://chromiumcodereview.appspot.com//10826243

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10491 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 11:37:58 +00:00
hausner@google.com 29f91cc6f4 Implement new catch syntax in vm compiler
- Support for new on T catch (e) syntax
- warning (default:off) when old catch clause syntax is found
- convert one language test to used new catch syntax
Review URL: https://chromiumcodereview.appspot.com//10827240

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10456 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 20:14:18 +00:00
hausner@google.com 45b76746b5 Fix super getter/setter
Fix handling of super getters and setters. In particular, parser
now correctly converts super getters into super setters for
compound assignment, and pre- and postfix increment operators.

co 19 tests still fail because super index operator is broken.
Will work on this next.
Review URL: https://chromiumcodereview.appspot.com//10849004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 18:02:51 +00:00
rnystrom@google.com 1edc2c68da Disable one missed co19 FormatException test.
Review URL: https://chromiumcodereview.appspot.com//10823216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10361 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 22:23:50 +00:00
rnystrom@google.com 9464117cb5 Correctly disable BadNumberFormatException test for dartc and dart2js.
Review URL: https://chromiumcodereview.appspot.com//10834216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10360 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 21:52:28 +00:00
rnystrom@google.com 5d89b2b6de Disable currently broken co19 tests on all configs.
Review URL: https://chromiumcodereview.appspot.com//10828200

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10356 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 21:25:31 +00:00
rnystrom@google.com 0bc9b19740 Rename BadNumberFormatException -> FormatException.
Review URL: https://chromiumcodereview.appspot.com//10850034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10354 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 20:56:59 +00:00
asiva@google.com 63924054e3 Update test status after issue 4201 is fixed.
Review URL: https://chromiumcodereview.appspot.com//10854016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10318 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 23:06:41 +00:00
johnniwinther@google.com 3ce4405ced Revert "Skeleton typedef type implementation"
This reverts revision 10234.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10235 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 16:06:19 +00:00
johnniwinther@google.com 21855b3b1a Skeleton typedef type implementation
Review URL: https://chromiumcodereview.appspot.com//10832136

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10234 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 15:48:49 +00:00
scheglov@google.com 099e23eb11 Issue 3847. Allow non-constant instance variable initializers
http://code.google.com/p/dart/issues/detail?id=3847

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10233 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 14:41:00 +00:00
johnniwinther@google.com 832a3f46a3 Unify ClassElement and TypedefElement.
Review URL: https://chromiumcodereview.appspot.com//10825177

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10221 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 11:10:38 +00:00
ager@google.com 4531c0c770 Remove old isolate API and update all code in the repository to use
the new API.

R=kasperl@google.com,sigmund@google.com,turnidge@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10210 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 07:24:29 +00:00
hausner@google.com db4653f0e0 Add check for duplicate field initialization
This change adds a check that reports duplicate initialization
of instance fields. Fixes issues 921 and 1034.

There were several tests in the language suite that had duplicate
initializers for final instance fields. Corrected the tests.

dart2js also contained duplicate initializations of a couple
of final fields.
Review URL: https://chromiumcodereview.appspot.com//10825140

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10146 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 22:25:36 +00:00
brianwilkerson@google.com 8723c22ee4 Fix for issue 2439
Review URL: https://chromiumcodereview.appspot.com//10823090

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10058 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 14:47:32 +00:00
hausner@google.com d03049391b Fix issue 977
Constructors with redirection may not have a function body.
Review URL: https://chromiumcodereview.appspot.com//10820064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9999 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-27 23:23:24 +00:00
hausner@google.com ef1a46e5da Fix checked co19 tests, exclude bad test.
Review URL: https://chromiumcodereview.appspot.com//10834055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9995 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-27 21:08:31 +00:00
hausner@google.com 741a12cfd6 Support const modifier in fields, variables
Issue 3551

This change adds const as a valid keyword to declare fields and
variables. The mandatory initializer has to be a compile time
const expression.

Static final variables still have to be initialized with
compile time constant expressions. I will add non-const static
finals (issue 3558) in another change.

Other small changes:
- allow null in some compile time constant expressions.
- allow only numbers, booleans, strings and null in compile time
  constant string interpolation.
Review URL: https://chromiumcodereview.appspot.com//10828053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9992 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-27 20:49:24 +00:00
brianwilkerson@google.com e212422aa0 Fix for issue 3915
Review URL: https://chromiumcodereview.appspot.com//10824045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9944 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 17:19:00 +00:00
asiva@google.com 7d1e8d98f2 Fix status file.
Review URL: https://chromiumcodereview.appspot.com//10834018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9917 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 23:15:42 +00:00
asiva@google.com 523687cde8 Update failing test status.
TBR=hausner.
Review URL: https://chromiumcodereview.appspot.com//10822025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9912 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 21:41:19 +00:00