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 "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 private: | 1707 private: |
1708 void GenerateCallToTrap(Runtime::FunctionId trap_id) { | 1708 void GenerateCallToTrap(Runtime::FunctionId trap_id) { |
1709 if (trap_id == Runtime::kNumFunctions) { | 1709 if (trap_id == Runtime::kNumFunctions) { |
1710 // We cannot test calls to the runtime in cctest/test-run-wasm. | 1710 // We cannot test calls to the runtime in cctest/test-run-wasm. |
1711 // Therefore we emit a call to C here instead of a call to the runtime. | 1711 // Therefore we emit a call to C here instead of a call to the runtime. |
1712 __ PrepareCallCFunction(0, esi); | 1712 __ PrepareCallCFunction(0, esi); |
1713 __ CallCFunction( | 1713 __ CallCFunction( |
1714 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), | 1714 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), |
1715 0); | 1715 0); |
1716 } else { | 1716 } else { |
1717 __ Move(esi, isolate()->native_context()); | 1717 __ Move(esi, Smi::kZero); |
1718 gen_->AssembleSourcePosition(instr_); | 1718 gen_->AssembleSourcePosition(instr_); |
1719 __ CallRuntime(trap_id); | 1719 __ CallRuntime(trap_id); |
1720 } | 1720 } |
1721 ReferenceMap* reference_map = | 1721 ReferenceMap* reference_map = |
1722 new (gen_->zone()) ReferenceMap(gen_->zone()); | 1722 new (gen_->zone()) ReferenceMap(gen_->zone()); |
1723 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, | 1723 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, |
1724 Safepoint::kNoLazyDeopt); | 1724 Safepoint::kNoLazyDeopt); |
1725 } | 1725 } |
1726 | 1726 |
1727 bool frame_elided_; | 1727 bool frame_elided_; |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2301 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2301 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2302 __ Nop(padding_size); | 2302 __ Nop(padding_size); |
2303 } | 2303 } |
2304 } | 2304 } |
2305 | 2305 |
2306 #undef __ | 2306 #undef __ |
2307 | 2307 |
2308 } // namespace compiler | 2308 } // namespace compiler |
2309 } // namespace internal | 2309 } // namespace internal |
2310 } // namespace v8 | 2310 } // namespace v8 |
OLD | NEW |