Rationale:
Loop part was not checking anything (no ASSERT).
Also, made test more strict (block should be
in all enveloping loops).
Change-Id: Ib918afa9c130dc8aa26cd8e8104e735075ff1176
Reviewed-on: https://dart-review.googlesource.com/c/92863
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Change-Id: I7afca644ec761a201c490a711293ea6f2710b035
Reviewed-on: https://dart-review.googlesource.com/c/92847
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I07aaa0604477ec827cac9696832ca83649067c93
Reviewed-on: https://dart-review.googlesource.com/c/92845
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Fixes#35870.
Change-Id: Ie250961f12a720a4ffbfc114df55a18518bf0426
Reviewed-on: https://dart-review.googlesource.com/c/92864
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
If a named parameter is annotated as `@required`, then this overrides
the NamedNoDefaultParameterHeuristic; the parameter is considered
required regardless of what happens at call sites. A duplicate
`@required` annotation is not inserted.
Change-Id: Ib1385d0a65dd9001bb7abede9de2a319f65a1f86
Reviewed-on: https://dart-review.googlesource.com/c/92844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The issue derives from the fact that `parameterStructure` has only the preserved parameters,
however the SSA was emitting values for all arguments.
I fixed this by emitting all parameters. I also noticed that the parameter order should
probably be the native-ordering here as well (it doesn't matter for the factory, but it may
matter for other static native calls, if any)
Bug: https://github.com/dart-lang/sdk/issues/35916
Change-Id: I2e93c7f8e3baf5c9285107d23786bb3bf4f3a511
Reviewed-on: https://dart-review.googlesource.com/c/92626
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This fixes a bug in test.py's new --tests option.
Change-Id: I0410972116045c612429565081ad84735d2d2bf1
Reviewed-on: https://dart-review.googlesource.com/c/92784
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Fix some types of base objects in the V8 snapshot profile output.
Rename ICData::ic_data_ to entries_ as it does not point to an ICData.
Change-Id: Ie80974e2eb741810a5f540dd40e5d60a519d8e4e
Reviewed-on: https://dart-review.googlesource.com/c/92665
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
The Set literals support in 0.1.82 looks good for Flutter after a test migration
(https://github.com/flutter/flutter/pull/27811).
flutter-analyze-try is meant to break but only flag legitimate opportunities to migrate (validated in PR above).
Change-Id: Ie63d00cd006a96cd7f2df44b82ff8a82cf73b6bc
Reviewed-on: https://dart-review.googlesource.com/c/92761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
This allows LSP to translate locations to line/col ranges without re-requesting the LineInfos.
Change-Id: I59fab4d9f9de123deefd02a901ab4cc34ef8c0fb
Reviewed-on: https://dart-review.googlesource.com/c/92680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
Currently assuming that the language team chooses option 2 for
https://github.com/dart-lang/language/issues/156#issuecomment-460525075.
To handle the case where the user does not specify a default value,
and all call sites supply the named parameter, there are two possible
heuristics:
- assumeNullable: mark the parameter as nullable, since the implicit
default is `null`, even though the implicit default is never used.
- assumeRequired: consider the parameter to be `@required`, ensuring
that the implicit default will never be used.
I've provisionally chosen `assumeRequired` as the default behavior.
Functionality not yet implemented:
- If `@required` is already present in the source code, this should
override the heuristic; also it should not be added again.
- If the parameter is already marked as nullable in the source code,
this should override the heuristic.
- Uses of `@required` should be translated to `required`.
- If `@required` is already present in the source code, and a default
value is supplied, the default value should be removed.
- If the parameter is used in a way that demonstrates it was intended
to be non-nullable (i.e. it appears in a place in unconditional
control flow that would cause an exception to be thrown if it was
null), this should override the heuristic and cause it to be marked
as `@required`.
Change-Id: I9f2ec63787fdb6215e6075ecfcc830ed9942b8b5
Reviewed-on: https://dart-review.googlesource.com/c/92532
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This change assigns systematic names to the builders for branches, where
those builders end in their branch name as the suffix. This will be used to
identify to which branch the builders belong.
Change-Id: Ifa3be5dbbd45d4f623f70dd36d12426d360b0c30
Reviewed-on: https://dart-review.googlesource.com/c/92741
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
To support separate compilation in DDC, the constant evaluator would
leave instantiations through unavailable constructors unevaluated.
These constructors were identified by being in an external library and
having no initializers. This check erroneously triggered on
"const Object()", breaking the bytecode generator.
Change-Id: I73c10982a36086a431e9fbd54d67cbcde90df68e
Reviewed-on: https://dart-review.googlesource.com/c/92721
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
This is the next step towards preventing compiler from directly peeking
into runtime and instead interact with runtime through a well defined
surface.
This CL decouples the hand-written stub codes from the runtime. The
target architecture dependent stubs are moved to
dart::compiler::StubCodeCompiler which use dart::compiler::target:*
for accessing any runtime related code.
The generation of type testing stubs is moved to separate files for the
time being.
Issue https://github.com/dart-lang/sdk/issues/31709
Change-Id: Icd0995b18a7bac496b1e12231cf437943f5c94f1
Reviewed-on: https://dart-review.googlesource.com/c/92720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
Sometimes there is no difference between 'relevance' and 'relevanceBoost',
for example for enum constants. But for primitive constants, there might
be multiple `double` constants, in different libraries with their own
different relevances. And it would be nice to keep relative relevances
of these libraries in primitive type constants.
R=brianwilkerson@google.com
Change-Id: I3641a4709e09f5c5dd979f5ca8df7b0235c708d2
Reviewed-on: https://dart-review.googlesource.com/c/92623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Some of the new control flow collections tests are using the spread operator.
Change-Id: Id050025342692a5e3d88471840c4f0ca5cdab5da
Reviewed-on: https://dart-review.googlesource.com/c/92480
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This reverts commit 4118d3c793.
Crashes on hot reload/rollback bots.
Original change's description:
> [vm/extensions] Fix Loader::ReloadNativeExtensions(...).
>
> This method was not doing anything since the switch to Dart 2
> because extensions no longer were added as imports to the libraries
> which loaded them.
>
> This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.
>
> Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
> Reviewed-on: https://dart-review.googlesource.com/c/92180
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=rmacnak@google.com,sjindel@google.com
Change-Id: If8c8d6cf8ee2cb0a354601f94c609d3d7b5ddf03
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/92640
Reviewed-by: Samir Jindel <sjindel@google.com>
Change-Id: I242d87bc7104d0f01af4be4339be451ca2308736
Reviewed-on: https://dart-review.googlesource.com/c/92621
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
It was removed for https://github.com/dart-lang/sdk/issues/25197
This CL though does not remove it everywhere though.
There are 41 other references in tests, doing:
assertNoSuggestions(kind: CompletionSuggestionKind.ARGUMENT_LIST);
Maybe we should remove these as well?
R=brianwilkerson@google.com
Change-Id: I812a2d6900e8430e5808a5a5cd8285b32d1517d6
Reviewed-on: https://dart-review.googlesource.com/c/92620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This method was not doing anything since the switch to Dart 2
because extensions no longer were added as imports to the libraries
which loaded them.
This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.
Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
Reviewed-on: https://dart-review.googlesource.com/c/92180
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>