Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 7167006: Merge arguments branch to bleeding merge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix test arguments.js." Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/messages.js ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 return GetCode(CALLBACKS, name); 3091 return GetCode(CALLBACKS, name);
3092 } 3092 }
3093 3093
3094 3094
3095 MaybeObject* KeyedLoadStubCompiler::CompileLoadElement(Map* receiver_map) { 3095 MaybeObject* KeyedLoadStubCompiler::CompileLoadElement(Map* receiver_map) {
3096 // ----------- S t a t e ------------- 3096 // ----------- S t a t e -------------
3097 // -- ra : return address 3097 // -- ra : return address
3098 // -- a0 : key 3098 // -- a0 : key
3099 // -- a1 : receiver 3099 // -- a1 : receiver
3100 // ----------------------------------- 3100 // -----------------------------------
3101 MaybeObject* maybe_stub;
3102 if (receiver_map->has_fast_elements()) {
3103 maybe_stub = KeyedLoadFastElementStub().TryGetCode();
3104 } else {
3105 ASSERT(receiver_map->has_external_array_elements());
3106 JSObject::ElementsKind elements_kind = receiver_map->elements_kind();
3107 maybe_stub = KeyedLoadExternalArrayStub(elements_kind).TryGetCode();
3108 }
3101 Code* stub; 3109 Code* stub;
3102 MaybeObject* maybe_stub = ComputeSharedKeyedLoadElementStub(receiver_map);
3103 if (!maybe_stub->To(&stub)) return maybe_stub; 3110 if (!maybe_stub->To(&stub)) return maybe_stub;
3104 __ DispatchMap(a1, 3111 __ DispatchMap(a1,
3105 a2, 3112 a2,
3106 Handle<Map>(receiver_map), 3113 Handle<Map>(receiver_map),
3107 Handle<Code>(stub), 3114 Handle<Code>(stub),
3108 DO_SMI_CHECK); 3115 DO_SMI_CHECK);
3109 3116
3110 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss(); 3117 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
3111 __ Jump(ic, RelocInfo::CODE_TARGET); 3118 __ Jump(ic, RelocInfo::CODE_TARGET);
3112 3119
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
3174 3181
3175 __ DecrementCounter(counters->keyed_store_field(), 1, a3, t0); 3182 __ DecrementCounter(counters->keyed_store_field(), 1, a3, t0);
3176 Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss(); 3183 Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss();
3177 __ Jump(ic, RelocInfo::CODE_TARGET); 3184 __ Jump(ic, RelocInfo::CODE_TARGET);
3178 3185
3179 // Return the generated code. 3186 // Return the generated code.
3180 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); 3187 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name);
3181 } 3188 }
3182 3189
3183 3190
3184 MaybeObject* KeyedStoreStubCompiler::CompileStoreElement(Map* receiver_map) { 3191 MaybeObject* KeyedStoreStubCompiler::CompileStoreElement(
3192 Map* receiver_map) {
3185 // ----------- S t a t e ------------- 3193 // ----------- S t a t e -------------
3186 // -- a0 : value 3194 // -- a0 : value
3187 // -- a1 : key 3195 // -- a1 : key
3188 // -- a2 : receiver 3196 // -- a2 : receiver
3189 // -- ra : return address 3197 // -- ra : return address
3190 // -- a3 : scratch 3198 // -- a3 : scratch
3191 // ----------------------------------- 3199 // -----------------------------------
3200 MaybeObject* maybe_stub;
3201 if (receiver_map->has_fast_elements()) {
3202 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
3203 maybe_stub = KeyedStoreFastElementStub(is_js_array).TryGetCode();
3204 } else {
3205 ASSERT(receiver_map->has_external_array_elements());
3206 JSObject::ElementsKind elements_kind = receiver_map->elements_kind();
3207 maybe_stub = KeyedStoreExternalArrayStub(elements_kind).TryGetCode();
3208 }
3192 Code* stub; 3209 Code* stub;
3193 MaybeObject* maybe_stub = ComputeSharedKeyedStoreElementStub(receiver_map);
3194 if (!maybe_stub->To(&stub)) return maybe_stub; 3210 if (!maybe_stub->To(&stub)) return maybe_stub;
3195 __ DispatchMap(a2, 3211 __ DispatchMap(a2,
3196 a3, 3212 a3,
3197 Handle<Map>(receiver_map), 3213 Handle<Map>(receiver_map),
3198 Handle<Code>(stub), 3214 Handle<Code>(stub),
3199 DO_SMI_CHECK); 3215 DO_SMI_CHECK);
3200 3216
3201 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); 3217 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
3202 __ Jump(ic, RelocInfo::CODE_TARGET); 3218 __ Jump(ic, RelocInfo::CODE_TARGET);
3203 3219
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
4233 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 4249 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
4234 __ Jump(ic, RelocInfo::CODE_TARGET); 4250 __ Jump(ic, RelocInfo::CODE_TARGET);
4235 } 4251 }
4236 4252
4237 4253
4238 #undef __ 4254 #undef __
4239 4255
4240 } } // namespace v8::internal 4256 } } // namespace v8::internal
4241 4257
4242 #endif // V8_TARGET_ARCH_MIPS 4258 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698