Chromium Code Reviews| Index: src/x64/stub-cache-x64.cc |
| diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
| index 8888d70a6bf59eefffb8161ac420ecf54ec9f865..5221aff8f402f21c4f7cdcc0aea926b61d0af392 100644 |
| --- a/src/x64/stub-cache-x64.cc |
| +++ b/src/x64/stub-cache-x64.cc |
| @@ -2998,6 +2998,40 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadSpecialized(JSObject* receiver) { |
| } |
| +MaybeObject* KeyedLoadStubCompiler::CompileLoadPixelArray(JSObject* receiver) { |
| + // ----------- S t a t e ------------- |
| + // -- rax : key |
| + // -- rdx : receiver |
| + // -- esp[0] : return address |
| + // ----------------------------------- |
| + Label miss; |
| + |
| + // Check that the receiver isn't a smi. |
| + __ JumpIfSmi(rdx, &miss); |
| + |
| + // Check that the map matches. |
| + __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset), |
|
Mads Ager (chromium)
2011/02/01 12:02:12
Use CheckMap to check both map and not smi?
danno
2011/02/03 12:53:26
Done.
|
| + Handle<Map>(receiver->map())); |
| + __ j(not_equal, &miss); |
| + |
| + GenerateFastPixelArrayLoad(masm(), |
| + rdx, |
| + rax, |
| + rbx, |
| + rcx, |
| + rax, |
| + &miss, |
| + &miss, |
| + &miss); |
| + |
| + __ bind(&miss); |
| + GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| + |
| + // Return the generated code. |
| + return GetCode(NORMAL, NULL); |
| +} |
| + |
| + |
| // Specialized stub for constructing objects from functions which only have only |
| // simple assignments of the form this.x = ...; in their body. |
| MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |