| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
| 8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
| 9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 Label done; | 71 Label done; |
| 72 NameDictionaryLookupStub::GenerateNegativeLookup(masm, miss_label, &done, | 72 NameDictionaryLookupStub::GenerateNegativeLookup(masm, miss_label, &done, |
| 73 properties, name, scratch1); | 73 properties, name, scratch1); |
| 74 __ bind(&done); | 74 __ bind(&done); |
| 75 __ DecrementCounter(counters->negative_lookups_miss(), 1); | 75 __ DecrementCounter(counters->negative_lookups_miss(), 1); |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 79 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
| 80 MacroAssembler* masm, int index, Register result, Label* miss) { | 80 MacroAssembler* masm, int index, Register result, Label* miss) { |
| 81 __ LoadNativeContextSlot(index, result); | 81 const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); |
| 82 __ movp(result, Operand(rsi, offset)); |
| 83 __ movp(result, FieldOperand(result, JSGlobalObject::kNativeContextOffset)); |
| 84 __ movp(result, Operand(result, Context::SlotOffset(index))); |
| 82 // Load its initial map. The global functions all have initial maps. | 85 // Load its initial map. The global functions all have initial maps. |
| 83 __ movp(result, | 86 __ movp(result, |
| 84 FieldOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); | 87 FieldOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |
| 85 // Load the prototype from the initial map. | 88 // Load the prototype from the initial map. |
| 86 __ movp(result, FieldOperand(result, Map::kPrototypeOffset)); | 89 __ movp(result, FieldOperand(result, Map::kPrototypeOffset)); |
| 87 } | 90 } |
| 88 | 91 |
| 89 | 92 |
| 90 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( | 93 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( |
| 91 MacroAssembler* masm, Register receiver, Register result, Register scratch, | 94 MacroAssembler* masm, Register receiver, Register result, Register scratch, |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 // Return the generated code. | 807 // Return the generated code. |
| 805 return GetCode(kind(), Code::NORMAL, name); | 808 return GetCode(kind(), Code::NORMAL, name); |
| 806 } | 809 } |
| 807 | 810 |
| 808 | 811 |
| 809 #undef __ | 812 #undef __ |
| 810 } // namespace internal | 813 } // namespace internal |
| 811 } // namespace v8 | 814 } // namespace v8 |
| 812 | 815 |
| 813 #endif // V8_TARGET_ARCH_X64 | 816 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |