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

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

Issue 2651833003: [wasm] Move protected instruction info to RelocInfo (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/v8/v8 into trap-relocinfo 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
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 : OutOfLineCode(gen), 273 : OutOfLineCode(gen),
274 gen_(gen), 274 gen_(gen),
275 pc_(pc), 275 pc_(pc),
276 frame_elided_(frame_elided), 276 frame_elided_(frame_elided),
277 position_(position), 277 position_(position),
278 instr_(instr) {} 278 instr_(instr) {}
279 279
280 // TODO(eholk): Refactor this method to take the code generator as a 280 // TODO(eholk): Refactor this method to take the code generator as a
281 // parameter. 281 // parameter.
282 void Generate() final { 282 void Generate() final {
283 int current_pc = __ pc_offset(); 283 Address current_pc = __ pc();
284 284
285 gen_->AddProtectedInstruction(pc_, current_pc); 285 __ RecordProtectedInstruction(pc_, current_pc);
286 286
287 if (frame_elided_) { 287 if (frame_elided_) {
288 __ EnterFrame(StackFrame::WASM_COMPILED); 288 __ EnterFrame(StackFrame::WASM_COMPILED);
289 } 289 }
290 290
291 wasm::TrapReason trap_id = wasm::kTrapMemOutOfBounds; 291 wasm::TrapReason trap_id = wasm::kTrapMemOutOfBounds;
292 int trap_reason = wasm::WasmOpcodes::TrapReasonToMessageId(trap_id); 292 int trap_reason = wasm::WasmOpcodes::TrapReasonToMessageId(trap_id);
293 __ Push(Smi::FromInt(trap_reason)); 293 __ Push(Smi::FromInt(trap_reason));
294 __ Push(Smi::FromInt(position_)); 294 __ Push(Smi::FromInt(position_));
295 __ Move(rsi, gen_->isolate()->native_context()); 295 __ Move(rsi, gen_->isolate()->native_context());
(...skipping 2558 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
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698