Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index a9cd8f81f8097f3def6fe0bb8cde906f79bf61d1..1c7cecf90eb6313d82295cd536a3661a1c71d114 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -1474,6 +1474,15 @@ |
__ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype)); |
__ Branch(&slow_case, ne, at, Operand(zero_reg)); |
+ // Ensure that {function} is not bound. |
+ Register const shared_info = scratch; |
+ __ ld(shared_info, |
+ FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
+ __ lbu(scratch, |
+ FieldMemOperand(shared_info, SharedFunctionInfo::kBoundByteOffset)); |
+ __ And(at, scratch, Operand(1 << SharedFunctionInfo::kBoundBitWithinByte)); |
+ __ Branch(&slow_case, ne, at, Operand(zero_reg)); |
+ |
// Get the "prototype" (or initial map) of the {function}. |
__ ld(function_prototype, |
FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |