Index: src/stub-cache.cc |
diff --git a/src/stub-cache.cc b/src/stub-cache.cc |
index 214527f09c17fced40202ed429c144b6e04be03e..f43c9acee36365aa220e8e20856d556fb88e7b23 100644 |
--- a/src/stub-cache.cc |
+++ b/src/stub-cache.cc |
@@ -221,10 +221,12 @@ Handle<Code> StubCache::ComputeLoadNonexistent(Handle<Name> name, |
Handle<Code> StubCache::ComputeLoadField(Handle<Name> name, |
Handle<JSObject> receiver, |
Handle<JSObject> holder, |
- PropertyIndex field) { |
+ PropertyIndex field, |
+ Representation representation) { |
if (receiver.is_identical_to(holder)) { |
LoadFieldStub stub(field.is_inobject(holder), |
- field.translate(holder)); |
+ field.translate(holder), |
+ representation); |
return stub.GetCode(isolate()); |
} |
@@ -235,7 +237,7 @@ Handle<Code> StubCache::ComputeLoadField(Handle<Name> name, |
LoadStubCompiler compiler(isolate_); |
Handle<Code> handler = |
- compiler.CompileLoadField(receiver, holder, name, field); |
+ compiler.CompileLoadField(receiver, holder, name, field, representation); |
JSObject::UpdateMapCodeCache(stub_holder, name, handler); |
return handler; |
} |
@@ -336,10 +338,12 @@ Handle<Code> StubCache::ComputeLoadGlobal(Handle<Name> name, |
Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name, |
Handle<JSObject> receiver, |
Handle<JSObject> holder, |
- PropertyIndex field) { |
+ PropertyIndex field, |
+ Representation representation) { |
if (receiver.is_identical_to(holder)) { |
KeyedLoadFieldStub stub(field.is_inobject(holder), |
- field.translate(holder)); |
+ field.translate(holder), |
+ representation); |
return stub.GetCode(isolate()); |
} |
@@ -350,7 +354,7 @@ Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name, |
KeyedLoadStubCompiler compiler(isolate_); |
Handle<Code> handler = |
- compiler.CompileLoadField(receiver, holder, name, field); |
+ compiler.CompileLoadField(receiver, holder, name, field, representation); |
JSObject::UpdateMapCodeCache(stub_holder, name, handler); |
return handler; |
} |
@@ -1494,15 +1498,17 @@ Register BaseLoadStubCompiler::HandlerFrontend(Handle<JSObject> object, |
} |
-Handle<Code> BaseLoadStubCompiler::CompileLoadField(Handle<JSObject> object, |
- Handle<JSObject> holder, |
- Handle<Name> name, |
- PropertyIndex field) { |
+Handle<Code> BaseLoadStubCompiler::CompileLoadField( |
+ Handle<JSObject> object, |
+ Handle<JSObject> holder, |
+ Handle<Name> name, |
+ PropertyIndex field, |
+ Representation representation) { |
Label miss; |
Register reg = HandlerFrontendHeader(object, receiver(), holder, name, &miss); |
- GenerateLoadField(reg, holder, field); |
+ GenerateLoadField(reg, holder, field, representation); |
__ bind(&miss); |
TailCallBuiltin(masm(), MissBuiltin(kind())); |
@@ -1512,19 +1518,6 @@ Handle<Code> BaseLoadStubCompiler::CompileLoadField(Handle<JSObject> object, |
} |
-// Load a fast property out of a holder object (src). In-object properties |
-// are loaded directly otherwise the property is loaded from the properties |
-// fixed array. |
-void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm, |
- Register dst, |
- Register src, |
- Handle<JSObject> holder, |
- PropertyIndex index) { |
- DoGenerateFastPropertyLoad( |
- masm, dst, src, index.is_inobject(holder), index.translate(holder)); |
-} |
- |
- |
Handle<Code> BaseLoadStubCompiler::CompileLoadConstant( |
Handle<JSObject> object, |
Handle<JSObject> holder, |
@@ -1587,14 +1580,16 @@ void BaseLoadStubCompiler::GenerateLoadPostInterceptor( |
if (lookup->IsField()) { |
PropertyIndex field = lookup->GetFieldIndex(); |
if (interceptor_holder.is_identical_to(holder)) { |
- GenerateLoadField(interceptor_reg, holder, field); |
+ GenerateLoadField( |
+ interceptor_reg, holder, field, lookup->representation()); |
} else { |
// We found FIELD property in prototype chain of interceptor's holder. |
// Retrieve a field from field's holder. |
Register reg = HandlerFrontend( |
interceptor_holder, interceptor_reg, holder, name, &success); |
__ bind(&success); |
- GenerateLoadField(reg, holder, field); |
+ GenerateLoadField( |
+ reg, holder, field, lookup->representation()); |
} |
} else { |
// We found CALLBACKS property in prototype chain of interceptor's |
@@ -1646,7 +1641,7 @@ Handle<Code> BaseStoreStubCompiler::CompileStoreTransition( |
LookupResult* lookup, |
Handle<Map> transition, |
Handle<Name> name) { |
- Label miss, miss_restore_name; |
+ Label miss, miss_restore_name, slow; |
GenerateNameCheck(name, this->name(), &miss); |
@@ -1656,15 +1651,19 @@ Handle<Code> BaseStoreStubCompiler::CompileStoreTransition( |
transition, |
name, |
receiver(), this->name(), value(), |
- scratch1(), scratch2(), |
+ scratch1(), scratch2(), scratch3(), |
&miss, |
- &miss_restore_name); |
+ &miss_restore_name, |
+ &slow); |
// Handle store cache miss. |
GenerateRestoreName(masm(), &miss_restore_name, name); |
__ bind(&miss); |
TailCallBuiltin(masm(), MissBuiltin(kind())); |
+ GenerateRestoreName(masm(), &slow, name); |
+ TailCallBuiltin(masm(), SlowBuiltin(kind())); |
+ |
// Return the generated code. |
return GetICCode(kind(), Code::MAP_TRANSITION, name); |
} |