OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/interpreter/bytecode-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
10 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 .JumpIfTrue(&start) | 263 .JumpIfTrue(&start) |
264 .CompareOperation(Token::Value::EQ, reg) | 264 .CompareOperation(Token::Value::EQ, reg) |
265 .JumpIfFalse(&start); | 265 .JumpIfFalse(&start); |
266 // Perform an operation that returns a non-boolean operation to | 266 // Perform an operation that returns a non-boolean operation to |
267 // generate JumpIfToBooleanTrue/False. | 267 // generate JumpIfToBooleanTrue/False. |
268 builder.BinaryOperation(Token::Value::ADD, reg) | 268 builder.BinaryOperation(Token::Value::ADD, reg) |
269 .JumpIfTrue(&start) | 269 .JumpIfTrue(&start) |
270 .BinaryOperation(Token::Value::ADD, reg) | 270 .BinaryOperation(Token::Value::ADD, reg) |
271 .JumpIfFalse(&start); | 271 .JumpIfFalse(&start); |
272 | 272 |
| 273 // Intrinsics handled by the interpreter. |
| 274 builder.CallRuntime(Runtime::kInlineIsArray, reg, 1) |
| 275 .CallRuntime(Runtime::kInlineIsArray, wide, 1); |
| 276 |
273 builder.Debugger(); | 277 builder.Debugger(); |
274 | 278 |
275 builder.Return(); | 279 builder.Return(); |
276 | 280 |
277 // Generate BytecodeArray. | 281 // Generate BytecodeArray. |
278 Handle<BytecodeArray> the_array = builder.ToBytecodeArray(); | 282 Handle<BytecodeArray> the_array = builder.ToBytecodeArray(); |
279 CHECK_EQ(the_array->frame_size(), | 283 CHECK_EQ(the_array->frame_size(), |
280 (builder.fixed_and_temporary_register_count() + | 284 (builder.fixed_and_temporary_register_count() + |
281 builder.translation_register_count()) * | 285 builder.translation_register_count()) * |
282 kPointerSize); | 286 kPointerSize); |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 iterator.Advance(); | 651 iterator.Advance(); |
648 } | 652 } |
649 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 653 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
650 iterator.Advance(); | 654 iterator.Advance(); |
651 CHECK(iterator.done()); | 655 CHECK(iterator.done()); |
652 } | 656 } |
653 | 657 |
654 } // namespace interpreter | 658 } // namespace interpreter |
655 } // namespace internal | 659 } // namespace internal |
656 } // namespace v8 | 660 } // namespace v8 |
OLD | NEW |