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-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 if (shared_info.is_null()) return SetStackOverflow(); | 643 if (shared_info.is_null()) return SetStackOverflow(); |
644 builder()->InsertConstantPoolEntryAt(literal.second, shared_info); | 644 builder()->InsertConstantPoolEntryAt(literal.second, shared_info); |
645 } | 645 } |
646 | 646 |
647 // Build object literal constant properties | 647 // Build object literal constant properties |
648 for (std::pair<ObjectLiteral*, size_t> literal : object_literals_) { | 648 for (std::pair<ObjectLiteral*, size_t> literal : object_literals_) { |
649 ObjectLiteral* object_literal = literal.first; | 649 ObjectLiteral* object_literal = literal.first; |
650 if (object_literal->properties_count() > 0) { | 650 if (object_literal->properties_count() > 0) { |
651 // If constant properties is an empty fixed array, we've already added it | 651 // If constant properties is an empty fixed array, we've already added it |
652 // to the constant pool when visiting the object literal. | 652 // to the constant pool when visiting the object literal. |
653 Handle<FixedArray> constant_properties = | 653 Handle<BoilerplateDescription> constant_properties = |
654 object_literal->GetOrBuildConstantProperties(isolate); | 654 object_literal->GetOrBuildConstantProperties(isolate); |
655 | 655 |
656 builder()->InsertConstantPoolEntryAt(literal.second, constant_properties); | 656 builder()->InsertConstantPoolEntryAt(literal.second, constant_properties); |
657 } | 657 } |
658 } | 658 } |
659 | 659 |
660 // Build array literal constant elements | 660 // Build array literal constant elements |
661 for (std::pair<ArrayLiteral*, size_t> literal : array_literals_) { | 661 for (std::pair<ArrayLiteral*, size_t> literal : array_literals_) { |
662 ArrayLiteral* array_literal = literal.first; | 662 ArrayLiteral* array_literal = literal.first; |
663 Handle<ConstantElementsPair> constant_elements = | 663 Handle<ConstantElementsPair> constant_elements = |
(...skipping 2711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 } | 3375 } |
3376 | 3376 |
3377 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3377 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
3378 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3378 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
3379 : Runtime::kStoreKeyedToSuper_Sloppy; | 3379 : Runtime::kStoreKeyedToSuper_Sloppy; |
3380 } | 3380 } |
3381 | 3381 |
3382 } // namespace interpreter | 3382 } // namespace interpreter |
3383 } // namespace internal | 3383 } // namespace internal |
3384 } // namespace v8 | 3384 } // namespace v8 |
OLD | NEW |