| 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_MIPS_CODE_STUBS_ARM_H_ | 5 #ifndef V8_MIPS_CODE_STUBS_ARM_H_ |
| 6 #define V8_MIPS_CODE_STUBS_ARM_H_ | 6 #define V8_MIPS_CODE_STUBS_ARM_H_ |
| 7 | 7 |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 | 9 |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 | 74 |
| 75 class StoreRegistersStateStub: public PlatformCodeStub { | 75 class StoreRegistersStateStub: public PlatformCodeStub { |
| 76 public: | 76 public: |
| 77 explicit StoreRegistersStateStub(Isolate* isolate) | 77 explicit StoreRegistersStateStub(Isolate* isolate) |
| 78 : PlatformCodeStub(isolate) {} | 78 : PlatformCodeStub(isolate) {} |
| 79 | 79 |
| 80 static void GenerateAheadOfTime(Isolate* isolate); | 80 static void GenerateAheadOfTime(Isolate* isolate); |
| 81 private: | 81 private: |
| 82 Major MajorKey() const { return StoreRegistersState; } | 82 virtual inline Major MajorKey() const FINAL OVERRIDE; |
| 83 uint32_t MinorKey() const { return 0; } | 83 uint32_t MinorKey() const { return 0; } |
| 84 | 84 |
| 85 void Generate(MacroAssembler* masm); | 85 void Generate(MacroAssembler* masm); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 class RestoreRegistersStateStub: public PlatformCodeStub { | 88 class RestoreRegistersStateStub: public PlatformCodeStub { |
| 89 public: | 89 public: |
| 90 explicit RestoreRegistersStateStub(Isolate* isolate) | 90 explicit RestoreRegistersStateStub(Isolate* isolate) |
| 91 : PlatformCodeStub(isolate) {} | 91 : PlatformCodeStub(isolate) {} |
| 92 | 92 |
| 93 static void GenerateAheadOfTime(Isolate* isolate); | 93 static void GenerateAheadOfTime(Isolate* isolate); |
| 94 private: | 94 private: |
| 95 Major MajorKey() const { return RestoreRegistersState; } | 95 virtual inline Major MajorKey() const FINAL OVERRIDE; |
| 96 uint32_t MinorKey() const { return 0; } | 96 uint32_t MinorKey() const { return 0; } |
| 97 | 97 |
| 98 void Generate(MacroAssembler* masm); | 98 void Generate(MacroAssembler* masm); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 // This stub can convert a signed int32 to a heap number (double). It does | 101 // This stub can convert a signed int32 to a heap number (double). It does |
| 102 // not work for int32s that are in Smi range! No GC occurs during this stub | 102 // not work for int32s that are in Smi range! No GC occurs during this stub |
| 103 // so you don't have to set up the frame. | 103 // so you don't have to set up the frame. |
| 104 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { | 104 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { |
| 105 public: | 105 public: |
| 106 WriteInt32ToHeapNumberStub(Isolate* isolate, Register the_int, | 106 WriteInt32ToHeapNumberStub(Isolate* isolate, Register the_int, |
| 107 Register the_heap_number, Register scratch, | 107 Register the_heap_number, Register scratch, |
| 108 Register scratch2) | 108 Register scratch2) |
| 109 : PlatformCodeStub(isolate) { | 109 : PlatformCodeStub(isolate) { |
| 110 minor_key_ = IntRegisterBits::encode(the_int.code()) | | 110 minor_key_ = IntRegisterBits::encode(the_int.code()) | |
| 111 HeapNumberRegisterBits::encode(the_heap_number.code()) | | 111 HeapNumberRegisterBits::encode(the_heap_number.code()) | |
| 112 ScratchRegisterBits::encode(scratch.code()) | | 112 ScratchRegisterBits::encode(scratch.code()) | |
| 113 SignRegisterBits::encode(scratch2.code()); | 113 SignRegisterBits::encode(scratch2.code()); |
| 114 DCHECK(IntRegisterBits::is_valid(the_int.code())); | 114 DCHECK(IntRegisterBits::is_valid(the_int.code())); |
| 115 DCHECK(HeapNumberRegisterBits::is_valid(the_heap_number.code())); | 115 DCHECK(HeapNumberRegisterBits::is_valid(the_heap_number.code())); |
| 116 DCHECK(ScratchRegisterBits::is_valid(scratch.code())); | 116 DCHECK(ScratchRegisterBits::is_valid(scratch.code())); |
| 117 DCHECK(SignRegisterBits::is_valid(scratch2.code())); | 117 DCHECK(SignRegisterBits::is_valid(scratch2.code())); |
| 118 } | 118 } |
| 119 | 119 |
| 120 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 120 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 121 | 121 |
| 122 private: | 122 private: |
| 123 Major MajorKey() const { return WriteInt32ToHeapNumber; } | 123 virtual inline Major MajorKey() const FINAL OVERRIDE; |
| 124 | 124 |
| 125 void Generate(MacroAssembler* masm); | 125 void Generate(MacroAssembler* masm); |
| 126 | 126 |
| 127 Register the_int() const { | 127 Register the_int() const { |
| 128 return Register::from_code(IntRegisterBits::decode(minor_key_)); | 128 return Register::from_code(IntRegisterBits::decode(minor_key_)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 Register the_heap_number() const { | 131 Register the_heap_number() const { |
| 132 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_)); | 132 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_)); |
| 133 } | 133 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 Register scratch1_; | 293 Register scratch1_; |
| 294 | 294 |
| 295 friend class RecordWriteStub; | 295 friend class RecordWriteStub; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 enum OnNoNeedToInformIncrementalMarker { | 298 enum OnNoNeedToInformIncrementalMarker { |
| 299 kReturnOnNoNeedToInformIncrementalMarker, | 299 kReturnOnNoNeedToInformIncrementalMarker, |
| 300 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 300 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
| 301 }; | 301 }; |
| 302 | 302 |
| 303 Major MajorKey() const { return RecordWrite; } | 303 virtual inline Major MajorKey() const FINAL OVERRIDE; |
| 304 | 304 |
| 305 void Generate(MacroAssembler* masm); | 305 void Generate(MacroAssembler* masm); |
| 306 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 306 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
| 307 void CheckNeedsToInformIncrementalMarker( | 307 void CheckNeedsToInformIncrementalMarker( |
| 308 MacroAssembler* masm, | 308 MacroAssembler* masm, |
| 309 OnNoNeedToInformIncrementalMarker on_no_need, | 309 OnNoNeedToInformIncrementalMarker on_no_need, |
| 310 Mode mode); | 310 Mode mode); |
| 311 void InformIncrementalMarker(MacroAssembler* masm); | 311 void InformIncrementalMarker(MacroAssembler* masm); |
| 312 | 312 |
| 313 void Activate(Code* code) { | 313 void Activate(Code* code) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // keep the code which called into native pinned in the memory. Currently the | 352 // keep the code which called into native pinned in the memory. Currently the |
| 353 // simplest approach is to generate such stub early enough so it can never be | 353 // simplest approach is to generate such stub early enough so it can never be |
| 354 // moved by GC | 354 // moved by GC |
| 355 class DirectCEntryStub: public PlatformCodeStub { | 355 class DirectCEntryStub: public PlatformCodeStub { |
| 356 public: | 356 public: |
| 357 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 357 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 358 void Generate(MacroAssembler* masm); | 358 void Generate(MacroAssembler* masm); |
| 359 void GenerateCall(MacroAssembler* masm, Register target); | 359 void GenerateCall(MacroAssembler* masm, Register target); |
| 360 | 360 |
| 361 private: | 361 private: |
| 362 Major MajorKey() const { return DirectCEntry; } | 362 virtual inline Major MajorKey() const FINAL OVERRIDE; |
| 363 | 363 |
| 364 bool NeedsImmovableCode() { return true; } | 364 bool NeedsImmovableCode() { return true; } |
| 365 | 365 |
| 366 DISALLOW_COPY_AND_ASSIGN(DirectCEntryStub); | 366 DISALLOW_COPY_AND_ASSIGN(DirectCEntryStub); |
| 367 }; | 367 }; |
| 368 | 368 |
| 369 | 369 |
| 370 class NameDictionaryLookupStub: public PlatformCodeStub { | 370 class NameDictionaryLookupStub: public PlatformCodeStub { |
| 371 public: | 371 public: |
| 372 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 372 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 401 static const int kTotalProbes = 20; | 401 static const int kTotalProbes = 20; |
| 402 | 402 |
| 403 static const int kCapacityOffset = | 403 static const int kCapacityOffset = |
| 404 NameDictionary::kHeaderSize + | 404 NameDictionary::kHeaderSize + |
| 405 NameDictionary::kCapacityIndex * kPointerSize; | 405 NameDictionary::kCapacityIndex * kPointerSize; |
| 406 | 406 |
| 407 static const int kElementsStartOffset = | 407 static const int kElementsStartOffset = |
| 408 NameDictionary::kHeaderSize + | 408 NameDictionary::kHeaderSize + |
| 409 NameDictionary::kElementsStartIndex * kPointerSize; | 409 NameDictionary::kElementsStartIndex * kPointerSize; |
| 410 | 410 |
| 411 Major MajorKey() const { return NameDictionaryLookup; } | 411 virtual inline Major MajorKey() const FINAL OVERRIDE; |
| 412 | 412 |
| 413 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 413 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
| 414 | 414 |
| 415 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 415 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 416 | 416 |
| 417 DISALLOW_COPY_AND_ASSIGN(NameDictionaryLookupStub); | 417 DISALLOW_COPY_AND_ASSIGN(NameDictionaryLookupStub); |
| 418 }; | 418 }; |
| 419 | 419 |
| 420 | 420 |
| 421 } } // namespace v8::internal | 421 } } // namespace v8::internal |
| 422 | 422 |
| 423 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 423 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |