| 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) |
| 103 builder.CallRuntime(Runtime::kIsArray, reg, 1); | 103 .CallRuntime(Runtime::kIsArray, reg, 1) |
| 104 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1); |
| 104 | 105 |
| 105 // Emit binary operator invocations. | 106 // Emit binary operator invocations. |
| 106 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) | 107 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
| 107 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) | 108 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) |
| 108 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) | 109 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) |
| 109 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) | 110 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) |
| 110 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); | 111 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); |
| 111 | 112 |
| 112 // Emit bitwise operator invocations | 113 // Emit bitwise operator invocations |
| 113 builder.BinaryOperation(Token::Value::BIT_OR, reg, Strength::WEAK) | 114 builder.BinaryOperation(Token::Value::BIT_OR, reg, Strength::WEAK) |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 | 698 |
| 698 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 699 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 699 iterator.Advance(); | 700 iterator.Advance(); |
| 700 CHECK(iterator.done()); | 701 CHECK(iterator.done()); |
| 701 } | 702 } |
| 702 | 703 |
| 703 | 704 |
| 704 } // namespace interpreter | 705 } // namespace interpreter |
| 705 } // namespace internal | 706 } // namespace internal |
| 706 } // namespace v8 | 707 } // namespace v8 |
| OLD | NEW |