Commit Graph

4835 Commits

Author SHA1 Message Date
sra@google.com 56076c00da Parse more properties of native code fragments.
';' is now a separator rather than a terminator.

Add properties for:
- throwing behaviour
- allocation (fresh unaliased object)
- gvn

These are currently unused.
I have a separate CL in preparation with a better throwing behaviour

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1034263002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44947 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 20:53:41 +00:00
sigurdm@google.com f328d3f997 Fix bug in dart2js async rewrite
In some cases where a transform of yield and await was not needed, the old nodes were reused - instead they should have been visited to
allow renaming and rewrite of `this`.

BUG= dartbug.com/23058
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1060293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44933 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 12:06:46 +00:00
sra@google.com 206671dfb7 Add 'toString' method to NativeBehavior
TBR=floitsch@google.com

Review URL: https://codereview.chromium.org//1053053003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44869 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-02 20:15:27 +00:00
sra@google.com c7e5344b9f "Redo "Avoid getInterceptor calls in cases were the interceptor would be constant if it were not null." agains.
TBR=floitsch@google.com

Review URL: https://codereview.chromium.org//1058433003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44858 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-02 02:59:47 +00:00
sra@google.com 9456ce82b5 Revert "Redo "Avoid getInterceptor calls in cases were the interceptor would be constant if it were not null.""
Will delete unused API.

TBR=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//1050363002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44857 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-02 02:49:53 +00:00
sra@google.com d4a1b47e98 Redo "Avoid getInterceptor calls in cases were the interceptor would be constant if it were not null."
TBR=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//1057753002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44856 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-02 01:44:05 +00:00
sra@google.com b1315659b5 Revert "Avoid getInterceptor calls in cases were the interceptor would be constant if it were not null."
TBR=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//1050343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44855 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-02 01:33:08 +00:00
sra@google.com c96493e219 Avoid getInterceptor calls in cases were the interceptor would be constant if it were not null.
Example:

    gap = J.getInterceptor$x(style).get$columnGap(style);
-->
    gap = (style && C.CssStyleDeclaration_methods).get$columnGap(style);

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1031633003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44853 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-02 00:59:25 +00:00
herhut@google.com 557d7f5ec9 Also intialize methods inherited from mixin classes.
BUG= http://dartbug.com/23056
R=zarah@google.com, floitsch@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1057513002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44832 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-01 13:15:01 +00:00
zarah@google.com db854e1148 dart2js: emit info on lazy fields in array.
R=herhut@google.com

Review URL: https://codereview.chromium.org//999933007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44830 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-01 11:07:34 +00:00
het@google.com 7f97883c8d Emit diagnostics for bad NSM implementations
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1023673012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44808 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 17:11:26 +00:00
johnniwinther@google.com 8cd443241a Handle NewExpression in SemanticSendVisitor.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1043723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44800 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 10:02:55 +00:00
herhut@google.com 32a9974aef Do not include names of lazy globals in minified mode.
BUG=
R=zarah@google.com

Review URL: https://codereview.chromium.org//1022103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44777 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 10:36:31 +00:00
zarah@google.com 14836d31f2 dart2js: remove first argument from lazy function.
R=herhut@google.com

Committed: https://code.google.com/p/dart/source/detail?r=44660

Reverted: https://code.google.com/p/dart/source/detail?r=44665

Review URL: https://codereview.chromium.org//1029003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44776 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 08:19:27 +00:00
herhut@google.com faa03376b4 Clean up naming scheme for reflection names.
BUG= http://dartbug.com/22987
R=ahe@google.com

Committed: https://code.google.com/p/dart/source/detail?r=44732

Reverted: https://code.google.com/p/dart/source/detail?r=44733

Review URL: https://codereview.chromium.org//1040623002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44736 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 14:43:02 +00:00
karlklose@google.com ce95110c52 Change type annotation buildInvokeConstructorInvocation.
The Dart backend uses the type directly to reconstruct malformed constructor calls and the JavaScript backend will generate code to throw an exception when encountering an ErroneousElement as target.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1036263002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44735 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 14:11:49 +00:00
herhut@google.com 363b144eae Revert "Clean up naming scheme for reflection names."
This reverts commit r44732.

BUG=
TBR=ahe@google.com

Review URL: https://codereview.chromium.org//1039223002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44733 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 13:38:50 +00:00
herhut@google.com 7719901f37 Clean up naming scheme for reflection names.
BUG= http://dartbug.com/22987
R=ahe@google.com

Review URL: https://codereview.chromium.org//1040623002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44732 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 12:28:04 +00:00
herhut@google.com 7bb03d31d9 Move set-membership based containment test behind a flag.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1037223002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44731 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 10:54:57 +00:00
johnniwinther@google.com 726265c92c Fix type annotation for deferred constants.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org//1033213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44730 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 10:26:47 +00:00
sra@google.com d216759d16 Fix printing of HConstant
Avoid the assert in ConstantValue.toString()

BUG=

Review URL: https://codereview.chromium.org//1036873004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44715 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 17:52:14 +00:00
johnniwinther@google.com db93e02d2c Implement ResolvedVisitor using SemanticSendVisitor.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1030103004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44711 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 14:49:24 +00:00
karlklose@google.com 43e52e2162 cps-ir: Set runtime type information for new objects that require it.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1011403003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44708 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 10:27:32 +00:00
floitsch@google.com 14ddfb7aac dart2js: Optimize Function.apply for 0-3 argument calls.
R=sra@google.com

Review URL: https://codereview.chromium.org//1032013002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44704 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 23:21:23 +00:00
sra@google.com ab8f0bb4ec dart2js: permit generation of conditionals as arguments of allocations.
Example:

    t1 = onError == null ? 1 : 3;
    this._addListener$1(new P._FutureListener(null, result, t1, f, onError));
