| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 | 
| 8 | 8 | 
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" | 
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" | 
| (...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2846   } | 2846   } | 
| 2847 } | 2847 } | 
| 2848 | 2848 | 
| 2849 | 2849 | 
| 2850 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2850 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 
| 2851   ASSERT(ToRegister(instr->context()).is(rsi)); | 2851   ASSERT(ToRegister(instr->context()).is(rsi)); | 
| 2852   ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 2852   ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 
| 2853   ASSERT(ToRegister(instr->result()).is(rax)); | 2853   ASSERT(ToRegister(instr->result()).is(rax)); | 
| 2854 | 2854 | 
| 2855   __ Move(LoadIC::NameRegister(), instr->name()); | 2855   __ Move(LoadIC::NameRegister(), instr->name()); | 
|  | 2856   if (FLAG_vector_ics) { | 
|  | 2857     Register vector = ToRegister(instr->temp_vector()); | 
|  | 2858     ASSERT(vector.is(LoadIC::VectorRegister())); | 
|  | 2859     __ Move(vector, instr->hydrogen()->feedback_vector()); | 
|  | 2860     // No need to allocate this register. | 
|  | 2861     ASSERT(LoadIC::SlotRegister().is(rax)); | 
|  | 2862     __ Move(LoadIC::SlotRegister(), Smi::FromInt(instr->hydrogen()->slot())); | 
|  | 2863   } | 
| 2856   ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2864   ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 
| 2857   Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 2865   Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 
| 2858   CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2866   CallCode(ic, RelocInfo::CODE_TARGET, instr); | 
| 2859 } | 2867 } | 
| 2860 | 2868 | 
| 2861 | 2869 | 
| 2862 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2870 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 
| 2863   Register value = ToRegister(instr->value()); | 2871   Register value = ToRegister(instr->value()); | 
| 2864   Handle<Cell> cell_handle = instr->hydrogen()->cell().handle(); | 2872   Handle<Cell> cell_handle = instr->hydrogen()->cell().handle(); | 
| 2865 | 2873 | 
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2986   __ Load(result, FieldOperand(object, offset), representation); | 2994   __ Load(result, FieldOperand(object, offset), representation); | 
| 2987 } | 2995 } | 
| 2988 | 2996 | 
| 2989 | 2997 | 
| 2990 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2998 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 
| 2991   ASSERT(ToRegister(instr->context()).is(rsi)); | 2999   ASSERT(ToRegister(instr->context()).is(rsi)); | 
| 2992   ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3000   ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 
| 2993   ASSERT(ToRegister(instr->result()).is(rax)); | 3001   ASSERT(ToRegister(instr->result()).is(rax)); | 
| 2994 | 3002 | 
| 2995   __ Move(LoadIC::NameRegister(), instr->name()); | 3003   __ Move(LoadIC::NameRegister(), instr->name()); | 
|  | 3004   if (FLAG_vector_ics) { | 
|  | 3005     Register vector = ToRegister(instr->temp_vector()); | 
|  | 3006     ASSERT(vector.is(LoadIC::VectorRegister())); | 
|  | 3007     __ Move(vector, instr->hydrogen()->feedback_vector()); | 
|  | 3008     // No need to allocate this register. | 
|  | 3009     ASSERT(LoadIC::SlotRegister().is(rax)); | 
|  | 3010     __ Move(LoadIC::SlotRegister(), Smi::FromInt(instr->hydrogen()->slot())); | 
|  | 3011   } | 
| 2996   Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 3012   Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 
| 2997   CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3013   CallCode(ic, RelocInfo::CODE_TARGET, instr); | 
| 2998 } | 3014 } | 
| 2999 | 3015 | 
| 3000 | 3016 | 
| 3001 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3017 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 
| 3002   Register function = ToRegister(instr->function()); | 3018   Register function = ToRegister(instr->function()); | 
| 3003   Register result = ToRegister(instr->result()); | 3019   Register result = ToRegister(instr->result()); | 
| 3004 | 3020 | 
| 3005   // Check that the function really is a function. | 3021   // Check that the function really is a function. | 
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3282                    offset); | 3298                    offset); | 
| 3283   } | 3299   } | 
| 3284 } | 3300 } | 
| 3285 | 3301 | 
| 3286 | 3302 | 
| 3287 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3303 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 
| 3288   ASSERT(ToRegister(instr->context()).is(rsi)); | 3304   ASSERT(ToRegister(instr->context()).is(rsi)); | 
| 3289   ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3305   ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 
| 3290   ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); | 3306   ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); | 
| 3291 | 3307 | 
|  | 3308   if (FLAG_vector_ics) { | 
|  | 3309     Register vector = ToRegister(instr->temp_vector()); | 
|  | 3310     ASSERT(vector.is(LoadIC::VectorRegister())); | 
|  | 3311     __ Move(vector, instr->hydrogen()->feedback_vector()); | 
|  | 3312     // No need to allocate this register. | 
|  | 3313     ASSERT(LoadIC::SlotRegister().is(rax)); | 
|  | 3314     __ Move(LoadIC::SlotRegister(), Smi::FromInt(instr->hydrogen()->slot())); | 
|  | 3315   } | 
|  | 3316 | 
| 3292   Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3317   Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 
| 3293   CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3318   CallCode(ic, RelocInfo::CODE_TARGET, instr); | 
| 3294 } | 3319 } | 
| 3295 | 3320 | 
| 3296 | 3321 | 
| 3297 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3322 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 
| 3298   Register result = ToRegister(instr->result()); | 3323   Register result = ToRegister(instr->result()); | 
| 3299 | 3324 | 
| 3300   if (instr->hydrogen()->from_inlined()) { | 3325   if (instr->hydrogen()->from_inlined()) { | 
| 3301     __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); | 3326     __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); | 
| (...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5835   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5860   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 
| 5836   RecordSafepoint(Safepoint::kNoLazyDeopt); | 5861   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
| 5837 } | 5862 } | 
| 5838 | 5863 | 
| 5839 | 5864 | 
| 5840 #undef __ | 5865 #undef __ | 
| 5841 | 5866 | 
| 5842 } }  // namespace v8::internal | 5867 } }  // namespace v8::internal | 
| 5843 | 5868 | 
| 5844 #endif  // V8_TARGET_ARCH_X64 | 5869 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|