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 2862 matching lines...) Loading... |
2873 | 2873 |
2874 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2874 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2875 DCHECK(ToRegister(instr->context()).is(cp)); | 2875 DCHECK(ToRegister(instr->context()).is(cp)); |
2876 DCHECK(ToRegister(instr->global_object()) | 2876 DCHECK(ToRegister(instr->global_object()) |
2877 .is(LoadDescriptor::ReceiverRegister())); | 2877 .is(LoadDescriptor::ReceiverRegister())); |
2878 DCHECK(ToRegister(instr->result()).is(v0)); | 2878 DCHECK(ToRegister(instr->result()).is(v0)); |
2879 | 2879 |
2880 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2880 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
2881 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2881 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
2882 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2882 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
2883 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, | 2883 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, |
2884 PREMONOMORPHIC).code(); | 2884 PREMONOMORPHIC).code(); |
2885 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2885 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2886 } | 2886 } |
2887 | 2887 |
2888 | 2888 |
2889 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2889 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
2890 Register context = ToRegister(instr->context()); | 2890 Register context = ToRegister(instr->context()); |
2891 Register result = ToRegister(instr->result()); | 2891 Register result = ToRegister(instr->result()); |
2892 | 2892 |
2893 __ lw(result, ContextOperand(context, instr->slot_index())); | 2893 __ lw(result, ContextOperand(context, instr->slot_index())); |
(...skipping 79 matching lines...) Loading... |
2973 | 2973 |
2974 | 2974 |
2975 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2975 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
2976 DCHECK(ToRegister(instr->context()).is(cp)); | 2976 DCHECK(ToRegister(instr->context()).is(cp)); |
2977 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2977 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
2978 DCHECK(ToRegister(instr->result()).is(v0)); | 2978 DCHECK(ToRegister(instr->result()).is(v0)); |
2979 | 2979 |
2980 // Name is always in a2. | 2980 // Name is always in a2. |
2981 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2981 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
2982 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2982 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
2983 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( | 2983 Handle<Code> ic = |
2984 isolate(), NOT_CONTEXTUAL, | 2984 CodeFactory::LoadICInOptimizedCode( |
2985 instr->hydrogen()->initialization_state()).code(); | 2985 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), |
| 2986 instr->hydrogen()->initialization_state()).code(); |
2986 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2987 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2987 } | 2988 } |
2988 | 2989 |
2989 | 2990 |
2990 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2991 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
2991 Register scratch = scratch0(); | 2992 Register scratch = scratch0(); |
2992 Register function = ToRegister(instr->function()); | 2993 Register function = ToRegister(instr->function()); |
2993 Register result = ToRegister(instr->result()); | 2994 Register result = ToRegister(instr->result()); |
2994 | 2995 |
2995 // Get the prototype or initial map from the function. | 2996 // Get the prototype or initial map from the function. |
(...skipping 304 matching lines...) Loading... |
3300 | 3301 |
3301 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3302 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3302 DCHECK(ToRegister(instr->context()).is(cp)); | 3303 DCHECK(ToRegister(instr->context()).is(cp)); |
3303 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3304 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3304 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3305 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3305 | 3306 |
3306 if (instr->hydrogen()->HasVectorAndSlot()) { | 3307 if (instr->hydrogen()->HasVectorAndSlot()) { |
3307 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3308 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3308 } | 3309 } |
3309 | 3310 |
3310 Handle<Code> ic = | 3311 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
3311 CodeFactory::KeyedLoadICInOptimizedCode( | 3312 isolate(), instr->hydrogen()->language_mode(), |
3312 isolate(), instr->hydrogen()->initialization_state()).code(); | 3313 instr->hydrogen()->initialization_state()).code(); |
3313 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3314 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3314 } | 3315 } |
3315 | 3316 |
3316 | 3317 |
3317 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3318 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3318 Register scratch = scratch0(); | 3319 Register scratch = scratch0(); |
3319 Register temp = scratch1(); | 3320 Register temp = scratch1(); |
3320 Register result = ToRegister(instr->result()); | 3321 Register result = ToRegister(instr->result()); |
3321 | 3322 |
3322 if (instr->hydrogen()->from_inlined()) { | 3323 if (instr->hydrogen()->from_inlined()) { |
(...skipping 2702 matching lines...) Loading... |
6025 __ Push(at, ToRegister(instr->function())); | 6026 __ Push(at, ToRegister(instr->function())); |
6026 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6027 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6027 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6028 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6028 } | 6029 } |
6029 | 6030 |
6030 | 6031 |
6031 #undef __ | 6032 #undef __ |
6032 | 6033 |
6033 } // namespace internal | 6034 } // namespace internal |
6034 } // namespace v8 | 6035 } // namespace v8 |
OLD | NEW |