Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 74dbdf08ae5141d00101ca26403fa5f02ad7d8f7..6a4ba8dfcf673b94ed3e4c795a61ebecca0e6e0f 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -2712,9 +2712,10 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { |
__ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rax); |
__ j(below, &null, Label::kNear); |
- // Return 'Function' for JSFunction objects. |
- __ CmpInstanceType(rax, JS_FUNCTION_TYPE); |
- __ j(equal, &function, Label::kNear); |
+ // Return 'Function' for JSFunction and JSBoundFunction objects. |
+ __ CmpInstanceType(rax, FIRST_FUNCTION_TYPE); |
+ STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
+ __ j(above_equal, &function, Label::kNear); |
// Check if the constructor in the map is a JS function. |
__ GetMapConstructor(rax, rax, rbx); |