Chromium Code Reviews| Index: src/stub-cache.cc | 
| diff --git a/src/stub-cache.cc b/src/stub-cache.cc | 
| index 52e7f4cf3dfa8fc7581c63dca111b718fd86b96d..a4e89facbdf5c2479dd61f62fb0b3898b7262aec 100644 | 
| --- a/src/stub-cache.cc | 
| +++ b/src/stub-cache.cc | 
| @@ -1118,6 +1118,33 @@ Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object, | 
| } | 
| +Handle<Code> StoreStubCompiler::CompileStoreArrayLength(Handle<JSObject> object, | 
| + LookupResult* lookup, | 
| + Handle<Name> name) { | 
| + // This accepts as a receiver anything JSArray::SetElementsLength accepts | 
| + // (currently anything except for external arrays which means anything with | 
| + // elements of FixedArray type). Value must be a number, but only smis are | 
| + // accepted as the most common case. | 
| + Label miss; | 
| + | 
| + // It is not necessary to check object since all the necessary checks are | 
| 
 
Toon Verwaest
2014/03/17 15:12:10
Remove this comment. This is true for all ICs.
 
Igor Sheludko
2014/03/17 15:43:17
Done.
 
 | 
| + // done at stub installation time. | 
| + | 
| + // Check that value is a smi. | 
| + __ JumpIfNotSmi(value(), &miss); | 
| + | 
| + // Generate tail call to StoreIC_ArrayLength. | 
| + GenerateStoreArrayLength(); | 
| + | 
| + // Handle miss case. | 
| + __ bind(&miss); | 
| + TailCallBuiltin(masm(), MissBuiltin(kind())); | 
| + | 
| + // Return the generated code. | 
| + return GetCode(kind(), Code::FAST, name); | 
| +} | 
| + | 
| + | 
| Handle<Code> StoreStubCompiler::CompileStoreViaSetter( | 
| Handle<JSObject> object, | 
| Handle<JSObject> holder, |