Commit Graph

122 Commits

Author SHA1 Message Date
floitsch@google.com 79ae635658 dart2js: don't pass the supername to visitFields.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42247 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 16:09:15 +00:00
ahe@google.com 29356bf94a Incremental compilation of new lazy statics.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42243 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 14:15:56 +00:00
johnniwinther@google.com a4eaf84c1d Generate typedef node from the element.
BUG=
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42238 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 09:17:40 +00:00
johnniwinther@google.com 82e12821d0 Fix crash in typechecker
BUG=http://dartbug.com/21793
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42236 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 08:29:32 +00:00
ahe@google.com 5a35c6fd0e Incremental compiler: support optional arguments.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42235 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 08:08:12 +00:00
floitsch@google.com a5f3c39b21 Isolates: allow sending of arbitrary objects in dart2js.
BUG= http://dartbug.com/12628
BUG= http://dartbug.com/9245
R=lrn@google.com, sigurdm@google.com, sra@google.com

Committed: https://code.google.com/p/dart/source/detail?r=42161
Reverted: https://code.google.com/p/dart/source/detail?r=42206

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42209 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-09 16:41:58 +00:00
floitsch@google.com 67dff7ca30 Revert "Isolates: allow sending of arbitrary objects in dart2js."
This reverts commit r42161.

Revert "Update status file."

This reverts commit r42163.

Revert "Update test."

This reverts commit r42165.

Revert "Update status file."

This reverts commit r42166.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42206 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-09 13:25:23 +00:00
herhut@google.com 75d0e5f3db Revert "Improve receiver narrowing in type propagation."
This reverts revision 42162.

BUG=
TBR=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42177 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 20:03:16 +00:00
asgerf@google.com cc4d2af55d Refactored treatment of closure variables in dart2js CPS.
Closure variables are now represented by a ClosureVariable object.
Previously they were identified by a LocalElement.

Parameters to a FunctionDefinition are now a mix of Parameter and
ClosureVariable. FunctionDefinitions also have a list of all the closure
variables they declare.

This change is a step toward supporting field initializers that modify or
capture function parameters.

BUG=
R=johnniwinther@google.com, sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42164 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 14:06:23 +00:00
herhut@google.com 714da403d5 Improve receiver narrowing in type propagation.
BUG=
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42162 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 13:41:05 +00:00
floitsch@google.com c115b77640 Isolates: allow sending of arbitrary objects in dart2js.
BUG= http://dartbug.com/12628
BUG= http://dartbug.com/9245
R=lrn@google.com, sigurdm@google.com, sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42161 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 13:28:29 +00:00
zarah@google.com 2114b3f3e5 Move isolateStaticClosureAccess and isolateLazyInitializerAccess from namer to emitter.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42159 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 11:38:06 +00:00
zarah@google.com c4044560cf Move elementAccess from namer to emitter.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42130 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 08:30:16 +00:00
sra@google.com 01b3346d7c Always generate the checkBigInt (Math.floor(x) == x) test for int receiver type checks and argument type checks, since the int32 tests don't make sense in the absence of bailouts.
Also remove dead code for checks that are no longer generated.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42088 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 18:34:43 +00:00
floitsch@google.com 3618c48d1c dart2js: Always generate functions for rti substitutions.
R=karlklose@google.com, zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42062 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 12:17:59 +00:00
sigurdm@google.com d943cfb9e0 Remove js.ArrayElement.
Instead introduce js.ArrayHole to mark empty spots in Arrays.

BUG=
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42060 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 09:28:26 +00:00
johnniwinther@google.com 4ff78cf3c6 Support top-level field declaration and assignment in analyzer2dart.
BUG=
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42043 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 14:23:19 +00:00
ahe@google.com 590e8b06a2 Incremental compiler: Use addStubs for adding methods.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42042 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 14:11:34 +00:00
herhut@google.com a69a6d49f1 Filter out calls to local functions whose signature does not apply.
BUG= http://dartbug.com/21724
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42040 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 14:01:18 +00:00
ahe@google.com dd9e8ee3a4 Disable super-aliases during incremental compilation.
R=herhut@google.com, johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42035 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 10:06:10 +00:00
johnniwinther@google.com eab478e8ac Extract BuilderContext from ASTEmitter
BUG=
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42034 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 10:04:11 +00:00
sigurdm@google.com e8f775b2e5 Support for map literals in cps js emitter
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42029 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-28 12:07:38 +00:00
floitsch@google.com cfa33f9c4c dart2js: Move TypeTestRegistry into its own file.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42028 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-28 10:44:01 +00:00
floitsch@google.com 2c92e0d83c dart2js: Split TypeTestEmitter into a registry and an emitter.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42027 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-28 10:42:56 +00:00
floitsch@google.com c7d49af199 dart2js: Remove dead code in type test emitter.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42026 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-28 10:41:21 +00:00
floitsch@google.com 18ded35fa2 dart2js: Make usage of names more consistent between compiler and runtime.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42025 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-28 10:40:28 +00:00
sigurdm@google.com 2e1567ff24 Add support for fields to the new dart backend.
Field initializers are represented similarly to a function with no
parameters.
When they are emitted in backend_ast_emitter.dart `ensureExpression`
wraps the code in an immediately invoked closure if it is not on the
simple form `return e;`.
Ideally this should never happen, but currently happens for cases like eg.
class A {
  static var b = 1;
  var a = b++;
}

