OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_CODE_STUBS_ARM64_H_ | 5 #ifndef V8_ARM64_CODE_STUBS_ARM64_H_ |
6 #define V8_ARM64_CODE_STUBS_ARM64_H_ | 6 #define V8_ARM64_CODE_STUBS_ARM64_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 class StoreRegistersStateStub: public PlatformCodeStub { | 39 class StoreRegistersStateStub: public PlatformCodeStub { |
40 public: | 40 public: |
41 explicit StoreRegistersStateStub(Isolate* isolate) | 41 explicit StoreRegistersStateStub(Isolate* isolate) |
42 : PlatformCodeStub(isolate) {} | 42 : PlatformCodeStub(isolate) {} |
43 | 43 |
44 static Register to_be_pushed_lr() { return ip0; } | 44 static Register to_be_pushed_lr() { return ip0; } |
45 | 45 |
46 static void GenerateAheadOfTime(Isolate* isolate); | 46 static void GenerateAheadOfTime(Isolate* isolate); |
47 | 47 |
48 private: | 48 private: |
49 void Generate(MacroAssembler* masm); | 49 DEFINE_PLATFORM_CODE_STUB(StoreRegistersState, PlatformCodeStub); |
50 | |
51 DEFINE_CODE_STUB(StoreRegistersState, PlatformCodeStub); | |
52 }; | 50 }; |
53 | 51 |
54 | 52 |
55 class RestoreRegistersStateStub: public PlatformCodeStub { | 53 class RestoreRegistersStateStub: public PlatformCodeStub { |
56 public: | 54 public: |
57 explicit RestoreRegistersStateStub(Isolate* isolate) | 55 explicit RestoreRegistersStateStub(Isolate* isolate) |
58 : PlatformCodeStub(isolate) {} | 56 : PlatformCodeStub(isolate) {} |
59 | 57 |
60 static void GenerateAheadOfTime(Isolate* isolate); | 58 static void GenerateAheadOfTime(Isolate* isolate); |
61 | 59 |
62 private: | 60 private: |
63 void Generate(MacroAssembler* masm); | 61 DEFINE_PLATFORM_CODE_STUB(RestoreRegistersState, PlatformCodeStub); |
64 | |
65 DEFINE_CODE_STUB(RestoreRegistersState, PlatformCodeStub); | |
66 }; | 62 }; |
67 | 63 |
68 | 64 |
69 class RecordWriteStub: public PlatformCodeStub { | 65 class RecordWriteStub: public PlatformCodeStub { |
70 public: | 66 public: |
71 // Stub to record the write of 'value' at 'address' in 'object'. | 67 // Stub to record the write of 'value' at 'address' in 'object'. |
72 // Typically 'address' = 'object' + <some offset>. | 68 // Typically 'address' = 'object' + <some offset>. |
73 // See MacroAssembler::RecordWriteField() for example. | 69 // See MacroAssembler::RecordWriteField() for example. |
74 RecordWriteStub(Isolate* isolate, | 70 RecordWriteStub(Isolate* isolate, |
75 Register object, | 71 Register object, |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 friend class RecordWriteStub; | 267 friend class RecordWriteStub; |
272 }; | 268 }; |
273 | 269 |
274 enum OnNoNeedToInformIncrementalMarker { | 270 enum OnNoNeedToInformIncrementalMarker { |
275 kReturnOnNoNeedToInformIncrementalMarker, | 271 kReturnOnNoNeedToInformIncrementalMarker, |
276 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 272 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
277 }; | 273 }; |
278 | 274 |
279 virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } | 275 virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; } |
280 | 276 |
281 void Generate(MacroAssembler* masm); | 277 virtual void Generate(MacroAssembler* masm) OVERRIDE; |
282 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 278 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
283 void CheckNeedsToInformIncrementalMarker( | 279 void CheckNeedsToInformIncrementalMarker( |
284 MacroAssembler* masm, | 280 MacroAssembler* masm, |
285 OnNoNeedToInformIncrementalMarker on_no_need, | 281 OnNoNeedToInformIncrementalMarker on_no_need, |
286 Mode mode); | 282 Mode mode); |
287 void InformIncrementalMarker(MacroAssembler* masm); | 283 void InformIncrementalMarker(MacroAssembler* masm); |
288 | 284 |
289 void Activate(Code* code) { | 285 void Activate(Code* code) { |
290 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 286 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
291 } | 287 } |
(...skipping 27 matching lines...) Expand all Loading... |
319 Label slow_; | 315 Label slow_; |
320 RegisterAllocation regs_; | 316 RegisterAllocation regs_; |
321 }; | 317 }; |
322 | 318 |
323 | 319 |
324 // Helper to call C++ functions from generated code. The caller must prepare | 320 // Helper to call C++ functions from generated code. The caller must prepare |
325 // the exit frame before doing the call with GenerateCall. | 321 // the exit frame before doing the call with GenerateCall. |
326 class DirectCEntryStub: public PlatformCodeStub { | 322 class DirectCEntryStub: public PlatformCodeStub { |
327 public: | 323 public: |
328 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 324 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
329 void Generate(MacroAssembler* masm); | |
330 void GenerateCall(MacroAssembler* masm, Register target); | 325 void GenerateCall(MacroAssembler* masm, Register target); |
331 | 326 |
332 private: | 327 private: |
333 bool NeedsImmovableCode() { return true; } | 328 bool NeedsImmovableCode() { return true; } |
334 | 329 |
335 DEFINE_CODE_STUB(DirectCEntry, PlatformCodeStub); | 330 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); |
336 }; | 331 }; |
337 | 332 |
338 | 333 |
339 class NameDictionaryLookupStub: public PlatformCodeStub { | 334 class NameDictionaryLookupStub: public PlatformCodeStub { |
340 public: | 335 public: |
341 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 336 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
342 | 337 |
343 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) | 338 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) |
344 : PlatformCodeStub(isolate) { | 339 : PlatformCodeStub(isolate) { |
345 minor_key_ = LookupModeBits::encode(mode); | 340 minor_key_ = LookupModeBits::encode(mode); |
346 } | 341 } |
347 | 342 |
348 void Generate(MacroAssembler* masm); | |
349 | |
350 static void GenerateNegativeLookup(MacroAssembler* masm, | 343 static void GenerateNegativeLookup(MacroAssembler* masm, |
351 Label* miss, | 344 Label* miss, |
352 Label* done, | 345 Label* done, |
353 Register receiver, | 346 Register receiver, |
354 Register properties, | 347 Register properties, |
355 Handle<Name> name, | 348 Handle<Name> name, |
356 Register scratch0); | 349 Register scratch0); |
357 | 350 |
358 static void GeneratePositiveLookup(MacroAssembler* masm, | 351 static void GeneratePositiveLookup(MacroAssembler* masm, |
359 Label* miss, | 352 Label* miss, |
(...skipping 14 matching lines...) Expand all Loading... |
374 NameDictionary::kCapacityIndex * kPointerSize; | 367 NameDictionary::kCapacityIndex * kPointerSize; |
375 | 368 |
376 static const int kElementsStartOffset = | 369 static const int kElementsStartOffset = |
377 NameDictionary::kHeaderSize + | 370 NameDictionary::kHeaderSize + |
378 NameDictionary::kElementsStartIndex * kPointerSize; | 371 NameDictionary::kElementsStartIndex * kPointerSize; |
379 | 372 |
380 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 373 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
381 | 374 |
382 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 375 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
383 | 376 |
384 DEFINE_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 377 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
385 }; | 378 }; |
386 | 379 |
387 } } // namespace v8::internal | 380 } } // namespace v8::internal |
388 | 381 |
389 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ | 382 #endif // V8_ARM64_CODE_STUBS_ARM64_H_ |
OLD | NEW |