Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 918f9ebe060d245df5a6e6026ce5363afb98c497..d9ba5c2b5c2cede0977c2364ab75ac0e7f4b1b30 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2030,7 +2030,8 @@ void MacroAssembler::DispatchMap(Register obj, |
void MacroAssembler::TryGetFunctionPrototype(Register function, |
Register result, |
Register scratch, |
- Label* miss) { |
+ Label* miss, |
+ bool miss_on_bound_function) { |
// Check that the receiver isn't a smi. |
JumpIfSmi(function, miss); |
@@ -2038,6 +2039,15 @@ void MacroAssembler::TryGetFunctionPrototype(Register function, |
CompareObjectType(function, result, scratch, JS_FUNCTION_TYPE); |
b(ne, miss); |
+ if (miss_on_bound_function) { |
+ ldr(scratch, |
+ FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
+ ldr(scratch, |
+ FieldMemOperand(scratch, SharedFunctionInfo::kCompilerHintsOffset)); |
+ tst(scratch, Operand(1 << SharedFunctionInfo::kBoundFunction)); |
+ b(ne, miss); |
+ } |
+ |
// Make sure that the function has an instance prototype. |
Label non_instance; |
ldrb(scratch, FieldMemOperand(result, Map::kBitFieldOffset)); |