Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index afd3cae9498f610d5075c84b5ae965ebe5c819a5..9e7220df22901a03d920eb3874747d1fb6211f0a 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -2557,6 +2557,14 @@ |
static_cast<uint8_t>(1 << Map::kHasNonInstancePrototype)); |
__ j(not_zero, &slow_case); |
+ // Ensure that {function} is not bound. |
+ Register const shared_info = scratch; |
+ __ mov(shared_info, |
+ FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
+ __ BooleanBitTest(shared_info, SharedFunctionInfo::kCompilerHintsOffset, |
+ SharedFunctionInfo::kBoundFunction); |
+ __ j(not_zero, &slow_case); |
+ |
// Get the "prototype" (or initial map) of the {function}. |
__ mov(function_prototype, |
FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |