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