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

Side by Side Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 2664273002: [wasm] Acquire the context for TrapIf from a wasm frame (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 #include "src/compilation-info.h" 6 #include "src/compilation-info.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 if (trap_id == Runtime::kNumFunctions) { 2106 if (trap_id == Runtime::kNumFunctions) {
2107 // We cannot test calls to the runtime in cctest/test-run-wasm. 2107 // We cannot test calls to the runtime in cctest/test-run-wasm.
2108 // Therefore we emit a call to C here instead of a call to the runtime. 2108 // Therefore we emit a call to C here instead of a call to the runtime.
2109 // We use the context register as the scratch register, because we do 2109 // We use the context register as the scratch register, because we do
2110 // not have a context here. 2110 // not have a context here.
2111 __ PrepareCallCFunction(0, 0, cp); 2111 __ PrepareCallCFunction(0, 0, cp);
2112 __ CallCFunction( 2112 __ CallCFunction(
2113 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), 2113 ExternalReference::wasm_call_trap_callback_for_testing(isolate()),
2114 0); 2114 0);
2115 } else { 2115 } else {
2116 __ Move(cp, isolate()->native_context()); 2116 __ Move(cp, Smi::kZero);
2117 gen_->AssembleSourcePosition(instr_); 2117 gen_->AssembleSourcePosition(instr_);
2118 __ CallRuntime(trap_id); 2118 __ CallRuntime(trap_id);
2119 } 2119 }
2120 ReferenceMap* reference_map = 2120 ReferenceMap* reference_map =
2121 new (gen_->zone()) ReferenceMap(gen_->zone()); 2121 new (gen_->zone()) ReferenceMap(gen_->zone());
2122 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, 2122 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0,
2123 Safepoint::kNoLazyDeopt); 2123 Safepoint::kNoLazyDeopt);
2124 } 2124 }
2125 bool frame_elided_; 2125 bool frame_elided_;
2126 Instruction* instr_; 2126 Instruction* instr_;
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
2673 padding_size -= v8::internal::Assembler::kInstrSize; 2673 padding_size -= v8::internal::Assembler::kInstrSize;
2674 } 2674 }
2675 } 2675 }
2676 } 2676 }
2677 2677
2678 #undef __ 2678 #undef __
2679 2679
2680 } // namespace compiler 2680 } // namespace compiler
2681 } // namespace internal 2681 } // namespace internal
2682 } // namespace v8 2682 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698