| 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 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2236 } | 2236 } |
| 2237 | 2237 |
| 2238 | 2238 |
| 2239 Handle<JSFunction> Factory::CreateApiFunction( | 2239 Handle<JSFunction> Factory::CreateApiFunction( |
| 2240 Handle<FunctionTemplateInfo> obj, | 2240 Handle<FunctionTemplateInfo> obj, |
| 2241 Handle<Object> prototype, | 2241 Handle<Object> prototype, |
| 2242 ApiInstanceType instance_type) { | 2242 ApiInstanceType instance_type) { |
| 2243 Handle<Code> code = isolate()->builtins()->HandleApiCall(); | 2243 Handle<Code> code = isolate()->builtins()->HandleApiCall(); |
| 2244 Handle<Code> construct_stub = isolate()->builtins()->JSConstructStubApi(); | 2244 Handle<Code> construct_stub = isolate()->builtins()->JSConstructStubApi(); |
| 2245 | 2245 |
| 2246 obj->set_instantiated(true); |
| 2246 Handle<JSFunction> result; | 2247 Handle<JSFunction> result; |
| 2247 if (obj->remove_prototype()) { | 2248 if (obj->remove_prototype()) { |
| 2248 result = NewFunctionWithoutPrototype(empty_string(), code); | 2249 result = NewFunctionWithoutPrototype(empty_string(), code); |
| 2249 } else { | 2250 } else { |
| 2250 int internal_field_count = 0; | 2251 int internal_field_count = 0; |
| 2251 if (!obj->instance_template()->IsUndefined()) { | 2252 if (!obj->instance_template()->IsUndefined()) { |
| 2252 Handle<ObjectTemplateInfo> instance_template = | 2253 Handle<ObjectTemplateInfo> instance_template = |
| 2253 Handle<ObjectTemplateInfo>( | 2254 Handle<ObjectTemplateInfo>( |
| 2254 ObjectTemplateInfo::cast(obj->instance_template())); | 2255 ObjectTemplateInfo::cast(obj->instance_template())); |
| 2255 internal_field_count = | 2256 internal_field_count = |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2513 return Handle<Object>::null(); | 2514 return Handle<Object>::null(); |
| 2514 } | 2515 } |
| 2515 | 2516 |
| 2516 | 2517 |
| 2517 Handle<Object> Factory::ToBoolean(bool value) { | 2518 Handle<Object> Factory::ToBoolean(bool value) { |
| 2518 return value ? true_value() : false_value(); | 2519 return value ? true_value() : false_value(); |
| 2519 } | 2520 } |
| 2520 | 2521 |
| 2521 | 2522 |
| 2522 } } // namespace v8::internal | 2523 } } // namespace v8::internal |
| OLD | NEW |