Commit graph

1896 commits

Author SHA1 Message Date
Lasse Reichstein Holst Nielsen 757d806b36 Add type parameter to Isolate.spawn.
This is a strong mode migration that was missed in the earlier rounds.
It allows use of functions that have a more restricted argument type than Object in strong mode
while still ensuring that the argument has a correct type.

Change-Id: Ib00e3f4b4a679c003a992d674c36ef672729b22e
Reviewed-on: https://dart-review.googlesource.com/24540
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-04 07:11:44 +00:00
Paul Berry 10ec335464 [vm,libs] Strong mode fix to bigint.dart
Change-Id: I5a7f9d750ec3615f2050e7ef56cf406804179139
Reviewed-on: https://dart-review.googlesource.com/25141
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-30 22:51:46 +00:00
Samir Jindel be07555207 Revert "Revert "[kernel] Implementation of fine-grained strong mode argument type-checks, phase 2""
This fixes some incorrect asserts that were breaking the debug bots.
The original revision is available in Patchset 1.

This reverts commit 26735519cb.

Bug:
Change-Id: Ifa599b7bff752dec4c505e10fd6db206e1abd977
Reviewed-on: https://dart-review.googlesource.com/23820
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-11-27 18:25:31 +00:00
Vyacheslav Egorov 26735519cb Revert "[kernel] Implementation of fine-grained strong mode argument type-checks, phase 2"
This reverts commit f13f772bb2.

Reason for revert: dartk(p)-strong debug mode is completely broken
because we convert int values non-representable as Smi to Smi, which
triggers that assert. The code that does tagging checks that
Untag(Tag(x)) == x, however for our purposes this identity does not
need to hold because we only care about lower bits and ignore the sign.

Reverting to restore green-ness of DEBUG builds.

TBR=sjindel@google.com

Bug:
Change-Id: Id436cbe000d6dec8db3469070ed531327cc82d89
Reviewed-on: https://dart-review.googlesource.com/23661
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-26 10:21:01 +00:00
Samir Jindel f13f772bb2 [kernel] Implementation of fine-grained strong mode argument type-checks, phase 2
This revision continues the implementation of:
https://docs.google.com/document/d/1KK8b6kzr0pQev5YNftSZhN3M6I8HcvOJwJ6U-cW4nfw/edit?ts=5a05b3e9#heading=h.7j21arix8p2

* Add argument checking bits for named arguments in the arguments descriptor.
* Add argument checking bits for type arguments.
* Calculate argument checking bits for setters.
* Add dispatch category to PropertySet and DirectPropertySet.

Bug:
Change-Id: Ieb0a4a99c401f53a72de473fda7bab61581f9996
Reviewed-on: https://dart-review.googlesource.com/22700
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-24 18:23:57 +00:00
Lasse R.H. Nielsen 847cf039f0 Lower-case Isolate.{IMMEDIATE,BEFORE_NEXT_EVENT}.
Change-Id: I9a7071a7f6dc61b502f5aa9bc9bc2455247a7513
Reviewed-on: https://dart-review.googlesource.com/22984
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-24 12:44:17 +00:00
Samir Jindel a991c17dc9 [kernel] Implementation of fine-grained strong mode argument type-checks, phase 1
The revision begins the implementation of:
https://docs.google.com/document/d/1KK8b6kzr0pQev5YNftSZhN3M6I8HcvOJwJ6U-cW4nfw/edit?ts=5a05b3e9#heading=h.7j21arix8p2

* The ArgumentsDescriptor is updated to hold a bitvector for positional arguments.
* The kernel flowgraph builder is updated to calculate the appropriate bits from
  the interface target and pass them through the ArgumentsDescriptor
  for regular MethodInvocations.

Bug:
Change-Id: I1cd9f43f697df1dd4f36103bbdfc0ba000125c02
Reviewed-on: https://dart-review.googlesource.com/21541
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-21 15:35:48 +00:00
Régis Crelier f91f67a5be [VM] Emit type checks for incoming function arguments in strong mode.
Change-Id: Icd64913f0fc6ba54a0b8517bf05ae4babfae3bdc
Reviewed-on: https://dart-review.googlesource.com/19287
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-18 00:31:35 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

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

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Alexander Markov 59cdc65dc7 [VM] Relax constraints for integer literals according to int64 spec
Handling of integer literals is corrected according to the informal spec
for the fixed-size integers:

https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md

This change allows unsigned 64-bit hexadecimal literals and MIN_INT64
to be used when running on the VM with --limit-ints-to-64-bits option.

Change-Id: Ied7a7688768bcf4ff40ab5b499dd71622d2c3948
Reviewed-on: https://dart-review.googlesource.com/19400
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-09 16:58:38 +00:00
Paul Berry 846832e55b [VM,Libs] Strong mode fix for string_patch.dart
The runtime type of the list passed to makeListFixedLength<int> must
be List<int>.

Change-Id: I3fcc6a53a8b40e97b8b76b125d9ed71bacf96358
Bug:
Reviewed-on: https://dart-review.googlesource.com/19222
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-08 16:11:05 +00:00
Paul Berry 9311f15906 [VM] Strong mode fix for isolate_patch.dart
"If" tests like `if (entryPoint is _BinaryFunction)` are too general;
they only guarantee that `entryPoint` accepts arguments of type
`Null`, whereas in practice `entryPoint` accepts other values.  Once
runtime check insertion is complete, this will cause the front end to
insert implicit downcasts at the time of the call to `entryPoint` to
cast the parameters to `Null`.

Suppress these casts by casting `entryPoint` to `dynamic` at the time
of the call.

Change-Id: I75a98ef25d41fb1b6571901fdf4bfcc079ff35df
Bug:
Reviewed-on: https://dart-review.googlesource.com/19224
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-08 16:03:01 +00:00
Samir Jindel bc9645509e Revert "Revert "[kernel] Fix NoSuchMethod errors for generic functions.""
This un-revert fixes the issues revealed in https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.dart%2Fvm-kernel-mac-release-x64-be%2F2217%2F%2B%2Frecipes%2Fsteps%2Fvm_tests%2F0%2Fstdout.

Patchset 1 contains the original revision unmodified.

This reverts commit 9029ee09c5.

Bug:
Change-Id: I109c011c2688144b00293ce50b3aad53e018a2f2
Reviewed-on: https://dart-review.googlesource.com/18340
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-06 17:07:38 +00:00
Samir Jindel edc4cb1f90 Fix incorrect type inference in Bigint.modInverse.
Bug:
Change-Id: I73639d68c191d74815f7ac78bc98dc862efd319a
Reviewed-on: https://dart-review.googlesource.com/18841
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-06 17:04:28 +00:00
Paul Berry 3e85ad23cf Fix strong mode issue in math_patch.dart.
In the implementations of min and max, when a and b are doubles and a
== 0.0, we have special case logic to return `(a + b) * a * b` and `a
+ b`, respectively.  These expressions both have type `double`,
whereas the return type is required to be `T`, and the type system
can't guarantee that `double` is assignable to `T`, because all that
is known is that `T` extends `num`.

(Note: a human reader can see that since a and b are doubles, and a
and b have static type `T`, it follows that double must be a subtype
of `T`.  But the type system doesn't have the ability to reach this
conclusion).

To work around this issue we assign to a temporary variable of type
`num`.  Since `T` extends `num`, it is safe to return the temporary
variable.

Fixes #31162

Change-Id: I7eeea43384ce134f3b44d266af908a87f8e0e36a
Reviewed-on: https://dart-review.googlesource.com/18515
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 21:30:00 +00:00
Lasse R.H. Nielsen adcb6a7399 Make main invocation not fail strong-mode type checking.
Bug: http://dartbug.com/31270
Change-Id: Id6ad2a429d5dc44b437a0fdd8fb4889d3dccf194
Reviewed-on: https://dart-review.googlesource.com/18480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 16:06:00 +00:00
Samir Jindel 9029ee09c5 Revert "[kernel] Fix NoSuchMethod errors for generic functions."
This reverts commit 52e1466588.

Bug:
Change-Id: Ic1b37a5df2f50ede4f6873b6d2a701663673bcbb
Reviewed-on: https://dart-review.googlesource.com/18261
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 16:52:32 +00:00
Samir Jindel 52e1466588 [kernel] Fix NoSuchMethod errors for generic functions.
Bug:
Change-Id: I8ad90e34a7b1f77b29f1d711f158bcb69f5928f4
Reviewed-on: https://dart-review.googlesource.com/17941
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-02 15:16:08 +00:00
Peter von der Ahé 0023f99019 Changes to runtime patches so Fasta can understand them.
Change-Id: I7f8d6b110f2f0c90b131a2538240c1b81bfa1578
Reviewed-on: https://dart-review.googlesource.com/17162
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 15:16:04 +00:00
Alexander Markov c84e2968ac [VM] Avoid dynamic call in _Double.==
Change-Id: Iab301370f33c375db1cd52f8eb87500955dfab09
Reviewed-on: https://dart-review.googlesource.com/17722
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-10-31 22:01:09 +00:00
Alexander Markov 6505994d58 [VM] Correct return type of _setHash
Change-Id: I3f02d584d30fc7a2f3bd93858eaf77abe3c9f5b7
Reviewed-on: https://dart-review.googlesource.com/17720
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-10-31 22:01:08 +00:00
Martin Kustermann 84dbb6e0b6 [VM] Do eager rehashing of [LinkedHashMap]s in order to avoid checking on every access
This improves 
  * JIT performance by around 14% 
  * precompiled performance by around 2%
on a simple map microbenchmark.

Change-Id: I623e2a715a709f89f2514ae30fbb504ee2e31661
Reviewed-on: https://dart-review.googlesource.com/17165
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-31 13:42:15 +00:00
William Hesse 65c7fb4a96 Add correct type in Timer implementation
R=dmitryas@google.com
R=jacobr@google.com

Bug:
Change-Id: I30f2e177b956b7f05b4d580a4736587ec0f15751
Reviewed-on: https://dart-review.googlesource.com/17163
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2017-10-30 13:36:14 +00:00
Paul Berry 6f9d6965fe Insert implicit downcasts for simple assignments.
Notes on test changes:

- This revealed runtime failures in some tests in
  pkg/front_end/testcases/inference.  Since these tests were never
  meant to exercise runtime behavior in the first place, I just
  changed them so that main() does nothing.

- This revealed runtime failures in some tests in tests/language_2.
  These tests began failing because they used "var" for a fields and
  then later assigned a value to the field that was incompatible with
  the inferred type.  It looks like the intent was for these fields to
  have type "dynamic", so I changed the tests accordingly.

Change-Id: I0ddb2063427b52b5e4be1884fa333e25be4bf4f3
Reviewed-on: https://dart-review.googlesource.com/16881
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-27 18:27:09 +00:00
Vyacheslav Egorov 4985165e76 [VM] Make "Hello, World!" run in strong mode (through DFE).
Includes the following changes:

- Disable type checking in the service isolate when strong mode is 
turned on. We don't yet have strong mode clean vmservice Kernel 
binary available (Issue #31203);
- Introduce new Dart VM API to allow creating List<T> (T in {String, int}).
Current API only allows to create List<dynamic> and in strong mode 
List<dynamic> is not assignable to List<T>. For now we limit this API to 
a fixed number of core types for performance considerations (type 
arguments can be canonicalized and cache ahead of time). We will
extend the API allowing creation of arbitrary List<T> if we will
discover the need for it later;
- Use this new API to fix CreateRuntimeOptions to create List<String>
and not List<dynamic>;
- Likewise fix OneByteString_splitWithCharCode to return List<String>
and not List<dynamic>;

Additionally this CL refactors how getters and setters are created
in object_store.h removing 500 lines of largely boilerplate code.

Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I3fdcd2d54ff3f307db0913c67a7c2f009ea9d7a7
Reviewed-on: https://dart-review.googlesource.com/15884
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-10-24 11:43:48 +00:00
Kasper Lund 1db8615e29 Avoid just truncating to the nearby int in double.hashCode.
Preserves the property that doubles and ints that are equal
share the same hash code, but gives different doubles a much
higher chance of having different hash codes.

BUG=https://github.com/dart-lang/sdk/issues/2884

Change-Id: Ia97164087db568f26ffbbd6854ed9c19f81e9611
Reviewed-on: https://dart-review.googlesource.com/15140
Commit-Queue: Kasper Lund <kasperl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-23 06:47:20 +00:00
Vyacheslav Egorov 9cd7bc724d [VM, Kernel] Fix sync* implementation in checked mode
Change abefb7b432 introduced a typing issue
instead of fixing it: _SyncIterator<T>._current was actually used to return
either a value of type T (for yield) or value of type Iterable<T> (for yield*)
from the move callback.

This change refactors implementation of _SyncIterator in such a way that
_current is only used to return value for yield and a separate field
_yieldEachIterable is used to return Iterable<T> for yield*.

Change-Id: I3e3c832bbc8986d6976ddbb0856a1b5a127d845b
Reviewed-on: https://dart-review.googlesource.com/15542
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-20 18:15:28 +00:00
Vyacheslav Egorov faff8765c4 [VM] Fix typing issues in _List and _GrowableList
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I4ef4d1f1fbaefa1a39b56a7ad00c8b365a5e5202
Reviewed-on: https://dart-review.googlesource.com/14842
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-19 15:27:15 +00:00
Vyacheslav Egorov 1142aaa713 [VM] Cleanup more typing issues in convert_patch.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: Id39d6e44f49b539a5416ea6f5f62f252ee5a4c94
Reviewed-on: https://dart-review.googlesource.com/15122
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-19 14:01:07 +00:00
Vyacheslav Egorov 49eb9ed58e [VM] Cleanup typing issues in regexp_patch.
RegExp implementation expects to see:

- _groupCount on all RegExp objects;
- _substringUnchecked on all String objects;

Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I81f705d85a4b1325941562a0287870c7a8edad9c
Reviewed-on: https://dart-review.googlesource.com/15123
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-19 14:00:57 +00:00
Vyacheslav Egorov 64f6b38a6e [VM] Cleanup typing issues in collection_patch
Parameterize hash map entries and iterators with appropriate type arguments.

Cleanup code that was declaring local variables with unnecessary explicit types,
while at the same time dropping relevant type arguments (e.g. List instead of
List<_HashMapEntry<K, V>>).

Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I420e84e9ba549d7a9713970c85dbccc19d26761f
Reviewed-on: https://dart-review.googlesource.com/15121
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-19 13:07:57 +00:00
Vyacheslav Egorov dcfb7b9a4c [VM] Fix typing violations in string_patch.dart.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I1a0a94ce19bb54cb4273d1508b6ed08b94c60307
Reviewed-on: https://dart-review.googlesource.com/14840
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-19 06:42:37 +00:00
Régis Crelier 269298fa8e [VM] Remove support for deprecated tear off syntax in the VM.
Change-Id: I2359bb18783cf21eab94001fe401f66c2ce680b7
Reviewed-on: https://dart-review.googlesource.com/14721
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-18 01:11:00 +00:00
Vyacheslav Egorov 826b48ee8a [VM] Clean up typing violations in the numerics implementation.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I93d7bca2ff627431f1a316bb01a5dada1b5f2354
Reviewed-on: https://dart-review.googlesource.com/14522
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-17 21:00:24 +00:00
Vyacheslav Egorov abefb7b432 [kernel] Assign proper types and interface targets to nodes created by async transformer.
Bug: https://github.com/dart-lang/sdk/issues/31070
Change-Id: Iaedbd425fcb6d243c0bfa93495335658553a9301
Reviewed-on: https://dart-review.googlesource.com/14481
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-17 17:44:00 +00:00
Florian Loitsch 88f58757b1 Fix datetime for daylight-saving transitions.
Change-Id: I0ec35937a76ada32991b79bcdac57912731db489
Reviewed-on: https://dart-review.googlesource.com/14380
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-17 08:26:21 +00:00
Régis Crelier 390c80234a [VM generic functions] Properly instantiate generic signatures by providing the
number of free function type parameters.
Add test and mark status files.

Change-Id: I081de7674693c5ac2071a33948d25aadfc65f4ae
Reviewed-on: https://dart-review.googlesource.com/13901
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-16 21:57:05 +00:00
pq d184bcef2a Revert "Fix datetime for daylight-saving transitions."[TBR]
This reverts commit 95d3298ae7.

floitsch@ to revisit and re-apply tommorrow.

Bug:
Change-Id: I54b0851fdf4b931d1718f850ffe9d467495dc745
Reviewed-on: https://dart-review.googlesource.com/14080
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-10-16 17:20:09 +00:00
Florian Loitsch 95d3298ae7 Fix datetime for daylight-saving transitions.
This is a temporary fix, until https://dart-review.googlesource.com/c/sdk/+/9300 works for iOS.

Fixes #30550.
BUG= http://dartbug.com/30550

Change-Id: Id8ef8508510d577023e32402d8ea6f257f2f16d1
Reviewed-on: https://dart-review.googlesource.com/14044
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-10-16 15:00:06 +00:00
Vyacheslav Egorov 0179aa14b3 [VM] Cleanup typing issues in mirrors_impl.dart
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: Ib209aed8d3e2871d8c5676b1c89a2ec2487649af
Reviewed-on: https://dart-review.googlesource.com/12447
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-16 10:30:26 +00:00
Vyacheslav Egorov 3f9a4966e7 [VM] Fix typing issues in the typed_data.dart
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I6bc0454c8c27432ee6206267c04d114d47835046
Reviewed-on: https://dart-review.googlesource.com/12660
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-11 10:29:05 +00:00
Alexander Markov 86fde60e4d [VM] Intrinsify Type.hashCode
This CL optimizes Type.hashCode similarly to String.hashCode, by
introducing intrinsic version of hashCode calculation which uses
hashcode stored in Type instance.

This is important for Flutter's .of pattern, which heavily uses
Maps with Type keys.

Results on Flutter stocks/build_bench.dart microbenchmark:
Before: 4906 µs
After:  4751 µs
(minimum of 5 runs, using tip of Flutter and Flutter engine)

Issue: https://github.com/dart-lang/sdk/issues/31011
Issue: https://github.com/flutter/flutter/issues/11572
Change-Id: Ifbaf721050007db49bbd969dc669d070f4ce839e
Reviewed-on: https://dart-review.googlesource.com/12622
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-10 23:46:09 +00:00
Vyacheslav Egorov a771e05fa4 [VM] Fix typing issues in convert_patch.dart
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I65cea214cb4f053850a05c107f78a8af1bdde81f
Reviewed-on: https://dart-review.googlesource.com/12446
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-10 11:09:11 +00:00
Vyacheslav Egorov 5b14ee115a [VM] Make _StringBase implement String
_StringBase is used everywhere as if it was assignable to String,
however it itself does not implement String, its subclasses do.

This change addresses this.

Also removes unused native runtime method from one of subclasses.

Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: Iea2389d1b48a3689fb11c99c0e230747ab1c5962
Reviewed-on: https://dart-review.googlesource.com/12444
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-10 10:33:31 +00:00
Peter von der Ahé e8aef37eac Clean up patches so they can be compiled by Fasta.
Change-Id: Ie436375c78496366accf0ba82938e54cbe30b143
Reviewed-on: https://dart-review.googlesource.com/3001
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-05 14:05:50 +00:00
Siva Annamalai e1f107973d Delete code related to FLAG_i_like_slow_isolate_spawn which was only used in dartium.
Change-Id: I7dd9d8d825253146c9b1c04216cc63fbf7aa9ba7
Reviewed-on: https://dart-review.googlesource.com/11251
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-05 00:56:43 +00:00
Samir Jindel 195c62ff0c [kernel] Begin reducing type erasure.
1. We no longer remove type parameters on functions.
2. We no longer remove type arguments at call sites.
3. We allow non-captured function type parameters to be used outside closures. 

Bug:
Change-Id: I116ec54c90b04be90e1157042c22797e57a7c51c
Reviewed-on: https://dart-review.googlesource.com/9342
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-03 14:33:30 +00:00
Régis Crelier db8b20107b Revert "Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError.""
This reverts commit 8cf9ef22c4.

The expectations in Dart2js and Kernel tests have now been updated.

Change-Id: I9d65ff207490cfc783849b1b726db81cf56ecfc2
Reviewed-on: https://dart-review.googlesource.com/9124
Reviewed-by: Régis Crelier <regis@google.com>
2017-09-28 00:27:24 +00:00