OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/mips64/lithium-codegen-mips64.h" | 9 #include "src/mips64/lithium-codegen-mips64.h" |
10 #include "src/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2874 } | 2874 } |
2875 } | 2875 } |
2876 | 2876 |
2877 | 2877 |
2878 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2878 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2879 ASSERT(ToRegister(instr->context()).is(cp)); | 2879 ASSERT(ToRegister(instr->context()).is(cp)); |
2880 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 2880 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); |
2881 ASSERT(ToRegister(instr->result()).is(v0)); | 2881 ASSERT(ToRegister(instr->result()).is(v0)); |
2882 | 2882 |
2883 __ li(LoadIC::NameRegister(), Operand(instr->name())); | 2883 __ li(LoadIC::NameRegister(), Operand(instr->name())); |
| 2884 if (FLAG_vector_ics) { |
| 2885 Register vector = ToRegister(instr->temp_vector()); |
| 2886 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 2887 __ li(vector, instr->hydrogen()->feedback_vector()); |
| 2888 // No need to allocate this register. |
| 2889 ASSERT(LoadIC::SlotRegister().is(a0)); |
| 2890 __ li(LoadIC::SlotRegister(), |
| 2891 Operand(Smi::FromInt(instr->hydrogen()->slot()))); |
| 2892 } |
2884 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2893 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
2885 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 2894 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
2886 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2895 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2887 } | 2896 } |
2888 | 2897 |
2889 | 2898 |
2890 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2899 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
2891 Register value = ToRegister(instr->value()); | 2900 Register value = ToRegister(instr->value()); |
2892 Register cell = scratch0(); | 2901 Register cell = scratch0(); |
2893 | 2902 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3013 } | 3022 } |
3014 | 3023 |
3015 | 3024 |
3016 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3025 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3017 ASSERT(ToRegister(instr->context()).is(cp)); | 3026 ASSERT(ToRegister(instr->context()).is(cp)); |
3018 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3027 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
3019 ASSERT(ToRegister(instr->result()).is(v0)); | 3028 ASSERT(ToRegister(instr->result()).is(v0)); |
3020 | 3029 |
3021 // Name is always in a2. | 3030 // Name is always in a2. |
3022 __ li(LoadIC::NameRegister(), Operand(instr->name())); | 3031 __ li(LoadIC::NameRegister(), Operand(instr->name())); |
| 3032 if (FLAG_vector_ics) { |
| 3033 Register vector = ToRegister(instr->temp_vector()); |
| 3034 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3035 __ li(vector, instr->hydrogen()->feedback_vector()); |
| 3036 // No need to allocate this register. |
| 3037 ASSERT(LoadIC::SlotRegister().is(a0)); |
| 3038 __ li(LoadIC::SlotRegister(), |
| 3039 Operand(Smi::FromInt(instr->hydrogen()->slot()))); |
| 3040 } |
3023 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 3041 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
3024 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3042 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3025 } | 3043 } |
3026 | 3044 |
3027 | 3045 |
3028 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3046 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
3029 Register scratch = scratch0(); | 3047 Register scratch = scratch0(); |
3030 Register function = ToRegister(instr->function()); | 3048 Register function = ToRegister(instr->function()); |
3031 Register result = ToRegister(instr->result()); | 3049 Register result = ToRegister(instr->result()); |
3032 | 3050 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 return MemOperand(scratch0(), base_offset); | 3393 return MemOperand(scratch0(), base_offset); |
3376 } | 3394 } |
3377 } | 3395 } |
3378 | 3396 |
3379 | 3397 |
3380 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3398 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3381 ASSERT(ToRegister(instr->context()).is(cp)); | 3399 ASSERT(ToRegister(instr->context()).is(cp)); |
3382 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3400 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
3383 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); | 3401 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); |
3384 | 3402 |
| 3403 if (FLAG_vector_ics) { |
| 3404 Register vector = ToRegister(instr->temp_vector()); |
| 3405 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3406 __ li(vector, instr->hydrogen()->feedback_vector()); |
| 3407 // No need to allocate this register. |
| 3408 ASSERT(LoadIC::SlotRegister().is(a0)); |
| 3409 __ li(LoadIC::SlotRegister(), |
| 3410 Operand(Smi::FromInt(instr->hydrogen()->slot()))); |
| 3411 } |
| 3412 |
3385 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3413 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
3386 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3414 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3387 } | 3415 } |
3388 | 3416 |
3389 | 3417 |
3390 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3418 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3391 Register scratch = scratch0(); | 3419 Register scratch = scratch0(); |
3392 Register temp = scratch1(); | 3420 Register temp = scratch1(); |
3393 Register result = ToRegister(instr->result()); | 3421 Register result = ToRegister(instr->result()); |
3394 | 3422 |
(...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5932 __ li(at, scope_info); | 5960 __ li(at, scope_info); |
5933 __ Push(at, ToRegister(instr->function())); | 5961 __ Push(at, ToRegister(instr->function())); |
5934 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5962 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5935 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5963 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5936 } | 5964 } |
5937 | 5965 |
5938 | 5966 |
5939 #undef __ | 5967 #undef __ |
5940 | 5968 |
5941 } } // namespace v8::internal | 5969 } } // namespace v8::internal |
OLD | NEW |