| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2915 Handle<Map> receiver_map) { | 2915 Handle<Map> receiver_map) { |
| 2916 // ----------- S t a t e ------------- | 2916 // ----------- S t a t e ------------- |
| 2917 // -- eax : value | 2917 // -- eax : value |
| 2918 // -- ecx : key | 2918 // -- ecx : key |
| 2919 // -- edx : receiver | 2919 // -- edx : receiver |
| 2920 // -- esp[0] : return address | 2920 // -- esp[0] : return address |
| 2921 // ----------------------------------- | 2921 // ----------------------------------- |
| 2922 ElementsKind elements_kind = receiver_map->elements_kind(); | 2922 ElementsKind elements_kind = receiver_map->elements_kind(); |
| 2923 bool is_jsarray = receiver_map->instance_type() == JS_ARRAY_TYPE; | 2923 bool is_jsarray = receiver_map->instance_type() == JS_ARRAY_TYPE; |
| 2924 Handle<Code> stub = | 2924 Handle<Code> stub = |
| 2925 KeyedStoreElementStub(is_jsarray, elements_kind, grow_mode_).GetCode(); | 2925 KeyedStoreElementStub(is_jsarray, |
| 2926 elements_kind, |
| 2927 grow_mode_).GetCode(isolate()); |
| 2926 | 2928 |
| 2927 __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK); | 2929 __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK); |
| 2928 | 2930 |
| 2929 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); | 2931 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); |
| 2930 __ jmp(ic, RelocInfo::CODE_TARGET); | 2932 __ jmp(ic, RelocInfo::CODE_TARGET); |
| 2931 | 2933 |
| 2932 // Return the generated code. | 2934 // Return the generated code. |
| 2933 return GetCode(Code::NORMAL, factory()->empty_string()); | 2935 return GetCode(Code::NORMAL, factory()->empty_string()); |
| 2934 } | 2936 } |
| 2935 | 2937 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3157 // -- ecx : key | 3159 // -- ecx : key |
| 3158 // -- edx : receiver | 3160 // -- edx : receiver |
| 3159 // -- esp[0] : return address | 3161 // -- esp[0] : return address |
| 3160 // ----------------------------------- | 3162 // ----------------------------------- |
| 3161 | 3163 |
| 3162 ElementsKind elements_kind = receiver_map->elements_kind(); | 3164 ElementsKind elements_kind = receiver_map->elements_kind(); |
| 3163 if (receiver_map->has_fast_elements() || | 3165 if (receiver_map->has_fast_elements() || |
| 3164 receiver_map->has_external_array_elements()) { | 3166 receiver_map->has_external_array_elements()) { |
| 3165 Handle<Code> stub = KeyedLoadFastElementStub( | 3167 Handle<Code> stub = KeyedLoadFastElementStub( |
| 3166 receiver_map->instance_type() == JS_ARRAY_TYPE, | 3168 receiver_map->instance_type() == JS_ARRAY_TYPE, |
| 3167 elements_kind).GetCode(); | 3169 elements_kind).GetCode(isolate()); |
| 3168 __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK); | 3170 __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK); |
| 3169 } else { | 3171 } else { |
| 3170 Handle<Code> stub = | 3172 Handle<Code> stub = |
| 3171 KeyedLoadDictionaryElementStub().GetCode(); | 3173 KeyedLoadDictionaryElementStub().GetCode(isolate()); |
| 3172 __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK); | 3174 __ DispatchMap(edx, receiver_map, stub, DO_SMI_CHECK); |
| 3173 } | 3175 } |
| 3174 | 3176 |
| 3175 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 3177 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 3176 | 3178 |
| 3177 // Return the generated code. | 3179 // Return the generated code. |
| 3178 return GetCode(Code::NORMAL, factory()->empty_string()); | 3180 return GetCode(Code::NORMAL, factory()->empty_string()); |
| 3179 } | 3181 } |
| 3180 | 3182 |
| 3181 | 3183 |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3923 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 3925 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
| 3924 } | 3926 } |
| 3925 } | 3927 } |
| 3926 | 3928 |
| 3927 | 3929 |
| 3928 #undef __ | 3930 #undef __ |
| 3929 | 3931 |
| 3930 } } // namespace v8::internal | 3932 } } // namespace v8::internal |
| 3931 | 3933 |
| 3932 #endif // V8_TARGET_ARCH_IA32 | 3934 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |