Skip to content

Commit d4e388e

Browse files
author
Dart CI
committed
Version 2.17.0-6.0.dev
Merge commit '226d3c69f4de8ecd784a03c611d33d9a8e15badf' into 'dev'
2 parents 1330b02 + 226d3c6 commit d4e388e

File tree

12 files changed

+764
-655
lines changed

12 files changed

+764
-655
lines changed

pkg/front_end/lib/src/fasta/builder/class_builder.dart

Lines changed: 1 addition & 561 deletions
Large diffs are not rendered by default.

pkg/front_end/lib/src/fasta/source/source_class_builder.dart

Lines changed: 504 additions & 13 deletions
Large diffs are not rendered by default.

pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
29632963
Iterator<Builder> iterator = this.iterator;
29642964
while (iterator.moveNext()) {
29652965
Builder declaration = iterator.current;
2966-
if (declaration is ClassBuilder) {
2966+
if (declaration is SourceClassBuilder) {
29672967
declaration.buildOutlineExpressions(this, classHierarchy,
29682968
delayedActionPerformers, synthesizedFunctionNodes);
29692969
} else if (declaration is ExtensionBuilder) {

pkg/front_end/test/patching/patching_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
1010
import 'package:front_end/src/api_prototype/compiler_options.dart';
1111
import 'package:front_end/src/api_prototype/experimental_flags.dart';
1212
import 'package:front_end/src/fasta/builder/builder.dart';
13-
import 'package:front_end/src/fasta/builder/class_builder.dart';
1413
import 'package:front_end/src/fasta/builder/member_builder.dart';
14+
import 'package:front_end/src/fasta/source/source_class_builder.dart';
1515
import 'package:front_end/src/fasta/source/source_member_builder.dart';
1616
import 'package:front_end/src/testing/id_testing_helper.dart';
1717
import 'package:front_end/src/testing/id_testing_utils.dart';
@@ -128,7 +128,8 @@ class PatchingDataExtractor extends CfeDataExtractor<Features> {
128128

129129
@override
130130
Features computeClassValue(Id id, Class cls) {
131-
ClassBuilder clsBuilder = lookupClassBuilder(compilerResult, cls)!;
131+
SourceClassBuilder clsBuilder =
132+
lookupClassBuilder(compilerResult, cls) as SourceClassBuilder;
132133

133134
Features features = new Features();
134135
if (cls.isAbstract) {

runtime/vm/compiler/backend/flow_graph_compiler.cc

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3572,60 +3572,6 @@ void FlowGraphCompiler::EmitMoveFromNative(
35723572
}
35733573
}
35743574

3575-
void FlowGraphCompiler::EmitMoveConst(const compiler::ffi::NativeLocation& dst,
3576-
Location src,
3577-
Representation src_type,
3578-
TemporaryRegisterAllocator* temp) {
3579-
ASSERT(src.IsConstant());
3580-
const auto& dst_type = dst.payload_type();
3581-
if (dst.IsExpressibleAsLocation() &&
3582-
dst_type.IsExpressibleAsRepresentation() &&
3583-
dst_type.AsRepresentationOverApprox(zone_) == src_type) {
3584-
// We can directly emit the const in the right place and representation.
3585-
const Location dst_loc = dst.AsLocation();
3586-
EmitMove(dst_loc, src, temp);
3587-
} else {
3588-
// We need an intermediate location.
3589-
Location intermediate;
3590-
if (dst_type.IsInt()) {
3591-
if (TMP == kNoRegister) {
3592-
Register scratch = temp->AllocateTemporary();
3593-
Location::RegisterLocation(scratch);
3594-
} else {
3595-
intermediate = Location::RegisterLocation(TMP);
3596-
}
3597-
} else {
3598-
ASSERT(dst_type.IsFloat());
3599-
intermediate = Location::FpuRegisterLocation(FpuTMP);
3600-
}
3601-
3602-
if (src.IsPairLocation()) {
3603-
for (intptr_t i : {0, 1}) {
3604-
const Representation src_type_split =
3605-
compiler::ffi::NativeType::FromUnboxedRepresentation(zone_,
3606-
src_type)
3607-
.Split(zone_, i)
3608-
.AsRepresentation();
3609-
const auto& intermediate_native =
3610-
compiler::ffi::NativeLocation::FromLocation(zone_, intermediate,
3611-
src_type_split);
3612-
EmitMove(intermediate, src.AsPairLocation()->At(i), temp);
3613-
EmitNativeMove(dst.Split(zone_, 2, i), intermediate_native, temp);
3614-
}
3615-
} else {
3616-
const auto& intermediate_native =
3617-
compiler::ffi::NativeLocation::FromLocation(zone_, intermediate,
3618-
src_type);
3619-
EmitMove(intermediate, src, temp);
3620-
EmitNativeMove(dst, intermediate_native, temp);
3621-
}
3622-
3623-
if (dst_type.IsInt() && TMP == kNoRegister) {
3624-
temp->ReleaseTemporary();
3625-
}
3626-
}
3627-
return;
3628-
}
36293575

36303576
// The assignment to loading units here must match that in
36313577
// AssignLoadingUnitsCodeVisitor, which runs after compilation is done.

runtime/vm/compiler/backend/flow_graph_compiler.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,12 +613,6 @@ class FlowGraphCompiler : public ValueObject {
613613
const compiler::ffi::NativeLocation& src,
614614
TemporaryRegisterAllocator* temp);
615615

616-
// Emits a Dart const to a native location.
617-
void EmitMoveConst(const compiler::ffi::NativeLocation& dst,
618-
Location src,
619-
Representation src_type,
620-
TemporaryRegisterAllocator* temp);
621-
622616
bool CheckAssertAssignableTypeTestingABILocations(
623617
const LocationSummary& locs);
624618

runtime/vm/compiler/backend/il.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6504,7 +6504,10 @@ void FfiCallInstr::EmitParamMoves(FlowGraphCompiler* compiler,
65046504

65056505
ConstantTemporaryAllocator temp_alloc(temp);
65066506
if (origin.IsConstant()) {
6507-
compiler->EmitMoveConst(def_target, origin, origin_rep, &temp_alloc);
6507+
// Can't occur because we currently don't inline FFI trampolines (see
6508+
// http://dartbug.com/45055), which means all incomming arguments
6509+
// originate from parameters and thus are non-constant.
6510+
UNREACHABLE();
65086511
} else {
65096512
compiler->EmitMoveToNative(def_target, origin, origin_rep, &temp_alloc);
65106513
}

runtime/vm/object.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8173,9 +8173,11 @@ bool Function::CanBeInlined() const {
81738173
// being inlined (for now).
81748174
if (ForceOptimize()) {
81758175
if (IsFfiTrampoline()) {
8176-
// The CallSiteInliner::InlineCall asserts in PrepareGraphs that
8177-
// GraphEntryInstr::SuccessorCount() == 1, but FFI trampoline has two
8178-
// entries (a normal and a catch entry).
8176+
// We currently don't support inlining FFI trampolines. Some of them
8177+
// are naturally non-inlinable because they contain a try/catch block,
8178+
// but this condition is broader than strictly necessary.
8179+
// The work necessary for inlining FFI trampolines is tracked by
8180+
// http://dartbug.com/45055.
81798181
return false;
81808182
}
81818183
return CompilerState::Current().is_aot();

0 commit comments

Comments
 (0)