OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef V8_X64_CODE_STUBS_X64_H_ | 5 #ifndef V8_X64_CODE_STUBS_X64_H_ |
6 #define V8_X64_CODE_STUBS_X64_H_ | 6 #define V8_X64_CODE_STUBS_X64_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 54 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
55 | 55 |
56 NameDictionaryLookupStub(Isolate* isolate, Register dictionary, | 56 NameDictionaryLookupStub(Isolate* isolate, Register dictionary, |
57 Register result, Register index, LookupMode mode) | 57 Register result, Register index, LookupMode mode) |
58 : PlatformCodeStub(isolate) { | 58 : PlatformCodeStub(isolate) { |
59 minor_key_ = DictionaryBits::encode(dictionary.code()) | | 59 minor_key_ = DictionaryBits::encode(dictionary.code()) | |
60 ResultBits::encode(result.code()) | | 60 ResultBits::encode(result.code()) | |
61 IndexBits::encode(index.code()) | LookupModeBits::encode(mode); | 61 IndexBits::encode(index.code()) | LookupModeBits::encode(mode); |
62 } | 62 } |
63 | 63 |
64 void Generate(MacroAssembler* masm); | |
65 | |
66 static void GenerateNegativeLookup(MacroAssembler* masm, | 64 static void GenerateNegativeLookup(MacroAssembler* masm, |
67 Label* miss, | 65 Label* miss, |
68 Label* done, | 66 Label* done, |
69 Register properties, | 67 Register properties, |
70 Handle<Name> name, | 68 Handle<Name> name, |
71 Register r0); | 69 Register r0); |
72 | 70 |
73 static void GeneratePositiveLookup(MacroAssembler* masm, | 71 static void GeneratePositiveLookup(MacroAssembler* masm, |
74 Label* miss, | 72 Label* miss, |
75 Label* done, | 73 Label* done, |
(...skipping 28 matching lines...) Expand all Loading... |
104 return Register::from_code(IndexBits::decode(minor_key_)); | 102 return Register::from_code(IndexBits::decode(minor_key_)); |
105 } | 103 } |
106 | 104 |
107 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 105 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
108 | 106 |
109 class DictionaryBits: public BitField<int, 0, 4> {}; | 107 class DictionaryBits: public BitField<int, 0, 4> {}; |
110 class ResultBits: public BitField<int, 4, 4> {}; | 108 class ResultBits: public BitField<int, 4, 4> {}; |
111 class IndexBits: public BitField<int, 8, 4> {}; | 109 class IndexBits: public BitField<int, 8, 4> {}; |
112 class LookupModeBits: public BitField<LookupMode, 12, 1> {}; | 110 class LookupModeBits: public BitField<LookupMode, 12, 1> {}; |
113 | 111 |
114 DEFINE_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 112 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
115 }; | 113 }; |
116 | 114 |
117 | 115 |
118 class RecordWriteStub: public PlatformCodeStub { | 116 class RecordWriteStub: public PlatformCodeStub { |
119 public: | 117 public: |
120 RecordWriteStub(Isolate* isolate, Register object, Register value, | 118 RecordWriteStub(Isolate* isolate, Register object, Register value, |
121 Register address, RememberedSetAction remembered_set_action, | 119 Register address, RememberedSetAction remembered_set_action, |
122 SaveFPRegsMode fp_mode) | 120 SaveFPRegsMode fp_mode) |
123 : PlatformCodeStub(isolate), | 121 : PlatformCodeStub(isolate), |
124 regs_(object, // An input reg. | 122 regs_(object, // An input reg. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 friend class RecordWriteStub; | 310 friend class RecordWriteStub; |
313 }; | 311 }; |
314 | 312 |
315 enum OnNoNeedToInformIncrementalMarker { | 313 enum OnNoNeedToInformIncrementalMarker { |
316 kReturnOnNoNeedToInformIncrementalMarker, | 314 kReturnOnNoNeedToInformIncrementalMarker, |
317 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 315 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
318 }; | 316 }; |
319 | 317 |
320 virtual Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } | 318 virtual Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } |
321 | 319 |
322 void Generate(MacroAssembler* masm); | 320 virtual void Generate(MacroAssembler* masm) OVERRIDE; |
323 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 321 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
324 void CheckNeedsToInformIncrementalMarker( | 322 void CheckNeedsToInformIncrementalMarker( |
325 MacroAssembler* masm, | 323 MacroAssembler* masm, |
326 OnNoNeedToInformIncrementalMarker on_no_need, | 324 OnNoNeedToInformIncrementalMarker on_no_need, |
327 Mode mode); | 325 Mode mode); |
328 void InformIncrementalMarker(MacroAssembler* masm); | 326 void InformIncrementalMarker(MacroAssembler* masm); |
329 | 327 |
330 void Activate(Code* code) { | 328 void Activate(Code* code) { |
331 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 329 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
332 } | 330 } |
(...skipping 27 matching lines...) Expand all Loading... |
360 Label slow_; | 358 Label slow_; |
361 RegisterAllocation regs_; | 359 RegisterAllocation regs_; |
362 | 360 |
363 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 361 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
364 }; | 362 }; |
365 | 363 |
366 | 364 |
367 } } // namespace v8::internal | 365 } } // namespace v8::internal |
368 | 366 |
369 #endif // V8_X64_CODE_STUBS_X64_H_ | 367 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |