| 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 2931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2942 DCHECK(ToRegister(instr->context()).is(cp)); | 2942 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2943 DCHECK(ToRegister(instr->global_object()) | 2943 DCHECK(ToRegister(instr->global_object()) |
| 2944 .is(LoadDescriptor::ReceiverRegister())); | 2944 .is(LoadDescriptor::ReceiverRegister())); |
| 2945 DCHECK(ToRegister(instr->result()).is(v0)); | 2945 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2946 | 2946 |
| 2947 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2947 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2948 if (FLAG_vector_ics) { | 2948 if (FLAG_vector_ics) { |
| 2949 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2949 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2950 } | 2950 } |
| 2951 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2951 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 2952 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); | 2952 Handle<Code> ic = |
| 2953 CodeFactory::LoadICInOptimizedCode(isolate(), mode, UNINITIALIZED).code(); |
| 2953 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2954 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2954 } | 2955 } |
| 2955 | 2956 |
| 2956 | 2957 |
| 2957 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2958 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2958 Register value = ToRegister(instr->value()); | 2959 Register value = ToRegister(instr->value()); |
| 2959 Register cell = scratch0(); | 2960 Register cell = scratch0(); |
| 2960 | 2961 |
| 2961 // Load the cell. | 2962 // Load the cell. |
| 2962 __ li(cell, Operand(instr->hydrogen()->cell().handle())); | 2963 __ li(cell, Operand(instr->hydrogen()->cell().handle())); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3069 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3070 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 3070 DCHECK(ToRegister(instr->context()).is(cp)); | 3071 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3071 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3072 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 3072 DCHECK(ToRegister(instr->result()).is(v0)); | 3073 DCHECK(ToRegister(instr->result()).is(v0)); |
| 3073 | 3074 |
| 3074 // Name is always in a2. | 3075 // Name is always in a2. |
| 3075 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3076 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 3076 if (FLAG_vector_ics) { | 3077 if (FLAG_vector_ics) { |
| 3077 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3078 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 3078 } | 3079 } |
| 3079 Handle<Code> ic = | 3080 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
| 3080 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); | 3081 isolate(), NOT_CONTEXTUAL, |
| 3082 instr->hydrogen()->initialization_state()).code(); |
| 3081 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3083 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3082 } | 3084 } |
| 3083 | 3085 |
| 3084 | 3086 |
| 3085 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3087 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 3086 Register scratch = scratch0(); | 3088 Register scratch = scratch0(); |
| 3087 Register function = ToRegister(instr->function()); | 3089 Register function = ToRegister(instr->function()); |
| 3088 Register result = ToRegister(instr->result()); | 3090 Register result = ToRegister(instr->result()); |
| 3089 | 3091 |
| 3090 // Get the prototype or initial map from the function. | 3092 // Get the prototype or initial map from the function. |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4272 } | 4274 } |
| 4273 } | 4275 } |
| 4274 | 4276 |
| 4275 | 4277 |
| 4276 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 4278 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
| 4277 DCHECK(ToRegister(instr->context()).is(cp)); | 4279 DCHECK(ToRegister(instr->context()).is(cp)); |
| 4278 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); | 4280 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); |
| 4279 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); | 4281 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); |
| 4280 | 4282 |
| 4281 __ li(StoreDescriptor::NameRegister(), Operand(instr->name())); | 4283 __ li(StoreDescriptor::NameRegister(), Operand(instr->name())); |
| 4282 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->language_mode()); | 4284 Handle<Code> ic = |
| 4285 StoreIC::initialize_stub(isolate(), instr->language_mode(), |
| 4286 instr->hydrogen()->initialization_state()); |
| 4283 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4287 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4284 } | 4288 } |
| 4285 | 4289 |
| 4286 | 4290 |
| 4287 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { | 4291 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
| 4288 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; | 4292 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; |
| 4289 Operand operand(0); | 4293 Operand operand(0); |
| 4290 Register reg; | 4294 Register reg; |
| 4291 if (instr->index()->IsConstantOperand()) { | 4295 if (instr->index()->IsConstantOperand()) { |
| 4292 operand = ToOperand(instr->index()); | 4296 operand = ToOperand(instr->index()); |
| (...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6025 __ li(at, scope_info); | 6029 __ li(at, scope_info); |
| 6026 __ Push(at, ToRegister(instr->function())); | 6030 __ Push(at, ToRegister(instr->function())); |
| 6027 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6031 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6028 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6032 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6029 } | 6033 } |
| 6030 | 6034 |
| 6031 | 6035 |
| 6032 #undef __ | 6036 #undef __ |
| 6033 | 6037 |
| 6034 } } // namespace v8::internal | 6038 } } // namespace v8::internal |
| OLD | NEW |