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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 LanguageMode language_mode) { | 578 LanguageMode language_mode) { |
579 if (language_mode == SLOPPY) { | 579 if (language_mode == SLOPPY) { |
580 OutputStaKeyedPropertySloppy(object, key, feedback_slot); | 580 OutputStaKeyedPropertySloppy(object, key, feedback_slot); |
581 } else { | 581 } else { |
582 DCHECK_EQ(language_mode, STRICT); | 582 DCHECK_EQ(language_mode, STRICT); |
583 OutputStaKeyedPropertyStrict(object, key, feedback_slot); | 583 OutputStaKeyedPropertyStrict(object, key, feedback_slot); |
584 } | 584 } |
585 return *this; | 585 return *this; |
586 } | 586 } |
587 | 587 |
588 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(size_t entry, | 588 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( |
589 int slot, int flags) { | 589 size_t shared_function_info_entry, int slot, int flags) { |
590 OutputCreateClosure(entry, slot, flags); | 590 OutputCreateClosure(shared_function_info_entry, slot, flags); |
591 return *this; | 591 return *this; |
592 } | 592 } |
593 | 593 |
594 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext( | 594 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext( |
595 Handle<ScopeInfo> scope_info) { | 595 Handle<ScopeInfo> scope_info) { |
596 size_t entry = GetConstantPoolEntry(scope_info); | 596 size_t entry = GetConstantPoolEntry(scope_info); |
597 OutputCreateBlockContext(entry); | 597 OutputCreateBlockContext(entry); |
598 return *this; | 598 return *this; |
599 } | 599 } |
600 | 600 |
(...skipping 41 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 constant_elements_entry, int literal_index, int flags) { |
653 int flags) { | |
654 size_t constant_elements_entry = GetConstantPoolEntry(constant_elements); | |
655 OutputCreateArrayLiteral(constant_elements_entry, literal_index, flags); | 653 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 constant_properties_entry, int literal_index, int flags, |
661 Register output) { | 659 Register output) { |
662 size_t constant_properties_entry = GetConstantPoolEntry(constant_properties); | |
663 OutputCreateObjectLiteral(constant_properties_entry, literal_index, flags, | 660 OutputCreateObjectLiteral(constant_properties_entry, literal_index, flags, |
664 output); | 661 output); |
665 return *this; | 662 return *this; |
666 } | 663 } |
667 | 664 |
668 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { | 665 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { |
669 OutputPushContext(context); | 666 OutputPushContext(context); |
670 return *this; | 667 return *this; |
671 } | 668 } |
672 | 669 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 RegisterList reg_list) { | 1043 RegisterList reg_list) { |
1047 DCHECK(RegisterListIsValid(reg_list)); | 1044 DCHECK(RegisterListIsValid(reg_list)); |
1048 if (register_optimizer_) | 1045 if (register_optimizer_) |
1049 register_optimizer_->PrepareOutputRegisterList(reg_list); | 1046 register_optimizer_->PrepareOutputRegisterList(reg_list); |
1050 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); | 1047 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); |
1051 } | 1048 } |
1052 | 1049 |
1053 } // namespace interpreter | 1050 } // namespace interpreter |
1054 } // namespace internal | 1051 } // namespace internal |
1055 } // namespace v8 | 1052 } // namespace v8 |
OLD | NEW |