Commit Graph

130 Commits

Author SHA1 Message Date
johnniwinther@google.com ef93dd9da1 Added support for exports and re-exports.
BUG=5429
TESTS=language/export_test, language/export_cyclic_test

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13478 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-10 15:08:18 +00:00
ahe@google.com 8214500336 Implement part-of directive.
Review URL: https://codereview.chromium.org//11092003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13398 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 07:49:48 +00:00
ahe@google.com 29749a1350 Fix warnings in dart2js.
Review URL: https://codereview.chromium.org//11088003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13353 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-08 13:38:10 +00:00
johnniwinther@google.com 7e831ffacc Minor fixes in dart2js.
Review URL: https://codereview.chromium.org//11030048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13283 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 11:16:13 +00:00
karlklose@google.com ed965b2b98 Fix some warnings.
R=floitsch@google.com,ahe@google.com,ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13212 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 08:51:43 +00:00
johnniwinther@google.com 95481c4500 Patch cleanup.
Unused methods removed.
Patch-related methods moved to PatchParserTask.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13210 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 08:39:47 +00:00
johnniwinther@google.com 98ab126164 Patch refactoring.
This is the third and main part of the patch refactoring.
Patch libraries, classes, and functions now have there separate element chain,
which is doubly-linked to their origin counterparts.

See the library comment in lib/compiler/patch_parser.dart for a detailed
description of the new patch system, the terminology and the invariants.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13163 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-03 09:00:45 +00:00
karlklose@google.com 1f6c58ce6c Added TODO.
Review URL: https://codereview.chromium.org//11033016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13117 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 14:48:50 +00:00
johnniwinther@google.com 88fe3fe3c5 Use static final empty Modifier instead of null.
Review URL: https://codereview.chromium.org//10996062

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13050 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 07:01:07 +00:00
lrn@google.com 37197c2553 Stop using the Hashable interface.
All objects have a hashCode method, so there is no need for a Hashable
interface.
The interface itself is retained for at least two weeks, to give time for
code to remove uses of it.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12955 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 13:07:54 +00:00
ngeoffray@google.com 3628cb7167 Order the parameters of a function at the definition site.
Review URL: https://codereview.chromium.org//10991034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12904 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 12:40:08 +00:00
antonm@google.com 7b29e4f53a Resolve op when op= syntax is used.
Review URL: https://codereview.chromium.org//10942029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12839 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 11:58:55 +00:00
danrubel@google.com fea0ced904 Convert raw strings in compiler
Review URL: https://codereview.chromium.org//10970038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12783 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 15:22:07 +00:00
ahe@google.com 970a4ee600 A library element should know its compilation units.
Review URL: https://codereview.chromium.org//10960033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12755 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 06:53:12 +00:00
johnniwinther@google.com 2a82f822b9 Import scope rules updated.
BUG=2946

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12706 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 14:02:25 +00:00
johnniwinther@google.com 608c199175 Stub implementation of patch invariants for the patch refactoring.
This is the first part of the patch refactoring which implements
a stub version of the invariants needed for the new patch implementation.

See the library comment in lib/compiler/patch_parser.dart for a detailed
description of the new patch system, the terminology and the invariants.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12687 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 09:31:08 +00:00
ahe@google.com fcc9f5f0ff Parse new library syntax.
Committed: https://code.google.com/p/dart/source/detail?r=12386
But reverted in: https://code.google.com/p/dart/source/detail?r=12387

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12686 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 09:08:12 +00:00
ahe@google.com 8b7b049559 Revert "Parse new library syntax."
This reverts r12386.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12387 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 14:35:47 +00:00
ahe@google.com 4f66bc9539 Parse new library syntax.
Review URL: https://chromiumcodereview.appspot.com//10911298

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12386 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 14:13:10 +00:00
ngeoffray@google.com b2b57490f9 Runtime support for the new parameter specification.
Review URL: https://chromiumcodereview.appspot.com//10911211

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12258 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 12:01:17 +00:00
ngeoffray@google.com 938ce7ebe8 Fix import, spotted by checked mode.
Review URL: https://chromiumcodereview.appspot.com//10917163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12107 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 11:10:00 +00:00
ngeoffray@google.com 13dd7022b5 num implements Comparable and Hashable.
Review URL: https://chromiumcodereview.appspot.com//10916172

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12037 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 14:20:36 +00:00
lrn@google.com be2453bae1 Removed/moved "assert" function to core_patch.dart as "_assert".
Changed resolution of assert to only accepting assert in a statement position.
Added more assert tests.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12026 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:45:02 +00:00
karlklose@google.com 54538f6161 Generate a warning and a runtime error for calls to nonexistent static calls, getters and setters.
R=ngeoffray@google.com
BUG=3086,3089,3095

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12011 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 10:41:38 +00:00
ngeoffray@google.com 7ef6d7aac2 Re-apply with a few fixes http://codereview.chromium.org/10913081/: Fix resolution of type parameters in static context, and the use of type parameters in closures.
Review URL: https://chromiumcodereview.appspot.com//10910098

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11966 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 16:31:30 +00:00
sgjesse@google.com 247f05e863 Better tracking of provided types at call sites
The tracking of provided types at call sites now take both the
type of named arguments from selectors and the type of the
defualt values for optional paramters into account.

To know the type of the default values for optional parameters
the constant expressions for the default values are always
compiled before the function.

In order to check whether a new selector invalidates the current
provided types for a function the default values for the optional
parameters needs to be stored with all registered optimized
functions.

R=kasperl@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11917 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 06:38:15 +00:00
ngeoffray@google.com 2edbe0b892 Revert r11881. metadata_test fails for yet to be discover reasons.
Review URL: https://chromiumcodereview.appspot.com//10918078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11889 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 17:04:38 +00:00
ngeoffray@google.com f1aece76c4 Fix resolution of type parameters in static context, and the use of type parameters in closures.
Review URL: https://chromiumcodereview.appspot.com//10913081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11881 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 16:04:25 +00:00
ager@google.com 156e6a71b5 First corelib cleanup patch after unification.
Do not go through coreimpl for object implementation. Instead, use patching
in core directly.

This leads to error message issues in dart2js which I have patched up
the best way I could find.

R=ajohnsen@google.com,johnniwinther@google.com,lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11784 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 07:26:02 +00:00
ahe@google.com 47db61e5de Parse argument definition test expressions.
Review URL: https://chromiumcodereview.appspot.com//10915030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11748 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 08:26:01 +00:00
ngeoffray@google.com b31af3710a Support checked mode for field setters.
Review URL: https://chromiumcodereview.appspot.com//10908012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11646 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 19:37:16 +00:00
karlklose@google.com c3d24e1eaf Rename Type to DartType to avoid conflicts with the class Type in the core library.
BUG=http://code.google.com/p/dart/issues/detail?id=4810

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11619 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 15:13:29 +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 3886bb7ee4 Remove more warnings.
R=ahe@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11489 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 05:54:40 +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
iposva@google.com 43c364c8e5 - Change "static final" to "static const" in the lib/ directory.
Review URL: https://chromiumcodereview.appspot.com//10880068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11401 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 18:28:29 +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
ahe@google.com a22ed2cf6b Support abstract getters without parameters.
Review URL: https://chromiumcodereview.appspot.com//10880040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11293 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 08:26:17 +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
ahe@google.com 88467d4dfe Evaluate compile-time constants of metadata.
Review URL: https://chromiumcodereview.appspot.com//10870010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11212 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 06:28:25 +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
ahe@google.com 234caf4849 Create an outline of metadata API in dart2js.
Review URL: https://chromiumcodereview.appspot.com//10879006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11147 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 13:37:13 +00:00
lrn@google.com d82749cc47 Make addGetterOrSetter (now: defineAccessor) not add the abstract field as a member.
The abstract field element is only present as a result of a named
lookup in order to return both getter and setter as one result.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11142 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 12:57:04 +00:00
ahe@google.com 1ada772cc1 Remove most superfluous getter arguments from dart2js.
Review URL: https://chromiumcodereview.appspot.com//10876008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11123 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 06:33:24 +00:00
karlklose@google.com 5ac1789d6c Fix dart2dart and dart2js build.
TBR=antonm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11051 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 14:36:38 +00:00
antonm@google.com d5525c3fa6 Better version of TypeVariableElement.position.
R=ahe@google.com,johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11047 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 14:10:33 +00:00
antonm@google.com 435969e63b Implement TypeVariableElement.position.
R=ahe@google.com,johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11044 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:54:05 +00:00
karlklose@google.com aeafe0fdda Add erroneous elements for function types and use them to allow unresolvable constructors to be handled in the backend.
This is the first step towards runtime error handling of unresolvable constructors, library prefixes and constructor names in new-expressions.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11042 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:40:07 +00:00
ahe@google.com 2134fa0fc1 Clean up state handling in ClassElement.
Review URL: https://chromiumcodereview.appspot.com//10823311

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11040 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:23:34 +00:00