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_X87_CODE_STUBS_X87_H_ | 5 #ifndef V8_X87_CODE_STUBS_X87_H_ |
6 #define V8_X87_CODE_STUBS_X87_H_ | 6 #define V8_X87_CODE_STUBS_X87_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 Register r0); | 69 Register r0); |
70 | 70 |
71 static void GeneratePositiveLookup(MacroAssembler* masm, | 71 static void GeneratePositiveLookup(MacroAssembler* masm, |
72 Label* miss, | 72 Label* miss, |
73 Label* done, | 73 Label* done, |
74 Register elements, | 74 Register elements, |
75 Register name, | 75 Register name, |
76 Register r0, | 76 Register r0, |
77 Register r1); | 77 Register r1); |
78 | 78 |
79 virtual bool SometimesSetsUpAFrame() { return false; } | 79 bool SometimesSetsUpAFrame() OVERRIDE { return false; } |
80 | 80 |
81 private: | 81 private: |
82 static const int kInlinedProbes = 4; | 82 static const int kInlinedProbes = 4; |
83 static const int kTotalProbes = 20; | 83 static const int kTotalProbes = 20; |
84 | 84 |
85 static const int kCapacityOffset = | 85 static const int kCapacityOffset = |
86 NameDictionary::kHeaderSize + | 86 NameDictionary::kHeaderSize + |
87 NameDictionary::kCapacityIndex * kPointerSize; | 87 NameDictionary::kCapacityIndex * kPointerSize; |
88 | 88 |
89 static const int kElementsStartOffset = | 89 static const int kElementsStartOffset = |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 RecordWriteStub(uint32_t key, Isolate* isolate) | 133 RecordWriteStub(uint32_t key, Isolate* isolate) |
134 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} | 134 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} |
135 | 135 |
136 enum Mode { | 136 enum Mode { |
137 STORE_BUFFER_ONLY, | 137 STORE_BUFFER_ONLY, |
138 INCREMENTAL, | 138 INCREMENTAL, |
139 INCREMENTAL_COMPACTION | 139 INCREMENTAL_COMPACTION |
140 }; | 140 }; |
141 | 141 |
142 virtual bool SometimesSetsUpAFrame() { return false; } | 142 bool SometimesSetsUpAFrame() OVERRIDE { return false; } |
143 | 143 |
144 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 144 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
145 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 145 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
146 | 146 |
147 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 147 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
148 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 148 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
149 | 149 |
150 static Mode GetMode(Code* stub) { | 150 static Mode GetMode(Code* stub) { |
151 byte first_instruction = stub->instruction_start()[0]; | 151 byte first_instruction = stub->instruction_start()[0]; |
152 byte second_instruction = stub->instruction_start()[2]; | 152 byte second_instruction = stub->instruction_start()[2]; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 return no_reg; | 321 return no_reg; |
322 } | 322 } |
323 friend class RecordWriteStub; | 323 friend class RecordWriteStub; |
324 }; | 324 }; |
325 | 325 |
326 enum OnNoNeedToInformIncrementalMarker { | 326 enum OnNoNeedToInformIncrementalMarker { |
327 kReturnOnNoNeedToInformIncrementalMarker, | 327 kReturnOnNoNeedToInformIncrementalMarker, |
328 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 328 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
329 }; | 329 }; |
330 | 330 |
331 virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } | 331 inline Major MajorKey() const FINAL { return RecordWrite; } |
332 | 332 |
333 virtual void Generate(MacroAssembler* masm) OVERRIDE; | 333 void Generate(MacroAssembler* masm) OVERRIDE; |
334 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 334 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
335 void CheckNeedsToInformIncrementalMarker( | 335 void CheckNeedsToInformIncrementalMarker( |
336 MacroAssembler* masm, | 336 MacroAssembler* masm, |
337 OnNoNeedToInformIncrementalMarker on_no_need, | 337 OnNoNeedToInformIncrementalMarker on_no_need, |
338 Mode mode); | 338 Mode mode); |
339 void InformIncrementalMarker(MacroAssembler* masm); | 339 void InformIncrementalMarker(MacroAssembler* masm); |
340 | 340 |
341 void Activate(Code* code) { | 341 void Activate(Code* code) OVERRIDE { |
342 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 342 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
343 } | 343 } |
344 | 344 |
345 Register object() const { | 345 Register object() const { |
346 return Register::from_code(ObjectBits::decode(minor_key_)); | 346 return Register::from_code(ObjectBits::decode(minor_key_)); |
347 } | 347 } |
348 | 348 |
349 Register value() const { | 349 Register value() const { |
350 return Register::from_code(ValueBits::decode(minor_key_)); | 350 return Register::from_code(ValueBits::decode(minor_key_)); |
351 } | 351 } |
(...skipping 18 matching lines...) Expand all Loading... |
370 | 370 |
371 RegisterAllocation regs_; | 371 RegisterAllocation regs_; |
372 | 372 |
373 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 373 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
374 }; | 374 }; |
375 | 375 |
376 | 376 |
377 } } // namespace v8::internal | 377 } } // namespace v8::internal |
378 | 378 |
379 #endif // V8_X87_CODE_STUBS_X87_H_ | 379 #endif // V8_X87_CODE_STUBS_X87_H_ |
OLD | NEW |