| 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 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 | 1882 |
| 1883 | 1883 |
| 1884 void Factory::BecomeJSFunction(Handle<JSProxy> proxy) { | 1884 void Factory::BecomeJSFunction(Handle<JSProxy> proxy) { |
| 1885 ReinitializeJSProxy(proxy, JS_FUNCTION_TYPE, JSFunction::kSize); | 1885 ReinitializeJSProxy(proxy, JS_FUNCTION_TYPE, JSFunction::kSize); |
| 1886 } | 1886 } |
| 1887 | 1887 |
| 1888 | 1888 |
| 1889 Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(int slot_count) { | 1889 Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(int slot_count) { |
| 1890 // Ensure we can skip the write barrier | 1890 // Ensure we can skip the write barrier |
| 1891 DCHECK_EQ(isolate()->heap()->uninitialized_symbol(), | 1891 DCHECK_EQ(isolate()->heap()->uninitialized_symbol(), |
| 1892 *TypeFeedbackInfo::UninitializedSentinel(isolate())); | 1892 *TypeFeedbackVector::UninitializedSentinel(isolate())); |
| 1893 | 1893 |
| 1894 if (slot_count == 0) { | 1894 if (slot_count == 0) { |
| 1895 return Handle<TypeFeedbackVector>::cast(empty_fixed_array()); | 1895 return Handle<TypeFeedbackVector>::cast(empty_fixed_array()); |
| 1896 } | 1896 } |
| 1897 | 1897 |
| 1898 CALL_HEAP_FUNCTION(isolate(), | 1898 CALL_HEAP_FUNCTION(isolate(), |
| 1899 isolate()->heap()->AllocateFixedArrayWithFiller( | 1899 isolate()->heap()->AllocateFixedArrayWithFiller( |
| 1900 slot_count, TENURED, | 1900 slot_count, TENURED, |
| 1901 *TypeFeedbackInfo::UninitializedSentinel(isolate())), | 1901 *TypeFeedbackVector::UninitializedSentinel(isolate())), |
| 1902 TypeFeedbackVector); | 1902 TypeFeedbackVector); |
| 1903 } | 1903 } |
| 1904 | 1904 |
| 1905 | 1905 |
| 1906 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( | 1906 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
| 1907 Handle<String> name, int number_of_literals, FunctionKind kind, | 1907 Handle<String> name, int number_of_literals, FunctionKind kind, |
| 1908 Handle<Code> code, Handle<ScopeInfo> scope_info, | 1908 Handle<Code> code, Handle<ScopeInfo> scope_info, |
| 1909 Handle<TypeFeedbackVector> feedback_vector) { | 1909 Handle<TypeFeedbackVector> feedback_vector) { |
| 1910 DCHECK(IsValidFunctionKind(kind)); | 1910 DCHECK(IsValidFunctionKind(kind)); |
| 1911 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name, code); | 1911 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name, code); |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2393 return Handle<Object>::null(); | 2393 return Handle<Object>::null(); |
| 2394 } | 2394 } |
| 2395 | 2395 |
| 2396 | 2396 |
| 2397 Handle<Object> Factory::ToBoolean(bool value) { | 2397 Handle<Object> Factory::ToBoolean(bool value) { |
| 2398 return value ? true_value() : false_value(); | 2398 return value ? true_value() : false_value(); |
| 2399 } | 2399 } |
| 2400 | 2400 |
| 2401 | 2401 |
| 2402 } } // namespace v8::internal | 2402 } } // namespace v8::internal |
| OLD | NEW |