| OLD | NEW |
| 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 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 if (trap_id == Runtime::kNumFunctions) { | 1771 if (trap_id == Runtime::kNumFunctions) { |
| 1772 // We cannot test calls to the runtime in cctest/test-run-wasm. | 1772 // We cannot test calls to the runtime in cctest/test-run-wasm. |
| 1773 // Therefore we emit a call to C here instead of a call to the runtime. | 1773 // Therefore we emit a call to C here instead of a call to the runtime. |
| 1774 // We use the context register as the scratch register, because we do | 1774 // We use the context register as the scratch register, because we do |
| 1775 // not have a context here. | 1775 // not have a context here. |
| 1776 __ PrepareCallCFunction(0, 0, cp); | 1776 __ PrepareCallCFunction(0, 0, cp); |
| 1777 __ CallCFunction( | 1777 __ CallCFunction( |
| 1778 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), | 1778 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), |
| 1779 0); | 1779 0); |
| 1780 } else { | 1780 } else { |
| 1781 __ Move(cp, isolate()->native_context()); | 1781 __ Move(cp, Smi::kZero); |
| 1782 gen_->AssembleSourcePosition(instr_); | 1782 gen_->AssembleSourcePosition(instr_); |
| 1783 __ CallRuntime(trap_id); | 1783 __ CallRuntime(trap_id); |
| 1784 } | 1784 } |
| 1785 ReferenceMap* reference_map = | 1785 ReferenceMap* reference_map = |
| 1786 new (gen_->zone()) ReferenceMap(gen_->zone()); | 1786 new (gen_->zone()) ReferenceMap(gen_->zone()); |
| 1787 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, | 1787 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, |
| 1788 Safepoint::kNoLazyDeopt); | 1788 Safepoint::kNoLazyDeopt); |
| 1789 } | 1789 } |
| 1790 | 1790 |
| 1791 bool frame_elided_; | 1791 bool frame_elided_; |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2373 padding_size -= v8::internal::Assembler::kInstrSize; | 2373 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2374 } | 2374 } |
| 2375 } | 2375 } |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 #undef __ | 2378 #undef __ |
| 2379 | 2379 |
| 2380 } // namespace compiler | 2380 } // namespace compiler |
| 2381 } // namespace internal | 2381 } // namespace internal |
| 2382 } // namespace v8 | 2382 } // namespace v8 |
| OLD | NEW |