Commit Graph

4698 Commits

Author SHA1 Message Date
herhut@google.com d953d8dbfe Compute new targets for dynamic call sites eagerly.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42985 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-19 11:46:10 +00:00
asgerf@google.com 5e13a173b2 Dart2dart: Support for-loop variables captured in loop body.
Capture in initializer, condition, and update is still not supported.

IMO: we should postpone efforts toward full capture support in dart2dart
until benchmarks indicate that dart2dart actually benefits from the
translation through CPS (which is still an open question, yes?).

Such benchmarking should not be blocked by lack of completeness,
because real code probably never captures loop variables in the loop
header.

R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42959 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 14:56:13 +00:00
floitsch@google.com 1bfba5354d dart2js: move NativeEmitter into js_emitter directory.
R=johnniwinther@google.com, zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42957 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 14:17:17 +00:00
floitsch@google.com 2daf605ba3 dart2js: use bool to track if an app has native classes.
No need to keep a list of native classes, if we only want to know if there are some.

R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42956 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 14:16:21 +00:00
zarah@google.com 9d42a5bdf0 Revert "dart2js: Only emit constructors of the native class interceptors that are used."
This reverts commit r42944.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42950 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 10:58:13 +00:00
sigurdm@google.com b0d465cfa0 Revert "Allow LetCont to bind multiple continuations."
This reverts commit r42945.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42948 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 10:09:01 +00:00
floitsch@google.com ca249bec57 dart2js: Remove (some) unused imports.
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42947 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 09:09:57 +00:00
floitsch@google.com c038db3cf5 dart2js: rename Elements.isErroneousElement to Elements.isErroneous.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42946 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 08:58:43 +00:00
kmillikin@google.com 16d72e35e0 Allow LetCont to bind multiple continuations.
LetCont can now bind multiple continuations in the same scope.  As an
example, the 'then' and 'else' continuations of a branch are siblings
in the expression, and neither is in the scope of the other.  None of
the LetCont-bound continuations are in scope for any of the
continuation bodies.  Recursive continuations are still recursive
values, not recursive bindings, so there is no direct way to have
mutually recursive continuations.  This matches the JavaScript
semantics.

R=asgerf@google.com, sigurdm@google.com, karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42945 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 08:55:20 +00:00
zarah@google.com 026d08fea2 dart2js: Only emit constructors of the native class interceptors that are used.
This change only affects CSP mode: when compiling in CSP mode we were emitting constructors and getters/setters of native classes that were potentially not needed.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42944 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 08:52:43 +00:00
koda@google.com 016666613f Revert r42934.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42939 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 22:45:26 +00:00
floitsch@google.com 20950adb02 dart2js: more uses of the model in the old emitter.
Some renamings.

R=ahe@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42934 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 21:12:39 +00:00
floitsch@google.com d23f2ab1ca Revert "dart2js: more uses of the model in the old emitter."
This reverts commit r42917.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42922 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 18:05:45 +00:00
floitsch@google.com 98a50ea6db dart2js: more uses of the model in the old emitter.
Some renamings.

R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42917 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 16:28:30 +00:00
ahe@google.com 8319fbbfbf Add option --generate-code-with-compile-time-errors.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42916 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 16:26:46 +00:00
ahe@google.com 6c25b15802 Error recovery broke host checked mode, fix it.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42915 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 16:16:52 +00:00
asgerf@google.com 73d063e5f4 Fix some bugs that blocked optimizations in the new IRs.
- Bad reference counting in tree IR builder.
- Incorrect visit order in StatementRewriter.visitSetField.
- Bad hint assigned in IR builder for GetClosureVariable.

BUG=
R=sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42913 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 15:50:36 +00:00
ahe@google.com dae8aed3d8 Register throwRuntimeError when creating an ErroneousConstructorElementX
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42912 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 15:02:37 +00:00
floitsch@google.com 884599197e dart2js: Remove unused function.
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42906 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 13:46:06 +00:00
ahe@google.com c179b70426 Don’t exit prematurely if compilation failed.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42905 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 12:12:22 +00:00
ahe@google.com 8e39d5fed8 Recover from crash in language/async_test/constructor4.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42904 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 12:04:33 +00:00
ahe@google.com aa760547b4 Avoid duplicated messages.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42903 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 11:59:35 +00:00
floitsch@google.com 12eaf70732 dart2js: start using the model in the old emitter.
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42902 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 11:55:30 +00:00
karlklose@google.com 7e80e7dfea Remove tracking of factories used with type arguments.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42899 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 08:39:45 +00:00
vegorov@google.com a45ed14472 Fix build broken by r42878.
Remove parameter name left at internalError invocation.

