Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index c33830dafa385056a7bc874b8eac696442d9fcc5..df32f00e18be6c6d2058d5863eaeb28e29605a32 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -993,9 +993,9 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
const bool is_leaf_call =
(argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
- const ExternalLabel* stub_entry;
+ const StubEntry* stub_entry = NULL;
if (is_bootstrap_native() || is_leaf_call) {
- stub_entry = &StubCode::CallBootstrapCFunctionLabel();
+ stub_entry = StubCode::CallBootstrapCFunction_entry();
#if defined(USING_SIMULATOR)
entry = Simulator::RedirectExternalReference(
entry, Simulator::kBootstrapNativeCall, function().NumParameters());
@@ -1004,7 +1004,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// In the case of non bootstrap native methods the CallNativeCFunction
// stub generates the redirection address when running under the simulator
// and hence we do not change 'entry' here.
- stub_entry = &StubCode::CallNativeCFunctionLabel();
+ stub_entry = StubCode::CallNativeCFunction_entry();
#if defined(USING_SIMULATOR)
if (!function().IsNativeAutoSetupScope()) {
entry = Simulator::RedirectExternalReference(
@@ -1015,7 +1015,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ LoadImmediate(T5, entry);
__ LoadImmediate(A1, argc_tag);
compiler->GenerateCall(token_pos(),
- stub_entry,
+ *stub_entry,
RawPcDescriptors::kOther,
locs());
__ Pop(result);
@@ -1847,14 +1847,14 @@ class BoxAllocationSlowPath : public SlowPathCode {
__ Bind(entry_label());
const Code& stub =
Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
- const ExternalLabel label(stub.EntryPoint());
+ const StubEntry stub_entry(stub);
LocationSummary* locs = instruction_->locs();
locs->live_registers()->Remove(Location::RegisterLocation(result_));
compiler->SaveLiveRegisters(locs);
compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
- &label,
+ stub_entry,
RawPcDescriptors::kOther,
locs);
compiler->AddStubCallTarget(stub);
@@ -2246,9 +2246,8 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
__ Bind(&slow_path);
- const ExternalLabel label(StubCode::AllocateArrayEntryPoint());
compiler->GenerateCall(token_pos(),
- &label,
+ *StubCode::AllocateArray_entry(),
RawPcDescriptors::kOther,
locs());
__ Bind(&done);
@@ -2496,9 +2495,8 @@ class AllocateContextSlowPath : public SlowPathCode {
compiler->SaveLiveRegisters(locs);
__ LoadImmediate(T1, instruction_->num_context_variables());
- const ExternalLabel label(StubCode::AllocateContextEntryPoint());
compiler->GenerateCall(instruction_->token_pos(),
- &label,
+ *StubCode::AllocateContext_entry(),
RawPcDescriptors::kOther,
locs);
ASSERT(instruction_->locs()->out(0).reg() == V0);
@@ -2554,9 +2552,8 @@ void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ Comment("AllocateContextInstr");
__ LoadImmediate(T1, num_context_variables());
- const ExternalLabel label(StubCode::AllocateContextEntryPoint());
compiler->GenerateCall(token_pos(),
- &label,
+ *StubCode::AllocateContext_entry(),
RawPcDescriptors::kOther,
locs());
}
@@ -5545,9 +5542,9 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Isolate* isolate = compiler->isolate();
const Code& stub = Code::Handle(isolate,
StubCode::GetAllocationStubForClass(cls()));
- const ExternalLabel label(stub.EntryPoint());
+ const StubEntry stub_entry(stub);
compiler->GenerateCall(token_pos(),
- &label,
+ stub_entry,
RawPcDescriptors::kOther,
locs());
compiler->AddStubCallTarget(stub);
@@ -5557,8 +5554,8 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(!compiler->is_optimizing());
- const ExternalLabel label(StubCode::DebugStepCheckEntryPoint());
- compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
+ compiler->GenerateCall(
+ token_pos(), *StubCode::DebugStepCheck_entry(), stub_kind_, locs());
}
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698