| 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_IA32_CODE_STUBS_IA32_H_ | 5 #ifndef V8_IA32_CODE_STUBS_IA32_H_ |
| 6 #define V8_IA32_CODE_STUBS_IA32_H_ | 6 #define V8_IA32_CODE_STUBS_IA32_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 59 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
| 60 | 60 |
| 61 NameDictionaryLookupStub(Isolate* isolate, Register dictionary, | 61 NameDictionaryLookupStub(Isolate* isolate, Register dictionary, |
| 62 Register result, Register index, LookupMode mode) | 62 Register result, Register index, LookupMode mode) |
| 63 : PlatformCodeStub(isolate) { | 63 : PlatformCodeStub(isolate) { |
| 64 minor_key_ = DictionaryBits::encode(dictionary.code()) | | 64 minor_key_ = DictionaryBits::encode(dictionary.code()) | |
| 65 ResultBits::encode(result.code()) | | 65 ResultBits::encode(result.code()) | |
| 66 IndexBits::encode(index.code()) | LookupModeBits::encode(mode); | 66 IndexBits::encode(index.code()) | LookupModeBits::encode(mode); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void Generate(MacroAssembler* masm); | |
| 70 | |
| 71 static void GenerateNegativeLookup(MacroAssembler* masm, | 69 static void GenerateNegativeLookup(MacroAssembler* masm, |
| 72 Label* miss, | 70 Label* miss, |
| 73 Label* done, | 71 Label* done, |
| 74 Register properties, | 72 Register properties, |
| 75 Handle<Name> name, | 73 Handle<Name> name, |
| 76 Register r0); | 74 Register r0); |
| 77 | 75 |
| 78 static void GeneratePositiveLookup(MacroAssembler* masm, | 76 static void GeneratePositiveLookup(MacroAssembler* masm, |
| 79 Label* miss, | 77 Label* miss, |
| 80 Label* done, | 78 Label* done, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 109 return Register::from_code(IndexBits::decode(minor_key_)); | 107 return Register::from_code(IndexBits::decode(minor_key_)); |
| 110 } | 108 } |
| 111 | 109 |
| 112 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 110 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
| 113 | 111 |
| 114 class DictionaryBits: public BitField<int, 0, 3> {}; | 112 class DictionaryBits: public BitField<int, 0, 3> {}; |
| 115 class ResultBits: public BitField<int, 3, 3> {}; | 113 class ResultBits: public BitField<int, 3, 3> {}; |
| 116 class IndexBits: public BitField<int, 6, 3> {}; | 114 class IndexBits: public BitField<int, 6, 3> {}; |
| 117 class LookupModeBits: public BitField<LookupMode, 9, 1> {}; | 115 class LookupModeBits: public BitField<LookupMode, 9, 1> {}; |
| 118 | 116 |
| 119 DEFINE_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 117 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 120 }; | 118 }; |
| 121 | 119 |
| 122 | 120 |
| 123 class RecordWriteStub: public PlatformCodeStub { | 121 class RecordWriteStub: public PlatformCodeStub { |
| 124 public: | 122 public: |
| 125 RecordWriteStub(Isolate* isolate, | 123 RecordWriteStub(Isolate* isolate, |
| 126 Register object, | 124 Register object, |
| 127 Register value, | 125 Register value, |
| 128 Register address, | 126 Register address, |
| 129 RememberedSetAction remembered_set_action, | 127 RememberedSetAction remembered_set_action, |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 friend class RecordWriteStub; | 336 friend class RecordWriteStub; |
| 339 }; | 337 }; |
| 340 | 338 |
| 341 enum OnNoNeedToInformIncrementalMarker { | 339 enum OnNoNeedToInformIncrementalMarker { |
| 342 kReturnOnNoNeedToInformIncrementalMarker, | 340 kReturnOnNoNeedToInformIncrementalMarker, |
| 343 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 341 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
| 344 }; | 342 }; |
| 345 | 343 |
| 346 virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } | 344 virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } |
| 347 | 345 |
| 348 void Generate(MacroAssembler* masm); | 346 virtual void Generate(MacroAssembler* masm) OVERRIDE; |
| 349 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 347 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
| 350 void CheckNeedsToInformIncrementalMarker( | 348 void CheckNeedsToInformIncrementalMarker( |
| 351 MacroAssembler* masm, | 349 MacroAssembler* masm, |
| 352 OnNoNeedToInformIncrementalMarker on_no_need, | 350 OnNoNeedToInformIncrementalMarker on_no_need, |
| 353 Mode mode); | 351 Mode mode); |
| 354 void InformIncrementalMarker(MacroAssembler* masm); | 352 void InformIncrementalMarker(MacroAssembler* masm); |
| 355 | 353 |
| 356 void Activate(Code* code) { | 354 void Activate(Code* code) { |
| 357 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 355 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
| 358 } | 356 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 385 | 383 |
| 386 RegisterAllocation regs_; | 384 RegisterAllocation regs_; |
| 387 | 385 |
| 388 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 386 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
| 389 }; | 387 }; |
| 390 | 388 |
| 391 | 389 |
| 392 } } // namespace v8::internal | 390 } } // namespace v8::internal |
| 393 | 391 |
| 394 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 392 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |