Change-Id: I4ecec92d5d0d51e050e2d3a189eede439e5b8de3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171520
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Change-Id: I5883ce6e80d451b52073f3770fbdf971e7dcf18c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170692
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Simple calls to `List.generate` are expanded into a list allocation
and a loop. This generates better code for several reasons:
- There is no overhead for the function argument (closure allocation,
closure type, closure class)
- Global type inference is more precise since each List.generate list
is tracked separately, and the assignments in the loop give better
inference to the collection's element type.
To get precise element type inference, there are two new JSArray
constructors. Global type inference starts with the element type being
bottom for these elements, avoiding spurious nulls in the inferred
type.
Change-Id: I5efb90651ae3f9eb2e81af556704960cdf0b75c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168770
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The spec string `Object` matches all native classes. The combination
of RegExp named groups and importing 'dart:html' in a small program
could result in a larger `.js` file than expected. Using `=Object`
fixes the excessive number of native classes matched.
Change-Id: I40ab8195d0edc24d05a748bc35c5f74f66272937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171044
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
If the bound is not specified, CFE will use Object* in an opted-out library or Object? in an opted-in library, and not dynamic as before.
This workaround is therefore not needed anymore, and actually harmful as shown in the regression tests.
Closes https://github.com/dart-lang/sdk/issues/44136
Add regression tests.
Change-Id: I11a96cbebcb592f66f3965e38cb2411200df332b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171380
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
The 'isInvariant' property of ir.MethodInvocation nodes allows dart2js
to lower JSArray.add to Array.push in more cases. It is set in the
expansion of List literals.
Change-Id: I6c08ec449e6f7e2b2d839e9faeeff2c338f29e5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171080
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This flag doesn't seem to be used anywhere, neither of
dart/flutter/golem/g3.
Main motivation is to remove the GC triggering code in
Isolate::MakeRunnable.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: If48072f62974dec5f7c19cc08be7904401e38a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171282
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Change-Id: Ic209ecd3ec52380a9dd1f214be3b854a64e03d9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171283
Auto-Submit: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Now a `pub get` will be run implicitly if needed.
(This happens in getExecutableForCommand from the pub package).
Change-Id: I9eca9b6d8761a3035f21c0f86653c87710b9d229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171281
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
The directory was deleted in an earlier change.
Change-Id: Ib6191c5624c7db2462c67a62d4221eacb034eec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171280
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This change synchronizes the try_benchmarks script with the commands
currently used to build for benchmarking and adds a test that the
IsolateSpawn benchmark continues to work.
Change-Id: I37066fb8a246e0003bdccd7c4dbb5b84060b30f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170982
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL refactors NativeCallingConvention to be a standalone class that
can be unit tested separately. It no longer uses Function to calcalate
the native ABI, but a NativeFunctionType.
The BaseMarshaller no longer extends NativeCallingConvention but nests
it instead.
The actual unit tests will be added in a follow up CL.
Issue: https://github.com/dart-lang/sdk/issues/44117
Change-Id: Ib529cbaa7e52b51ebdec831eeb772faee153335c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170981
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: Ief025612b5f3e14079716460eae030d09f6f5e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170862
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Change-Id: I6db1a2a5dd4501b16fa947a8fa1c337592947ade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170842
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Change-Id: Ie55532aa1471d2c9df1f32ab9444e977f984f7e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170861
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Change-Id: Ie5ba98ac96c05c4890c4b80fbdfe673f2ad64d96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170860
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
When I first implemented this I thought that checking exports wasn't
needed, since it's not allowed for a migrated library to re-export
symbols defined in an unmigtated library. But it turns out we still
do need to include exports in the check, since there might be migrated
libraries that are only reachable in the transitive dependency graph
via an export, and we need to check that *those* libraries don't
import unmigrated code.
Bug: https://github.com/dart-lang/sdk/issues/44061
Change-Id: I280b4117373a3320fc1efe65abe24e344199754c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
There are no functional differences between the previous and the new
commit. Though it brings in a fix for a test which is required for
further dart->g3 rolls.
Issue b/172649154
Change-Id: I923246aa9db1973e213257a086f0065ad862ca4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170881
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
In error reporting on assignability where the expression has type
`Null` we use a special messages that doesn't state that
"'Null' is nullable". Cases where `Null` is part of the type or where
the expression of type `Null` is derived from a collection are not
special cased.
Closes#43998Closes#44093
Change-Id: Ic0c79e6362f2365eb3fe8222ccd2ef8fac4f188d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170433
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
The CL add a 'flags' to MethodInvocation with the properties isInvariant
and isBoundsSafe. The former is used for to marks safe calls in unified
collection encoding. Both can be used further by backends.
The CL also adds a 'fileEndOffset' to Block. This is current set for
block declared in used code.
In response to https://github.com/dart-lang/sdk/issues/43994
and https://github.com/dart-lang/sdk/issues/43965
Change-Id: I579fc2928331465dfc2c152ccfd21297b12cfdd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170695
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>