99a5f149ac
Relanding 4be50d6fa1 with fixes to DBC
and location summaries: AssertAssignable must save FPU registers.
For now we are limiting this to type checks against type parameter types.
In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).
Before this change in Dart 2 mode numbers were 51s and 57s respectively.
After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.
Issue https://github.com/dart-lang/sdk/issues/31798
Issue https://github.com/dart-lang/sdk/issues/33257
Change-Id: Ifb55f86453bfdf36a2e03bcd7f3197cfde257103
Reviewed-on: https://dart-review.googlesource.com/57980
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
127 lines
3.4 KiB
C++
127 lines
3.4 KiB
C++
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/globals.h"
|
|
#if defined(TARGET_ARCH_DBC)
|
|
|
|
#include "vm/compiler/assembler/assembler.h"
|
|
#include "vm/compiler/backend/flow_graph_compiler.h"
|
|
#include "vm/compiler/jit/compiler.h"
|
|
#include "vm/cpu.h"
|
|
#include "vm/dart_entry.h"
|
|
#include "vm/heap.h"
|
|
#include "vm/instructions.h"
|
|
#include "vm/object_store.h"
|
|
#include "vm/runtime_entry.h"
|
|
#include "vm/stack_frame.h"
|
|
#include "vm/stub_code.h"
|
|
#include "vm/tags.h"
|
|
|
|
#define __ assembler->
|
|
|
|
namespace dart {
|
|
|
|
DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects.");
|
|
DEFINE_FLAG(bool,
|
|
use_slow_path,
|
|
false,
|
|
"Set to true for debugging & verifying the slow paths.");
|
|
DECLARE_FLAG(bool, trace_optimized_ic_calls);
|
|
|
|
void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
|
|
__ Compile();
|
|
}
|
|
|
|
void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
|
|
__ NoSuchMethod();
|
|
}
|
|
|
|
// Not executed, but used as a stack marker when calling
|
|
// DRT_OptimizeInvokedFunction.
|
|
void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// Not executed, but used as a sentinel in Simulator::JumpToFrame.
|
|
void StubCode::GenerateRunExceptionHandlerStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
void StubCode::GenerateDeoptForRewindStub(Assembler* assembler) {
|
|
__ DeoptRewind();
|
|
}
|
|
|
|
// TODO(vegorov) Don't generate this stub.
|
|
void StubCode::GenerateFixCallersTargetStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(vegorov) Don't generate these stubs.
|
|
void StubCode::GenerateAllocationStubForClass(Assembler* assembler,
|
|
const Class& cls) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(vegorov) Don't generate this stub.
|
|
void StubCode::GenerateMegamorphicMissStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// These deoptimization stubs are only used to populate stack frames
|
|
// with something meaningful to make sure GC can scan the stack during
|
|
// the last phase of deoptimization which materializes objects.
|
|
void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
void StubCode::GenerateDeoptimizeStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(kustermann): Don't generate this stub.
|
|
void StubCode::GenerateDefaultTypeTestStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(kustermann): Don't generate this stub.
|
|
void StubCode::GenerateTopTypeTypeTestStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(kustermann): Don't generate this stub.
|
|
void StubCode::GenerateTypeRefTypeTestStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(kustermann): Don't generate this stub.
|
|
void StubCode::GenerateUnreachableTypeTestStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(kustermann): Don't generate this stub.
|
|
void StubCode::GenerateLazySpecializeTypeTestStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
// TODO(kustermann): Don't generate this stub.
|
|
void StubCode::GenerateSlowTypeTestStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
} // namespace dart
|
|
|
|
#endif // defined TARGET_ARCH_DBC
|