| 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/ast/scopes.h" | 7 #include "src/ast/scopes.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 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 } | 2271 } |
| 2272 | 2272 |
| 2273 | 2273 |
| 2274 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 2274 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
| 2275 for (size_t index = 0; index < target_count; ++index) { | 2275 for (size_t index = 0; index < target_count; ++index) { |
| 2276 __ dq(targets[index]); | 2276 __ dq(targets[index]); |
| 2277 } | 2277 } |
| 2278 } | 2278 } |
| 2279 | 2279 |
| 2280 | 2280 |
| 2281 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | |
| 2282 | |
| 2283 | |
| 2284 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 2281 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
| 2285 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { | 2282 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
| 2286 return; | 2283 return; |
| 2287 } | 2284 } |
| 2288 | 2285 |
| 2289 int space_needed = Deoptimizer::patch_size(); | 2286 int space_needed = Deoptimizer::patch_size(); |
| 2290 // Ensure that we have enough space after the previous lazy-bailout | 2287 // Ensure that we have enough space after the previous lazy-bailout |
| 2291 // instruction for patching the code here. | 2288 // instruction for patching the code here. |
| 2292 int current_pc = masm()->pc_offset(); | 2289 int current_pc = masm()->pc_offset(); |
| 2293 if (current_pc < last_lazy_deopt_pc_ + space_needed) { | 2290 if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
| 2294 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2291 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2295 __ Nop(padding_size); | 2292 __ Nop(padding_size); |
| 2296 } | 2293 } |
| 2297 } | 2294 } |
| 2298 | 2295 |
| 2299 #undef __ | 2296 #undef __ |
| 2300 | 2297 |
| 2301 } // namespace compiler | 2298 } // namespace compiler |
| 2302 } // namespace internal | 2299 } // namespace internal |
| 2303 } // namespace v8 | 2300 } // namespace v8 |
| OLD | NEW |