mlippautz@google.com
47c8f8b3e2
Reland transformation of async functions.
...
Reland https://codereview.chromium.org/362153002/
Additions:
* Fixes for parsing async "keyword".
* Further tests.
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//423213005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38715 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 23:50:33 +00:00
mlippautz@google.com
be3e426f27
Revert async changes.
...
Revert "Transform functions marked as async"
This reverts commit 79cbaaf60143babcb29bb0ed74a0da87fd998c39.
Revert "Fix snapshot test"
This reverts commit ee892aa105daccc74c734eb18934814b76a415bb.
BUG=
Review URL: https://codereview.chromium.org//428993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38690 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 18:42:53 +00:00
mlippautz@google.com
dfc33496a4
Transform functions marked as async
...
In a nutshell:
foo(params) async { <body> return result; }
transforms to
foo(params) async {
var c = new Completer();
var async_body = () { <body> completer.complete(result); }
new Future(async_body);
return c.future;
}
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//362153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38681 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 17:16:00 +00:00
paulberry@google.com
850bd0b980
Detect invalid const constructor due to non-const initializer in field declaration.
...
BUG=dartbug.com/18780
R=scheglov@google.com
Review URL: https://codereview.chromium.org//397823004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38432 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 15:52:31 +00:00
vegorov@google.com
77c26187f2
Support allocation sinking for compound objects.
...
- Improve escape/alias analysis:
-- Storing an object into a field of another object does not mean that this object escapes (or has aliases) as long as that object does not have any loads from the same place;
-- Places like X.f and Y.f don't alias if X and Y are two different allocation instructions even if X and Y themselves potentially have aliases;
-- Improve precision of alias analysis for indexed properties;
- Support dematerialization and rematerialization of objects that are referenced by other dematerialized objects.
-- Use fix-point algorithm to collect candidates for allocation sinking;
-- Support aborting unsuccessful allocation sinking.
R=fschneider@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//395943003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38404 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 18:35:08 +00:00
iposva@google.com
727648d0e5
- Properly setup an Api scope before calling out through the API.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//394343003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38326 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 12:46:04 +00:00
scheglov@google.com
a4dee8bf4c
Resolve names in combinators for PropertyInducingElements instead of PropertyAccessorElements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//384093002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38199 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 17:11:34 +00:00
johnmccutchan@google.com
2ebd74a740
Add Uint32 representation.
...
- Add new representation: kUnboxedUint32.
- Add BinaryUint32Op, UnaryUint32Op, ShiftUint32Op instructions.
- Add new optimization pass which replaces Mint instructions with Uint32 instructions when possible.
- IA32 completed.
- ARM completed.
R=fschneider@google.com , vegorov@google.com , zra@google.com
Review URL: https://codereview.chromium.org//345563007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38198 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 17:01:02 +00:00
ahe@google.com
db23204dc8
Update status file for analyzer.
...
Review URL: https://codereview.chromium.org//394503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38195 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 15:39:45 +00:00
ahe@google.com
89949355f0
Update status file for dartium
...
Review URL: https://codereview.chromium.org//389333004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38190 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 14:05:30 +00:00
ahe@google.com
06b816d668
Fix main handling in dart2js and add tests.
...
BUG=https://code.google.com/p/dart/issues/detail?id=5683
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//285903006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38187 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 11:53:25 +00:00
fschneider@google.com
8b1319ab8a
Fix analyzer status after my previous CL.
...
The test I added is expected to produce warnings because it tests
invalid noSuchMethod overriding.
TBR=iposva@google.com
Review URL: https://codereview.chromium.org//384393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38186 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 11:16:17 +00:00
fschneider@google.com
28039cb7cc
Fix crash bug with noSuchMethod invocation and argument count mismatch.
...
When trying to invoke noSuchMethod on an object and it does not implement
noSuchMethod(i) -- with one argument, but with a mismatching number of arguments,
throw a NoSuchMethodError.
BUG=dartbug.com/12561
TEST=tests/language/regress_12561_test.dart
R=iposva@google.com
Review URL: https://codereview.chromium.org//390003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38183 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 10:06:42 +00:00
paulberry@google.com
f825cc7389
Generate compile errors for illegal uses of const Symbol constructor.
...
BUG=dartbug.com/18755
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//387003003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38163 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 18:12:03 +00:00
ricow@google.com
f5391d44e9
Remove suppression for language/dynamic_prefix_core_test/01
...
It is not failing on the bots.
Suppression was introduced in r38113 - Sigurd: maybe you missed adding a file to the changeset in that revision?
Review URL: https://codereview.chromium.org//388753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38146 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 05:26:14 +00:00
asiva@google.com
7da11812c7
Fix status file.
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//386683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38133 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 21:29:23 +00:00
asiva@google.com
71ec4d108d
The language/deferred_constraints_type_annotation_test/type_annotation_top_level'
...
test seems to timeout intermittently on the buildbot, skipping it until I
investigate the failure.
Review URL: https://codereview.chromium.org//387523003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38123 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 16:02:15 +00:00
johnniwinther@google.com
08286e9286
Fix crash for type variables with dynamic bound.
...
BUG=http://dartbug.com/19728
R=floitsch@google.com
Review URL: https://codereview.chromium.org//377413007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38119 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 13:23:59 +00:00
sigurdm@google.com
974e9adeed
Dart2dart rename unresolved getters & Make IsCheck not be a primitive
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//374413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38113 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 10:37:56 +00:00
ahe@google.com
4e45c304ba
Handle multiline interpolated strings in line-based scanner.
...
BUG=https://code.google.com/p/dart/issues/detail?id=18601
R=kasperl@google.com
Review URL: https://codereview.chromium.org//373563002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38110 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 08:39:09 +00:00
asiva@google.com
af20fc3b0a
Remove skip of
...
language/deferred_*
lib/mirrors/deferred_*
from status files for drt/dartium targets
R=hausner@google.com
Review URL: https://codereview.chromium.org//384463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38108 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 21:53:31 +00:00
floitsch@google.com
a436303adf
Fix range-analysis.
...
BUG= http://dartbug.com/19798
R=kmillikin@google.com , ngeoffray@google.com
Review URL: https://codereview.chromium.org//369833005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38029 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 16:38:51 +00:00
sigurdm@google.com
0624f9717e
Tests that inheritance of deferred classes is disallowed
...
The implementation of this constraint is implied for dart2js by Issue
177543002 (Constrain type annotations with deferred types.)
R=floitsch@google.com
Review URL: https://codereview.chromium.org//190553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38022 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 09:37:05 +00:00
asgerf@google.com
7f4ac7d27e
dart2dart: Support for inner functions in new IR.
...
In CPS, closure variables are modeled as ref cells. In tree, variables
are in scope within inner functions and closure variables are handled directly.
In Dart, a function must be declared if it has a return type or is recursive.
Therefore tree now has both FunctionExpression and FunctionDeclaration, the latter
is mainly to be used for functions that cannot occur in expression context.
The CPS also has two ways of creating functions, CreateFunction and DeclareFunction,
but here the latter is only strictly necessary for recursive function.
The CL also contains quite a bit of other code improvements that came along.
BUG=
R=kmillikin@google.com , sigurdm@google.com
Review URL: https://codereview.chromium.org//366853007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38005 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-04 10:09:16 +00:00
sigurdm@google.com
9a12541144
Handle unresolved elements in the new IR
...
Also handle static calls to identical.
It seems the renamer takes care of these - mostly we just have to not
give up.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//363113004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37977 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 08:51:17 +00:00
asgerf@google.com
139a3eff6c
Fixed static type warning annotation in rewrite_implicit_this_test.dart.
...
BUG=
Review URL: https://codereview.chromium.org//367263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37976 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 08:39:31 +00:00
asgerf@google.com
4d2066a776
dart2dart: Use implicit 'this' when generating Dart code.
...
Expressions like this.x will be printed simply as x.
The renaming phase seems to disambiguate things so x is not captured.
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//362343003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37975 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 08:06:17 +00:00
whesse@google.com
5720b9be2c
Update Android content_shell test status.
...
BUG=
R=ricow@google.com
Review URL: https://codereview.chromium.org//362323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37944 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 12:29:07 +00:00
karlklose@google.com
34417e2a46
Use List instead of Link in the type system.
...
BUG=
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//177963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37875 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 13:45:57 +00:00
sigurdm@google.com
4140b865ad
Report an error from dart2dart when deferred loading is used.
...
R=asgerf@google.com , floitsch@google.com
Review URL: https://codereview.chromium.org//362743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37867 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 12:37:20 +00:00
johnniwinther@google.com
e6d53e2796
Fix handling of type literals.
...
Continued work on https://codereview.chromium.org/355373002/
BUG=
R=asgerf@google.com , sigurdm@google.com
Review URL: https://codereview.chromium.org//359413006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37859 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 11:01:51 +00:00
sigurdm@google.com
5c2b6a6ca8
Insert missing issue number in status file.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//351773006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37808 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 08:22:04 +00:00
sigurdm@google.com
e6351830ec
Mark the bug as only failing with the new backend.
...
Review URL: https://codereview.chromium.org//358983004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37786 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 13:24:09 +00:00
sigurdm@google.com
5c060431a6
Add support for superSend to the new IR and dart backend.
...
Review URL: https://codereview.chromium.org//349923004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37783 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 11:04:01 +00:00
rmacnak@google.com
f127126ff9
Don't add the catch frame at a rethrow to the stacktrace.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//342473006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37712 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 23:01:54 +00:00
whesse@google.com
fd58ea6849
Update Android content_shell status, don't skip test that times out.
...
BUG=dartbug.com/19127
R=ricow@google.com
Review URL: https://codereview.chromium.org//353833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37689 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 11:13:06 +00:00
floitsch@google.com
8e4f3ff23e
Move validation to validate.dart and add comments.
...
R=ngeoffray@google.com
Review URL: https://codereview.chromium.org//350903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37685 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 08:29:17 +00:00
floitsch@google.com
bd996f67d6
Fix test.
...
Review URL: https://codereview.chromium.org//355623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37652 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 11:03:36 +00:00
floitsch@google.com
56f0554dcf
Avoid critical edge for loop-exits.
...
BUG= http://dartbug.com/19550
R=lrn@google.com
Review URL: https://codereview.chromium.org//331343004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37649 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 09:49:05 +00:00
whesse@google.com
8a2882831e
Update status for Android content_shell.
...
BUG=dartbug.com/19127
R=ricow@google.com
Review URL: https://codereview.chromium.org//333933004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37646 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 09:17:22 +00:00
hausner@google.com
f58745f751
Fix parsing and resolving of prefixed names
...
R=regis@google.com
Review URL: https://codereview.chromium.org//352523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37631 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 23:26:26 +00:00
asgerf@google.com
bd3255ed6a
dart2dart: Support for all constants in new backend.
...
Adds support for:
- Type literals
- By-value reference to top-level or static function
- Const constructor invocation inside const literal list or map
Nested const expressions are linearized to LetPrims, and we rely on the dart_tree to inline all primitives (since non-const variable references may not occur in a const expression).
There are still a bunch of constants that we support but don't actually treat as constants. Reference to top-level constants are still treated as a getter invocations, for instance.
We bail out on local constant declarations since they must either be inlined at multiple places or we must generate a constant declaration for them.
BUG=
R=kmillikin@google.com , sigurdm@google.com
Review URL: https://codereview.chromium.org//348053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37585 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 08:46:08 +00:00
floitsch@google.com
a8c4502e23
Fix crash when a closure self-referenced in a try.
...
In host-checked mode dart2js would crash when a nested function would reference itself again inside a try/catch.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//308283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37488 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-19 12:12:46 +00:00
fschneider@google.com
1657f150f1
Fix our initial dead phi elimination in the presence of try-catch.
...
BUG=dartbug.com/19519
TEST=tests/language/try_catch_optimized4_test.dart
R=vegorov@google.com
Review URL: https://codereview.chromium.org//340113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37444 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 14:27:45 +00:00
fschneider@google.com
941ffb9a52
Enable OSR optimization for functions with try-catch.
...
This is working. I added and extended tests to cover the
different cases where OSR can occur (inside/outside try/catch)
BUG=dartbug.com/16313,dartbug.com/17442
R=srdjan@google.com
Review URL: https://codereview.chromium.org//335793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37441 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 09:16:25 +00:00
ahe@google.com
6cec85e824
Improve parser error recovery.
...
For example:
BEFORE:
$ ./sdk/bin/dart2js tests/co19/src/Language/07_Classes/07_Classes_A02_t24.dart
tests/co19/src/Language/07_Classes/07_Classes_A02_t24.dart:51:1:
Error: Expected ';', but got 'EOF'.
^^
Error: Compilation failed.
./sdk/bin/dart2js tests/co19/src/Language/07_Classes/1_Instance_Methods/2_Operators_A02_t06.dart
tests/co19/src/Language/07_Classes/1_Instance_Methods/2_Operators_A02_t06.dart:25:1:
Error: Expected ';', but got 'EOF'.
^^
Error: Compilation failed.
$ ./sdk/bin/dart2js keyword_type_expression_test.dart
keyword_type_expression_test.dart:8:1:
Error: Can't have modifier 'KeywordToken(in)' here.
Try replacing modifier 'KeywordToken(in)' with 'var', 'final', or a type.
in greeting = "fisk"; /// 01: compile-time error
^^
keyword_type_expression_test.dart:11:1:
Error: 'in' is a reserved word and can't be used here.
Try using a different name.
in greeting /// 02: compile-time error
^^
keyword_type_expression_test.dart:11:4:
Error: Expected ')', but got 'greeting'.
in greeting /// 02: compile-time error
^^^^^^^^
Error: Compilation failed.
AFTER (added periods to preserve alignment in Rietveld):
$ ./sdk/bin/dart2js tests/co19/src/Language/07_Classes/07_Classes_A02_t24.dart
tests/co19/src/Language/07_Classes/07_Classes_A02_t24.dart:43:31:
Error: Missing ';'.
..static final v = null, vv = 1
..............................^
Error: Compilation failed.
$ ./sdk/bin/dart2js tests/co19/src/Language/07_Classes/1_Instance_Methods/2_Operators_A02_t06.dart
tests/co19/src/Language/07_Classes/1_Instance_Methods/2_Operators_A02_t06.dart:16:18:
Error: Missing ';'.
..operator =(x) {}
.................^
Error: Compilation failed.
$ ./sdk/bin/dart2js tests/language/keyword_type_expression_test.dart
tests/language/keyword_type_expression_test.dart:8:1:
Error: Can't have modifier 'in' here.
Try replacing modifier 'in' with 'var', 'final', or a type.
in greeting = "fisk"; /// 01: compile-time error
^^
tests/language/keyword_type_expression_test.dart:11:1:
Error: 'in' is a reserved word and can't be used here.
Try using a different name.
in greeting /// 02: compile-time error
^^
Error: Compilation failed.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//324293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37439 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 07:50:25 +00:00
zra@google.com
419dce3183
Fixes field access on MIPS for classes with many fields.
...
This mirrors yesterday's fix for ARM.
R=regis@google.com
Review URL: https://codereview.chromium.org//338353005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37419 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 20:44:24 +00:00
fschneider@google.com
e169c20859
Fix bug in ARM instance field stores.
...
A large number of fields resulted in wrong offset
computation for the generated code for stores.
BUG=dartbug.com/19649
TEST=tests/language/large_class_declaration_test.dart
R=zra@google.com
Review URL: https://codereview.chromium.org//339593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37389 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 09:28:24 +00:00
whesse@google.com
7b293c6a92
Disable android content_shell timing out tests.
...
BUG=
Review URL: https://codereview.chromium.org//338773003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37352 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 09:49:22 +00:00
hausner@google.com
e1f2c03aab
Skip deferred load tests on Dartium until loader is fixed.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//336883003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37336 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 23:47:49 +00:00