OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 Handle<HeapObject> heap_num_1 = factory->NewHeapNumber(2147483647); | 28 Handle<HeapObject> heap_num_1 = factory->NewHeapNumber(2147483647); |
29 Smi* zero = Smi::kZero; | 29 Smi* zero = Smi::kZero; |
30 Smi* smi_0 = Smi::FromInt(64); | 30 Smi* smi_0 = Smi::FromInt(64); |
31 Smi* smi_1 = Smi::FromInt(-65536); | 31 Smi* smi_1 = Smi::FromInt(-65536); |
32 Register reg_0(0); | 32 Register reg_0(0); |
33 Register reg_1(1); | 33 Register reg_1(1); |
34 RegisterList pair(0, 2); | 34 RegisterList pair(0, 2); |
35 RegisterList triple(0, 3); | 35 RegisterList triple(0, 3); |
36 Register param = Register::FromParameterIndex(2, builder.parameter_count()); | 36 Register param = Register::FromParameterIndex(2, builder.parameter_count()); |
37 Handle<String> name = factory->NewStringFromStaticChars("abc"); | 37 Handle<String> name = factory->NewStringFromStaticChars("abc"); |
38 int name_index = 2; | 38 uint32_t name_index = 2; |
39 int feedback_slot = 97; | 39 uint32_t feedback_slot = 97; |
40 | 40 |
41 builder.LoadLiteral(heap_num_0) | 41 builder.LoadLiteral(heap_num_0) |
42 .StoreAccumulatorInRegister(reg_0) | 42 .StoreAccumulatorInRegister(reg_0) |
43 .LoadLiteral(heap_num_1) | 43 .LoadLiteral(heap_num_1) |
44 .StoreAccumulatorInRegister(reg_0) | 44 .StoreAccumulatorInRegister(reg_0) |
45 .LoadLiteral(zero) | 45 .LoadLiteral(zero) |
46 .StoreAccumulatorInRegister(reg_0) | 46 .StoreAccumulatorInRegister(reg_0) |
47 .LoadLiteral(smi_0) | 47 .LoadLiteral(smi_0) |
48 .StackCheck(0) | 48 .StackCheck(0) |
49 .StoreAccumulatorInRegister(reg_0) | 49 .StoreAccumulatorInRegister(reg_0) |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 CHECK_EQ(iterator.current_offset(), offset); | 278 CHECK_EQ(iterator.current_offset(), offset); |
279 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); | 279 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); |
280 CHECK(!iterator.done()); | 280 CHECK(!iterator.done()); |
281 iterator.Advance(); | 281 iterator.Advance(); |
282 CHECK(iterator.done()); | 282 CHECK(iterator.done()); |
283 } | 283 } |
284 | 284 |
285 } // namespace interpreter | 285 } // namespace interpreter |
286 } // namespace internal | 286 } // namespace internal |
287 } // namespace v8 | 287 } // namespace v8 |
OLD | NEW |