OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/interpreter/bytecode-peephole-optimizer.h" | 5 #include "src/interpreter/bytecode-peephole-optimizer.h" |
6 | 6 |
7 #include "src/objects-inl.h" | 7 #include "src/objects-inl.h" |
8 #include "src/objects.h" | 8 #include "src/objects.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 namespace interpreter { | 12 namespace interpreter { |
13 | 13 |
14 BytecodePeepholeOptimizer::BytecodePeepholeOptimizer( | 14 BytecodePeepholeOptimizer::BytecodePeepholeOptimizer( |
15 BytecodePipelineStage* next_stage) | 15 BytecodePipelineStage* next_stage) |
16 : next_stage_(next_stage) { | 16 : next_stage_(next_stage) { |
17 InvalidateLast(); | 17 InvalidateLast(); |
18 } | 18 } |
19 | 19 |
20 // override | 20 // override |
21 Handle<BytecodeArray> BytecodePeepholeOptimizer::ToBytecodeArray( | 21 Handle<BytecodeArray> BytecodePeepholeOptimizer::ToBytecodeArray( |
22 int fixed_register_count, int parameter_count, | 22 Isolate* isolate, int fixed_register_count, int parameter_count, |
23 Handle<FixedArray> handler_table) { | 23 Handle<FixedArray> handler_table) { |
24 Flush(); | 24 Flush(); |
25 return next_stage_->ToBytecodeArray(fixed_register_count, parameter_count, | 25 return next_stage_->ToBytecodeArray(isolate, fixed_register_count, |
26 handler_table); | 26 parameter_count, handler_table); |
27 } | 27 } |
28 | 28 |
29 // override | 29 // override |
30 void BytecodePeepholeOptimizer::BindLabel(BytecodeLabel* label) { | 30 void BytecodePeepholeOptimizer::BindLabel(BytecodeLabel* label) { |
31 Flush(); | 31 Flush(); |
32 next_stage_->BindLabel(label); | 32 next_stage_->BindLabel(label); |
33 } | 33 } |
34 | 34 |
35 // override | 35 // override |
36 void BytecodePeepholeOptimizer::BindLabel(const BytecodeLabel& target, | 36 void BytecodePeepholeOptimizer::BindLabel(const BytecodeLabel& target, |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 #undef CASE | 334 #undef CASE |
335 default: | 335 default: |
336 UNREACHABLE(); | 336 UNREACHABLE(); |
337 break; | 337 break; |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 } // namespace interpreter | 341 } // namespace interpreter |
342 } // namespace internal | 342 } // namespace internal |
343 } // namespace v8 | 343 } // namespace v8 |
OLD | NEW |