 Chromium Code Reviews
 Chromium Code Reviews Issue 6287030:
  Create specialized code stubs for PixelArray loads.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/trunk
    
  
    Issue 6287030:
  Create specialized code stubs for PixelArray loads.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/trunk| OLD | NEW | 
|---|---|
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3080 __ Ret(); | 3080 __ Ret(); | 
| 3081 | 3081 | 
| 3082 __ bind(&miss); | 3082 __ bind(&miss); | 
| 3083 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 3083 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 
| 3084 | 3084 | 
| 3085 // Return the generated code. | 3085 // Return the generated code. | 
| 3086 return GetCode(NORMAL, NULL); | 3086 return GetCode(NORMAL, NULL); | 
| 3087 } | 3087 } | 
| 3088 | 3088 | 
| 3089 | 3089 | 
| 3090 MaybeObject* KeyedLoadStubCompiler::CompileLoadPixelArray(JSObject* receiver) { | |
| 3091 // ----------- S t a t e ------------- | |
| 3092 // -- lr : return address | |
| 3093 // -- r0 : key | |
| 3094 // -- r1 : receiver | |
| 3095 // ----------------------------------- | |
| 3096 Label miss; | |
| 3097 | |
| 3098 // Check that the receiver isn't a smi. | |
| 3099 __ tst(r1, Operand(kSmiTagMask)); | |
| 
Mads Ager (chromium)
2011/02/01 12:02:12
JumpIfSmi?
 
danno
2011/02/03 12:53:26
Done.
 | |
| 3100 __ b(eq, &miss); | |
| 3101 | |
| 3102 // Check that the map matches. | |
| 3103 __ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); | |
| 
Mads Ager (chromium)
2011/02/01 12:02:12
CheckMap? I think you can even have check map incl
 
danno
2011/02/03 12:53:26
Done.
 | |
| 3104 __ cmp(r2, Operand(Handle<Map>(receiver->map()))); | |
| 3105 __ b(ne, &miss); | |
| 3106 | |
| 3107 GenerateFastPixelArrayLoad(masm(), | |
| 3108 r1, | |
| 3109 r0, | |
| 3110 r2, | |
| 3111 r3, | |
| 3112 r4, | |
| 3113 r5, | |
| 3114 r0, | |
| 3115 &miss, | |
| 3116 &miss, | |
| 3117 &miss); | |
| 3118 | |
| 3119 __ bind(&miss); | |
| 3120 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Miss)); | |
| 3121 __ Jump(ic, RelocInfo::CODE_TARGET); | |
| 3122 | |
| 3123 // Return the generated code. | |
| 3124 return GetCode(NORMAL, NULL); | |
| 3125 } | |
| 3126 | |
| 3127 | |
| 3090 MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, | 3128 MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, | 
| 3091 int index, | 3129 int index, | 
| 3092 Map* transition, | 3130 Map* transition, | 
| 3093 String* name) { | 3131 String* name) { | 
| 3094 // ----------- S t a t e ------------- | 3132 // ----------- S t a t e ------------- | 
| 3095 // -- r0 : value | 3133 // -- r0 : value | 
| 3096 // -- r1 : name | 3134 // -- r1 : name | 
| 3097 // -- r2 : receiver | 3135 // -- r2 : receiver | 
| 3098 // -- lr : return address | 3136 // -- lr : return address | 
| 3099 // ----------------------------------- | 3137 // ----------------------------------- | 
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3934 | 3972 | 
| 3935 return GetCode(flags); | 3973 return GetCode(flags); | 
| 3936 } | 3974 } | 
| 3937 | 3975 | 
| 3938 | 3976 | 
| 3939 #undef __ | 3977 #undef __ | 
| 3940 | 3978 | 
| 3941 } } // namespace v8::internal | 3979 } } // namespace v8::internal | 
| 3942 | 3980 | 
| 3943 #endif // V8_TARGET_ARCH_ARM | 3981 #endif // V8_TARGET_ARCH_ARM | 
| OLD | NEW |