| OLD | NEW |
| 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 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2513 | 2513 |
| 2514 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2514 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2515 DCHECK(ToRegister(instr->context()).is(cp)); | 2515 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2516 DCHECK(ToRegister(instr->global_object()) | 2516 DCHECK(ToRegister(instr->global_object()) |
| 2517 .is(LoadDescriptor::ReceiverRegister())); | 2517 .is(LoadDescriptor::ReceiverRegister())); |
| 2518 DCHECK(ToRegister(instr->result()).is(v0)); | 2518 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2519 | 2519 |
| 2520 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2520 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2521 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2521 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2522 Handle<Code> ic = | 2522 Handle<Code> ic = |
| 2523 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) | 2523 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) |
| 2524 .code(); | 2524 .code(); |
| 2525 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2525 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2526 } | 2526 } |
| 2527 | 2527 |
| 2528 | 2528 |
| 2529 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2529 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2530 Register context = ToRegister(instr->context()); | 2530 Register context = ToRegister(instr->context()); |
| 2531 Register result = ToRegister(instr->result()); | 2531 Register result = ToRegister(instr->result()); |
| 2532 | 2532 |
| 2533 __ lw(result, ContextMemOperand(context, instr->slot_index())); | 2533 __ lw(result, ContextMemOperand(context, instr->slot_index())); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2613 | 2613 |
| 2614 | 2614 |
| 2615 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2615 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2616 DCHECK(ToRegister(instr->context()).is(cp)); | 2616 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2617 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2617 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2618 DCHECK(ToRegister(instr->result()).is(v0)); | 2618 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2619 | 2619 |
| 2620 // Name is always in a2. | 2620 // Name is always in a2. |
| 2621 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2621 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2622 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2622 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2623 Handle<Code> ic = | 2623 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); |
| 2624 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code(); | |
| 2625 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2624 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2626 } | 2625 } |
| 2627 | 2626 |
| 2628 | 2627 |
| 2629 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2628 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2630 Register scratch = scratch0(); | 2629 Register scratch = scratch0(); |
| 2631 Register function = ToRegister(instr->function()); | 2630 Register function = ToRegister(instr->function()); |
| 2632 Register result = ToRegister(instr->result()); | 2631 Register result = ToRegister(instr->result()); |
| 2633 | 2632 |
| 2634 // Get the prototype or initial map from the function. | 2633 // Get the prototype or initial map from the function. |
| (...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5549 __ lw(result, FieldMemOperand(scratch, | 5548 __ lw(result, FieldMemOperand(scratch, |
| 5550 FixedArray::kHeaderSize - kPointerSize)); | 5549 FixedArray::kHeaderSize - kPointerSize)); |
| 5551 __ bind(deferred->exit()); | 5550 __ bind(deferred->exit()); |
| 5552 __ bind(&done); | 5551 __ bind(&done); |
| 5553 } | 5552 } |
| 5554 | 5553 |
| 5555 #undef __ | 5554 #undef __ |
| 5556 | 5555 |
| 5557 } // namespace internal | 5556 } // namespace internal |
| 5558 } // namespace v8 | 5557 } // namespace v8 |
| OLD | NEW |