| 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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
| 6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.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 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2197 } | 2197 } |
| 2198 } | 2198 } |
| 2199 | 2199 |
| 2200 | 2200 |
| 2201 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 2201 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
| 2202 // On 64-bit MIPS we emit the jump tables inline. | 2202 // On 64-bit MIPS we emit the jump tables inline. |
| 2203 UNREACHABLE(); | 2203 UNREACHABLE(); |
| 2204 } | 2204 } |
| 2205 | 2205 |
| 2206 | 2206 |
| 2207 void CodeGenerator::AddNopForSmiCodeInlining() { | |
| 2208 // Unused on 32-bit ARM. Still exists on 64-bit arm. | |
| 2209 // TODO(plind): Unclear when this is called now. Understand, fix if needed. | |
| 2210 __ nop(); // Maybe PROPERTY_ACCESS_INLINED? | |
| 2211 } | |
| 2212 | |
| 2213 | |
| 2214 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 2207 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
| 2215 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { | 2208 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
| 2216 return; | 2209 return; |
| 2217 } | 2210 } |
| 2218 | 2211 |
| 2219 int space_needed = Deoptimizer::patch_size(); | 2212 int space_needed = Deoptimizer::patch_size(); |
| 2220 // Ensure that we have enough space after the previous lazy-bailout | 2213 // Ensure that we have enough space after the previous lazy-bailout |
| 2221 // instruction for patching the code here. | 2214 // instruction for patching the code here. |
| 2222 int current_pc = masm()->pc_offset(); | 2215 int current_pc = masm()->pc_offset(); |
| 2223 if (current_pc < last_lazy_deopt_pc_ + space_needed) { | 2216 if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
| 2224 // Block tramoline pool emission for duration of padding. | 2217 // Block tramoline pool emission for duration of padding. |
| 2225 v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( | 2218 v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( |
| 2226 masm()); | 2219 masm()); |
| 2227 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2220 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2228 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); | 2221 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); |
| 2229 while (padding_size > 0) { | 2222 while (padding_size > 0) { |
| 2230 __ nop(); | 2223 __ nop(); |
| 2231 padding_size -= v8::internal::Assembler::kInstrSize; | 2224 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2232 } | 2225 } |
| 2233 } | 2226 } |
| 2234 } | 2227 } |
| 2235 | 2228 |
| 2236 #undef __ | 2229 #undef __ |
| 2237 | 2230 |
| 2238 } // namespace compiler | 2231 } // namespace compiler |
| 2239 } // namespace internal | 2232 } // namespace internal |
| 2240 } // namespace v8 | 2233 } // namespace v8 |
| OLD | NEW |