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 "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // Emit argument creation operations. | 92 // Emit argument creation operations. |
93 builder.CreateArguments(CreateArgumentsType::kMappedArguments) | 93 builder.CreateArguments(CreateArgumentsType::kMappedArguments) |
94 .CreateArguments(CreateArgumentsType::kUnmappedArguments); | 94 .CreateArguments(CreateArgumentsType::kUnmappedArguments); |
95 | 95 |
96 // Emit literal creation operations | 96 // Emit literal creation operations |
97 builder.CreateRegExpLiteral(0, reg) | 97 builder.CreateRegExpLiteral(0, reg) |
98 .CreateArrayLiteral(0, 0) | 98 .CreateArrayLiteral(0, 0) |
99 .CreateObjectLiteral(0, 0); | 99 .CreateObjectLiteral(0, 0); |
100 | 100 |
101 // Call operations. | 101 // Call operations. |
102 builder.Call(reg, reg, 0) | 102 builder.Call(reg, reg, 0, 0) |
| 103 .Call(reg, reg, 0, 1024) |
103 .CallRuntime(Runtime::kIsArray, reg, 1) | 104 .CallRuntime(Runtime::kIsArray, reg, 1) |
104 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1); | 105 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1); |
105 | 106 |
106 // Emit binary operator invocations. | 107 // Emit binary operator invocations. |
107 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) | 108 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
108 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) | 109 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) |
109 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) | 110 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) |
110 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) | 111 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) |
111 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); | 112 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); |
112 | 113 |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 | 699 |
699 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 700 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
700 iterator.Advance(); | 701 iterator.Advance(); |
701 CHECK(iterator.done()); | 702 CHECK(iterator.done()); |
702 } | 703 } |
703 | 704 |
704 | 705 |
705 } // namespace interpreter | 706 } // namespace interpreter |
706 } // namespace internal | 707 } // namespace internal |
707 } // namespace v8 | 708 } // namespace v8 |
OLD | NEW |