Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index b1f2126cefb3e0f4ab9afbf1aab51709c8bbb13e..9e00692afaabadd6a9004c053eacf8fecae01a1c 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -1293,6 +1293,21 @@ void StoreStubCompiler::GenerateStoreViaSetter( |
Handle<Code> StoreStubCompiler::CompileStoreInterceptor( |
Handle<JSObject> object, |
Handle<Name> name) { |
+ Label miss; |
+ |
+ // Check that the map of the object hasn't changed. |
+ __ CheckMap(receiver(), scratch1(), Handle<Map>(object->map()), &miss, |
+ DO_SMI_CHECK); |
+ |
+ // Perform global security token check if needed. |
+ if (object->IsJSGlobalProxy()) { |
+ __ CheckAccessGlobalProxy(receiver(), scratch1(), &miss); |
+ } |
+ |
+ // Stub is never generated for non-global objects that require access |
+ // checks. |
+ ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
+ |
__ Push(receiver(), this->name(), value()); |
// Do tail-call to the runtime system. |
@@ -1300,6 +1315,10 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor( |
ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); |
__ TailCallExternalReference(store_ic_property, 3, 1); |
+ // Handle store cache miss. |
+ __ bind(&miss); |
+ TailCallBuiltin(masm(), MissBuiltin(kind())); |
+ |
// Return the generated code. |
return GetCode(kind(), Code::FAST, name); |
} |