sigurdm@google.com
3ac4cc58f1
Fix dart2dart status files.
...
Follow up to https://codereview.chromium.org/816663002/
R=karlklose@google.com
Review URL: https://codereview.chromium.org//811263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42501 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 09:06:56 +00:00
sigurdm@google.com
ed041f149c
dart2js: Fix crash with reference to type literal in static context.
...
BUG= dartbug.com/21566
R=karlklose@google.com
Review URL: https://codereview.chromium.org//816663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42458 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 13:43:40 +00:00
floitsch@google.com
79f0df2cc8
dart2js: put all type-test related properties on the prototype and not on the constructor.
...
R=karlklose@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42392
Reverted: https://code.google.com/p/dart/source/detail?r=42408
Review URL: https://codereview.chromium.org//802653005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42435 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:05:15 +00:00
sigurdm@google.com
b0e9fbedce
Generative constructors in the new dart backend.
...
With super and field initializers.
Field initializers and the arguments to a super-initializer
are treated as zero-arg nested functions, and if they assign
to a parameter, that parameter is set to be a closure
variable.
Still no 'this' initializer redirections.
initializing formals (such as `C(this.x)` ) are translated
to field initializers. We might want to revisit this choice.
R=asgerf@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//787603003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42427 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 10:34:21 +00:00
sigurdm@google.com
cf906beba3
dart2js: Fix of deferred static functions.
...
When deferred static functions go to a different output hunk than the
class they are defined in the emitter got problems with outputting them.
We could say that static functions always go to the same output-unit as
their class, and this is needed to support reflection. But we already
handle it that way when reflection is needed. In deferred_load.dart:
void addLiveInstanceMember(Element element) {
if (!compiler.enqueuer.resolution.hasBeenResolved(element)) return;
if (!isMirrorUsage && !element.isInstanceMember) return;
collectDependencies(element.implementation);
}
R=floitsch@google.com
Review URL: https://codereview.chromium.org//810473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42389 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 13:14:35 +00:00
floitsch@google.com
147f810e6f
dart2js: accept const map literals as expression statements.
...
Dart2js was broken for:
<String, int> {};
The reason was that we tried to find an identifier after an initial type (looking for something like `Set<int> foo`) to parse a declaration. We assumed that the first token would be a type name and skipped the `<` when we did this search, thus believing that there was a declaration.
BUG= http://dartbug.com/12793
BUG= http://dartbug.com/12794
BUG= http://dartbug.com/21155
R=ahe@google.com
Review URL: https://codereview.chromium.org//796363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42356 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-13 17:12:59 +00:00
sigurdm@google.com
b2b4663ec9
dart2js: fix mixin support in deferred libraries.
...
This is the continuation of https://codereview.chromium.org/794813002
BUG= http://dartbug.com/21837
R=floitsch@google.com
Review URL: https://codereview.chromium.org//799553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42320 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-12 14:30:32 +00:00
paulberry@google.com
3bb8ad828a
Annotate type_literal_prefix_call_test.dart properly for analyzer.
...
TBR=sigurdm@google.com
Review URL: https://codereview.chromium.org//801593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42303 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 23:07:48 +00:00
sra@google.com
8665a82d55
Redo "Make StringBuffer.write easier to inline"
...
Verified passes on Safari Version 7.1 (9537.85.10.17.1)
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//797733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42294 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 19:16:00 +00:00
sigurdm@google.com
480e12f0d7
Dart2js, move deferred global variables to the right output unit.
...
BUG=dartbug.com/21840
R=floitsch@google.com
Review URL: https://codereview.chromium.org//795923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42287 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 13:56:12 +00:00
sigurdm@google.com
531eecac65
Allow dart2js to compile calls to type literals when prefixed.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//794593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42286 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 13:36:27 +00:00
sra@google.com
8179222dd7
Revert "Probe safari codegen bug"
...
BUG=
Review URL: https://codereview.chromium.org//798483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42278 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 05:24:25 +00:00
sra@google.com
bd977c9812
Probe safari codegen bug
...
BUG=
Review URL: https://codereview.chromium.org//796723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42276 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 03:21:35 +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
hausner@google.com
8ece5c1b84
Allow Symbols in switch and maps
...
Allow Symbol literals (and const Symbol instances) as switch expression
and as key values in const Maps.
This implements the most recent Spec changes.
R=regis@google.com
Review URL: https://codereview.chromium.org//781203005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42230 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 00:24:07 +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
hausner@google.com
392db8d312
Implement correct semantics of Boolean Conversion
...
When converting null to a boolean value, throw an AssertionError
rather than a TypeError.
This is the same change as r42145, with added co19 status updates.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//779253003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42170 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 18:51:48 +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
hausner@google.com
4cfdf02012
Revert r42145 to fix co19 tests
...
Review URL: https://codereview.chromium.org//772513003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42148 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 21:05:38 +00:00
hausner@google.com
ad837a0d9f
Implement correct semantics of Boolean Conversion
...
When converting null to a boolean value, throw an AssertionError
rather than a TypeError.
Fixes issue 21279.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//778063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42145 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 20:36:37 +00:00
karlklose@google.com
c148959eb1
Add a test to test that substitutions are emitted for classes that are only used as type arguments.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//771673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42059 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 09:01:10 +00:00
hausner@google.com
a5efbb4d66
Fix named arguments in await expressions
...
Fix for issue 21480.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//762493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41968 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 20:31:54 +00:00
hausner@google.com
52279a7417
Fix test expectations
...
Review URL: https://codereview.chromium.org//758133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41963 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 18:38:58 +00:00
hausner@google.com
1b8fa74112
Fix parsing of awaitable expressions with nested functions
...
“have seen await” flag must be properly saved and restored when
parsing nested function (literals) inside an await expression.
Fixes issue 21536
R=srdjan@google.com
Review URL: https://codereview.chromium.org//755053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41962 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 18:13:49 +00:00
koda@google.com
dcb6b10c58
Skip enum_mirror_test under dart2dart.
...
TBR=hausner@google.com
BUG=dart:11511
Review URL: https://codereview.chromium.org//748483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41944 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 00:27:49 +00:00
koda@google.com
844dca3a21
Make toString visible on enum classes, as required by proposed spec.
...
R=hausner@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//724373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41939 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 19:19:18 +00:00
hausner@google.com
a224480e1a
Allow await expressions in arrow-style functions
...
Recognize await keyword when skipping expressions.
R=regis@google.com
Review URL: https://codereview.chromium.org//740823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41932 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 17:39:04 +00:00
johnniwinther@google.com
efe34f317d
Update status for enum_const_test.
...
BUG=
Review URL: https://codereview.chromium.org//751603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41904 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 14:19:42 +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
iposva@google.com
7eaf7a6a6d
- Add needed enum flags for dart2js.
...
Review URL: https://codereview.chromium.org//740383004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41883 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 07:43:08 +00:00
iposva@google.com
96bf02b8f1
- Make array immutable first, then canonicalize it.
...
- When serializing canonical objects, then inline the referenced
objects, so that you can canonicalize them when deserializing.
- Reenabled language/enum_const_test.
R=asiva@google.com
Review URL: https://codereview.chromium.org//745203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41881 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 07:18:40 +00:00
iposva@google.com
1eb1c6d319
- Do not attempt to canonicalize while we debug test failures.
...
Review URL: https://codereview.chromium.org//747673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41877 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 00:11:36 +00:00
iposva@google.com
1ee14fee2e
Fix dartbug.com/21671:
...
- Properly canonicalize enum values.
- Ensure canonical objects are deserialized properly.
R=asiva@google.com
Review URL: https://codereview.chromium.org//745023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41874 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 23:31:10 +00:00
whesse@google.com
28a647be27
Update enum test status for old java analyzer.
...
BUG=dartbug.com/21649
R=ricow@google.com
Review URL: https://codereview.chromium.org//735273003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41834 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 14:22:49 +00:00
zerny@google.com
6e3d80ab30
Fix failure reported by analyzer in test for issue 21159.
...
TBR=fschneider@google.com
Enable issue tests that appear to be incorrectly named.
BUG=
Review URL: https://codereview.chromium.org//726703007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41828 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 12:42:41 +00:00
zerny@google.com
bd1da68392
Enable issue tests that appear to be incorrectly named.
...
R=srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//732393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41826 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 09:56:21 +00:00
hausner@google.com
4bf624ebc0
Implement enum types in VM
...
Fully support enum types as per language spec version 1.6.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//735723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41815 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 23:10:07 +00:00
vegorov@google.com
8f7f26c0a4
Reland "Suppress canonicalization of Unbox() instruction that can deoptimize."
...
This relands commit r41693 with additional fixes in canonicalization pass.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//726593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41736 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 11:19:42 +00:00
fschneider@google.com
b26ff22adf
Allocation sinking for contexts.
...
Improved aliasing computation in presence of Redefinition and AssertAssignable.
Added possibility for inlining annotations via --enable-inlining-annotations flag.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//184523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41713 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 13:53:58 +00:00
whesse@google.com
e5d6c3d424
Update status for fixed test.
...
BUG=dartbug.com/21582
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//724013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41712 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 13:14:18 +00:00
vegorov@google.com
97c3268f51
Revert "Suppress canonicalization of Unbox() instruction that can deoptimize."
...
This reverts commit r41693 due to checked mode test failures.
TBR=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//722793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41695 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 18:57:31 +00:00
vegorov@google.com
94e896d963
Suppress canonicalization of Unbox() instruction that can deoptimize.
...
Suppress canonicalization of instructions that have unsatisfied input representations.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//721773003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41693 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 17:23:55 +00:00
johnniwinther@google.com
600d83af9e
Skip enum_test for dart2analyzer
...
BUG=
Review URL: https://codereview.chromium.org//721733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41689 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 14:20:23 +00:00
johnniwinther@google.com
8fe2fc93aa
Update enum encoding to latest spec.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//718703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41685 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:06:52 +00:00
paulberry@google.com
95b485ce90
Add language tests for bugs 21565 and 21566.
...
R=brianwilkerson@google.com , floitsch@google.com
Review URL: https://codereview.chromium.org//716683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41670 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 16:52:34 +00:00
paulberry@google.com
3bf0ca6aa8
Fix analyzer's treatment of mixin constructors.
...
This changes analyzer to match the spec (and the VM behavior) with
regard to which base class constructors are forwarded through mixin
applications: only those constructors that take zero optional
parameters are forwarded. In addition, the tests in tests/language/
are updated to match analyzer and the VM.
There is one small difference between analyzer and the VM behavior:
the spec says that if no constructors are forwarded at all, then the
mixin application will automatically acquire an implicit default
constructor. The VM behavior is to issue an error in this
circumstance. After consulting with Gilad, it seems like the VM
behavior is more consistent with the intent, so I've chosen to make
analyzer and the tests match the VM behavior, in the hopes that the
spec can be changed accordingly.
Should we change our minds in the future and decide that we want to
keep the spec as is, the tests and analyzer behavior can easily be
changed.
BUG=dartbug.com/19576
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//707073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41645 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 19:28:40 +00:00
paulberry@google.com
9c1ea65f07
Prevent conflict between parameter names and local function names.
...
From section 9.2 (Formal Parameters) of the spec:
The formal parameter list of a function introduces a new scope known
as the function's formal parameter scope. The formal parameter
scope of a function f is enclosed in the scope where f is declared.
Therefore, if one of the function's parameters has the same name as
the function itself, that isn't a problem.
Previously, we would add a local function to its own formal parameter
scope before visiting it (to allow it to call itself recursively), and
then after visiting it we would add it to the scope of the enclosing
function (so that the enclosing function could call it).
The fix is to add the local function just to the scope of the
enclosing function, and to do it before visiting the local function so
that recursion still works.
BUG=dartbug.com/20074
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//688253004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41621 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 01:11:17 +00:00
vegorov@google.com
a3c8a2643d
Add regression test for http://dartbug.com/21220 .
...
BUG=http://dartbug.com/21220
R=fschneider@google.com
Review URL: https://codereview.chromium.org//687803011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41599 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 12:18:41 +00:00
lrn@google.com
ee84420ff9
Revert "Mark test failing due to dartbug.com/21523"
...
Fixing a type-warning also fixed this problem.
Review URL: https://codereview.chromium.org//709443003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41552 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 13:02:52 +00:00