-->
    this._addListener$1(new P._FutureListener(null, result, onError == null ? 1 : 3, f, onError));

R=herhut@google.com

Review URL: https://codereview.chromium.org//1031993002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44696 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 20:18:29 +00:00
sigurdm@google.com 2008f189ad Rename the inner function of async functions.
Before they were all named `body`, now they have the same name as their
enclosing function.

BUG= dartbug.com/22942
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1018393003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44682 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 12:37:47 +00:00
zarah@google.com bb0a3b8216 dart2js: rename and refactor reflection_data_parser.
This change does not affect the generated output.

R=herhut@google.com

Review URL: https://codereview.chromium.org//1024523003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44681 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 08:50:43 +00:00
het@google.com 790d5e3ae4 Fix check for throwing NSM implementations.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1005873009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44678 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 01:01:28 +00:00
zarah@google.com 3e7cb1ca3d Revert "dart2js: remove first argument from lazy function."
This reverts commit r44660.

BUG=

Review URL: https://codereview.chromium.org//1026353002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44665 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 13:39:58 +00:00
herhut@google.com 3644473d58 Remove NSM if followed by a foreign with same effect.
BUG=
R=floitsch@google.com, sra@google.com

Committed: https://code.google.com/p/dart/source/detail?r=44661

Reverted: https://code.google.com/p/dart/source/detail?r=44662

Review URL: https://codereview.chromium.org//1010433004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44663 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 12:30:10 +00:00
herhut@google.com 6c456f3faa Revert "Remove NSM if followed by a foreign with same effect."
This reverts revision 44661.

BUG=
TBR=karlklose@google.com

Review URL: https://codereview.chromium.org//1026333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44662 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 12:04:40 +00:00
herhut@google.com 06f7b5aa13 Remove NSM if followed by a foreign with same effect.
BUG=
R=floitsch@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1010433004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44661 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 11:32:28 +00:00
zarah@google.com 9760e1ad33 dart2js: remove first argument from lazy function.
R=herhut@google.com

Review URL: https://codereview.chromium.org//1029003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44660 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 11:31:23 +00:00
johnniwinther@google.com fd41ebe4f6 Implement new flatten specification.
BUG=http://dartbug.com/22921
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1035443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44659 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 11:28:30 +00:00
herhut@google.com 63b52a596b Remove setFixedBackendName method from Element.
BUG=
TBR=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1033613003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44657 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 10:41:09 +00:00
herhut@google.com 361e855200 Do not use the namer for naming closure elements.
BUG=
R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=44594

Revetered: https://code.google.com/p/dart/source/detail?r=44596

Review URL: https://codereview.chromium.org//1009053005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44656 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 09:40:00 +00:00
het@google.com c3c4586a56 Don't bailout of type inference for simple NSM implementations
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1020853007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44651 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 00:10:54 +00:00
johnniwinther@google.com 94d30c2f27 Refactor IrBuilder to use SemanticVisitor.
BUG=
R=floitsch@google.com, karlklose@google.com

Review URL: https://codereview.chromium.org//1004683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44628 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 08:03:27 +00:00
het@google.com c90a6adc65 Don't generate invocation mirror code if all noSuchMethods forward to
Object.noSuchMethod

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1020853004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44606 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 18:19:01 +00:00
herhut@google.com 3f6cc0127f Split HForeign into HForeignCode and abstract base class.
BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1020853003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44602 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 13:00:46 +00:00
asgerf@google.com 4ff35364bd cps-ir: Do not propagate assignments into try.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1000813003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44600 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 10:14:47 +00:00
sra@google.com 847bd37ce0 Redo "Use an explicit 'this' parameter instead of 'This' nodes."
BUG=

Review URL: https://codereview.chromium.org//1021813002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44599 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 10:10:58 +00:00
herhut@google.com d4b8a98034 Revert "Do not use the namer for naming closure elements."
This reverts revision 44594.

BUG=
TBR=karlklose@google.com

Review URL: https://codereview.chromium.org//1022023002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44596 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 09:10:24 +00:00
johnniwinther@google.com fe9cf5a1bf Update SemanticVisitor with visitIndex, visitSuperIndex
... and add mixins in preparation for IrBuilder implementation based in SemanticVisitor.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1001863003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44595 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 08:51:58 +00:00
herhut@google.com d6779d36a6 Do not use the namer for naming closure elements.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1009053005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44594 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 08:41:40 +00:00
sra@google.com 77e8e513fc Revert "Use an explicit 'this' parameter instead of 'This' nodes."
Review URL: https://codereview.chromium.org//1018403002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44581 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 18:01:02 +00:00
sra@google.com a553590de4 Use an explicit 'this' parameter instead of 'This' nodes.
An explicit parameter makes it possible to visit all uses of 'this', for example, to change to a calling convention where the receiver is passed as an explicit argument.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1011383003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44578 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 17:09:20 +00:00
het@google.com 302048ecca Revert "Don't generate forwarding hooks if all noSuchMethod implementations"
This reverts commit r44575.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1019903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44576 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 16:44:37 +00:00
het@google.com cfb96163dc Don't generate forwarding hooks if all noSuchMethod implementations
forward to Object.noSuchMethod

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//996263002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44575 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 16:01:23 +00:00
herhut@google.com 34b6869777 Abort tracing in type inference in the presence of await.
BUG= http://dartbug.com/22868 http://dartbug.com/22895
R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=44555

Reverted: https://code.google.com/p/dart/source/detail?r=44556

Review URL: https://codereview.chromium.org//1013803006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44573 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 13:21:29 +00:00