johnniwinther@google.com
fdbabb995e
Dartdoc and Apidoc updated to use dart2js through the mirror system.
...
BUG=3414
Review URL: https://chromiumcodereview.appspot.com//10701091
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9584 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 08:52:19 +00:00
smok@google.com
8b8c0d1b5b
Fix getters/setters unparsing, they appeared as ordinary methods without get/set keywords.
...
Review URL: https://chromiumcodereview.appspot.com//10698154
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9551 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 16:10:28 +00:00
smok@google.com
3fa18d1a27
Fix unparsing of variable definitions.
...
Example affecting method with method args:
foo(f(arg)){}
would unparse to:
foo(var f(arg)){}
Also correctly unparse variable definition modifiers.
Review URL: https://chromiumcodereview.appspot.com//10735053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9550 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 14:00:34 +00:00
floitsch@google.com
c8cd641308
Fix usage of UNKNOWN/CONFLICTING types for union.
...
Fixes issue 4033.
Review URL: https://chromiumcodereview.appspot.com//10735051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9547 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 10:34:58 +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
smok@google.com
b929ce15cc
dart2dart fix synthesized constructor appearing in unparser. Don't output it.
...
For example, if we have:
class A {
}
main() {
new A();
}
that would result in:
class A{class}...
that "class" is the unparse result of synthesized constructor.
Review URL: https://chromiumcodereview.appspot.com//10735030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9541 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 04:31:36 +00:00
smok@google.com
0842017adc
dart2dart support for instantiatin simple top-level class:
...
class A {
}
main() {
new A();
}
Review URL: https://chromiumcodereview.appspot.com//10690110
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9506 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 12:41:29 +00:00
smok@google.com
ae080111b6
support unparsing of "new Object()":
...
main() {
new Object();
}
Review URL: https://chromiumcodereview.appspot.com//10752002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9496 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 03:13:34 +00:00
smok@google.com
2f89b3723f
dart2dart: fix top level field declarations.
...
Unparse:
final String x = "asd";
main() {
x;
}
used to unparse to:
x="asd"main(){x;}
Now:
final String x="asd";main(){x;}
Review URL: https://chromiumcodereview.appspot.com//10702114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9465 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 12:36:52 +00:00
smok@google.com
7b3401dd48
Fix const unparse. Example:
...
foo([var a = const[]]) {}
used to unparse to:
foo([var a = []]) {}
Review URL: https://chromiumcodereview.appspot.com//10689104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9439 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 12:57:27 +00:00
kasperl@google.com
8151ee080c
Update status files. More stuff pass.
...
R=efortuna@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10698107
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9420 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-05 14:00:06 +00:00
kasperl@google.com
a9a9ab6b58
Mark more tests as passing on IE.
...
Lots of stuff works now! More to come.
R=efortuna@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10698105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9419 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-05 12:52:12 +00:00
johnniwinther@google.com
45d8cdb032
Mirrors prototype added to dartdoc.
...
The mirrors system is local to dartdoc and will merged with the VM version at a later point.
TEST=compiler/dart2js/mirrors_test.dart
Review URL: https://chromiumcodereview.appspot.com//10692040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9406 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 13:23:28 +00:00
ager@google.com
f29bd5d854
Fix more type intersection stuff.
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10700104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9403 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 12:20:59 +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
ager@google.com
72b997b522
Reapply change to update dart2js operator equals semantics to follow the latest spec.
...
Changes since the version that was reverted are in patch set 2:
1. Fix one remaining dart2js test that relied on the old operator== behavior.
2. Fix type intersection operation to actually take null into account. Because of bounded types they should always use canBeNull.
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10692087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9396 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 11:29:47 +00:00
smok@google.com
90424cecb1
Fix unparsing of prefix increments.
...
http://code.google.com/p/dart/issues/detail?id=3909
Review URL: https://chromiumcodereview.appspot.com//10698092
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9393 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 10:31:33 +00:00
antonm@google.com
feea13eceb
Start emitting top-level functions.
...
R=smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10692073
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9359 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 16:21:54 +00:00
ager@google.com
8bca3e8dcb
Revert all the changes to equals operator. Causing buildbot trouble.
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10698079
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9357 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 15:39:14 +00:00
ager@google.com
544a4ed37f
Fix another test case after reemoval of eqNullB
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10704081
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9355 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 14:27:12 +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
ager@google.com
1157154fe3
Fix test after getting rid of eqNullB
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10697070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9352 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 14:06:31 +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
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
antonm@google.com
7ebe26948b
Quick fix.
...
TBR=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10705002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9178 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 16:27:05 +00:00
antonm@google.com
26681011a0
Add bailouts to dart backend.
...
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10662055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9175 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 16:06:47 +00:00
antonm@google.com
420355fb94
First take on proper dart2dart testing.
...
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10632020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9114 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:39:32 +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
floitsch@google.com
9f81c281c8
Make undefined and null equivalent.
...
Fixes issue 3328.
Review URL: https://chromiumcodereview.appspot.com//10533151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9053 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-24 19:13:57 +00:00
antonm@google.com
d3c7674269
Use correct type.
...
TBR=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10630005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8981 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 14:48:03 +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
podivilov@google.com
0e6839b3ff
First shot at source maps generation in dart2js.
...
This allows to generate a source map with begin and end positions of all functions.
Committed: https://code.google.com/p/dart/source/detail?r=8966
Review URL: https://chromiumcodereview.appspot.com//10579019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8973 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 11:45:19 +00:00
antonm@google.com
c5da3327ca
Add null check.
...
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10582038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8936 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 19:33:03 +00:00
antonm@google.com
b2c9f8e853
Add a test for operator[] unparse.
...
Review URL: https://chromiumcodereview.appspot.com//10583016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8860 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:09:51 +00:00
antonm@google.com
9634fb3c41
Add a test for empty list literal unparse.
...
R=ahe@google.com ,johnniwither@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10579017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8857 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 16:18:51 +00:00
ahe@google.com
6712466c19
Update a type annotation.
...
Review URL: https://chromiumcodereview.appspot.com//10559065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8847 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 14:06:42 +00:00
zundel@google.com
d0c8fb0d92
Migrated cascades tests from dart2js_extra into language tests
...
See issues for VM and Analyzer implementation:
http://code.google.com/p/dart/issues/detail?id=2150
http://code.google.com/p/dart/issues/detail?id=3729
Review URL: https://chromiumcodereview.appspot.com//10559064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8845 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 13:54:44 +00:00
kasperl@google.com
a1d2f0187d
Better bitwise and binary arithmetic when the left operand is known to be a primitive.
...
R=ager@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10558022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8836 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 09:23:26 +00:00
floitsch@google.com
fa3605df87
Reapply "Don't try to resolve in the builder".
...
This commits a fixed version of r8777.
Original review url: https://chromiumcodereview.appspot.com//10559031
Review URL: https://chromiumcodereview.appspot.com//10560032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8787 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 13:04:49 +00:00
ahe@google.com
1a9cbff175
Fix build breakage.
...
Review URL: https://chromiumcodereview.appspot.com//10558025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8784 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 12:06:49 +00:00
kasperl@google.com
49bf5f4a32
Fix type inference test.
...
R=ager@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10560004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8714 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 12:24:13 +00:00
kasperl@google.com
04b217c6d2
Remove frog from the repository.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10548047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8709 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 07:01:39 +00:00
kasperl@google.com
3eec57a270
Move frog/tests/{leg,leg_only,frog_native} to tests/compiler/.
...
This may not be the final resting place for these tests, but I want
to get them out of the frog directory because they really are very
valuable as tests for dart2js.
Review URL: https://chromiumcodereview.appspot.com//10536169
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8646 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 11:28:50 +00:00