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/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 | 809 |
810 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry( | 810 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry( |
811 int aliased_context_slot) { | 811 int aliased_context_slot) { |
812 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast( | 812 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast( |
813 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); | 813 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); |
814 entry->set_aliased_context_slot(aliased_context_slot); | 814 entry->set_aliased_context_slot(aliased_context_slot); |
815 return entry; | 815 return entry; |
816 } | 816 } |
817 | 817 |
818 | 818 |
819 Handle<DeclaredAccessorDescriptor> Factory::NewDeclaredAccessorDescriptor() { | |
820 return Handle<DeclaredAccessorDescriptor>::cast( | |
821 NewStruct(DECLARED_ACCESSOR_DESCRIPTOR_TYPE)); | |
822 } | |
823 | |
824 | |
825 Handle<DeclaredAccessorInfo> Factory::NewDeclaredAccessorInfo() { | |
826 Handle<DeclaredAccessorInfo> info = | |
827 Handle<DeclaredAccessorInfo>::cast( | |
828 NewStruct(DECLARED_ACCESSOR_INFO_TYPE)); | |
829 info->set_flag(0); // Must clear the flag, it was initialized as undefined. | |
830 return info; | |
831 } | |
832 | |
833 | |
834 Handle<ExecutableAccessorInfo> Factory::NewExecutableAccessorInfo() { | 819 Handle<ExecutableAccessorInfo> Factory::NewExecutableAccessorInfo() { |
835 Handle<ExecutableAccessorInfo> info = | 820 Handle<ExecutableAccessorInfo> info = |
836 Handle<ExecutableAccessorInfo>::cast( | 821 Handle<ExecutableAccessorInfo>::cast( |
837 NewStruct(EXECUTABLE_ACCESSOR_INFO_TYPE)); | 822 NewStruct(EXECUTABLE_ACCESSOR_INFO_TYPE)); |
838 info->set_flag(0); // Must clear the flag, it was initialized as undefined. | 823 info->set_flag(0); // Must clear the flag, it was initialized as undefined. |
839 return info; | 824 return info; |
840 } | 825 } |
841 | 826 |
842 | 827 |
843 Handle<Script> Factory::NewScript(Handle<String> source) { | 828 Handle<Script> Factory::NewScript(Handle<String> source) { |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 return Handle<Object>::null(); | 2507 return Handle<Object>::null(); |
2523 } | 2508 } |
2524 | 2509 |
2525 | 2510 |
2526 Handle<Object> Factory::ToBoolean(bool value) { | 2511 Handle<Object> Factory::ToBoolean(bool value) { |
2527 return value ? true_value() : false_value(); | 2512 return value ? true_value() : false_value(); |
2528 } | 2513 } |
2529 | 2514 |
2530 | 2515 |
2531 } } // namespace v8::internal | 2516 } } // namespace v8::internal |
OLD | NEW |