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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/factory.h" | 7 #include "src/factory.h" |
8 #include "src/interpreter/bytecode-label.h" | 8 #include "src/interpreter/bytecode-label.h" |
9 #include "src/interpreter/bytecode-register-optimizer.h" | 9 #include "src/interpreter/bytecode-register-optimizer.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 zone(), register_allocator_, number_of_parameters, this); | 28 zone(), register_allocator_, number_of_parameters, this); |
29 } | 29 } |
30 | 30 |
31 void Write(BytecodeNode* node) override { output_.push_back(*node); } | 31 void Write(BytecodeNode* node) override { output_.push_back(*node); } |
32 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override { | 32 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override { |
33 output_.push_back(*node); | 33 output_.push_back(*node); |
34 } | 34 } |
35 void BindLabel(BytecodeLabel* label) override {} | 35 void BindLabel(BytecodeLabel* label) override {} |
36 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {} | 36 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {} |
37 Handle<BytecodeArray> ToBytecodeArray( | 37 Handle<BytecodeArray> ToBytecodeArray( |
38 int fixed_register_count, int parameter_count, | 38 Isolate* isolate, int fixed_register_count, int parameter_count, |
39 Handle<FixedArray> handle_table) override { | 39 Handle<FixedArray> handle_table) override { |
40 return Handle<BytecodeArray>(); | 40 return Handle<BytecodeArray>(); |
41 } | 41 } |
42 | 42 |
43 TemporaryRegisterAllocator* allocator() { return register_allocator_; } | 43 TemporaryRegisterAllocator* allocator() { return register_allocator_; } |
44 BytecodeRegisterOptimizer* optimizer() { return register_optimizer_; } | 44 BytecodeRegisterOptimizer* optimizer() { return register_optimizer_; } |
45 | 45 |
46 Register NewTemporary() { | 46 Register NewTemporary() { |
47 return Register(allocator()->BorrowTemporaryRegister()); | 47 return Register(allocator()->BorrowTemporaryRegister()); |
48 } | 48 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 CHECK_EQ(output()->at(3).bytecode(), Bytecode::kCallJSRuntime); | 211 CHECK_EQ(output()->at(3).bytecode(), Bytecode::kCallJSRuntime); |
212 CHECK_EQ(output()->at(3).operand(0), 0); | 212 CHECK_EQ(output()->at(3).operand(0), 0); |
213 CHECK_EQ(output()->at(3).operand(1), temp0.ToOperand()); | 213 CHECK_EQ(output()->at(3).operand(1), temp0.ToOperand()); |
214 CHECK_EQ(output()->at(3).operand(2), 2); | 214 CHECK_EQ(output()->at(3).operand(2), 2); |
215 } | 215 } |
216 | 216 |
217 } // namespace interpreter | 217 } // namespace interpreter |
218 } // namespace internal | 218 } // namespace internal |
219 } // namespace v8 | 219 } // namespace v8 |
OLD | NEW |