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

Unified Diff: src/compiler/arm64/code-generator-arm64.cc

Issue 2685583003: [wasm] Do not use setjmp/longjmp in cctests. (Closed)
Patch Set: Change comments Created 3 years, 10 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 | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/arm64/code-generator-arm64.cc
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc
index 1833821169d4f404b257f3de8a42925a02d15f58..18cdca4103ec4eb8ae5e435920d0c76617ef35bc 100644
--- a/src/compiler/arm64/code-generator-arm64.cc
+++ b/src/compiler/arm64/code-generator-arm64.cc
@@ -1723,10 +1723,6 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
if (frame_elided_) {
__ set_has_frame(old_has_frame);
}
- if (FLAG_debug_code) {
- // The trap code should never return.
- __ Brk(0);
- }
}
private:
@@ -1737,6 +1733,8 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
__ CallCFunction(
ExternalReference::wasm_call_trap_callback_for_testing(isolate()),
0);
+ __ LeaveFrame(StackFrame::WASM_COMPILED);
+ __ Ret();
} else {
DCHECK(csp.Is(__ StackPointer()));
__ Move(cp, Smi::kZero);
@@ -1744,11 +1742,15 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
__ Mov(jssp, csp);
gen_->AssembleSourcePosition(instr_);
__ CallRuntime(trap_id);
+ ReferenceMap* reference_map =
+ new (gen_->zone()) ReferenceMap(gen_->zone());
+ gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0,
+ Safepoint::kNoLazyDeopt);
+ if (FLAG_debug_code) {
+ // The trap code should never return.
+ __ Brk(0);
+ }
}
- ReferenceMap* reference_map =
- new (gen_->zone()) ReferenceMap(gen_->zone());
- gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0,
- Safepoint::kNoLazyDeopt);
}
bool frame_elided_;
Instruction* instr_;
@@ -1886,7 +1888,6 @@ void CodeGenerator::AssembleConstructFrame() {
osr_pc_offset_ = __ pc_offset();
shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots();
}
-
// Build remainder of frame, including accounting for and filling-in
// frame-specific header information, e.g. claiming the extra slot that
// other platforms explicitly push for STUB frames and frames recording
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698