TBR=johnniwinther@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42881 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 18:53:39 +00:00
vegorov@google.com a805ce5c5f Wrap standalone invariant() calls in assert().
To avoid unnecessary allocation: some of them have closure as an
argument.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42878 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 18:06:37 +00:00
ahe@google.com 3ca1728f97 Recover from read errors.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42872 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 14:16:10 +00:00
floitsch@google.com c67d68e399 dart2js: remove spurious semicolon.
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42869 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 13:39:20 +00:00
floitsch@google.com 240853c756 dart2js: Temporarily store output unit in Fragment.
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42867 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 13:03:29 +00:00
floitsch@google.com 6e769d9c7f dart2js: register output units explicitly in the program builder.
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42866 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 13:02:37 +00:00
floitsch@google.com f072c6319b dart2js: register static non final fields in the model.
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42864 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 13:00:47 +00:00
floitsch@google.com 6eaf30d3d0 dart2js: Rename Fragment to LibrariesMap and Output to Fragment.
Fragment is the better name and is now used more often.

R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42863 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 12:56:55 +00:00
ahe@google.com 5ec13e7ab7 Remove CompilerCancelledException.
Review URL: https://codereview.chromium.org//848003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42862 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 12:51:41 +00:00
ahe@google.com 4c2121a9bd Recover from fatal parser errors.
BUG=https://code.google.com/p/dart/issues/detail?id=22022
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42861 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 12:48:28 +00:00
asgerf@google.com 9748ac4ac4 Avoid boxing loop variables that are only mutated in initializer or update
For example:

for (int i=0; i<10; i++) {
  getFoo(i).then((x) {
    x.doBar(i);
  });
}

BUG=
R=floitsch@google.com, karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42809 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 14:11:13 +00:00
floitsch@google.com 22b3753ce2 dart2js: Use unique instance as exit signal.
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42806 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 13:51:30 +00:00
asgerf@google.com e50fd28ff7 Use closure conversion in new dart2js backend.
New instructions: CreateBox, SetField, GetField, CreateClosureClass.

The "old" instructions based on ref-cells are still in use by dart2dart:
GetClosureVariable, SetClosureVariable, CreateFunction.

dart2dart still does not support captured for-loop variables, but this
is a separate issue.

BUG=
R=floitsch@google.com, kmillikin@google.com, sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42802 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 11:57:15 +00:00
johnniwinther@google.com 0192ea71fc Emit to StreamCodeOutput instead of CodeBuffer.
BUG=
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42801 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 09:14:25 +00:00
zarah@google.com a664d5d416 dart2js OldEmitter: Remove processing of old metadata encoding.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42800 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 08:46:50 +00:00
ahe@google.com 63d8097fad Use synthetic elements to recover from errors in signatures.dart.
BUG=https://code.google.com/p/dart/issues/detail?id=22021
R=karlklose@google.com, zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42772 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 13:57:30 +00:00
ahe@google.com f54164609b Update invariant in class_members.dart.
Review URL: https://codereview.chromium.org//811933004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42770 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 12:45:21 +00:00
ahe@google.com e2cbbcaef1 Non-fatal errors in compile-time constants.
BUG=https://code.google.com/p/dart/issues/detail?id=22018
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42768 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 10:17:36 +00:00
ahe@google.com dc07285505 Non fatal errors on duplicated accessors.
BUG=https://code.google.com/p/dart/issues/detail?id=22019
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42767 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 10:15:29 +00:00
ahe@google.com 60e17ef3cd Address comments from 820093006
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42766 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 10:14:02 +00:00
sigurdm@google.com 95582bb710 Add deferred map info to dump-info.
I am not sure if we should bump the version property. That would require
an update of the viewer.

BUG=
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42763 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 08:25:29 +00:00
floitsch@google.com ab9cc6e41e dart2js: collect static-non-final fields in the task.
R=sigurdm@google.com, zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42744 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:23:53 +00:00
floitsch@google.com 57ae728cf5 dart2js: Register constants in the model builder.
We need to make sure that constants are registered, as otherwise output units that only contain constants aren't generated.

R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42743 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:22:43 +00:00
floitsch@google.com 86d9c01cd5 dart2js: Support new const operations on strings.
BUG= http://dartbug.com/21001
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42737 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 16:07:53 +00:00
ahe@google.com 1e3bca615b Less fatal errors
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42731 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 11:28:04 +00:00
ahe@google.com 0803aae8df Create erroneous element when resolution of initializer fails.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42729 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 10:50:15 +00:00