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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return result; | 89 return result; |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { | 93 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { |
94 Handle<PrototypeInfo> result = | 94 Handle<PrototypeInfo> result = |
95 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); | 95 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); |
96 result->set_prototype_users(WeakFixedArray::Empty()); | 96 result->set_prototype_users(WeakFixedArray::Empty()); |
97 result->set_registry_slot(PrototypeInfo::UNREGISTERED); | 97 result->set_registry_slot(PrototypeInfo::UNREGISTERED); |
98 result->set_validity_cell(Smi::FromInt(0)); | 98 result->set_validity_cell(Smi::FromInt(0)); |
99 result->set_constructor_name(Smi::FromInt(0)); | |
100 return result; | 99 return result; |
101 } | 100 } |
102 | 101 |
103 | 102 |
104 Handle<SloppyBlockWithEvalContextExtension> | 103 Handle<SloppyBlockWithEvalContextExtension> |
105 Factory::NewSloppyBlockWithEvalContextExtension( | 104 Factory::NewSloppyBlockWithEvalContextExtension( |
106 Handle<ScopeInfo> scope_info, Handle<JSObject> extension) { | 105 Handle<ScopeInfo> scope_info, Handle<JSObject> extension) { |
107 DCHECK(scope_info->is_declaration_scope()); | 106 DCHECK(scope_info->is_declaration_scope()); |
108 Handle<SloppyBlockWithEvalContextExtension> result = | 107 Handle<SloppyBlockWithEvalContextExtension> result = |
109 Handle<SloppyBlockWithEvalContextExtension>::cast( | 108 Handle<SloppyBlockWithEvalContextExtension>::cast( |
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2326 } | 2325 } |
2327 | 2326 |
2328 | 2327 |
2329 Handle<Object> Factory::ToBoolean(bool value) { | 2328 Handle<Object> Factory::ToBoolean(bool value) { |
2330 return value ? true_value() : false_value(); | 2329 return value ? true_value() : false_value(); |
2331 } | 2330 } |
2332 | 2331 |
2333 | 2332 |
2334 } // namespace internal | 2333 } // namespace internal |
2335 } // namespace v8 | 2334 } // namespace v8 |
OLD | NEW |