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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 isolate()->heap()->AllocateStruct(type), | 795 isolate()->heap()->AllocateStruct(type), |
796 Struct); | 796 Struct); |
797 } | 797 } |
798 | 798 |
799 | 799 |
800 Handle<CodeCache> Factory::NewCodeCache() { | 800 Handle<CodeCache> Factory::NewCodeCache() { |
801 Handle<CodeCache> code_cache = | 801 Handle<CodeCache> code_cache = |
802 Handle<CodeCache>::cast(NewStruct(CODE_CACHE_TYPE)); | 802 Handle<CodeCache>::cast(NewStruct(CODE_CACHE_TYPE)); |
803 code_cache->set_default_cache(*empty_fixed_array(), SKIP_WRITE_BARRIER); | 803 code_cache->set_default_cache(*empty_fixed_array(), SKIP_WRITE_BARRIER); |
804 code_cache->set_normal_type_cache(*undefined_value(), SKIP_WRITE_BARRIER); | 804 code_cache->set_normal_type_cache(*undefined_value(), SKIP_WRITE_BARRIER); |
805 code_cache->set_weak_cell_cache(*undefined_value(), SKIP_WRITE_BARRIER); | |
806 return code_cache; | 805 return code_cache; |
807 } | 806 } |
808 | 807 |
809 | 808 |
810 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry( | 809 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry( |
811 int aliased_context_slot) { | 810 int aliased_context_slot) { |
812 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast( | 811 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast( |
813 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); | 812 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); |
814 entry->set_aliased_context_slot(aliased_context_slot); | 813 entry->set_aliased_context_slot(aliased_context_slot); |
815 return entry; | 814 return entry; |
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 return Handle<Object>::null(); | 2520 return Handle<Object>::null(); |
2522 } | 2521 } |
2523 | 2522 |
2524 | 2523 |
2525 Handle<Object> Factory::ToBoolean(bool value) { | 2524 Handle<Object> Factory::ToBoolean(bool value) { |
2526 return value ? true_value() : false_value(); | 2525 return value ? true_value() : false_value(); |
2527 } | 2526 } |
2528 | 2527 |
2529 | 2528 |
2530 } } // namespace v8::internal | 2529 } } // namespace v8::internal |
OLD | NEW |