Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: src/arm/code-stubs-arm.h

Issue 502713003: Encode CEntryStub properties in the minor key. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: encode Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM_CODE_STUBS_ARM_H_ 5 #ifndef V8_ARM_CODE_STUBS_ARM_H_
6 #define V8_ARM_CODE_STUBS_ARM_H_ 6 #define V8_ARM_CODE_STUBS_ARM_H_
7 7
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 10 matching lines...) Expand all
21 21
22 void Generate(MacroAssembler* masm); 22 void Generate(MacroAssembler* masm);
23 23
24 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); 24 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
25 virtual bool SometimesSetsUpAFrame() { return false; } 25 virtual bool SometimesSetsUpAFrame() { return false; }
26 26
27 private: 27 private:
28 SaveFPRegsMode save_doubles_; 28 SaveFPRegsMode save_doubles_;
29 29
30 Major MajorKey() const { return StoreBufferOverflow; } 30 Major MajorKey() const { return StoreBufferOverflow; }
31 int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } 31 uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
32 }; 32 };
33 33
34 34
35 class StringHelper : public AllStatic { 35 class StringHelper : public AllStatic {
36 public: 36 public:
37 // Generate code for copying a large number of characters. This function 37 // Generate code for copying a large number of characters. This function
38 // is allowed to spend extra time setting up conditions to make copying 38 // is allowed to spend extra time setting up conditions to make copying
39 // faster. Copying of overlapping regions is not supported. 39 // faster. Copying of overlapping regions is not supported.
40 // Dest register ends at the position after the last character written. 40 // Dest register ends at the position after the last character written.
41 static void GenerateCopyCharacters(MacroAssembler* masm, 41 static void GenerateCopyCharacters(MacroAssembler* masm,
(...skipping 20 matching lines...) Expand all
62 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); 62 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper);
63 }; 63 };
64 64
65 65
66 class SubStringStub: public PlatformCodeStub { 66 class SubStringStub: public PlatformCodeStub {
67 public: 67 public:
68 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 68 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
69 69
70 private: 70 private:
71 Major MajorKey() const { return SubString; } 71 Major MajorKey() const { return SubString; }
72 int MinorKey() const { return 0; } 72 uint32_t MinorKey() const { return 0; }
73 73
74 void Generate(MacroAssembler* masm); 74 void Generate(MacroAssembler* masm);
75 }; 75 };
76 76
77 77
78 78
79 class StringCompareStub: public PlatformCodeStub { 79 class StringCompareStub: public PlatformCodeStub {
80 public: 80 public:
81 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) { } 81 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
82 82
(...skipping 10 matching lines...) Expand all
93 // in r0. 93 // in r0.
94 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, 94 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm,
95 Register left, 95 Register left,
96 Register right, 96 Register right,
97 Register scratch1, 97 Register scratch1,
98 Register scratch2, 98 Register scratch2,
99 Register scratch3); 99 Register scratch3);
100 100
101 private: 101 private:
102 virtual Major MajorKey() const { return StringCompare; } 102 virtual Major MajorKey() const { return StringCompare; }
103 virtual int MinorKey() const { return 0; } 103 virtual uint32_t MinorKey() const { return 0; }
104 virtual void Generate(MacroAssembler* masm); 104 virtual void Generate(MacroAssembler* masm);
105 105
106 static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm, 106 static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
107 Register left, 107 Register left,
108 Register right, 108 Register right,
109 Register length, 109 Register length,
110 Register scratch1, 110 Register scratch1,
111 Register scratch2, 111 Register scratch2,
112 Label* chars_not_equal); 112 Label* chars_not_equal);
113 }; 113 };
(...skipping 19 matching lines...) Expand all
133 Register the_int_; 133 Register the_int_;
134 Register the_heap_number_; 134 Register the_heap_number_;
135 Register scratch_; 135 Register scratch_;
136 136
137 // Minor key encoding in 16 bits. 137 // Minor key encoding in 16 bits.
138 class IntRegisterBits: public BitField<int, 0, 4> {}; 138 class IntRegisterBits: public BitField<int, 0, 4> {};
139 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; 139 class HeapNumberRegisterBits: public BitField<int, 4, 4> {};
140 class ScratchRegisterBits: public BitField<int, 8, 4> {}; 140 class ScratchRegisterBits: public BitField<int, 8, 4> {};
141 141
142 Major MajorKey() const { return WriteInt32ToHeapNumber; } 142 Major MajorKey() const { return WriteInt32ToHeapNumber; }
143 int MinorKey() const { 143 uint32_t MinorKey() const {
144 // Encode the parameters in a unique 16 bit value. 144 // Encode the parameters in a unique 16 bit value.
145 return IntRegisterBits::encode(the_int_.code()) 145 return IntRegisterBits::encode(the_int_.code())
146 | HeapNumberRegisterBits::encode(the_heap_number_.code()) 146 | HeapNumberRegisterBits::encode(the_heap_number_.code())
147 | ScratchRegisterBits::encode(scratch_.code()); 147 | ScratchRegisterBits::encode(scratch_.code());
148 } 148 }
149 149
150 void Generate(MacroAssembler* masm); 150 void Generate(MacroAssembler* masm);
151 }; 151 };
152 152
153 153
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 void Generate(MacroAssembler* masm); 300 void Generate(MacroAssembler* masm);
301 void GenerateIncremental(MacroAssembler* masm, Mode mode); 301 void GenerateIncremental(MacroAssembler* masm, Mode mode);
302 void CheckNeedsToInformIncrementalMarker( 302 void CheckNeedsToInformIncrementalMarker(
303 MacroAssembler* masm, 303 MacroAssembler* masm,
304 OnNoNeedToInformIncrementalMarker on_no_need, 304 OnNoNeedToInformIncrementalMarker on_no_need,
305 Mode mode); 305 Mode mode);
306 void InformIncrementalMarker(MacroAssembler* masm); 306 void InformIncrementalMarker(MacroAssembler* masm);
307 307
308 Major MajorKey() const { return RecordWrite; } 308 Major MajorKey() const { return RecordWrite; }
309 309
310 int MinorKey() const { 310 uint32_t MinorKey() const {
311 return ObjectBits::encode(object_.code()) | 311 return ObjectBits::encode(object_.code()) |
312 ValueBits::encode(value_.code()) | 312 ValueBits::encode(value_.code()) |
313 AddressBits::encode(address_.code()) | 313 AddressBits::encode(address_.code()) |
314 RememberedSetActionBits::encode(remembered_set_action_) | 314 RememberedSetActionBits::encode(remembered_set_action_) |
315 SaveFPRegsModeBits::encode(save_fp_regs_mode_); 315 SaveFPRegsModeBits::encode(save_fp_regs_mode_);
316 } 316 }
317 317
318 void Activate(Code* code) { 318 void Activate(Code* code) {
319 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); 319 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
320 } 320 }
(...skipping 20 matching lines...) Expand all
341 // simplest approach is to generate such stub early enough so it can never be 341 // simplest approach is to generate such stub early enough so it can never be
342 // moved by GC 342 // moved by GC
343 class DirectCEntryStub: public PlatformCodeStub { 343 class DirectCEntryStub: public PlatformCodeStub {
344 public: 344 public:
345 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 345 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
346 void Generate(MacroAssembler* masm); 346 void Generate(MacroAssembler* masm);
347 void GenerateCall(MacroAssembler* masm, Register target); 347 void GenerateCall(MacroAssembler* masm, Register target);
348 348
349 private: 349 private:
350 Major MajorKey() const { return DirectCEntry; } 350 Major MajorKey() const { return DirectCEntry; }
351 int MinorKey() const { return 0; } 351 uint32_t MinorKey() const { return 0; }
352 352
353 bool NeedsImmovableCode() { return true; } 353 bool NeedsImmovableCode() { return true; }
354 }; 354 };
355 355
356 356
357 class NameDictionaryLookupStub: public PlatformCodeStub { 357 class NameDictionaryLookupStub: public PlatformCodeStub {
358 public: 358 public:
359 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; 359 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
360 360
361 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) 361 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode)
(...skipping 26 matching lines...) Expand all
388 static const int kCapacityOffset = 388 static const int kCapacityOffset =
389 NameDictionary::kHeaderSize + 389 NameDictionary::kHeaderSize +
390 NameDictionary::kCapacityIndex * kPointerSize; 390 NameDictionary::kCapacityIndex * kPointerSize;
391 391
392 static const int kElementsStartOffset = 392 static const int kElementsStartOffset =
393 NameDictionary::kHeaderSize + 393 NameDictionary::kHeaderSize +
394 NameDictionary::kElementsStartIndex * kPointerSize; 394 NameDictionary::kElementsStartIndex * kPointerSize;
395 395
396 Major MajorKey() const { return NameDictionaryLookup; } 396 Major MajorKey() const { return NameDictionaryLookup; }
397 397
398 int MinorKey() const { return LookupModeBits::encode(mode_); } 398 uint32_t MinorKey() const { return LookupModeBits::encode(mode_); }
399 399
400 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 400 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
401 401
402 LookupMode mode_; 402 LookupMode mode_;
403 }; 403 };
404 404
405 405
406 class PlatformInterfaceDescriptor { 406 class PlatformInterfaceDescriptor {
407 public: 407 public:
408 explicit PlatformInterfaceDescriptor( 408 explicit PlatformInterfaceDescriptor(
409 TargetAddressStorageMode storage_mode) 409 TargetAddressStorageMode storage_mode)
410 : storage_mode_(storage_mode) { } 410 : storage_mode_(storage_mode) { }
411 411
412 TargetAddressStorageMode storage_mode() { return storage_mode_; } 412 TargetAddressStorageMode storage_mode() { return storage_mode_; }
413 413
414 private: 414 private:
415 TargetAddressStorageMode storage_mode_; 415 TargetAddressStorageMode storage_mode_;
416 }; 416 };
417 417
418 418
419 } } // namespace v8::internal 419 } } // namespace v8::internal
420 420
421 #endif // V8_ARM_CODE_STUBS_ARM_H_ 421 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698