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 "factory.h" | 5 #include "factory.h" |
6 | 6 |
7 #include "isolate-inl.h" | 7 #include "isolate-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 CALL_HEAP_FUNCTION( | 126 CALL_HEAP_FUNCTION( |
127 isolate(), | 127 isolate(), |
128 WeakHashTable::Allocate(isolate()->heap(), | 128 WeakHashTable::Allocate(isolate()->heap(), |
129 at_least_space_for, | 129 at_least_space_for, |
130 USE_DEFAULT_MINIMUM_CAPACITY, | 130 USE_DEFAULT_MINIMUM_CAPACITY, |
131 TENURED), | 131 TENURED), |
132 WeakHashTable); | 132 WeakHashTable); |
133 } | 133 } |
134 | 134 |
135 | 135 |
136 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, | |
137 int slack) { | |
138 ASSERT(0 <= number_of_descriptors); | |
139 CALL_HEAP_FUNCTION(isolate(), | |
140 DescriptorArray::Allocate( | |
141 isolate(), number_of_descriptors, slack), | |
142 DescriptorArray); | |
143 } | |
144 | |
145 | |
146 Handle<TransitionArray> Factory::NewTransitionArray(int number_of_transitions) { | |
147 ASSERT(0 <= number_of_transitions); | |
148 CALL_HEAP_FUNCTION(isolate(), | |
149 TransitionArray::Allocate( | |
150 isolate(), number_of_transitions), | |
151 TransitionArray); | |
152 } | |
153 | |
154 | |
155 Handle<TransitionArray> Factory::NewSimpleTransitionArray(Handle<Map> target) { | |
156 CALL_HEAP_FUNCTION(isolate(), | |
157 TransitionArray::AllocateSimple( | |
158 isolate(), *target), | |
159 TransitionArray); | |
160 } | |
161 | |
162 | |
163 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( | 136 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( |
164 int deopt_entry_count, | 137 int deopt_entry_count, |
165 PretenureFlag pretenure) { | 138 PretenureFlag pretenure) { |
166 ASSERT(deopt_entry_count > 0); | 139 ASSERT(deopt_entry_count > 0); |
167 CALL_HEAP_FUNCTION(isolate(), | 140 CALL_HEAP_FUNCTION(isolate(), |
168 DeoptimizationInputData::Allocate(isolate(), | 141 DeoptimizationInputData::Allocate(isolate(), |
169 deopt_entry_count, | 142 deopt_entry_count, |
170 pretenure), | 143 pretenure), |
171 DeoptimizationInputData); | 144 DeoptimizationInputData); |
172 } | 145 } |
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 if (name->Equals(h->infinity_string())) return infinity_value(); | 1988 if (name->Equals(h->infinity_string())) return infinity_value(); |
2016 return Handle<Object>::null(); | 1989 return Handle<Object>::null(); |
2017 } | 1990 } |
2018 | 1991 |
2019 | 1992 |
2020 Handle<Object> Factory::ToBoolean(bool value) { | 1993 Handle<Object> Factory::ToBoolean(bool value) { |
2021 return value ? true_value() : false_value(); | 1994 return value ? true_value() : false_value(); |
2022 } | 1995 } |
2023 | 1996 |
2024 } } // namespace v8::internal | 1997 } } // namespace v8::internal |
OLD | NEW |