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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.cc

Issue 2396023002: [crankshaft] Remove HLoadGlobalGeneric and use HCallWithDescriptor instead to call LoadGlobalIC. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 AllowDeferredHandleDereference vector_structure_check; 2486 AllowDeferredHandleDereference vector_structure_check;
2487 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2487 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2488 __ li(vector_register, vector); 2488 __ li(vector_register, vector);
2489 // No need to allocate this register. 2489 // No need to allocate this register.
2490 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2490 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2491 int index = vector->GetIndex(slot); 2491 int index = vector->GetIndex(slot);
2492 __ li(slot_register, Operand(Smi::FromInt(index))); 2492 __ li(slot_register, Operand(Smi::FromInt(index)));
2493 } 2493 }
2494 2494
2495 2495
2496 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2497 DCHECK(ToRegister(instr->context()).is(cp));
2498 DCHECK(ToRegister(instr->result()).is(v0));
2499
2500 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2501 Handle<Code> ic =
2502 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2503 .code();
2504 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2505 }
2506
2507
2508 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2496 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2509 Register context = ToRegister(instr->context()); 2497 Register context = ToRegister(instr->context());
2510 Register result = ToRegister(instr->result()); 2498 Register result = ToRegister(instr->result());
2511 2499
2512 __ lw(result, ContextMemOperand(context, instr->slot_index())); 2500 __ lw(result, ContextMemOperand(context, instr->slot_index()));
2513 if (instr->hydrogen()->RequiresHoleCheck()) { 2501 if (instr->hydrogen()->RequiresHoleCheck()) {
2514 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2502 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2515 2503
2516 if (instr->hydrogen()->DeoptimizesOnHole()) { 2504 if (instr->hydrogen()->DeoptimizesOnHole()) {
2517 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, Operand(at)); 2505 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, Operand(at));
(...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after
5492 __ lw(result, FieldMemOperand(scratch, 5480 __ lw(result, FieldMemOperand(scratch,
5493 FixedArray::kHeaderSize - kPointerSize)); 5481 FixedArray::kHeaderSize - kPointerSize));
5494 __ bind(deferred->exit()); 5482 __ bind(deferred->exit());
5495 __ bind(&done); 5483 __ bind(&done);
5496 } 5484 }
5497 5485
5498 #undef __ 5486 #undef __
5499 5487
5500 } // namespace internal 5488 } // namespace internal
5501 } // namespace v8 5489 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698