ajohnsen@google.com
e462fccf79
Support sourceing files in patches.
...
The path given is relative to the patch, not the library.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10827448
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11082 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 18:37:34 +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
lrn@google.com
d0145b687f
Make patching of classes lazy.
...
Review URL: https://chromiumcodereview.appspot.com//10855262
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11036 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 12:53:53 +00:00
ager@google.com
000b295a00
Make sure that libraries loaded from dart:core gets dart:core implicitly loaded.
...
This is in preparation for deprecating the corelib Math object
in favor of the dart:math library.
R=ahe@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10836355
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11032 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 11:24:23 +00:00
ahe@google.com
a6b6565123
Parse metadata, but ignore it.
...
Review URL: https://chromiumcodereview.appspot.com//10836351
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11029 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 10:55:54 +00:00
ahe@google.com
19851497ff
Support new getter syntax.
...
Review URL: https://chromiumcodereview.appspot.com//10831332
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10956 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 13:26:38 +00:00
lrn@google.com
ed1ed6472d
Make top-level patch injections be compilation unit under library.
...
Review URL: https://chromiumcodereview.appspot.com//10824347
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10895 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 13:08:00 +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
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
ahe@google.com
d49ade3fdf
Fix typo to unbreak checked build.
...
Review URL: https://chromiumcodereview.appspot.com//10836259
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10708 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 10:37:33 +00:00
ahe@google.com
7b88c78bd5
Clean up the scanner directory
...
Review URL: https://chromiumcodereview.appspot.com//10857005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10707 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 10:27:36 +00:00
ahe@google.com
d47c99d041
Support for new catch syntax in dart2js
...
Committing on behalft of: Alexander Aprelev <aprelev@gmail.com >
BUG=3758
Review URL: https://chromiumcodereview.appspot.com//10857013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10704 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 09:51:18 +00:00
lrn@google.com
7427732acd
Fix test in previous commit.
...
Bad variable name: members -> localMembers
Test passing unexpectedly.
TBR=ahe@google.com
CC=ajohnsen@google.com
Review URL: https://chromiumcodereview.appspot.com//10827318
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10638 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 12:38:37 +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
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
lrn@google.com
d134e7d052
Allow patch files to add declarations to the patched library.
...
Review URL: https://chromiumcodereview.appspot.com//10831262
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10562 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 11:58:48 +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
antonm@google.com
d26512406d
Properly parse operator declarations without return type.
...
Formerly, 'operator' token was parsed as a return type, fix it.
Emit a space if operator name is 'negative' as otherwise it's
unparsed as 'operatornegative'.
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10836034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10283 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 11:36:11 +00:00
smok@google.com
e842adc7ae
Get back recording 'implements' and 'extends' keyword on NodeList
...
as suggested by Peter in https://chromiumcodereview.appspot.com/10786028/
Review URL: https://chromiumcodereview.appspot.com//10832129
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10214 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 08:03:16 +00:00
antonm@google.com
cec30e74df
Support type annotations for list literals.
...
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10849002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10075 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 17:56:34 +00:00
antonm@google.com
d39132ea71
Fix interpolation unparse.
...
Formerly, string interpolation parts were put into a node list with null
delimiter, which was converted to single space string. That lead to extra
space when unparsing interpolation: '$a $b' -> '$a $b'.
Make empty string delimiter explicit and do not augument it with an additional
space.
R=smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10824113
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10073 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 17:43:50 +00:00
smok@google.com
1651f0d54a
Record 'implements' keyword for class declaration nodes.
...
Do not record 'implements' or 'extends' in NodeList of implemented interfaces.
Review URL: https://chromiumcodereview.appspot.com//10786028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10042 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 08:27:13 +00:00
smok@google.com
5ae046785f
Revert https://chromiumcodereview.appspot.com/10789012/
...
We now use default class for ClassElement
Review URL: https://chromiumcodereview.appspot.com//10834065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10041 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 08:11:20 +00:00
dgrove@google.com
89dd99fdd0
Convert DOM and HTML frog to dart2js.
...
Review URL: https://chromiumcodereview.appspot.com//10800104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9871 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 22:45:59 +00:00
smok@google.com
422a8ae338
Record default clause for interfaces in parser.
...
Use it in dart2dart emitter
Review URL: https://chromiumcodereview.appspot.com//10789012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9662 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 13:29:58 +00:00
lrn@google.com
2d58755073
Revert "Allow patch files to add top-level declarations to the patched library."
...
This reverts r9629.
TBR: floitsch
Review URL: https://chromiumcodereview.appspot.com//10702204
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9630 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 13:59:54 +00:00
lrn@google.com
7621533549
Allow patch files to add top-level declarations to the patched library.
...
The patch library is loaded normally, and then non-patch methods and classes
are cloned and added to the patched library. To support methods from other
compilation units, all elements now has a scriptOverride field that lets
them report a different script than the one of their enclosing element.
(For top-level elements that's already possible, as that's what #source does,
but for fields inside a class, we can't easily wrap a compilation unit element
around them.)
TBR: floitsch
(to get in before vacation, with reversion rights).
Review URL: https://chromiumcodereview.appspot.com//10703188
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9629 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 13:46:21 +00:00
johnniwinther@google.com
1274e083f5
Error produced for missing var, final, const or type on field declarations.
...
BUG=2997
TEST=tests/language/field_decl_missing_var_type_test
Review URL: https://chromiumcodereview.appspot.com//10690106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9585 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 09:22:53 +00:00
lrn@google.com
42f353fad1
Patch methods in classes.
...
Add math library in corelib/unified. Location subject to change.
Made _Random's implementation external and patched it to use JS random.
Made "external" marking acually work.
Review URL: https://chromiumcodereview.appspot.com//10696147
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9544 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 08:47:24 +00:00
lrn@google.com
9010ea745c
Add "external" prefix to methods and constructors.
...
This is expected to be added to the language specification, for allowing the specification of methods with externally bound implementations.
Review URL: https://chromiumcodereview.appspot.com//10697096
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9456 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 06:37:51 +00:00
lrn@google.com
d1da93a393
Reapply "Make patch file import declarations apply to the patched library too."
...
This reapplies r9346 with the following fix:
Adds #library tag to tests containing #import.
The test web-driver tries to source the file if it doesn't contain
a #library declaration, which isn't valid if it contains #import.
R=floitsch
Review URL: https://chromiumcodereview.appspot.com//10698096
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9401 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 12:02:28 +00:00
lrn@google.com
b5ce02776b
Revert "Make patch file import declarations apply to the patched library too."
...
This reverts commit r9346.
TBR=floitsch
Review URL: https://chromiumcodereview.appspot.com//10704080
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9354 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 14:25:50 +00:00
lrn@google.com
c86ce92f07
Make patch file import declarations apply to the patched library too.
...
Add a math library and apply patching to that, instead of to the web library.
We still have a default Math class with the same functionality, which isn't patched.
Review URL: https://chromiumcodereview.appspot.com//10694067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9346 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 13:01:15 +00:00
lrn@google.com
642b7d8a05
Revert "Revert "First step towards having patch files for generic libraries.""
...
This reapplies r9246 without the (known) bugs.
Review URL: https://chromiumcodereview.appspot.com//10689063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9282 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 09:04:42 +00:00
lrn@google.com
83ce2f9f6e
Revert "First step towards having patch files for generic libraries."
...
This reverts commit r9246.
TBR: floitsch
Review URL: https://chromiumcodereview.appspot.com//10689038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9249 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 13:49:13 +00:00
lrn@google.com
1fad321449
First step towards having patch files for generic libraries.
...
As proof of concept, it patches a non-functional htmlEscape from web.dart.
Still has lots of restrictions:
- Only loads a normal library (no syntax extension to mark patches as
separate from additions). Assumes every element is a patch.
- Only handles top-level functions (probably won't handle getters/setters
or constructors), and not classes.
- Doesn't check that the patched function is marked external (no syntax for
that in the spec yet, doesn't even require it to be abstract).
- Doesn't check that the signature of the patch function matches the original
function.
- Probably won't work for 'coreimpl', as loaded from 'js_helper', since it's not
loaded using the 'dart:' scheme.
Review URL: https://chromiumcodereview.appspot.com//10689036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9246 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 12:32:40 +00:00
podivilov@google.com
c3977d7b22
Get rid of DOMWrapperBase and DOMTypeBase.
...
These types are not needed anymore.
R=antonm@google.com
Review URL: https://chromiumcodereview.appspot.com//10659033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9242 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 10:21:25 +00:00
johnniwinther@google.com
3fd74bb898
Various token issues fixed in the compiler
...
Review URL: https://chromiumcodereview.appspot.com//10697003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9199 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 13:33:26 +00:00
lrn@google.com
cadba87302
Implement 'as' operator.
...
This is a quick implementation with room for improvement.
It might work.
Review URL: https://chromiumcodereview.appspot.com//10540048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9109 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:23:50 +00:00
johnniwinther@google.com
77f7b64611
Scanner can include comments in the token stream.
...
includeComments option argument added to the ByteArrayScanner. default is false.
Test of charOffset, charLength invariants on scanner output added.
Calls to beginToken() moved to fix invalid Token.charOffset values for string interpolations.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10539021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9059 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 10:57:25 +00:00
antonm@google.com
f8f5363fc4
New treatment of native methods.
...
R=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10558023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8980 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 14:37:42 +00:00
ahe@google.com
17048b69fa
Missing test from CL 10544173.
...
Review URL: https://chromiumcodereview.appspot.com//10584011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8889 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 07:29:13 +00:00
ahe@google.com
75a70e0b67
Allow built-in identifiers for labels.
...
Review URL: https://chromiumcodereview.appspot.com//10568011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8802 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 16:00:39 +00:00
ahe@google.com
9f1488c21c
Update partial parser and scanner to be able to skip expressions like "new Map<S, T>()".
...
Review URL: https://chromiumcodereview.appspot.com//10544173
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8720 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 13:43:46 +00:00
floitsch@google.com
b5acd09f81
Fix most warnings and other minor cleanups.
...
Review URL: https://chromiumcodereview.appspot.com//10557003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8719 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 13:26:35 +00:00
antonm@google.com
aaef8e92dd
Properly parse > in end of types.
...
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10540073
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8658 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 13:40:22 +00:00
floitsch@google.com
a1e41b060b
Reapply "Remove deprecated classes and functions in Date."
...
This reapplies a fixed version of commit 8445.
Original CL: https://chromiumcodereview.appspot.com//10541050
Review URL: https://chromiumcodereview.appspot.com//10538061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8455 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:32:18 +00:00
floitsch@google.com
c046c899a0
Revert "Remove deprecated classes and functions in Date."
...
This reverts commit 8445.
Review URL: https://chromiumcodereview.appspot.com//10532068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8446 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:31:55 +00:00
floitsch@google.com
2c2ee2000f
Remove deprecated classes and functions in Date.
...
Review URL: https://chromiumcodereview.appspot.com//10541050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8445 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:01:00 +00:00