Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2991 __ ret(0); | 2991 __ ret(0); |
| 2992 | 2992 |
| 2993 __ bind(&miss); | 2993 __ bind(&miss); |
| 2994 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 2994 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 2995 | 2995 |
| 2996 // Return the generated code. | 2996 // Return the generated code. |
| 2997 return GetCode(NORMAL, NULL); | 2997 return GetCode(NORMAL, NULL); |
| 2998 } | 2998 } |
| 2999 | 2999 |
| 3000 | 3000 |
| 3001 MaybeObject* KeyedLoadStubCompiler::CompileLoadPixelArray(JSObject* receiver) { | |
| 3002 // ----------- S t a t e ------------- | |
| 3003 // -- rax : key | |
| 3004 // -- rdx : receiver | |
| 3005 // -- esp[0] : return address | |
| 3006 // ----------------------------------- | |
| 3007 Label miss; | |
| 3008 | |
| 3009 // Check that the receiver isn't a smi. | |
| 3010 __ JumpIfSmi(rdx, &miss); | |
| 3011 | |
| 3012 // Check that the map matches. | |
| 3013 __ 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.
| |
| 3014 Handle<Map>(receiver->map())); | |
| 3015 __ j(not_equal, &miss); | |
| 3016 | |
| 3017 GenerateFastPixelArrayLoad(masm(), | |
| 3018 rdx, | |
| 3019 rax, | |
| 3020 rbx, | |
| 3021 rcx, | |
| 3022 rax, | |
| 3023 &miss, | |
| 3024 &miss, | |
| 3025 &miss); | |
| 3026 | |
| 3027 __ bind(&miss); | |
| 3028 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | |
| 3029 | |
| 3030 // Return the generated code. | |
| 3031 return GetCode(NORMAL, NULL); | |
| 3032 } | |
| 3033 | |
| 3034 | |
| 3001 // Specialized stub for constructing objects from functions which only have only | 3035 // Specialized stub for constructing objects from functions which only have only |
| 3002 // simple assignments of the form this.x = ...; in their body. | 3036 // simple assignments of the form this.x = ...; in their body. |
| 3003 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { | 3037 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
| 3004 // ----------- S t a t e ------------- | 3038 // ----------- S t a t e ------------- |
| 3005 // -- rax : argc | 3039 // -- rax : argc |
| 3006 // -- rdi : constructor | 3040 // -- rdi : constructor |
| 3007 // -- rsp[0] : return address | 3041 // -- rsp[0] : return address |
| 3008 // -- rsp[4] : last argument | 3042 // -- rsp[4] : last argument |
| 3009 // ----------------------------------- | 3043 // ----------------------------------- |
| 3010 Label generic_stub_call; | 3044 Label generic_stub_call; |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3427 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); | 3461 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); |
| 3428 | 3462 |
| 3429 return GetCode(flags); | 3463 return GetCode(flags); |
| 3430 } | 3464 } |
| 3431 | 3465 |
| 3432 #undef __ | 3466 #undef __ |
| 3433 | 3467 |
| 3434 } } // namespace v8::internal | 3468 } } // namespace v8::internal |
| 3435 | 3469 |
| 3436 #endif // V8_TARGET_ARCH_X64 | 3470 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |