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

Side by Side Diff: src/bootstrapper.cc

Issue 1342013003: Vector ICs: Hook up vectors in platform builtins to their SharedFunctionInfos. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test and remaining ports. Created 5 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
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/ia32/builtins-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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 JSObject::AddProperty(container, NAME##_name, isolate->factory()->NAME(), \ 1789 JSObject::AddProperty(container, NAME##_name, isolate->factory()->NAME(), \
1790 NONE); 1790 NONE);
1791 PUBLIC_SYMBOL_LIST(EXPORT_PUBLIC_SYMBOL) 1791 PUBLIC_SYMBOL_LIST(EXPORT_PUBLIC_SYMBOL)
1792 #undef EXPORT_PUBLIC_SYMBOL 1792 #undef EXPORT_PUBLIC_SYMBOL
1793 1793
1794 Handle<JSFunction> apply = InstallFunction( 1794 Handle<JSFunction> apply = InstallFunction(
1795 container, "reflect_apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, 1795 container, "reflect_apply", JS_OBJECT_TYPE, JSObject::kHeaderSize,
1796 MaybeHandle<JSObject>(), Builtins::kReflectApply); 1796 MaybeHandle<JSObject>(), Builtins::kReflectApply);
1797 apply->shared()->set_internal_formal_parameter_count(3); 1797 apply->shared()->set_internal_formal_parameter_count(3);
1798 apply->shared()->set_length(3); 1798 apply->shared()->set_length(3);
1799 apply->shared()->set_feedback_vector(
1800 *TypeFeedbackVector::CreatePushAppliedArgumentsVector(isolate));
1799 isolate->native_context()->set_reflect_apply(*apply); 1801 isolate->native_context()->set_reflect_apply(*apply);
1800 1802
1801 Handle<JSFunction> construct = InstallFunction( 1803 Handle<JSFunction> construct = InstallFunction(
1802 container, "reflect_construct", JS_OBJECT_TYPE, JSObject::kHeaderSize, 1804 container, "reflect_construct", JS_OBJECT_TYPE, JSObject::kHeaderSize,
1803 MaybeHandle<JSObject>(), Builtins::kReflectConstruct); 1805 MaybeHandle<JSObject>(), Builtins::kReflectConstruct);
1804 construct->shared()->set_internal_formal_parameter_count(3); 1806 construct->shared()->set_internal_formal_parameter_count(3);
1805 construct->shared()->set_length(2); 1807 construct->shared()->set_length(2);
1808 construct->shared()->set_feedback_vector(
1809 *TypeFeedbackVector::CreatePushAppliedArgumentsVector(isolate));
1806 isolate->native_context()->set_reflect_construct(*construct); 1810 isolate->native_context()->set_reflect_construct(*construct);
1807 } 1811 }
1808 1812
1809 1813
1810 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, 1814 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate,
1811 Handle<JSObject> container) { 1815 Handle<JSObject> container) {
1812 HandleScope scope(isolate); 1816 HandleScope scope(isolate);
1813 1817
1814 #define INITIALIZE_FLAG(FLAG) \ 1818 #define INITIALIZE_FLAG(FLAG) \
1815 { \ 1819 { \
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 Handle<JSObject> proto = 2378 Handle<JSObject> proto =
2375 Handle<JSObject>(JSObject::cast(function->instance_prototype())); 2379 Handle<JSObject>(JSObject::cast(function->instance_prototype()));
2376 2380
2377 // Install the call and the apply functions. 2381 // Install the call and the apply functions.
2378 Handle<JSFunction> call = 2382 Handle<JSFunction> call =
2379 InstallFunction(proto, "call", JS_OBJECT_TYPE, JSObject::kHeaderSize, 2383 InstallFunction(proto, "call", JS_OBJECT_TYPE, JSObject::kHeaderSize,
2380 MaybeHandle<JSObject>(), Builtins::kFunctionCall); 2384 MaybeHandle<JSObject>(), Builtins::kFunctionCall);
2381 Handle<JSFunction> apply = 2385 Handle<JSFunction> apply =
2382 InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, 2386 InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize,
2383 MaybeHandle<JSObject>(), Builtins::kFunctionApply); 2387 MaybeHandle<JSObject>(), Builtins::kFunctionApply);
2388 apply->shared()->set_feedback_vector(
2389 *TypeFeedbackVector::CreatePushAppliedArgumentsVector(isolate()));
2384 2390
2385 // Make sure that Function.prototype.call appears to be compiled. 2391 // Make sure that Function.prototype.call appears to be compiled.
2386 // The code will never be called, but inline caching for call will 2392 // The code will never be called, but inline caching for call will
2387 // only work if it appears to be compiled. 2393 // only work if it appears to be compiled.
2388 call->shared()->DontAdaptArguments(); 2394 call->shared()->DontAdaptArguments();
2389 DCHECK(call->is_compiled()); 2395 DCHECK(call->is_compiled());
2390 2396
2391 // Set the expected parameters for apply to 2; required by builtin. 2397 // Set the expected parameters for apply to 2; required by builtin.
2392 apply->shared()->set_internal_formal_parameter_count(2); 2398 apply->shared()->set_internal_formal_parameter_count(2);
2393 2399
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 } 3231 }
3226 3232
3227 3233
3228 // Called when the top-level V8 mutex is destroyed. 3234 // Called when the top-level V8 mutex is destroyed.
3229 void Bootstrapper::FreeThreadResources() { 3235 void Bootstrapper::FreeThreadResources() {
3230 DCHECK(!IsActive()); 3236 DCHECK(!IsActive());
3231 } 3237 }
3232 3238
3233 } // namespace internal 3239 } // namespace internal
3234 } // namespace v8 3240 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698