main() {
  var a = new A();
  print(a.a);
}

Gets converted to:

class A {
  static var b = 1;
  var a = (() /* new backend */
    {
      var v0;
      v0 = A.b;
      A.b = v0 + 1;
      return v0;
    }
  )();
}

main() /* new backend */
  {
    print(new A().a);
  }

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42024 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-28 08:48:46 +00:00
sigurdm@google.com 8f44815438 Add support for (unintercepted) method calls to the cps js emitter.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42022 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 14:53:59 +00:00
floitsch@google.com 3177875959 dart2js: Remove dead code.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42020 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 14:27:59 +00:00
floitsch@google.com 8e8fdb6eee dart2js: use named holes in boilerplate of new emitter.
Review URL: https://codereview.chromium.org//760293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42019 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 13:43:40 +00:00
karlklose@google.com ba86151355 Add an optional decorator to SExprStringifier to augment the output of nodes.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42018 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 13:24:16 +00:00
floitsch@google.com c4fa949b91 dart2js: Support mixins in the new emitter.
R=kasperl@google.com, sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42017 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 12:57:42 +00:00
karlklose@google.com 941508b32c Remove the hashCode function from CPS nodes.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42016 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 12:41:11 +00:00
karlklose@google.com 3d2514c304 Refactor the CPS SExprStringifier.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42015 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 12:27:00 +00:00
sigurdm@google.com bd32bef1d5 Invoking constructors in js cps
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42014 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-27 07:57:59 +00:00
herhut@google.com f8eff6c6a0 Delete unused readFunction.
BUG=
TBR=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41990 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 12:10:52 +00:00
herhut@google.com fc75d45d76 Encode super calls via extra properties on prototypes.
BUG= http://dartbug.com/21666
R=ahe@google.com, floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41989 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 11:48:29 +00:00
herhut@google.com ec8fe00d23 Fix declaration of _MixinFieldNamingScope.names.
BUG=
TBR=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41988 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 11:26:27 +00:00
herhut@google.com 40242d131f Use field names that are unique only wrt. the inheritance chain in minified mode.
R=floitsch@google.com, sra@google.com
BUG= http://dartbug.com/21510

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41986 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 10:27:55 +00:00
karlklose@google.com 8071da7ef8 cps-ir: Optimize identical used with constants.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41982 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 09:24:17 +00:00
karlklose@google.com 4b9dd6daf4 Add CPS IR transformation to make the JavaScript backend specific semantics explicit in the tree.
Also implement transformation to insert boolean conversion.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41979 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 07:26:49 +00:00
floitsch@google.com 0d7b1111f0 dart2js: add comments.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41958 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 15:39:31 +00:00
floitsch@google.com e728bda036 dart2js: Add "onlyForRti" to Classes in model of the new emitter.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41956 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 14:49:44 +00:00
ahe@google.com f01fe227e0 Checked mode fixes.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41951 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:52:58 +00:00
sigurdm@google.com 0e519dbdcf Add support for if, while, break, continue to js-cps
Also avoid returning values via fields in CodeGenerator.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41946 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 08:30:08 +00:00
ahe@google.com 3e8b1cc1f4 Incremental compilation of added instance fields.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41905 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 15:52:40 +00:00
johnniwinther@google.com c167972a80 Support native extensions for analysis and docgen.
BUG=http://dartbug.com/10616
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41903 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 14:09:14 +00:00
sigurdm@google.com 5ba3c0b361 Fix the new dart2dart backend.
Revert some code accidentially introduced by https://codereview.chromium.org//726543002

BUG=
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41902 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 14:00:44 +00:00
johnniwinther@google.com ba110b93ff Avoid patching in dart2dart.
BUG=http://dartbug.com/21441
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41901 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 13:42:56 +00:00
ahe@google.com 50b50dd273 Restore tmp function
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41899 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 12:05:41 +00:00