Skip to content

Commit

Permalink
[pkg/vm] Bump language version to 3.0 and cleanup experimental flags
Browse files Browse the repository at this point in the history
Minimum SDK version is increased in order to be able to use Dart 3.0
language features in pkg/vm.

TEST=ci

Change-Id: I4ef1139b2f8ba8acc7dbcf9bc0fe77f663cc427d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325541
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
  • Loading branch information
alexmarkov authored and Commit Queue committed Sep 12, 2023
1 parent 67f0d4d commit 3ec9cc8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pkg/vm/lib/transformations/type_flow/analysis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class _DependencyTracker {
/// This is the basic unit of processing in type flow analysis.
/// Call sites calling the same method with the same argument types
/// may reuse results of the analysis through the same _Invocation instance.
abstract class _Invocation extends _DependencyTracker
abstract base class _Invocation extends _DependencyTracker
with LinkedListEntry<_Invocation> {
final Selector selector;
final Args<Type> args;
Expand Down Expand Up @@ -187,7 +187,7 @@ abstract class _Invocation extends _DependencyTracker
}
}

class _DirectInvocation extends _Invocation {
final class _DirectInvocation extends _Invocation {
_DirectInvocation(DirectSelector selector, Args<Type> args)
: super(selector, args);

Expand Down Expand Up @@ -367,7 +367,7 @@ class _DirectInvocation extends _Invocation {
}
}

class _DispatchableInvocation extends _Invocation {
final class _DispatchableInvocation extends _Invocation {
bool _isPolymorphic = false;
Set<Call>? _callSites; // Populated only if not polymorphic.
Member? _monomorphicTarget;
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: VM specific Dart code and helper scripts
publish_to: none

environment:
sdk: '>=2.17.0 <4.0.0'
sdk: '>=3.0.0 <4.0.0'

# Use 'any' constraints here; we get our versions from the DEPS file.
dependencies:
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--enable-experiment=records
--target=dart2wasm
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ static method testRemovalOfStatementBodies() → dynamic {
on core::Object catch(final core::Object e) {
}
{}
#L1:
switch(42) /* core::int */ {
#L1:
#L2:
case #C3:
{}
}
#L3:
switch(42) /* core::int */ {
#L2:
#L4:
default:
{}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/tool/compare_il
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ SDK_DIR="$CUR_DIR/../../.."
# checked-in dart binaries must be adjusted.
DART="$SDK_DIR/tools/sdks/dart-sdk/bin/dart"

exec "$DART" $DART_VM_FLAGS --enable-experiment=records,patterns "${SDK_DIR}/pkg/vm/bin/compare_il.dart" $@
exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/compare_il.dart" $@
2 changes: 1 addition & 1 deletion pkg/vm/tool/compare_il.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ set SDK_DIR=%SCRIPTPATH%/../../../

set DART=%SDK_DIR%/tools/sdks/dart-sdk/bin/dart.exe

"%DART%" %DART_VM_OPTIONS% --enable-experiment=records,patterns "%SDK_DIR%/pkg/vm/bin/compare_il.dart" %*
"%DART%" %DART_VM_OPTIONS% "%SDK_DIR%/pkg/vm/bin/compare_il.dart" %*

0 comments on commit 3ec9cc8

Please sign in to comment.