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

Unified Diff: src/crankshaft/hydrogen-instructions.h

Issue 2044113002: Turn Function.prototype.bind into a hydrogen stub optimized for the common case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm64 Created 4 years, 6 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/code-stubs-hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen-instructions.h
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h
index 514882145f25caffde2ab63445e74542c8c66e6a..16e25533be77f21c70b73a26dad4c0751cd0b3db 100644
--- a/src/crankshaft/hydrogen-instructions.h
+++ b/src/crankshaft/hydrogen-instructions.h
@@ -2786,6 +2786,7 @@ class HCheckInstanceType final : public HUnaryOperation {
enum Check {
IS_JS_RECEIVER,
IS_JS_ARRAY,
+ IS_JS_FUNCTION,
IS_JS_DATE,
IS_STRING,
IS_INTERNALIZED_STRING,
@@ -2804,6 +2805,8 @@ class HCheckInstanceType final : public HUnaryOperation {
switch (check_) {
case IS_JS_RECEIVER: return HType::JSReceiver();
case IS_JS_ARRAY: return HType::JSArray();
+ case IS_JS_FUNCTION:
+ return HType::JSObject();
case IS_JS_DATE: return HType::JSObject();
case IS_STRING: return HType::String();
case IS_INTERNALIZED_STRING: return HType::String();
@@ -5565,6 +5568,19 @@ class HObjectAccess final {
Handle<Name>::null(), false, false);
}
+ static HObjectAccess ForBoundTargetFunction() {
+ return HObjectAccess(kInobject,
+ JSBoundFunction::kBoundTargetFunctionOffset);
+ }
+
+ static HObjectAccess ForBoundThis() {
+ return HObjectAccess(kInobject, JSBoundFunction::kBoundThisOffset);
+ }
+
+ static HObjectAccess ForBoundArguments() {
+ return HObjectAccess(kInobject, JSBoundFunction::kBoundArgumentsOffset);
+ }
+
// Create an access to an offset in a fixed array header.
static HObjectAccess ForFixedArrayHeader(int offset);
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698