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