| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, | 145 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, |
| 146 int slack) { | 146 int slack) { |
| 147 ASSERT(0 <= number_of_descriptors); | 147 ASSERT(0 <= number_of_descriptors); |
| 148 CALL_HEAP_FUNCTION(isolate(), | 148 CALL_HEAP_FUNCTION(isolate(), |
| 149 DescriptorArray::Allocate( | 149 DescriptorArray::Allocate( |
| 150 isolate(), number_of_descriptors, slack), | 150 isolate(), number_of_descriptors, slack), |
| 151 DescriptorArray); | 151 DescriptorArray); |
| 152 } | 152 } |
| 153 | 153 |
| 154 | 154 |
| 155 Handle<TransitionArray> Factory::NewTransitionArray(int number_of_transitions) { |
| 156 ASSERT(0 <= number_of_transitions); |
| 157 CALL_HEAP_FUNCTION(isolate(), |
| 158 TransitionArray::Allocate( |
| 159 isolate(), number_of_transitions), |
| 160 TransitionArray); |
| 161 } |
| 162 |
| 163 |
| 164 Handle<TransitionArray> Factory::NewSimpleTransitionArray(Handle<Map> target) { |
| 165 CALL_HEAP_FUNCTION(isolate(), |
| 166 TransitionArray::AllocateSimple( |
| 167 isolate(), *target), |
| 168 TransitionArray); |
| 169 } |
| 170 |
| 171 |
| 155 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( | 172 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( |
| 156 int deopt_entry_count, | 173 int deopt_entry_count, |
| 157 PretenureFlag pretenure) { | 174 PretenureFlag pretenure) { |
| 158 ASSERT(deopt_entry_count > 0); | 175 ASSERT(deopt_entry_count > 0); |
| 159 CALL_HEAP_FUNCTION(isolate(), | 176 CALL_HEAP_FUNCTION(isolate(), |
| 160 DeoptimizationInputData::Allocate(isolate(), | 177 DeoptimizationInputData::Allocate(isolate(), |
| 161 deopt_entry_count, | 178 deopt_entry_count, |
| 162 pretenure), | 179 pretenure), |
| 163 DeoptimizationInputData); | 180 DeoptimizationInputData); |
| 164 } | 181 } |
| (...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 if (name->Equals(h->infinity_string())) return infinity_value(); | 2004 if (name->Equals(h->infinity_string())) return infinity_value(); |
| 1988 return Handle<Object>::null(); | 2005 return Handle<Object>::null(); |
| 1989 } | 2006 } |
| 1990 | 2007 |
| 1991 | 2008 |
| 1992 Handle<Object> Factory::ToBoolean(bool value) { | 2009 Handle<Object> Factory::ToBoolean(bool value) { |
| 1993 return value ? true_value() : false_value(); | 2010 return value ? true_value() : false_value(); |
| 1994 } | 2011 } |
| 1995 | 2012 |
| 1996 } } // namespace v8::internal | 2013 } } // namespace v8::internal |
| OLD | NEW |