OLD | NEW |
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 Loading... |
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 Address current_pc = __ pc(); | 283 __ RecordProtectedInstructionLanding(pc_); |
284 | |
285 __ RecordProtectedInstruction(pc_, current_pc); | |
286 | 284 |
287 if (frame_elided_) { | 285 if (frame_elided_) { |
288 __ EnterFrame(StackFrame::WASM_COMPILED); | 286 __ EnterFrame(StackFrame::WASM_COMPILED); |
289 } | 287 } |
290 | 288 |
291 wasm::TrapReason trap_id = wasm::kTrapMemOutOfBounds; | 289 wasm::TrapReason trap_id = wasm::kTrapMemOutOfBounds; |
292 int trap_reason = wasm::WasmOpcodes::TrapReasonToMessageId(trap_id); | 290 int trap_reason = wasm::WasmOpcodes::TrapReasonToMessageId(trap_id); |
293 __ Push(Smi::FromInt(trap_reason)); | 291 __ Push(Smi::FromInt(trap_reason)); |
294 __ Push(Smi::FromInt(position_)); | 292 __ Push(Smi::FromInt(position_)); |
295 __ Move(rsi, gen_->isolate()->native_context()); | 293 __ Move(rsi, gen_->isolate()->native_context()); |
(...skipping 2566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2862 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2860 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2863 __ Nop(padding_size); | 2861 __ Nop(padding_size); |
2864 } | 2862 } |
2865 } | 2863 } |
2866 | 2864 |
2867 #undef __ | 2865 #undef __ |
2868 | 2866 |
2869 } // namespace compiler | 2867 } // namespace compiler |
2870 } // namespace internal | 2868 } // namespace internal |
2871 } // namespace v8 | 2869 } // namespace v8 |
OLD | NEW |