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

Side by Side Diff: src/ic/mips64/handler-compiler-mips64.cc

Issue 541513002: MIPS: Clean up code stubs and ensure distinct major keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/ic/mips/handler-compiler-mips.cc ('k') | src/mips/code-stubs-mips.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 274 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
275 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 275 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
276 __ li(api_function_address, Operand(ref)); 276 __ li(api_function_address, Operand(ref));
277 277
278 // Jump to stub. 278 // Jump to stub.
279 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); 279 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
280 __ TailCallStub(&stub); 280 __ TailCallStub(&stub);
281 } 281 }
282 282
283 283
284 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
285 MacroAssembler* masm) {
286 // The return address is in ra
287 Label slow, miss;
288
289 Register key = LoadDescriptor::NameRegister();
290 Register receiver = LoadDescriptor::ReceiverRegister();
291 DCHECK(receiver.is(a1));
292 DCHECK(key.is(a2));
293
294 __ UntagAndJumpIfNotSmi(a6, key, &miss);
295 __ ld(a4, FieldMemOperand(receiver, JSObject::kElementsOffset));
296 DCHECK(kSmiTagSize + kSmiShiftSize == 32);
297 __ LoadFromNumberDictionary(&slow, a4, key, v0, a6, a3, a5);
298 __ Ret();
299
300 // Slow case, key and receiver still unmodified.
301 __ bind(&slow);
302 __ IncrementCounter(
303 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, a2, a3);
304
305 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
306
307 // Miss case, call the runtime.
308 __ bind(&miss);
309
310 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
311 }
312
313
314 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 284 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
315 // Push receiver, key and value for runtime call. 285 // Push receiver, key and value for runtime call.
316 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 286 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
317 StoreDescriptor::ValueRegister()); 287 StoreDescriptor::ValueRegister());
318 288
319 // The slow case calls into the runtime to complete the store without causing 289 // The slow case calls into the runtime to complete the store without causing
320 // an IC miss that would otherwise cause a transition to the generic stub. 290 // an IC miss that would otherwise cause a transition to the generic stub.
321 ExternalReference ref = 291 ExternalReference ref =
322 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 292 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
323 __ TailCallExternalReference(ref, 3, 1); 293 __ TailCallExternalReference(ref, 3, 1);
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 // Return the generated code. 831 // Return the generated code.
862 return GetCode(kind(), Code::NORMAL, name); 832 return GetCode(kind(), Code::NORMAL, name);
863 } 833 }
864 834
865 835
866 #undef __ 836 #undef __
867 } 837 }
868 } // namespace v8::internal 838 } // namespace v8::internal
869 839
870 #endif // V8_TARGET_ARCH_MIPS64 840 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/mips/code-stubs-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698