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

Side by Side Diff: src/bootstrapper.cc

Issue 2532483002: [stubs] Port FastFunctionBindStub to TF (Closed)
Patch Set: Review feedback Created 4 years 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/code-stubs-arm64.cc ('k') | src/builtins/builtins.h » ('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/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 function_fun->shared()->DontAdaptArguments(); 1225 function_fun->shared()->DontAdaptArguments();
1226 function_fun->shared()->SetConstructStub( 1226 function_fun->shared()->SetConstructStub(
1227 *isolate->builtins()->FunctionConstructor()); 1227 *isolate->builtins()->FunctionConstructor());
1228 function_fun->shared()->set_length(1); 1228 function_fun->shared()->set_length(1);
1229 InstallWithIntrinsicDefaultProto(isolate, function_fun, 1229 InstallWithIntrinsicDefaultProto(isolate, function_fun,
1230 Context::FUNCTION_FUNCTION_INDEX); 1230 Context::FUNCTION_FUNCTION_INDEX);
1231 1231
1232 // Setup the methods on the %FunctionPrototype%. 1232 // Setup the methods on the %FunctionPrototype%.
1233 SimpleInstallFunction(prototype, factory->apply_string(), 1233 SimpleInstallFunction(prototype, factory->apply_string(),
1234 Builtins::kFunctionPrototypeApply, 2, false); 1234 Builtins::kFunctionPrototypeApply, 2, false);
1235 1235 SimpleInstallFunction(prototype, factory->bind_string(),
1236 if (FLAG_minimal) { 1236 Builtins::kFastFunctionPrototypeBind, 1, false);
1237 SimpleInstallFunction(prototype, factory->bind_string(),
1238 Builtins::kFunctionPrototypeBind, 1, false);
1239 } else {
1240 FastFunctionBindStub bind_stub(isolate);
1241 Handle<JSFunction> bind_function = factory->NewFunctionWithoutPrototype(
1242 factory->bind_string(), bind_stub.GetCode(), false);
1243 bind_function->shared()->DontAdaptArguments();
1244 bind_function->shared()->set_length(1);
1245 InstallFunction(prototype, bind_function, factory->bind_string(),
1246 DONT_ENUM);
1247 }
1248
1249 SimpleInstallFunction(prototype, factory->call_string(), 1237 SimpleInstallFunction(prototype, factory->call_string(),
1250 Builtins::kFunctionPrototypeCall, 1, false); 1238 Builtins::kFunctionPrototypeCall, 1, false);
1251 SimpleInstallFunction(prototype, factory->toString_string(), 1239 SimpleInstallFunction(prototype, factory->toString_string(),
1252 Builtins::kFunctionPrototypeToString, 0, false); 1240 Builtins::kFunctionPrototypeToString, 0, false);
1253 1241
1254 // Install the @@hasInstance function. 1242 // Install the @@hasInstance function.
1255 Handle<JSFunction> has_instance = InstallFunction( 1243 Handle<JSFunction> has_instance = InstallFunction(
1256 prototype, factory->has_instance_symbol(), JS_OBJECT_TYPE, 1244 prototype, factory->has_instance_symbol(), JS_OBJECT_TYPE,
1257 JSObject::kHeaderSize, MaybeHandle<JSObject>(), 1245 JSObject::kHeaderSize, MaybeHandle<JSObject>(),
1258 Builtins::kFunctionPrototypeHasInstance, 1246 Builtins::kFunctionPrototypeHasInstance,
(...skipping 3302 matching lines...) Expand 10 before | Expand all | Expand 10 after
4561 } 4549 }
4562 4550
4563 4551
4564 // Called when the top-level V8 mutex is destroyed. 4552 // Called when the top-level V8 mutex is destroyed.
4565 void Bootstrapper::FreeThreadResources() { 4553 void Bootstrapper::FreeThreadResources() {
4566 DCHECK(!IsActive()); 4554 DCHECK(!IsActive());
4567 } 4555 }
4568 4556
4569 } // namespace internal 4557 } // namespace internal
4570 } // namespace v8 4558 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698