floitsch@google.com
232fbebdfa
Don't lose the expected precedence during && compilation.
...
When transforming if (foo) bar; to foo && bar make sure that
bar is compiled with the correct precedence.
In particular avoid foo && toto = 499;
instead of
foo && (toto = 499).
Fixes issue 3862.
Review URL: https://chromiumcodereview.appspot.com//10669035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9157 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 11:40:55 +00:00
ahe@google.com
7b31e54ab7
Implement override checks.
...
First attempt committed as: https://code.google.com/p/dart/source/detail?r=9108
Review URL: https://chromiumcodereview.appspot.com//10575033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9151 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 09:07:36 +00:00
johnniwinther@google.com
e7dbe0306b
Avoid passing a null uri to translateUri.
...
This happens when reportDiagnostic is called from readScript.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10629002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9150 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 08:17:42 +00:00
floitsch@google.com
cf1ed8e24f
Fix assert.
...
Review URL: https://chromiumcodereview.appspot.com//10660027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9120 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:27:32 +00:00
floitsch@google.com
f1147e96b0
Transitively mark inputs as live when they are generateAtUseSite.
...
Review URL: https://chromiumcodereview.appspot.com//10667013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9119 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:14:16 +00:00
antonm@google.com
38bf8c295b
Revert "Implement override checks."
...
TBR=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10666052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9112 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:36:00 +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
ahe@google.com
7f2041bf11
Implement override checks.
...
Review URL: https://chromiumcodereview.appspot.com//10575033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9108 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 12:51:55 +00:00
podivilov@google.com
fb79a6c50b
Use JSON.printOn in SourceMapBuilder.
...
R=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10636003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9100 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 07:52:02 +00:00
antonm@google.com
e5e06b0f87
Process all resolver treeshaked elements in Dart backend.
...
For now the processing is a simple unparse validation.
Review URL: https://chromiumcodereview.appspot.com//10633006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9078 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:41:05 +00:00
antonm@google.com
aace7e9ec9
Place more guards for the cases which should be covered.
...
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10632019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9076 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:22:26 +00:00
floitsch@google.com
52154a86d8
Don't transform interceptors into dynamic invocations for null.
...
Fixes issue 3857
Review URL: https://chromiumcodereview.appspot.com//10660007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9062 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 14:01:55 +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
sgjesse@google.com
77cd2824be
Make sure that constructor bodies are added to the resolver
...
R=ahe@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10642017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9030 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 11:50:41 +00:00
whesse@google.com
54a975816d
Fix dart2js mock of dart:io, to incorporate new File.fromPath and Directory.fromPath.
...
BUG=
TEST=tools/test.py -cdart2js -rd8 standalone/io/file_test
Review URL: https://chromiumcodereview.appspot.com//10634027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9029 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 11:45:00 +00:00
antonm@google.com
d4c4113bc8
Propagate canUseNative flag to synthesized library.
...
That allows to unparse natives.
R=ahe@google.com ,smok@google.com
Review URL: https://chromiumcodereview.appspot.com//10638005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9026 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 10:54:00 +00:00
ager@google.com
64e847a8cc
Minor tweaks to the bitops builtin checks.
...
R=kasperl@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10642018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9020 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 09:57:42 +00:00
sgjesse@google.com
9ab265364b
Improve tracking of the type of fields after object construction
...
Based on the guarenteed types a field is initialized to in both the
initializer lists and constructor bodies give an optimistic type for
this field. Based on all the field setters and invoked setters for
that field turn this optimistic type into either a propagated type or
a guarenteed type.
R=kasperl@google.com , floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10638013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9019 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 09:29:41 +00:00
iposva@google.com
0fd25118b9
- Move the Timer interface to the dart:isolate library so that it
...
is accessible from both client and standalone program.
- Enable a way for the embedder to provide the implementation of
the Timer interface.
- Update tests.
Review URL: https://chromiumcodereview.appspot.com//10532123
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8987 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 16:17:21 +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
podivilov@google.com
a15a5c72a4
Revert "First shot at source maps generation in dart2js."
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8970 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 10:47:00 +00:00
ager@google.com
46a694f4ab
Relax the type requirements for using the builtin bitops.
...
Numbers is enough it does not have to be integers.
R=kasperl@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10624003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8967 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 10:25:19 +00:00
podivilov@google.com
5b15383056
First shot at source maps generation in dart2js.
...
This allows to generate a source map with begin and end positions of all functions.
Review URL: https://chromiumcodereview.appspot.com//10579019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8966 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 10:13:19 +00:00
floitsch@google.com
3d5769cc8b
Remove static fields in the namer.
...
Review URL: https://chromiumcodereview.appspot.com//10574046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8965 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 09:35:08 +00:00
sgjesse@google.com
0192db763e
Refactor the collection of initializer list types
...
Instead of storing a boolean to indicate whether a field is only
intialized to an integer store the propagated type instead. If
different types are encountered for the same field indicate this with
HType.UNKNOWN.
Also fix a bug in the checking, as potential single type initializers
is not the same as known single type initializers.
This is in preparation for information on other types than integers.
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10584009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8963 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 08:51:24 +00:00
sgjesse@google.com
c538b0f11e
Remove fromActivation marker from HFieldGet/Set
...
With the introduction of HLocalGet/Set it is not used any more.
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10579039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8961 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 06:59:09 +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
whesse@google.com
c5d1431241
Add Path class to dart:io, add tests for it to standalone/io.
...
Just a preliminary implementation - make suggestions for changes.
BUG=
TEST=standalone/io/path_test
Review URL: https://chromiumcodereview.appspot.com//10417053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8909 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 15:21:01 +00:00
karlklose@google.com
4dfab6c028
Treat stack overflows specially when reporting unhandled exceptions.
...
Review URL: https://chromiumcodereview.appspot.com//10583033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8908 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 15:00:40 +00:00
ager@google.com
bf7163f1a6
Reapply: Use GVN for length loads from arrays and strings.
...
- Fix bug in variable allocation.
- Treat all HCheck instructions the same when it comes to GVN. They do not have side-effects.
Changes since last version:
- give HTypeConversion a typeCode and implement typeEquals and dataEquals.
- clear side effects for array and string loads when enabling GVN.
R=floitsch@google.com ,kasperl@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10559081
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8905 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 12:52:26 +00:00
karlklose@google.com
47d73a7c86
Add a typeannotation and a missing argument to remove warnings.
...
Review URL: https://chromiumcodereview.appspot.com//10575030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8904 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 12:37:31 +00:00
ager@google.com
2da4a051f9
Revert GVN changes while investigating
...
R=kasperl@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10578038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8901 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 12:07:39 +00:00
ager@google.com
882d355f03
Use GVN for length loads from arrays and strings.
...
- Fix bug in variable allocation.
- Treat all HCheck instructions the same when it comes to GVN. They do not have side-effects.
R=floitsch@google.com ,kasperl@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10573027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8900 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:48:28 +00:00
floitsch@google.com
a51dc25968
Make isUtc a getter, change some method names in Date. Weekday is now 1 based.
...
isUtc is now a getter.
Date.hours -> Date.hour
Date.minutes -> Date.minute
Date.seconds -> Date.second
Date.milliseconds -> Date.millisecond
Date.fromEpoch -> Date.fromMillisecondsSinceEpoch
Date.value -> Date.millisecondsSinceEpoch
Date.MON == 1 (up to Date.SUN == 7).
Fixes issue 3444, 1985.
Review URL: https://chromiumcodereview.appspot.com//10538105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8899 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:43:46 +00:00
ahe@google.com
70489d4d0d
Ensure uniqueness of global names.
...
Review URL: https://chromiumcodereview.appspot.com//10581036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8896 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:16:38 +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
antonm@google.com
6cfca5fd94
Fix checked mode after r8854.
...
TBR=floitsh@google.com
Review URL: https://chromiumcodereview.appspot.com//10580018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8861 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:24:21 +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
floitsch@google.com
11e613aadb
Introduce HLocalValue and HLocalGet/Set.
...
Review URL: https://chromiumcodereview.appspot.com//10562041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8854 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 15:56:50 +00:00
ahe@google.com
965676d7af
Don't crash when a file is missing.
...
Review URL: https://chromiumcodereview.appspot.com//10572014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8844 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 13:49:10 +00:00
ahe@google.com
caa708cddb
Update dart2js to use diagnostic kinds.
...
Review URL: https://chromiumcodereview.appspot.com//10579015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8843 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 13:48:13 +00:00
kasperl@google.com
de84f6d23b
Postpone the argument type optimizations until the types are stable.
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10579014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8842 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 13:47:49 +00:00
floitsch@google.com
5566ee440c
Remove old code.
...
Review URL: https://chromiumcodereview.appspot.com//10559044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8838 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 11:33:50 +00:00
ahe@google.com
73b5ce042c
Fix a bug in type assertions involving String supertypes.
...
Review URL: https://chromiumcodereview.appspot.com//10574015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8837 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 10:53:21 +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
ngeoffray@google.com
aec0563c39
Revert r8800 some web tests are failing.
...
Review URL: https://chromiumcodereview.appspot.com//10544209
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8806 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 16:37:53 +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
ngeoffray@google.com
5afea1070a
Generate nested else if:
...
if (a) {
} else if () {
}
instead of:
if (a) {
} else {
if () {
}
}
Review URL: https://chromiumcodereview.appspot.com//10541173
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8800 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 15:55:25 +00:00