| 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 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 bool SometimesSetsUpAFrame() OVERRIDE { 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 RecordWriteStub(uint32_t key, Isolate* isolate) | 136 RecordWriteStub(uint32_t key, Isolate* isolate) |
| 137 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} | 137 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} |
| 138 | 138 |
| 139 enum Mode { | 139 enum Mode { |
| 140 STORE_BUFFER_ONLY, | 140 STORE_BUFFER_ONLY, |
| 141 INCREMENTAL, | 141 INCREMENTAL, |
| 142 INCREMENTAL_COMPACTION | 142 INCREMENTAL_COMPACTION |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 bool SometimesSetsUpAFrame() OVERRIDE { return false; } | 145 bool SometimesSetsUpAFrame() override { return false; } |
| 146 | 146 |
| 147 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 147 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
| 148 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 148 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
| 149 | 149 |
| 150 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 150 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
| 151 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 151 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
| 152 | 152 |
| 153 static Mode GetMode(Code* stub) { | 153 static Mode GetMode(Code* stub) { |
| 154 byte first_instruction = stub->instruction_start()[0]; | 154 byte first_instruction = stub->instruction_start()[0]; |
| 155 byte second_instruction = stub->instruction_start()[2]; | 155 byte second_instruction = stub->instruction_start()[2]; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 return no_reg; | 332 return no_reg; |
| 333 } | 333 } |
| 334 friend class RecordWriteStub; | 334 friend class RecordWriteStub; |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 enum OnNoNeedToInformIncrementalMarker { | 337 enum OnNoNeedToInformIncrementalMarker { |
| 338 kReturnOnNoNeedToInformIncrementalMarker, | 338 kReturnOnNoNeedToInformIncrementalMarker, |
| 339 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 339 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 inline Major MajorKey() const FINAL { return RecordWrite; } | 342 inline Major MajorKey() const final { return RecordWrite; } |
| 343 | 343 |
| 344 void Generate(MacroAssembler* masm) OVERRIDE; | 344 void Generate(MacroAssembler* masm) override; |
| 345 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 345 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
| 346 void CheckNeedsToInformIncrementalMarker( | 346 void CheckNeedsToInformIncrementalMarker( |
| 347 MacroAssembler* masm, | 347 MacroAssembler* masm, |
| 348 OnNoNeedToInformIncrementalMarker on_no_need, | 348 OnNoNeedToInformIncrementalMarker on_no_need, |
| 349 Mode mode); | 349 Mode mode); |
| 350 void InformIncrementalMarker(MacroAssembler* masm); | 350 void InformIncrementalMarker(MacroAssembler* masm); |
| 351 | 351 |
| 352 void Activate(Code* code) OVERRIDE { | 352 void Activate(Code* code) override { |
| 353 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 353 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
| 354 } | 354 } |
| 355 | 355 |
| 356 Register object() const { | 356 Register object() const { |
| 357 return Register::from_code(ObjectBits::decode(minor_key_)); | 357 return Register::from_code(ObjectBits::decode(minor_key_)); |
| 358 } | 358 } |
| 359 | 359 |
| 360 Register value() const { | 360 Register value() const { |
| 361 return Register::from_code(ValueBits::decode(minor_key_)); | 361 return Register::from_code(ValueBits::decode(minor_key_)); |
| 362 } | 362 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 381 | 381 |
| 382 RegisterAllocation regs_; | 382 RegisterAllocation regs_; |
| 383 | 383 |
| 384 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 384 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
| 385 }; | 385 }; |
| 386 | 386 |
| 387 | 387 |
| 388 } } // namespace v8::internal | 388 } } // namespace v8::internal |
| 389 | 389 |
| 390 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 390 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |