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

Unified Diff: runtime/vm/intermediate_language_arm64.cc

Issue 2734323003: Re-landing of "replace TrySync with Metadata". (Closed)
Patch Set: Address review comments Created 3 years, 9 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_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm64.cc
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 642bb8f395c823ae447bfc68549008b7b7c2f9b5..c502b0f6f0a1893af9a0d65a9dceec257cb4acd0 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -237,6 +237,7 @@ void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
//??
__ blr(R2);
compiler->RecordSafepoint(locs());
+ compiler->EmitCatchEntryState();
// Marks either the continuation point in unoptimized code or the
// deoptimization point in optimized code, after call.
const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
@@ -2206,8 +2207,9 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const Code& stub = Code::ZoneHandle(compiler->zone(),
StubCode::AllocateArray_entry()->code());
compiler->AddStubCallTarget(stub);
- compiler->GenerateCall(token_pos(), *StubCode::AllocateArray_entry(),
- RawPcDescriptors::kOther, locs());
+ compiler->GenerateCallWithDeopt(token_pos(), deopt_id(),
+ *StubCode::AllocateArray_entry(),
+ RawPcDescriptors::kOther, locs());
ASSERT(locs()->out(0).reg() == kResultReg);
}
@@ -2827,6 +2829,10 @@ class CheckedSmiSlowPath : public SlowPathCode {
locs->live_registers()->Remove(Location::RegisterLocation(result));
compiler->SaveLiveRegisters(locs);
+ if (instruction_->env() != NULL) {
+ Environment* env = compiler->SlowPathEnvironmentFor(instruction_);
+ compiler->pending_deoptimization_env_ = env;
+ }
__ Push(locs->in(0).reg());
__ Push(locs->in(1).reg());
compiler->EmitMegamorphicInstanceCall(
@@ -2837,6 +2843,7 @@ class CheckedSmiSlowPath : public SlowPathCode {
__ mov(result, R0);
compiler->RestoreLiveRegisters(locs);
__ b(exit_label());
+ compiler->pending_deoptimization_env_ = NULL;
}
private:
@@ -2964,6 +2971,10 @@ class CheckedSmiComparisonSlowPath : public SlowPathCode {
locs->live_registers()->Remove(Location::RegisterLocation(result));
compiler->SaveLiveRegisters(locs);
+ if (instruction_->env() != NULL) {
+ Environment* env = compiler->SlowPathEnvironmentFor(instruction_);
+ compiler->pending_deoptimization_env_ = env;
+ }
__ Push(locs->in(0).reg());
__ Push(locs->in(1).reg());
compiler->EmitMegamorphicInstanceCall(
@@ -2973,6 +2984,7 @@ class CheckedSmiComparisonSlowPath : public SlowPathCode {
/* slow_path_argument_count = */ 2);
__ mov(result, R0);
compiler->RestoreLiveRegisters(locs);
+ compiler->pending_deoptimization_env_ = NULL;
if (merged_) {
__ CompareObject(result, Bool::True());
__ b(
@@ -5546,6 +5558,7 @@ class RangeErrorSlowPath : public SlowPathCode {
}
__ Bind(entry_label());
LocationSummary* locs = instruction_->locs();
+ compiler->SaveLiveRegisters(locs);
__ Push(locs->in(0).reg());
__ Push(locs->in(1).reg());
__ CallRuntime(kRangeErrorRuntimeEntry, 2);
@@ -5553,6 +5566,8 @@ class RangeErrorSlowPath : public SlowPathCode {
RawPcDescriptors::kOther, compiler->assembler()->CodeSize(),
instruction_->deopt_id(), instruction_->token_pos(), try_index_);
compiler->RecordSafepoint(locs, 2);
+ Environment* env = compiler->SlowPathEnvironmentFor(instruction_);
+ compiler->EmitCatchEntryState(env, try_index_);
__ brk(0);
}
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698