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

Unified Diff: src/compiler/access-builder.cc

Issue 2916063002: [turbofan] Optimize Function.prototype.bind for the common case. (Closed)
Patch Set: Address feedback. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-builder.cc
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc
index c7b85255b299739941e6642016906e756ffa527c..f24c9dbe2bff910d79b5d1c90186d0e9c34221a2 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -170,6 +170,35 @@ FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() {
return access;
}
+// static
+FieldAccess AccessBuilder::ForJSBoundFunctionBoundTargetFunction() {
+ FieldAccess access = {
+ kTaggedBase, JSBoundFunction::kBoundTargetFunctionOffset,
+ Handle<Name>(), MaybeHandle<Map>(),
+ Type::Callable(), MachineType::TaggedPointer(),
+ kPointerWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForJSBoundFunctionBoundThis() {
+ FieldAccess access = {kTaggedBase, JSBoundFunction::kBoundThisOffset,
+ Handle<Name>(), MaybeHandle<Map>(),
+ Type::NonInternal(), MachineType::AnyTagged(),
+ kFullWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForJSBoundFunctionBoundArguments() {
+ FieldAccess access = {
+ kTaggedBase, JSBoundFunction::kBoundArgumentsOffset,
+ Handle<Name>(), MaybeHandle<Map>(),
+ Type::Internal(), MachineType::TaggedPointer(),
+ kPointerWriteBarrier};
+ return access;
+}
+
// static
FieldAccess AccessBuilder::ForJSGeneratorObjectContext() {
FieldAccess access = {kTaggedBase, JSGeneratorObject::kContextOffset,
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698