| 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 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2580 | 2580 |
| 2581 | 2581 |
| 2582 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2582 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2583 DCHECK(ToRegister(instr->context()).is(cp)); | 2583 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2584 DCHECK(ToRegister(instr->global_object()) | 2584 DCHECK(ToRegister(instr->global_object()) |
| 2585 .is(LoadDescriptor::ReceiverRegister())); | 2585 .is(LoadDescriptor::ReceiverRegister())); |
| 2586 DCHECK(ToRegister(instr->result()).is(v0)); | 2586 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2587 | 2587 |
| 2588 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2588 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2589 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2589 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2590 Handle<Code> ic = | 2590 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
| 2591 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), | 2591 isolate(), instr->typeof_mode(), PREMONOMORPHIC) |
| 2592 SLOPPY, PREMONOMORPHIC).code(); | 2592 .code(); |
| 2593 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2593 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2594 } | 2594 } |
| 2595 | 2595 |
| 2596 | 2596 |
| 2597 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2597 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2598 Register context = ToRegister(instr->context()); | 2598 Register context = ToRegister(instr->context()); |
| 2599 Register result = ToRegister(instr->result()); | 2599 Register result = ToRegister(instr->result()); |
| 2600 | 2600 |
| 2601 __ lw(result, ContextMemOperand(context, instr->slot_index())); | 2601 __ lw(result, ContextMemOperand(context, instr->slot_index())); |
| 2602 if (instr->hydrogen()->RequiresHoleCheck()) { | 2602 if (instr->hydrogen()->RequiresHoleCheck()) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2681 | 2681 |
| 2682 | 2682 |
| 2683 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2683 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2684 DCHECK(ToRegister(instr->context()).is(cp)); | 2684 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2685 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2685 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2686 DCHECK(ToRegister(instr->result()).is(v0)); | 2686 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2687 | 2687 |
| 2688 // Name is always in a2. | 2688 // Name is always in a2. |
| 2689 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2689 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2690 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2690 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2691 Handle<Code> ic = | 2691 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
| 2692 CodeFactory::LoadICInOptimizedCode( | 2692 isolate(), NOT_INSIDE_TYPEOF, |
| 2693 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(), | 2693 instr->hydrogen()->initialization_state()) |
| 2694 instr->hydrogen()->initialization_state()).code(); | 2694 .code(); |
| 2695 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2695 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2696 } | 2696 } |
| 2697 | 2697 |
| 2698 | 2698 |
| 2699 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2699 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2700 Register scratch = scratch0(); | 2700 Register scratch = scratch0(); |
| 2701 Register function = ToRegister(instr->function()); | 2701 Register function = ToRegister(instr->function()); |
| 2702 Register result = ToRegister(instr->result()); | 2702 Register result = ToRegister(instr->result()); |
| 2703 | 2703 |
| 2704 // Get the prototype or initial map from the function. | 2704 // Get the prototype or initial map from the function. |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 2994 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| 2995 DCHECK(ToRegister(instr->context()).is(cp)); | 2995 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2996 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2996 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2997 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 2997 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
| 2998 | 2998 |
| 2999 if (instr->hydrogen()->HasVectorAndSlot()) { | 2999 if (instr->hydrogen()->HasVectorAndSlot()) { |
| 3000 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3000 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
| 3001 } | 3001 } |
| 3002 | 3002 |
| 3003 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( | 3003 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
| 3004 isolate(), instr->hydrogen()->language_mode(), | 3004 isolate(), instr->hydrogen()->initialization_state()) |
| 3005 instr->hydrogen()->initialization_state()).code(); | 3005 .code(); |
| 3006 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3006 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3007 } | 3007 } |
| 3008 | 3008 |
| 3009 | 3009 |
| 3010 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3010 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3011 Register scratch = scratch0(); | 3011 Register scratch = scratch0(); |
| 3012 Register temp = scratch1(); | 3012 Register temp = scratch1(); |
| 3013 Register result = ToRegister(instr->result()); | 3013 Register result = ToRegister(instr->result()); |
| 3014 | 3014 |
| 3015 if (instr->hydrogen()->from_inlined()) { | 3015 if (instr->hydrogen()->from_inlined()) { |
| (...skipping 2557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5573 __ Push(at, ToRegister(instr->function())); | 5573 __ Push(at, ToRegister(instr->function())); |
| 5574 CallRuntime(Runtime::kPushBlockContext, instr); | 5574 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5575 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5575 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5576 } | 5576 } |
| 5577 | 5577 |
| 5578 | 5578 |
| 5579 #undef __ | 5579 #undef __ |
| 5580 | 5580 |
| 5581 } // namespace internal | 5581 } // namespace internal |
| 5582 } // namespace v8 | 5582 } // namespace v8 |
| OLD | NEW |