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

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

Issue 2398683004: [crankshaft] Remove HLoadNamedGeneric and use HCallWithDescriptor to call LoadIC. (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/hydrogen-instructions.cc ('k') | src/crankshaft/ia32/lithium-ia32.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. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 __ PushHeapObject(Handle<HeapObject>::cast(object)); 2488 __ PushHeapObject(Handle<HeapObject>::cast(object));
2489 } 2489 }
2490 } else if (operand->IsRegister()) { 2490 } else if (operand->IsRegister()) {
2491 __ push(ToRegister(operand)); 2491 __ push(ToRegister(operand));
2492 } else { 2492 } else {
2493 __ push(ToOperand(operand)); 2493 __ push(ToOperand(operand));
2494 } 2494 }
2495 } 2495 }
2496 2496
2497 2497
2498 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2499 DCHECK(ToRegister(instr->context()).is(esi));
2500 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2501 DCHECK(ToRegister(instr->result()).is(eax));
2502
2503 __ mov(LoadDescriptor::NameRegister(), instr->name());
2504 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2505 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code();
2506 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2507 }
2508
2509
2510 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2498 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2511 Register function = ToRegister(instr->function()); 2499 Register function = ToRegister(instr->function());
2512 Register temp = ToRegister(instr->temp()); 2500 Register temp = ToRegister(instr->temp());
2513 Register result = ToRegister(instr->result()); 2501 Register result = ToRegister(instr->result());
2514 2502
2515 // Get the prototype or initial map from the function. 2503 // Get the prototype or initial map from the function.
2516 __ mov(result, 2504 __ mov(result,
2517 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 2505 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
2518 2506
2519 // Check that the function has a prototype or an initial map. 2507 // Check that the function has a prototype or an initial map.
(...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after
5225 __ bind(deferred->exit()); 5213 __ bind(deferred->exit());
5226 __ bind(&done); 5214 __ bind(&done);
5227 } 5215 }
5228 5216
5229 #undef __ 5217 #undef __
5230 5218
5231 } // namespace internal 5219 } // namespace internal
5232 } // namespace v8 5220 } // namespace v8
5233 5221
5234 #endif // V8_TARGET_ARCH_IA32 5222 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698