Commit Graph

294 Commits

Author SHA1 Message Date
Régis Crelier 3d756ec4ab [VM runtime] In strong mode, restrict subtyping rules of callable instances (fixes #32154).
Update kernel status files.

Change-Id: I2bf6097b5229d80cc90baed92fd8dcc750667b23
Reviewed-on: https://dart-review.googlesource.com/41482
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-14 21:48:27 +00:00
Lasse R.H. Nielsen 7ca47924ad Fix status to mark crash.
Change-Id: I141e5b2eb3960caefaab34e39d8591cf20cfbc90
Reviewed-on: https://dart-review.googlesource.com/41262
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-02-14 15:27:33 +00:00
Paul Berry c4de71ede2 Re-land "Change front_end handling of callable classes."
Original description:
Change front_end handling of callable classes.

This CL is the first in a series of CLs to change the handling of
callable classes in Dart 2.0.

For purposes of this description, a "callable class" is a class whose
interface contains a `.call` method.

In Dart 1.0, a callable class was considered to be a subtype of the
`.call` method's function type.  This allowed the user to create
custom objects with similar behavior to closures, but with additional
fields and methods.

In Dart 2.0, a callable class is just an ordinary class, with no
subtype relation to any particular function type.  (Note however that
it is still permissible for a class to declare that it "implements
Function").

To reduce the amount of code broken by this change, a piece of
syntactic sugar is being added: if an expression whose static type is
a callable class appears where a function type is expected, an
implicit tear-off of the `.call` method is inserted.

Note that it is still possible at compile time to invoke an expression
whose static type is a callable class, and it is still possible at
runtime to invoke an expression whose runtime type is a callable
class; in both cases, this is considered an implicit invocation of the
class's `.call` method.  This is unchanged from Dart 1.0 behavior.

This CL introduces test cases for the new behavior, and implements the
implicit tear-off of `.call` in the front end.

Still to be implemented in future CLs:

- Spec text needs to be written.

- DDC/analyzer code needs to be written to perform implicit tear-offs
  of `.call`.

- The subtyping algorithm in DDC, analyzer, VM, and dart2js needs to
  be changed so that callable classes are no longer considered
  subtypes of any particular function type.

- A small corner case involving type parameters still needs to be
  addressed (see TODO in
  pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart).

Fixes #32064.

Change-Id: I0d397c608321e25ba42cc02aa8a516aa77aa7c9d
Reviewed-on: https://dart-review.googlesource.com/41280
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-14 15:22:25 +00:00
Paul Berry e2bdbb8bb8 Revert "Change front_end handling of callable classes."
This reverts commit f0a6330db0.

Reason for revert: Broken bots

Original change's description:
> Change front_end handling of callable classes.
> 
> This CL is the first in a series of CLs to change the handling of
> callable classes in Dart 2.0.
> 
> For purposes of this description, a "callable class" is a class whose
> interface contains a `.call` method.
> 
> In Dart 1.0, a callable class was considered to be a subtype of the
> `.call` method's function type.  This allowed the user to create
> custom objects with similar behavior to closures, but with additional
> fields and methods.
> 
> In Dart 2.0, a callable class is just an ordinary class, with no
> subtype relation to any particular function type.  (Note however that
> it is still permissible for a class to declare that it "implements
> Function").
> 
> To reduce the amount of code broken by this change, a piece of
> syntactic sugar is being added: if an expression whose static type is
> a callable class appears where a function type is expected, an
> implicit tear-off of the `.call` method is inserted.
> 
> Note that it is still possible at compile time to invoke an expression
> whose static type is a callable class, and it is still possible at
> runtime to invoke an expression whose runtime type is a callable
> class; in both cases, this is considered an implicit invocation of the
> class's `.call` method.  This is unchanged from Dart 1.0 behavior.
> 
> This CL introduces test cases for the new behavior, and implements the
> implicit tear-off of `.call` in the front end.
> 
> Still to be implemented in future CLs:
> 
> - Spec text needs to be written.
> 
> - DDC/analyzer code needs to be written to perform implicit tear-offs
>   of `.call`.
> 
> - The subtyping algorithm in DDC, analyzer, VM, and dart2js needs to
>   be changed so that callable classes are no longer considered
>   subtypes of any particular function type.
> 
> - A small corner case involving type parameters still needs to be
>   addressed (see TODO in
>   pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart).
> 
> Fixes #32064.
> 
> Change-Id: I6a86491047ae467a5e767cb3cc7cecb570b29308
> Reviewed-on: https://dart-review.googlesource.com/40508
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Kevin Millikin <kmillikin@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>
> Reviewed-by: Erik Ernst <eernst@google.com>

TBR=paulberry@google.com,lrn@google.com,leafp@google.com,dmitryas@google.com,eernst@google.com,kmillikin@google.com

Change-Id: Ia3d3a6e46ceee2b2c55938bec95d09d50bbf06a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/41240
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-14 13:10:54 +00:00
Lasse R.H. Nielsen fed7120b07 Make UnmodifiableMapView not lose unmodifiability on cast/retype.
Change-Id: I44c084353b35e16cd2fd5481d86a7be6c0b62ef3
Reviewed-on: https://dart-review.googlesource.com/41160
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-02-14 12:49:23 +00:00
Paul Berry f0a6330db0 Change front_end handling of callable classes.
This CL is the first in a series of CLs to change the handling of
callable classes in Dart 2.0.

For purposes of this description, a "callable class" is a class whose
interface contains a `.call` method.

In Dart 1.0, a callable class was considered to be a subtype of the
`.call` method's function type.  This allowed the user to create
custom objects with similar behavior to closures, but with additional
fields and methods.

In Dart 2.0, a callable class is just an ordinary class, with no
subtype relation to any particular function type.  (Note however that
it is still permissible for a class to declare that it "implements
Function").

To reduce the amount of code broken by this change, a piece of
syntactic sugar is being added: if an expression whose static type is
a callable class appears where a function type is expected, an
implicit tear-off of the `.call` method is inserted.

Note that it is still possible at compile time to invoke an expression
whose static type is a callable class, and it is still possible at
runtime to invoke an expression whose runtime type is a callable
class; in both cases, this is considered an implicit invocation of the
class's `.call` method.  This is unchanged from Dart 1.0 behavior.

This CL introduces test cases for the new behavior, and implements the
implicit tear-off of `.call` in the front end.

Still to be implemented in future CLs:

- Spec text needs to be written.

- DDC/analyzer code needs to be written to perform implicit tear-offs
  of `.call`.

- The subtyping algorithm in DDC, analyzer, VM, and dart2js needs to
  be changed so that callable classes are no longer considered
  subtypes of any particular function type.

- A small corner case involving type parameters still needs to be
  addressed (see TODO in
  pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart).

Fixes #32064.

Change-Id: I6a86491047ae467a5e767cb3cc7cecb570b29308
Reviewed-on: https://dart-review.googlesource.com/40508
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-02-14 11:03:32 +00:00
Régis Crelier 4c9a842d61 [corelib] Cleanup isValidInt and toInt() in new BigInt implementation.
Change-Id: I1f107d4f6e26ea3644bc6c9f7cff5ee6fac43958
Reviewed-on: https://dart-review.googlesource.com/40512
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-02-14 03:43:52 +00:00
Johnni Winther d30aaaa4b8 Ensure no type parameters on constructors.
Change-Id: I6a40e2f74b8a89e5873d94d406a56f82db0d0b48
Reviewed-on: https://dart-review.googlesource.com/40526
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-02-13 11:11:05 +00:00
Stephen Adams d78c05279a dart2js runtime Dart 2 subtype check (mostly)
This change adds most of Dart 2 subtype checking to js_runtime.
The main observable change is the stronger subtyping of function types.
The subtype code is split into V1 and V2 methods with the intention to
eventually remove the V1 paths.

There is a lot of minor details that are still TODO:

- TODO: generalized void
- TODO: comparison on type variable by it's bound
- TODO: FutureOr

Change-Id: Id05db0aef5ce0d58416a72f1538a90ed67436b3e
Reviewed-on: https://dart-review.googlesource.com/37960
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-02-12 23:54:48 +00:00
Emily Fortuna 06ef399354 Fix up locals map for signature function.
Change-Id: If2a569e0799c1f63f1ee728f183cb4f1e3badb56
Reviewed-on: https://dart-review.googlesource.com/40464
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-02-09 20:55:19 +00:00
Emily Fortuna 36b957762e Fix up test statuses for strong mode. They apparently got super out of date. :-(
Change-Id: If3e247aecbc7969423053854468f6117ace8fe49
Reviewed-on: https://dart-review.googlesource.com/40461
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-02-09 18:53:36 +00:00
Erik Corry 3f299c18ca Small cleanup of dart2js status files on Dart2 tests
R=whesse@google.com

Change-Id: I91163f895723ba0c5c79b6e75bd1c5eb4566ac61
Reviewed-on: https://dart-review.googlesource.com/40000
Reviewed-by: William Hesse <whesse@google.com>
2018-02-09 01:02:36 +00:00
Alexander Markov 307177ff9c [Gardening] Update status after changing test
This is a follow-up for
https://github.com/dart-lang/sdk/commit/236aef873a3e5d2a00403207ab26b3829c86e47f

Change-Id: Ie480a96b51deb7aaa91318990199d70edf13adf0
Reviewed-on: https://dart-review.googlesource.com/40100
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-08 21:03:18 +00:00
Mike Fairhurst 56d59dd967 Reland https://dart-review.googlesource.com/c/sdk/+/37441 with fixes
Change-Id: If8e2ec2ca1ac4f533dcb56b0c95d55e4a13e0598
Reviewed-on: https://dart-review.googlesource.com/39881
Reviewed-by: Paul Berry <paulberry@google.com>
2018-02-08 20:46:19 +00:00
Alexander Markov 236aef873a Update test corelib_2/iterable_to_list_test for Dart 2 type inference
According to Leaf, Dart 2 type inference prefers to infer type
which is asked for, even if a more specific type can be inferred
from arguments.

It means that for

  testIterable({"x": 1, "y": 1}.keys, ["x", "y"]);

where

  testIterable(Iterable iterable, List expected, [int depth = 0])

the inferred type of map is Map<String, int>, but inferred type
of list is List (as testIterable argument type is List).

So this test is fixed by specifying type arguments of 'expected'
lists explicitly.

Change-Id: I2deab160038ee7abaad587920cb8fc620e09ebdf
Reviewed-on: https://dart-review.googlesource.com/39441
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 17:19:12 +00:00
Johnni Winther df4453bbb4 Update dart2js_with_kernel status
Change-Id: I08b8cf15ffb034958729b5c07561e9eec98aba0f
Reviewed-on: https://dart-review.googlesource.com/39961
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-02-08 10:51:37 +00:00
Stephen Adams 027aea0657 Fix dart2js kernel corelib_2 status
TBR=sigmund@google.com

Change-Id: I144d0cbbd5080fe20dc566793d95a03eb3bbfbe5
Reviewed-on: https://dart-review.googlesource.com/39900
Reviewed-by: Stephen Adams <sra@google.com>
2018-02-08 03:58:16 +00:00
Emily Fortuna ef3c271542 Generate signature function in strong mode (previously was behind a flag).
Change-Id: Ia99623beb4f5cbba719833af2d710702d2caaa6d
Reviewed-on: https://dart-review.googlesource.com/38902
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-02-07 23:02:40 +00:00
Mike Fairhurst ec58f5646a Revert "Make void a static warning to use almost everywhere."
This reverts commit 09eed74a8a.

Reason for revert: Too much SDK code is not yet compliant.

Original change's description:
> Make `void` a static warning to use almost everywhere.
> 
> Changed the hint to a StaticWarningCode, since that's the new spec'd
> error type and the hint is no longer needed.
> 
> Added a new set of methods to test the cases.
> 
> Didn't try to solve the problem generally ("all usages except ... are
> errors" means it easier, in theory, to make a ReportVoidExpressions
> style visitor that catches absolutely all types) because most of the
> work is actually about suppressing errors that are no longer needed.
> Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
> put the void handling logic into each AST method specially anyway.
> 
> Some redundant tests removed.
> 
> Don't flag: ternaries, void -> void assignments, void returns in
> dynamic.
> 
> Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
> Reviewed-on: https://dart-review.googlesource.com/37441
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=leafp@google.com,scheglov@google.com,mfairhurst@google.com

Change-Id: I13ee4c6939468d35506779ade637a040833632f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39848
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-07 22:32:51 +00:00
Mike Fairhurst 09eed74a8a Make void a static warning to use almost everywhere.
Changed the hint to a StaticWarningCode, since that's the new spec'd
error type and the hint is no longer needed.

Added a new set of methods to test the cases.

Didn't try to solve the problem generally ("all usages except ... are
errors" means it easier, in theory, to make a ReportVoidExpressions
style visitor that catches absolutely all types) because most of the
work is actually about suppressing errors that are no longer needed.
Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
put the void handling logic into each AST method specially anyway.

Some redundant tests removed.

Don't flag: ternaries, void -> void assignments, void returns in
dynamic.

Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
Reviewed-on: https://dart-review.googlesource.com/37441
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-07 21:36:01 +00:00
William Hesse 2f9caa23c7 Update status for dart2js-with-kernel
Bug: https://github.com/dart-lang/sdk/issues/32078
Change-Id: If167667e16db1dd200aed649ac43071404d4feb9
TBR=johnniwinther@google.com
Reviewed-on: https://dart-review.googlesource.com/39780
Reviewed-by: William Hesse <whesse@google.com>
2018-02-07 16:03:35 +00:00
Peter von der Ahé 8815bbe90e Update status files for $compiler == fasta
Change-Id: I09761d12b98864d9a9abcc7abe6f046e45951715
Reviewed-on: https://dart-review.googlesource.com/36642
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-02-07 15:38:09 +00:00
Leaf Petersen 7fbaf476ba Status file fix for dart2js_d8_release_x64_strong
Change-Id: Icd457913f8cf9c78b618da7c7d728b4e56d7fe1d
Reviewed-on: https://dart-review.googlesource.com/39520
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-07 08:07:47 +00:00
Lasse R.H. Nielsen 6f78471687 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: I7a12fea533d42b0fc8357086649df38ad01f3cdd
Reviewed-on: https://dart-review.googlesource.com/39140
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-07 06:12:53 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
This reverts commit 0b59f24f97.

Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751

Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
> 
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-06 11:17:46 +00:00
Sigmund Cherem 5428a12b84 Ensure that env includes the actual mixin application fields and procedures.
From the docs of mixedInClass and mixin: the former is the direct thing that is
mixed in, but if it is a named mixin application it may not contain the actual
fields and procedures, instead the `.mixin` class does.

Change-Id: I049ced771925431d613b0b661154c1761fbe0a51
Reviewed-on: https://dart-review.googlesource.com/38161
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-02-02 07:10:30 +00:00
Lasse Reichstein Holst Nielsen 0c18b643c6 Add RegExp.escape methods.
Fixes 4706

Bug: http://dartbug.com/4706
Change-Id: If635cb0eb7c20405ab0127a443fe51176191b5ad
Reviewed-on: https://dart-review.googlesource.com/35641
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-02-01 09:56:47 +00:00
Brian Wilkerson 1d9ac49dd9 Reland "Add an error when an integer literal is out of bounds"
Change-Id: Id6ef76b47bedabc96fc372f6aea455975dfcc213
Reviewed-on: https://dart-review.googlesource.com/37840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-31 16:50:55 +00:00
William Hesse a4dd9d0a87 Update status for test on dart2js-with-kernel
R=erikcorry@google.com
BUG=32010

Change-Id: Ie615eb2975774027f0f606659d2d6704cf9341a6
Reviewed-on: https://dart-review.googlesource.com/37821
Reviewed-by: William Hesse <whesse@google.com>
2018-01-31 15:24:04 +00:00
Erik Corry e4ebb436c4 Disable list_replace_range_test that fails on dart2js+kernel
R=johnniwinther@google.com
BUG=32010

Change-Id: I325b0fd5d37bc9d15f5a9773f1acc3f7077556bd
Reviewed-on: https://dart-review.googlesource.com/37780
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-01-31 11:17:15 +00:00
Erik Corry d69b81d2e0 Fix test that expects too much from type inference
R=paulberry@google.com

Change-Id: I7a811b690fe06c3295363e7fccfbafb325a8c9b3
Reviewed-on: https://dart-review.googlesource.com/37740
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-31 09:06:31 +00:00
Erik Corry 04d3b1b382 Fix wrong test corelib_2/json_map_test
R=floitsch@google.com

Change-Id: Ie444d91870e4bf043207f05db3950223ce1fcba2
Reviewed-on: https://dart-review.googlesource.com/37620
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-01-31 07:29:24 +00:00
Johnni Winther edf17c8ebf Mark pcre_test as slow
Change-Id: I8f8587ebedd3c0e7120add03daa2b34723dd7f4e
Reviewed-on: https://dart-review.googlesource.com/37240
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-29 09:35:42 +00:00
Alexander Markov 4334c97dcb [Tests] Fix corelib_2/iterable_fold_test and iterable_reduce_test
* Change 'var iterable' to dynamic as type inference can only
  infer Object type.

* Explicitly set result type of closures passed to reduce() to
  make closure type compatible with parameter type expected by reduce().

* To modify List of Lists of int, add '[4]' instead of '4' to trigger
  expected ConcurrentModificationError instead of type error.

* Remove splitting to multi-test.

* Format with dartfmt.

Change-Id: Ie1a35eececbf1133cb2384afad10e9d355016abe
Reviewed-on: https://dart-review.googlesource.com/36300
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-01-26 17:43:33 +00:00
Sigmund Cherem 7f72ad6c18 Fix again
We are still running _2 suites on the legacy compiler, so I incorrectly removed
entries in the previous "fix".

TBR=johnniwinther@google.com

Change-Id: Ie251393e53d35c2eb2f7a5bd301e3cb837fce8a5
Reviewed-on: https://dart-review.googlesource.com/36482
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-23 18:32:18 +00:00
Sigmund Cherem 729ebbe043 Fix status files some more
The _2.status files are not normalized properly, so our script missed this.

We need to follow up with some additional fixes to the .status files and to add
to our script a way to detect these issues (typically whenever we have a "Pass"
and can't find the line that said otherwise).

TBR=johnniwinther@google.com

Change-Id: Icd4a6c003df86c0bf5c0894e971be13bc927f4ba
Reviewed-on: https://dart-review.googlesource.com/36480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-23 17:06:36 +00:00
Sigmund Cherem 444f65315e Pass --strong to dart2js when running in strong mode
Change-Id: I6ddf9e51547e2c7163c82e4433ce3f0fb527173a
Reviewed-on: https://dart-review.googlesource.com/36382
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-23 08:23:26 +00:00
Alexander Markov fc27a2c9d4 [vm/corelib] Fix int/double comparisons in num.compareTo
* double.compareTo(int) is fixed to handle integers which are not
  precisely representable as doubles.

* int.compareTo(double) is fixed to properly handle doubles which
  are clamped when converted to integers (with Dart 2.0 fixed-size
  integers).

* Test for num.compareTo is updated for fixed-size integers; more corner
  cases added.

Closes https://github.com/dart-lang/sdk/issues/31917

Change-Id: I8e98c3627f032082ab6a397713dece436585afd1
Reviewed-on: https://dart-review.googlesource.com/35004
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-01-22 18:22:28 +00:00
Erik Corry 3c2f9ea88d More SkipByDesign for tests that were moved
R=vegorov@google.com

Change-Id: I9d89ce90428d70ceb48e7eb2b16eb63f0aff8734
Reviewed-on: https://dart-review.googlesource.com/35721
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-19 09:11:45 +00:00
Erik Corry 0d1c495024 Add explanations to some status lines
R=kmillikin@google.com

Change-Id: I488148246cca0808e0aa1e6f1648273ca0b0a4ef
Reviewed-on: https://dart-review.googlesource.com/35720
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-18 15:48:24 +00:00
Erik Corry c8ae9bf77b [VM] Stop treating 0x180e as whitespace
This aligns us with JS engines and Unicode 6.3

R=lrn@google.com

Bug: 29060
Change-Id: I0b6356f0e652f7c9841bcf6485aa591a3d835061
Reviewed-on: https://dart-review.googlesource.com/35560
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-18 10:37:15 +00:00
Stephen Adams 8a7c3331df dart2js: Make String.split return List<String>
Two follow-on optimization would reduce the generated code to closer to the original size:

- It would be profitable to write an optimization the removes the type
  information from any list when it can be proven the type information
  is not used.

- Provided the split result list is not modified, we can strengthen
  accesses to be non-null Strings.

Bug: https://github.com/dart-lang/sdk/issues/30548
Change-Id: I87ecdd129ec0227f982bd2e1f34193b3d6b0d81b
Reviewed-on: https://dart-review.googlesource.com/35081
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-18 02:02:24 +00:00
Alexander Markov 7bd5093f83 [corelib] Fix type argument of Iterable from EmptyIterable.map
Change-Id: Ifee26537d05848e4ea6d354f5d57e0f14574d050
Reviewed-on: https://dart-review.googlesource.com/35460
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-01-17 22:31:18 +00:00
Erik Corry 2c951120a9 Precompiler without new front end does not supprt Dart2
R=vegorov@google.com
TBR=vegorov@google.com

Change-Id: If8a1ce64f5628c049be0d334fbd28df670777cf4
Reviewed-on: https://dart-review.googlesource.com/35440
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-17 22:12:08 +00:00
Alexander Markov 2e5264ddea [vm/corelib] Fix int.toRadixString() for MIN_INT64
Closes https://github.com/dart-lang/sdk/issues/31346

Change-Id: Ib925bdacf6503262a3bfb39be032a9607c0420da
Reviewed-on: https://dart-review.googlesource.com/35063
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-01-17 21:50:08 +00:00
Erik Corry 01e5fcd315 Reactivate 90% of string_split_test on dart2js
R=sra@google.com

Change-Id: Ibc88048063899c0ff3eb5be9c3644b5e717d5594
Reviewed-on: https://dart-review.googlesource.com/35282
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-17 21:03:07 +00:00
Erik Corry ac3fafed96 Don't try to run Dart2 tests on the app_jit
R=vegorov@google.com
TBR=vegorov@google.com

Change-Id: Idc7ce57438798fe03b64827bb97e3aa88343a850
Reviewed-on: https://dart-review.googlesource.com/35283
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-01-17 15:56:22 +00:00
Erik Corry b2f8b5481d Update two string tests in strong mode
R=vegorov@google.com

Change-Id: I07edf1dbf6d49ff8283a52f655e8bef8c2e99b4d
Reviewed-on: https://dart-review.googlesource.com/34823
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-17 14:50:11 +00:00
Erik Corry 5ed2f25f40 There is no longer a safarimobilesim test runtime.
And so there is no need to maintain status files for this platform.

R=whesse@google.com

Change-Id: Ie70e4b7308cfd9b1b179b2d1eeeb8f36dd1a62dc
Reviewed-on: https://dart-review.googlesource.com/34824
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-01-17 13:13:17 +00:00