fschneider@google.com
2693c71850
Inline [] operator on one-byte strings.
...
str[i] is translated into
temp = str.charCodeAt(i)
result = StringFromCharCode(temp);
The existing code for charCodeAt is reused and contains
the necessary range class id and range check.
Review URL: https://codereview.chromium.org//11416129
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15246 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:06:52 +00:00
regis@google.com
c2b4cccaee
Ambiguous type references require a compile time error in some special cases
...
(fix issue 6741).
Review URL: https://codereview.chromium.org//11348188
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15233 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 00:14:08 +00:00
scheglov@google.com
44c2dbfc4a
Fix dartc status
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15232 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 23:10:42 +00:00
hausner@google.com
5df36f0533
Fix more dart status
...
Review URL: https://codereview.chromium.org//11421042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15229 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 22:40:24 +00:00
hausner@google.com
59ab0c5fb4
Fix dartc status
...
Dartc does not support abstract methods that aren't
explicitly declared abstract.
Review URL: https://codereview.chromium.org//11413128
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15227 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 21:46:35 +00:00
hausner@google.com
abfdec2880
Eliminate explicit abstract from class members in tests
...
Review URL: https://codereview.chromium.org//11415105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15220 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 20:12:53 +00:00
fschneider@google.com
bf1fbb1296
Fix dart2dart and dartc test status for a recently enabled test.
...
BUG=dart:643, dart:1533
Review URL: https://codereview.chromium.org//11415095
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15197 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 12:31:23 +00:00
fschneider@google.com
a16afb4a27
Correct file names for tests in tests/language to run them in test.py.
...
Those tests were previously not run because of the missing _test suffix.
Changed the test expectations for type_variable_shadows_class_test until
it is fixed.
Corrected syntax error in optimized_lists.dart and removed invalid
expectation from mint_arithmetic_test.dart.
Added failing tests to the status file with the corresponding issue #.
Split double_to_string_test into two files where one contains all the
ones failing with dart2js.
BUG=dart:643,dart:1533
Review URL: https://codereview.chromium.org//11316108
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15193 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 11:15:36 +00:00
scheglov@google.com
62f9fea6ab
Issue 6283. Support type literals as expressions.
...
http://code.google.com/p/dart/issues/detail?id=6283
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//11316096
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15173 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 18:59:53 +00:00
ngeoffray@google.com
7a0f3e5eaa
Fix bad assumption of environment builder when it comes to nested loops: blocks inside a loop would not get the loop markers of its header. Instead, stack up loop markers when visiting the graph and pop them when being visited.
...
Review URL: https://codereview.chromium.org//11411068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15164 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 17:49:31 +00:00
karlklose@google.com
d2dbd01a0f
Support type literals as compile-time constants.
...
Review URL: https://codereview.chromium.org//11299009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15154 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:43:27 +00:00
erikcorry@google.com
84da84c22d
Revert "Add some support for the code-point code-unit distinction."
...
This reverts commit r15150
R=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//11411092
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com
547cbf9da6
Add some support for the code-point code-unit distinction.
...
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.
R=floitsch@google.com
BUG=
Review URL: https://codereview.chromium.org//11368138
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +00:00
lrn@google.com
22309b260c
Remove NullPointerException.
...
Accessing non-existing members on null now throws NoSuchMethodError.
Throwing a null value fails by throwing a NullThrownError.
Methods checking for null now generally throw new ArgumentError(null).
Committed: https://code.google.com/p/dart/source/detail?r=15061
Review URL: https://codereview.chromium.org//11415028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15136 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 09:21:52 +00:00
ngeoffray@google.com
68dd220bfc
Fix a crash in the compiler where an ssa instruction was using itself.
...
Review URL: https://codereview.chromium.org//11420060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15089 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 16:15:03 +00:00
ngeoffray@google.com
c2c0427204
Fix bug in dart2js where the return type in a bailout version was not registered.
...
Review URL: https://codereview.chromium.org//11414057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15079 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 13:53:22 +00:00
lrn@google.com
3450798a1d
Make Exception a class, not an interface, and remove the const constructor.
...
We should consider removing the constructor entirely, there is never a good excuse for throwing a non-descript Exception. If you do, it should likely be an Error instead.
Review URL: https://codereview.chromium.org//11369243
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15077 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 13:23:23 +00:00
lrn@google.com
0c8dce77f1
Revert "Remove NullPointerException."
...
Crashes in the x64 VM.
Review URL: https://codereview.chromium.org//11417058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15065 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 09:59:59 +00:00
lrn@google.com
ccc59f024f
Fixing file accidentally reverted when renaming it.
...
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//11299070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15062 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 09:05:10 +00:00
lrn@google.com
e211c2f0ee
Remove NullPointerException.
...
Accessing non-existing members on null now throws NoSuchMethodError.
Throwing a null value fails by throwing a NullThrownError.
Methods checking for null now generally throw new ArgumentError(null).
Review URL: https://codereview.chromium.org//11415028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15061 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 08:51:49 +00:00
ngeoffray@google.com
9ae8f3b4e1
Forgot to change the condition to be true in a do/while loop that has phi updates: the condition has already been evaluated.
...
Review URL: https://codereview.chromium.org//11419056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15059 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 07:32:26 +00:00
ngeoffray@google.com
503c71cdd5
Use the constant system to do a subtype type in the compile time constant handler. This is needed because of how we treat int and double specially.
...
Review URL: https://codereview.chromium.org//11419037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15014 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 16:36:14 +00:00
ngeoffray@google.com
dd9ff17708
Fix this longstanding bug that luckily did not bite us yet: Use Class.prototype.foo$bailout.call(this, ...) to call a bailout method instead of this.foo$bailout to avoid executing the bailout method of a subclass.
...
Review URL: https://codereview.chromium.org//11416007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15008 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 11:56:18 +00:00
karlklose@google.com
cdbf6e2a0a
Do not canonicalize Type instances.
...
Review URL: https://codereview.chromium.org//11417005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15000 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 08:33:35 +00:00
hausner@google.com
f9ab2fdf78
Disallow const native factories
...
We removed the only user of const native factory methods, so remove
the hack in the VM.
Issue 6662.
Review URL: https://codereview.chromium.org//11414019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14993 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 00:57:09 +00:00
ahe@google.com
a0d271a22c
Clean up operator names.
...
Review URL: https://chromiumcodereview.appspot.com//10905211
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14942 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 07:41:51 +00:00
ahe@google.com
6e6a322f4f
Track the origin element of inlined arguments to super constructor.
...
Review URL: https://codereview.chromium.org//11364212
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14941 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 07:02:25 +00:00
ahe@google.com
e004d21e19
Fix a couple of bugs in handling of factory redirections.
...
Review URL: https://codereview.chromium.org//11312245
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14940 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 06:34:50 +00:00
hausner@google.com
7eb3efc2ba
Fix native argument handling
...
Native functions need to fetch arguments differently if they are
called through a closure.
fixes issue 6696.
Review URL: https://codereview.chromium.org//11293290
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14937 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 01:14:01 +00:00
regis@google.com
8af5f5e418
Fix result type checking of redirecting factory in checked mode (issue 6596).
...
Review URL: https://codereview.chromium.org//11404004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14916 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 19:56:39 +00:00
ahe@google.com
d5aab7542d
Reword an error message, and test that the error is produced.
...
Review URL: https://codereview.chromium.org//11377155
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14889 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:16:03 +00:00
regis@google.com
7614e956dc
Check result type of redirecting factory in checked mode.
...
Review URL: https://codereview.chromium.org//11369219
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14862 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 19:02:08 +00:00
lrn@google.com
87eec0ef1f
Revert "Exception no longer an interface."
...
Broke more than expected.
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//11364216
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14848 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 14:04:19 +00:00
lrn@google.com
def3ee60a5
Exception no longer an interface.
...
Some tests disabled due to dartbug.com/6697
Review URL: https://codereview.chromium.org//11365226
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14847 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 13:42:51 +00:00
ngeoffray@google.com
7e53cbe71e
Update test expectations for dart2dart and drt.
...
Review URL: https://codereview.chromium.org//11366219
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14846 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 13:18:50 +00:00
ngeoffray@google.com
a742983dd5
Start new design for interceptors and implement String.charCodeAt with it.
...
Review URL: https://codereview.chromium.org//11365170
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14845 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 12:59:53 +00:00
ajohnsen@google.com
ab69873a42
Make RegExp constructor non-const.
...
Another take of https://codereview.chromium.org/11410033/ with status changes applied for co19 tests.
BUG=
Review URL: https://codereview.chromium.org//11369210
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14837 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:18:06 +00:00
ajohnsen@google.com
ec9fee9858
"Reverting 14829-14832"
...
BUG=
Review URL: https://codereview.chromium.org//11312203
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14833 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 07:28:13 +00:00
ajohnsen@google.com
8dc3edd7ce
Make RegExp's constructor non-const.
...
BUG=
Review URL: https://codereview.chromium.org//11410033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14829 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 06:48:43 +00:00
vegorov@google.com
f46860b868
Eradicate CallSiteInliner::next_ssa_temp_index_.
...
It should always be equal to the max SSA temp index stored on the caller graph itself. Thus it is redundant and dangerous to store it in two places.
R=kmillikin@google.com
BUG=
Review URL: https://codereview.chromium.org//11312200
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14827 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 00:50:57 +00:00
fschneider@google.com
8aa175b9e6
Restrict immediate operands to smi where only smis are supported.
...
Re-enable redundant phi elimination.
Add x64 codegen templates and assembler instructions for immediate operands.
Fix x64 assembler for imull when using r8-r15.
Add x64 instruction for imulq(reg, imm).
Fix x64 disassembler printing of immediates.
Review URL: https://codereview.chromium.org//11362210
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14814 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:44:34 +00:00
hausner@google.com
b2cbdba375
Remove named function literals from library and tests
...
Start eliminating old-style function literals, i.e. remove
return type and function names.
Enforcing new style function literal syntax can be turned
on with the vm flag --strict_function_literals.
Review URL: https://codereview.chromium.org//11377102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14805 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 19:55:11 +00:00
floitsch@google.com
8e6f238f86
a === b -> identical(a, b)
...
Replace === null with == null.
BUG=http://dartbug.com/6380
Review URL: https://codereview.chromium.org//11361190
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +00:00
lrn@google.com
e6221b1278
Set VM language/gc_test to "Pass, Fail".
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//11361215
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14782 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 10:10:46 +00:00
scheglov@google.com
d27580a5ca
Issue 6578. Report warning, not error for static/instance getter/setter mismatch
...
http://code.google.com/p/dart/issues/detail?id=6578
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//11358187
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14772 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-10 00:43:05 +00:00
regis@google.com
1946c5d29e
Disable new test in checked mode for dart2js.
...
Review URL: https://codereview.chromium.org//11361199
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14770 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-10 00:10:23 +00:00
regis@google.com
40276f8c30
Fix result type checking of factory constructors of generic classes in VM.
...
Add a language test.
Fix some language tests.
Fix runtime library.
Note: This does not yet fix result checking of redirecting factories.
Review URL: https://codereview.chromium.org//11369168
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14769 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 23:51:06 +00:00
fschneider@google.com
b866c114d1
Correct test status of arithmetic_test for dart2dart.
...
It is only expected to fail with dart2js.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//11410013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14759 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 21:22:36 +00:00
fschneider@google.com
a42474ba37
Reland: Improve smi shift operations and avoid repeated deoptimizations.
...
This CL includes a bug fix where a NULL check of the pc was missing.
Also change the dart2js test status of arithmetic_test from Skip to Fail.
Review URL: https://codereview.chromium.org//11369158
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14755 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 19:54:55 +00:00
johnniwinther@google.com
e4e50abc57
Library name added to test.
...
Review URL: https://codereview.chromium.org//11363165
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14739 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 13:15:00 +00:00