OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
10 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 10 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( | 362 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( |
363 Handle<FixedArray> constant_elements, int literal_index, int flags) { | 363 Handle<FixedArray> constant_elements, int literal_index, int flags) { |
364 size_t constant_elements_entry = GetConstantPoolEntry(constant_elements); | 364 size_t constant_elements_entry = GetConstantPoolEntry(constant_elements); |
365 Output(Bytecode::kCreateArrayLiteral, | 365 Output(Bytecode::kCreateArrayLiteral, |
366 UnsignedOperand(constant_elements_entry), | 366 UnsignedOperand(constant_elements_entry), |
367 UnsignedOperand(literal_index), UnsignedOperand(flags)); | 367 UnsignedOperand(literal_index), UnsignedOperand(flags)); |
368 return *this; | 368 return *this; |
369 } | 369 } |
370 | 370 |
371 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( | 371 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( |
372 Handle<FixedArray> constant_properties, int literal_index, int flags) { | 372 Handle<FixedArray> constant_properties, int literal_index, int flags, |
| 373 Register output) { |
373 size_t constant_properties_entry = GetConstantPoolEntry(constant_properties); | 374 size_t constant_properties_entry = GetConstantPoolEntry(constant_properties); |
374 Output(Bytecode::kCreateObjectLiteral, | 375 Output(Bytecode::kCreateObjectLiteral, |
375 UnsignedOperand(constant_properties_entry), | 376 UnsignedOperand(constant_properties_entry), |
376 UnsignedOperand(literal_index), UnsignedOperand(flags)); | 377 UnsignedOperand(literal_index), UnsignedOperand(flags), |
| 378 RegisterOperand(output)); |
377 return *this; | 379 return *this; |
378 } | 380 } |
379 | 381 |
380 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { | 382 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { |
381 Output(Bytecode::kPushContext, RegisterOperand(context)); | 383 Output(Bytecode::kPushContext, RegisterOperand(context)); |
382 return *this; | 384 return *this; |
383 } | 385 } |
384 | 386 |
385 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { | 387 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { |
386 Output(Bytecode::kPopContext, RegisterOperand(context)); | 388 Output(Bytecode::kPopContext, RegisterOperand(context)); |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 return Bytecode::kTailCall; | 962 return Bytecode::kTailCall; |
961 default: | 963 default: |
962 UNREACHABLE(); | 964 UNREACHABLE(); |
963 } | 965 } |
964 return Bytecode::kIllegal; | 966 return Bytecode::kIllegal; |
965 } | 967 } |
966 | 968 |
967 } // namespace interpreter | 969 } // namespace interpreter |
968 } // namespace internal | 970 } // namespace internal |
969 } // namespace v8 | 971 } // namespace v8 |
OLD | NEW |