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/globals.h" | 7 #include "src/globals.h" |
8 #include "src/interpreter/bytecode-array-writer.h" | 8 #include "src/interpreter/bytecode-array-writer.h" |
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 9 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 642 } |
643 | 643 |
644 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( | 644 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( |
645 Handle<String> pattern, int literal_index, int flags) { | 645 Handle<String> pattern, int literal_index, int flags) { |
646 size_t pattern_entry = GetConstantPoolEntry(pattern); | 646 size_t pattern_entry = GetConstantPoolEntry(pattern); |
647 OutputCreateRegExpLiteral(pattern_entry, literal_index, flags); | 647 OutputCreateRegExpLiteral(pattern_entry, literal_index, flags); |
648 return *this; | 648 return *this; |
649 } | 649 } |
650 | 650 |
651 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( | 651 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( |
652 Handle<ConstantElementsPair> constant_elements, int literal_index, | 652 size_t entry, int literal_index, int flags) { |
653 int flags) { | 653 OutputCreateArrayLiteral(entry, literal_index, flags); |
654 size_t constant_elements_entry = GetConstantPoolEntry(constant_elements); | |
655 OutputCreateArrayLiteral(constant_elements_entry, literal_index, flags); | |
656 return *this; | 654 return *this; |
657 } | 655 } |
658 | 656 |
659 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( | 657 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( |
660 Handle<FixedArray> constant_properties, int literal_index, int flags, | 658 size_t entry, int literal_index, int flags, Register output) { |
661 Register output) { | 659 OutputCreateObjectLiteral(entry, literal_index, flags, output); |
662 size_t constant_properties_entry = GetConstantPoolEntry(constant_properties); | |
663 OutputCreateObjectLiteral(constant_properties_entry, literal_index, flags, | |
664 output); | |
665 return *this; | 660 return *this; |
666 } | 661 } |
667 | 662 |
668 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { | 663 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { |
669 OutputPushContext(context); | 664 OutputPushContext(context); |
670 return *this; | 665 return *this; |
671 } | 666 } |
672 | 667 |
673 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { | 668 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { |
674 OutputPopContext(context); | 669 OutputPopContext(context); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 RegisterList reg_list) { | 1041 RegisterList reg_list) { |
1047 DCHECK(RegisterListIsValid(reg_list)); | 1042 DCHECK(RegisterListIsValid(reg_list)); |
1048 if (register_optimizer_) | 1043 if (register_optimizer_) |
1049 register_optimizer_->PrepareOutputRegisterList(reg_list); | 1044 register_optimizer_->PrepareOutputRegisterList(reg_list); |
1050 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); | 1045 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); |
1051 } | 1046 } |
1052 | 1047 |
1053 } // namespace interpreter | 1048 } // namespace interpreter |
1054 } // namespace internal | 1049 } // namespace internal |
1055 } // namespace v8 | 1050 } // namespace v8 |
OLD | NEW |