| 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 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2448 } | 2448 } |
| 2449 | 2449 |
| 2450 | 2450 |
| 2451 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 2451 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
| 2452 for (size_t index = 0; index < target_count; ++index) { | 2452 for (size_t index = 0; index < target_count; ++index) { |
| 2453 __ dd(targets[index]); | 2453 __ dd(targets[index]); |
| 2454 } | 2454 } |
| 2455 } | 2455 } |
| 2456 | 2456 |
| 2457 | 2457 |
| 2458 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | |
| 2459 | |
| 2460 | |
| 2461 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 2458 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
| 2462 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { | 2459 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
| 2463 return; | 2460 return; |
| 2464 } | 2461 } |
| 2465 | 2462 |
| 2466 int space_needed = Deoptimizer::patch_size(); | 2463 int space_needed = Deoptimizer::patch_size(); |
| 2467 // Ensure that we have enough space after the previous lazy-bailout | 2464 // Ensure that we have enough space after the previous lazy-bailout |
| 2468 // instruction for patching the code here. | 2465 // instruction for patching the code here. |
| 2469 int current_pc = masm()->pc_offset(); | 2466 int current_pc = masm()->pc_offset(); |
| 2470 if (current_pc < last_lazy_deopt_pc_ + space_needed) { | 2467 if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
| 2471 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2468 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2472 __ Nop(padding_size); | 2469 __ Nop(padding_size); |
| 2473 } | 2470 } |
| 2474 } | 2471 } |
| 2475 | 2472 |
| 2476 #undef __ | 2473 #undef __ |
| 2477 | 2474 |
| 2478 } // namespace compiler | 2475 } // namespace compiler |
| 2479 } // namespace internal | 2476 } // namespace internal |
| 2480 } // namespace v8 | 2477 } // namespace v8 |
| OLD | NEW |