655bc90489
Most of the infrastructure is fixed to work with DBC stack layout: - register allocator allocates DBC registers with the limitation that we allocate only 20 registers and bail out if anything needs spilling (there is no use implementing spilling on DBC because registers are memory locations themselves). We should be able to bump number of CPU registers on DBC up to 256 but this requires major surgery in some parts - so I postponed this; - lazy deoptimization is implemented, eager deoptimization is not - because we don't emit any code that actually requires it. it's a minor change to support it once we have a target; - stack scanning respects stack maps built by registers allocator; We bailout from all unsupported instructions. R=zra@google.com Review URL: https://codereview.chromium.org/1992963002 .
77 lines
1.9 KiB
C++
77 lines
1.9 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/assembler.h"
|
|
#include "vm/code_generator.h"
|
|
#include "vm/cpu.h"
|
|
#include "vm/compiler.h"
|
|
#include "vm/dart_entry.h"
|
|
#include "vm/flow_graph_compiler.h"
|
|
#include "vm/heap.h"
|
|
#include "vm/instructions.h"
|
|
#include "vm/object_store.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();
|
|
}
|
|
|
|
|
|
// 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::GenerateDeoptimizeLazyStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
|
|
void StubCode::GenerateDeoptimizeStub(Assembler* assembler) {
|
|
__ Trap();
|
|
}
|
|
|
|
|
|
// Print the stop message.
|
|
DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
|
|
OS::Print("Stop message: %s\n", message);
|
|
}
|
|
END_LEAF_RUNTIME_ENTRY
|
|
|
|
|
|
} // namespace dart
|
|
|
|
#endif // defined TARGET_ARCH_DBC
|