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

Side by Side Diff: src/compiler/x64/code-generator-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 private: 2335 private:
2336 void GenerateCallToTrap(Runtime::FunctionId trap_id) { 2336 void GenerateCallToTrap(Runtime::FunctionId trap_id) {
2337 if (trap_id == Runtime::kNumFunctions) { 2337 if (trap_id == Runtime::kNumFunctions) {
2338 // We cannot test calls to the runtime in cctest/test-run-wasm. 2338 // We cannot test calls to the runtime in cctest/test-run-wasm.
2339 // Therefore we emit a call to C here instead of a call to the runtime. 2339 // Therefore we emit a call to C here instead of a call to the runtime.
2340 __ PrepareCallCFunction(0); 2340 __ PrepareCallCFunction(0);
2341 __ CallCFunction( 2341 __ CallCFunction(
2342 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), 2342 ExternalReference::wasm_call_trap_callback_for_testing(isolate()),
2343 0); 2343 0);
2344 } else { 2344 } else {
2345 __ Move(rsi, isolate()->native_context()); 2345 __ Move(rsi, Smi::kZero);
2346 gen_->AssembleSourcePosition(instr_); 2346 gen_->AssembleSourcePosition(instr_);
2347 __ CallRuntime(trap_id); 2347 __ CallRuntime(trap_id);
2348 } 2348 }
2349 ReferenceMap* reference_map = 2349 ReferenceMap* reference_map =
2350 new (gen_->zone()) ReferenceMap(gen_->zone()); 2350 new (gen_->zone()) ReferenceMap(gen_->zone());
2351 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, 2351 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0,
2352 Safepoint::kNoLazyDeopt); 2352 Safepoint::kNoLazyDeopt);
2353 } 2353 }
2354 2354
2355 bool frame_elided_; 2355 bool frame_elided_;
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2854 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2854 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2855 __ Nop(padding_size); 2855 __ Nop(padding_size);
2856 } 2856 }
2857 } 2857 }
2858 2858
2859 #undef __ 2859 #undef __
2860 2860
2861 } // namespace compiler 2861 } // namespace compiler
2862 } // namespace internal 2862 } // namespace internal
2863 } // namespace v8 2863 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698