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 "macro-assembler.h" | 7 #include "macro-assembler.h" |
8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
9 #include "v8conversions.h" | 9 #include "v8conversions.h" |
10 | 10 |
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2221 } | 2221 } |
2222 // Climb parent chain | 2222 // Climb parent chain |
2223 Handle<Object> parent = Handle<Object>(obj->parent_template(), isolate()); | 2223 Handle<Object> parent = Handle<Object>(obj->parent_template(), isolate()); |
2224 if (parent->IsUndefined()) break; | 2224 if (parent->IsUndefined()) break; |
2225 obj = Handle<FunctionTemplateInfo>::cast(parent); | 2225 obj = Handle<FunctionTemplateInfo>::cast(parent); |
2226 } | 2226 } |
2227 | 2227 |
2228 // Install accumulated static accessors | 2228 // Install accumulated static accessors |
2229 for (int i = 0; i < valid_descriptors; i++) { | 2229 for (int i = 0; i < valid_descriptors; i++) { |
2230 Handle<AccessorInfo> accessor(AccessorInfo::cast(array->get(i))); | 2230 Handle<AccessorInfo> accessor(AccessorInfo::cast(array->get(i))); |
2231 JSObject::SetAccessor(result, accessor); | 2231 JSObject::SetAccessor(result, accessor).Assert(); |
2232 } | 2232 } |
2233 | 2233 |
2234 ASSERT(result->shared()->IsApiFunction()); | 2234 ASSERT(result->shared()->IsApiFunction()); |
2235 return result; | 2235 return result; |
2236 } | 2236 } |
2237 | 2237 |
2238 | 2238 |
2239 Handle<MapCache> Factory::NewMapCache(int at_least_space_for) { | 2239 Handle<MapCache> Factory::NewMapCache(int at_least_space_for) { |
2240 CALL_HEAP_FUNCTION(isolate(), | 2240 CALL_HEAP_FUNCTION(isolate(), |
2241 MapCache::Allocate(isolate()->heap(), | 2241 MapCache::Allocate(isolate()->heap(), |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 if (String::Equals(name, infinity_string())) return infinity_value(); | 2331 if (String::Equals(name, infinity_string())) return infinity_value(); |
2332 return Handle<Object>::null(); | 2332 return Handle<Object>::null(); |
2333 } | 2333 } |
2334 | 2334 |
2335 | 2335 |
2336 Handle<Object> Factory::ToBoolean(bool value) { | 2336 Handle<Object> Factory::ToBoolean(bool value) { |
2337 return value ? true_value() : false_value(); | 2337 return value ? true_value() : false_value(); |
2338 } | 2338 } |
2339 | 2339 |
2340 } } // namespace v8::internal | 2340 } } // namespace v8::internal |
OLD | NEW |