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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Emit literal creation operations. | 103 // Emit literal creation operations. |
104 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) | 104 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) |
105 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) | 105 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) |
106 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0); | 106 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0); |
107 | 107 |
108 // Call operations. | 108 // Call operations. |
109 builder.Call(reg, reg, 0, 0) | 109 builder.Call(reg, reg, 0, 0) |
110 .Call(reg, reg, 0, 1024) | 110 .Call(reg, reg, 0, 1024) |
111 .CallRuntime(Runtime::kIsArray, reg, 1) | 111 .CallRuntime(Runtime::kIsArray, reg, 1) |
| 112 .CallRuntimeForPair(Runtime::kLoadLookupSlot, reg, 1, reg) |
112 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1); | 113 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1); |
113 | 114 |
114 // Emit binary operator invocations. | 115 // Emit binary operator invocations. |
115 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) | 116 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
116 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) | 117 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) |
117 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) | 118 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) |
118 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) | 119 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) |
119 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); | 120 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); |
120 | 121 |
121 // Emit bitwise operator invocations | 122 // Emit bitwise operator invocations |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 } | 704 } |
704 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 705 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
705 iterator.Advance(); | 706 iterator.Advance(); |
706 CHECK(iterator.done()); | 707 CHECK(iterator.done()); |
707 } | 708 } |
708 | 709 |
709 | 710 |
710 } // namespace interpreter | 711 } // namespace interpreter |
711 } // namespace internal | 712 } // namespace internal |
712 } // namespace v8 | 713 } // namespace v8 |
OLD | NEW |