Small --optimization-counter-threshold makes tests very slow,
especially on architectures where kernel service runs from
kernel and not from app-jit snapshot.
TEST=change in tests, *-ia32 bots
Fixes https://github.com/dart-lang/sdk/issues/48627
Change-Id: I63e7e201ef9a0e4f645016c39a5be1819b61822d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263421
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.
TEST=No behavior changes.
Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
This exits current isolate immediately. If [port] is provided, then [message] is verified and sent out as isolate exits.
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47164
Change-Id: I513f4d7ceb5d74820f4aee60f5799b7b5193f2e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214312
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Previously, when encountering identifiers in metadata on a class's
type parameter, the analyzer would resolve them using the type
parameter scope, but then fall back on using implicit `this`. The CFE
would resolve them using the class body scope. In both cases, the end
result was that the annotation could refer to static class members.
This change brings the behavior of both the analyzer and the CFE in
line with the spec, by preventing the use of implicit `this` in these
annotations, and resolving them in the type parameter scope.
This is not expected to break any code in practice, because
annotations on type parameters are rare, as are annotations referring
to static class members, and the overlap between these two should be
negligibly small.
Fixes https://github.com/dart-lang/language/issues/1790.
Bug: https://github.com/dart-lang/language/issues/1790
Change-Id: Ibe5a421e04a53d29074a8b1509e1390658ed72e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210040
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This is a reland of 824bec596f
Original change's description:
> [vm] Hide internal implementation List types and expose them as List
>
> When taking a type of an instance with x.runtimeType we can map
> internal classes _List, _ImmutableList and _GrowableList to a
> user-visible List class. This is similar to what we do for
> implementation classes of int, String and Type.
> After that, result of x.runtimeType for built-in lists would be
> compatible with List<T> type literals.
>
> Also, both intrinsic and native implementations of _haveSameRuntimeType
> are updated to agree with new semantic of runtimeType.
>
> TEST=co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01
> TEST=runtime/tests/vm/dart/have_same_runtime_type_test
>
> Fixes https://github.com/dart-lang/sdk/issues/46893
> Issue https://github.com/dart-lang/sdk/issues/46231
>
> Change-Id: Ie24a9f527f66a06118427b7a09e49c03dff93d8e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210066
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Tess Strickland <sstrickl@google.com>
TEST=co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01
TEST=runtime/tests/vm/dart/have_same_runtime_type_test
TEST=lib/mirrors/regress_b196606044_test
Fixes https://github.com/dart-lang/sdk/issues/46893
Issue https://github.com/dart-lang/sdk/issues/46231
Change-Id: I79b587540338808bd73a6554f00a5eed042f4c26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210201
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This is a reland of 8a21ab195a
Original change's description:
> [VM/runtime] Refactor the representation of type parameters in the VM.
>
> This introduces a new VM internal class 'TypeParameters' representing the declaration of a list of type parameters, either in a class or function.
> The reference to (or use of) a type parameter is still represented by the existing 'TypeParameter' class.
>
> Fixes https://github.com/dart-lang/sdk/issues/43901
> Fixes https://github.com/dart-lang/sdk/issues/45763
>
> TEST=existing ones and a regression test
>
> Change-Id: I1fde808bf753cc1cb829f2c4383c1836651cee80
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189942
> Commit-Queue: Régis Crelier <regis@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
This fixes https://github.com/dart-lang/sdk/issues/45911
TEST=existing ones and a regression test
Change-Id: I709d38b1df3d73fe3c9796d5aca3cbbdcf77fd38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198380
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit 8a21ab195a.
Reason for revert: Test failure: http://b/187227619
Original change's description:
> [VM/runtime] Refactor the representation of type parameters in the VM.
>
> This introduces a new VM internal class 'TypeParameters' representing the declaration of a list of type parameters, either in a class or function.
> The reference to (or use of) a type parameter is still represented by the existing 'TypeParameter' class.
>
> Fixes https://github.com/dart-lang/sdk/issues/43901
> Fixes https://github.com/dart-lang/sdk/issues/45763
>
> TEST=existing ones and a regression test
>
> Change-Id: I1fde808bf753cc1cb829f2c4383c1836651cee80
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189942
> Commit-Queue: Régis Crelier <regis@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com,sstrickl@google.com
Change-Id: If12caa1a84cb6d1c1b8225589f3c994d25abb120
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198282
Reviewed-by: Michal Terepeta <michalt@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
This introduces a new VM internal class 'TypeParameters' representing the declaration of a list of type parameters, either in a class or function.
The reference to (or use of) a type parameter is still represented by the existing 'TypeParameter' class.
Fixes https://github.com/dart-lang/sdk/issues/43901
Fixes https://github.com/dart-lang/sdk/issues/45763
TEST=existing ones and a regression test
Change-Id: I1fde808bf753cc1cb829f2c4383c1836651cee80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189942
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This test was assuming that Platform.script would be equal to library
URI, but this is not the case when running from a dill file or a
snapshot.
Change-Id: I0ff2249b5b5301d6463ceca48097df7cb64e78b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167501
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The annotation has no semantics related to these tests, and the tests
will be cleaner without the extra code.
Change-Id: I0f31a30af624d2af707eae3003acb09a742bef3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152612
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This flag is unused and the behavior it enables was only useful along with
`dart:mirrors`.
- Remove the flag and the field on the options object.
- Prune code branches that are no longer reachable.
- Remove or inline some functions that became either empty or trivially small.
- Remove the manual check for a `dart:mirrors` import since this is handled by
the CFE now.
- Remove references to the flag in tests.
- Remove test files which only existed to enable the flag for other tests.
Change-Id: I21bf594271fb4eeb5b73fcbf07da736e9e8d1f33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138018
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
This one was literally only used for a single test. :-/
Change-Id: I316e17ecaf9a839b3c6f27ec86971a67ab52bbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135782
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
These changes are not sufficient by themselves, but the subset that can still run in Dart 2.
Bug: https://github.com/dart-lang/sdk/issues/40045
Change-Id: Ie8f61fc9ee94b85329a701f97b5d3f91dbc1f889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132422
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Added ability to recognize a MethodMirror to be a mirror of an extension member
Added ability to recognize a VariableMirror to be a mirror of a static
extension field.
Change-Id: I56715a491bba0d8cafb2796ebb755bd339e147c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120760
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Remote mirrors ended up being implemented as the service protocol instead of a Dart API.
Change-Id: I03b6c92d6acdde28e7b55044d98e075f5a1fe57e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109321
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
In bytecode mode default values are part of the method body, which is
omitted for abstract methods.
In anticipation for this future change, default values of parameters of
abstract methods are no longer available through dart:mirrors.
Please also see https://github.com/dart-lang/sdk/issues/38464
Change-Id: I47742b588690ea96cb3ca636ff86e4e042bfe5a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117299
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
In particular, mirrors_reader_test no longer crashes.
Change-Id: I602e7d85755dafd943fe84d20831f0f35484b387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108968
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This allows to break a circular dependency between package:expect and
package:async_helper, which will simplify the support for modular tests using
package:modular_test.
Change-Id: Ie48723d3f35d51a8fbe622e0158450e8104fe3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102140
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Revert "[ VM / Mirrors ] Added type checking to enforce strong mode semantics when using dart:mirrors"
This reverts commit 9f00eec55b.
Change-Id: I82ce07d388ba9402f20caf700815b39c9bc418f6
Reviewed-on: https://dart-review.googlesource.com/c/83225
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Implements static semantics for redirecting factories (c.f. §10.6.2 of
the specification). This CL does not include inference of actual type
arguments on redirectees, that is it does not handle the case where
type arguments have been omitted on the redirectee as in this
following example program:
class A<T> {
factory A() = B;
}
class B<T> implements A<T> {
B();
}
Closes https://github.com/dart-lang/sdk/issues/32988.
Also resolves the second part of
https://github.com/dart-lang/sdk/issues/30579.
Can possibly also close https://github.com/dart-lang/sdk/issues/11578.
Change-Id: I5f1fb60510ba6cdc917321239819c1f817b5b85d
Reviewed-on: https://dart-review.googlesource.com/74580
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Bug: https://github.com/dart-lang/sdk/issues/33022
This commit adds an error when a final field is not initialized at all
(and there is at least one generative constructor). A later commit
will add an error for the case where a field is initialized by some,
but not all, generative constructors.
A number of classes in the Dart2js and DDC support libraries use
uninitialized final fields to indicate getters in the corresponding
native classes. This commit adds a temporary whitelist for the
affected files, which can be removed when the fields have been
replaced by external getters.
This is tracked by https://github.com/dart-lang/sdk/issues/33762
Change-Id: I6b5cee230c7cd5554da2b61da7ebddb6b0b9396e
Reviewed-on: https://dart-review.googlesource.com/63781
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Add simplified unittest replacement to package:expect.
(It is used in multi-tests, so it needs to be in an accessible place without using ".." in its path).
Change-Id: I60aa212ed67ffbdda17ca18fce1cdff16237f4fe
Reviewed-on: https://dart-review.googlesource.com/65700
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
server is started.
When the incremental compiler is used it accumulates state that
increases the footprint of the process. This state is needed only
when the 'reload' or 'expression evaluation' functionality is used
in the debugger.
Currently in the VM we do not have a good way of detecting when the
debugger will be used as the vm service observatory functionality
can be turned on dynamically after the program has started.
This CL turns on the incremental compiler only when command line options
are used to start the observatory server. We could run into issues with
'expression evaluation' when the observatory is started dynamically after
the program is loaded.
Change-Id: I18c17698622071bca428018f7fdac1a84b0f195e
Reviewed-on: https://dart-review.googlesource.com/64667
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
In 4fb0c60938
active class was set in StreamingDartTypeTranslator, but it turns out
this is not enough. This CL sets active class in StreamingFlowGraphBuilder;
all dependent helper objects should pick it automatically.
Fixes https://github.com/dart-lang/sdk/issues/33259
Change-Id: If16afff35de32cbdba23f6260dac0e0fd7e9786a
Reviewed-on: https://dart-review.googlesource.com/57524
Reviewed-by: Samir Jindel <sjindel@google.com>
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
- Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).
Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit ad4cfa0260.
Reason for revert: Assertion failures on DBC
Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
>
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
>
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>
TBR=rmacnak@google.com,zra@google.com,asiva@google.com,kmillikin@google.com
Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
Without active class, kernel reader is not able to finalize types
and fails to parse type literals.
Fixes https://github.com/dart-lang/sdk/issues/33173
Change-Id: Iefe7f33a371f3d4f892f21f8ea0060d70887186c
Reviewed-on: https://dart-review.googlesource.com/56242
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>