| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, | 136 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, |
| 137 int slack) { | 137 int slack) { |
| 138 ASSERT(0 <= number_of_descriptors); | 138 ASSERT(0 <= number_of_descriptors); |
| 139 CALL_HEAP_FUNCTION(isolate(), | 139 CALL_HEAP_FUNCTION(isolate(), |
| 140 DescriptorArray::Allocate( | 140 DescriptorArray::Allocate( |
| 141 isolate(), number_of_descriptors, slack), | 141 isolate(), number_of_descriptors, slack), |
| 142 DescriptorArray); | 142 DescriptorArray); |
| 143 } | 143 } |
| 144 | 144 |
| 145 | 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 |
| 146 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( | 163 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( |
| 147 int deopt_entry_count, | 164 int deopt_entry_count, |
| 148 PretenureFlag pretenure) { | 165 PretenureFlag pretenure) { |
| 149 ASSERT(deopt_entry_count > 0); | 166 ASSERT(deopt_entry_count > 0); |
| 150 CALL_HEAP_FUNCTION(isolate(), | 167 CALL_HEAP_FUNCTION(isolate(), |
| 151 DeoptimizationInputData::Allocate(isolate(), | 168 DeoptimizationInputData::Allocate(isolate(), |
| 152 deopt_entry_count, | 169 deopt_entry_count, |
| 153 pretenure), | 170 pretenure), |
| 154 DeoptimizationInputData); | 171 DeoptimizationInputData); |
| 155 } | 172 } |
| (...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 if (name->Equals(h->infinity_string())) return infinity_value(); | 2015 if (name->Equals(h->infinity_string())) return infinity_value(); |
| 1999 return Handle<Object>::null(); | 2016 return Handle<Object>::null(); |
| 2000 } | 2017 } |
| 2001 | 2018 |
| 2002 | 2019 |
| 2003 Handle<Object> Factory::ToBoolean(bool value) { | 2020 Handle<Object> Factory::ToBoolean(bool value) { |
| 2004 return value ? true_value() : false_value(); | 2021 return value ? true_value() : false_value(); |
| 2005 } | 2022 } |
| 2006 | 2023 |
| 2007 } } // namespace v8::internal | 2024 } } // namespace v8::internal |
| OLD | NEW |