Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: src/factory.cc

Issue 579153003: Move state sentinels into TypeFeedbackVector. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ports. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698