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-label.h" | 9 #include "src/interpreter/bytecode-label.h" |
10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 builder.CreateObjectLiteral(0, 0, 0, reg); | 131 builder.CreateObjectLiteral(0, 0, 0, reg); |
132 | 132 |
133 // Call operations. | 133 // Call operations. |
134 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL) | 134 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL) |
135 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL, | 135 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL, |
136 TailCallMode::kDisallow) | 136 TailCallMode::kDisallow) |
137 .Call(reg, reg_list, 1, Call::GLOBAL_CALL, TailCallMode::kAllow) | 137 .Call(reg, reg_list, 1, Call::GLOBAL_CALL, TailCallMode::kAllow) |
138 .CallRuntime(Runtime::kIsArray, reg) | 138 .CallRuntime(Runtime::kIsArray, reg) |
139 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair) | 139 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair) |
140 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list) | 140 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list) |
141 .NewWithSpread(reg_list); | 141 .NewWithSpread(reg, reg_list); |
142 | 142 |
143 // Emit binary operator invocations. | 143 // Emit binary operator invocations. |
144 builder.BinaryOperation(Token::Value::ADD, reg, 1) | 144 builder.BinaryOperation(Token::Value::ADD, reg, 1) |
145 .BinaryOperation(Token::Value::SUB, reg, 2) | 145 .BinaryOperation(Token::Value::SUB, reg, 2) |
146 .BinaryOperation(Token::Value::MUL, reg, 3) | 146 .BinaryOperation(Token::Value::MUL, reg, 3) |
147 .BinaryOperation(Token::Value::DIV, reg, 4) | 147 .BinaryOperation(Token::Value::DIV, reg, 4) |
148 .BinaryOperation(Token::Value::MOD, reg, 5); | 148 .BinaryOperation(Token::Value::MOD, reg, 5); |
149 | 149 |
150 // Emit bitwise operator invocations | 150 // Emit bitwise operator invocations |
151 builder.BinaryOperation(Token::Value::BIT_OR, reg, 6) | 151 builder.BinaryOperation(Token::Value::BIT_OR, reg, 6) |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 iterator.Advance(); | 756 iterator.Advance(); |
757 } | 757 } |
758 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 758 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
759 iterator.Advance(); | 759 iterator.Advance(); |
760 CHECK(iterator.done()); | 760 CHECK(iterator.done()); |
761 } | 761 } |
762 | 762 |
763 } // namespace interpreter | 763 } // namespace interpreter |
764 } // namespace internal | 764 } // namespace internal |
765 } // namespace v8 | 765 } // namespace v8 |
OLD | NEW |