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

Side by Side Diff: src/x87/code-stubs-x87.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 | « src/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.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 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_X87_CODE_STUBS_X87_H_ 5 #ifndef V8_X87_CODE_STUBS_X87_H_
6 #define V8_X87_CODE_STUBS_X87_H_ 6 #define V8_X87_CODE_STUBS_X87_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 explicit StoreBufferOverflowStub(Isolate* isolate) 21 explicit StoreBufferOverflowStub(Isolate* isolate)
22 : PlatformCodeStub(isolate) { } 22 : PlatformCodeStub(isolate) { }
23 23
24 void Generate(MacroAssembler* masm); 24 void Generate(MacroAssembler* masm);
25 25
26 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); 26 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
27 virtual bool SometimesSetsUpAFrame() { return false; } 27 virtual bool SometimesSetsUpAFrame() { return false; }
28 28
29 private: 29 private:
30 Major MajorKey() const { return StoreBufferOverflow; } 30 Major MajorKey() const { return StoreBufferOverflow; }
31 int MinorKey() const { return 0; } 31 uint32_t MinorKey() const { return 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 characters using the rep movs instruction. 37 // Generate code for copying characters using the rep movs instruction.
38 // Copies ecx characters from esi to edi. Copying of overlapping regions is 38 // Copies ecx characters from esi to edi. Copying of overlapping regions is
39 // not supported. 39 // not supported.
40 static void GenerateCopyCharacters(MacroAssembler* masm, 40 static void GenerateCopyCharacters(MacroAssembler* masm,
41 Register dest, 41 Register dest,
(...skipping 19 matching lines...) Expand all
61 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); 61 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper);
62 }; 62 };
63 63
64 64
65 class SubStringStub: public PlatformCodeStub { 65 class SubStringStub: public PlatformCodeStub {
66 public: 66 public:
67 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 67 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
68 68
69 private: 69 private:
70 Major MajorKey() const { return SubString; } 70 Major MajorKey() const { return SubString; }
71 int MinorKey() const { return 0; } 71 uint32_t MinorKey() const { return 0; }
72 72
73 void Generate(MacroAssembler* masm); 73 void Generate(MacroAssembler* masm);
74 }; 74 };
75 75
76 76
77 class StringCompareStub: public PlatformCodeStub { 77 class StringCompareStub: public PlatformCodeStub {
78 public: 78 public:
79 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) { } 79 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
80 80
81 // Compares two flat ASCII strings and returns result in eax. 81 // Compares two flat ASCII strings and returns result in eax.
82 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, 82 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
83 Register left, 83 Register left,
84 Register right, 84 Register right,
85 Register scratch1, 85 Register scratch1,
86 Register scratch2, 86 Register scratch2,
87 Register scratch3); 87 Register scratch3);
88 88
89 // Compares two flat ASCII strings for equality and returns result 89 // Compares two flat ASCII strings for equality and returns result
90 // in eax. 90 // in eax.
91 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, 91 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm,
92 Register left, 92 Register left,
93 Register right, 93 Register right,
94 Register scratch1, 94 Register scratch1,
95 Register scratch2); 95 Register scratch2);
96 96
97 private: 97 private:
98 virtual Major MajorKey() const { return StringCompare; } 98 virtual Major MajorKey() const { return StringCompare; }
99 virtual int MinorKey() const { return 0; } 99 virtual uint32_t MinorKey() const { return 0; }
100 virtual void Generate(MacroAssembler* masm); 100 virtual void Generate(MacroAssembler* masm);
101 101
102 static void GenerateAsciiCharsCompareLoop( 102 static void GenerateAsciiCharsCompareLoop(
103 MacroAssembler* masm, 103 MacroAssembler* masm,
104 Register left, 104 Register left,
105 Register right, 105 Register right,
106 Register length, 106 Register length,
107 Register scratch, 107 Register scratch,
108 Label* chars_not_equal, 108 Label* chars_not_equal,
109 Label::Distance chars_not_equal_near = Label::kFar); 109 Label::Distance chars_not_equal_near = Label::kFar);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 static const int kCapacityOffset = 148 static const int kCapacityOffset =
149 NameDictionary::kHeaderSize + 149 NameDictionary::kHeaderSize +
150 NameDictionary::kCapacityIndex * kPointerSize; 150 NameDictionary::kCapacityIndex * kPointerSize;
151 151
152 static const int kElementsStartOffset = 152 static const int kElementsStartOffset =
153 NameDictionary::kHeaderSize + 153 NameDictionary::kHeaderSize +
154 NameDictionary::kElementsStartIndex * kPointerSize; 154 NameDictionary::kElementsStartIndex * kPointerSize;
155 155
156 Major MajorKey() const { return NameDictionaryLookup; } 156 Major MajorKey() const { return NameDictionaryLookup; }
157 157
158 int MinorKey() const { 158 uint32_t MinorKey() const {
159 return DictionaryBits::encode(dictionary_.code()) | 159 return DictionaryBits::encode(dictionary_.code()) |
160 ResultBits::encode(result_.code()) | 160 ResultBits::encode(result_.code()) |
161 IndexBits::encode(index_.code()) | 161 IndexBits::encode(index_.code()) |
162 LookupModeBits::encode(mode_); 162 LookupModeBits::encode(mode_);
163 } 163 }
164 164
165 class DictionaryBits: public BitField<int, 0, 3> {}; 165 class DictionaryBits: public BitField<int, 0, 3> {};
166 class ResultBits: public BitField<int, 3, 3> {}; 166 class ResultBits: public BitField<int, 3, 3> {};
167 class IndexBits: public BitField<int, 6, 3> {}; 167 class IndexBits: public BitField<int, 6, 3> {};
168 class LookupModeBits: public BitField<LookupMode, 9, 1> {}; 168 class LookupModeBits: public BitField<LookupMode, 9, 1> {};
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 void Generate(MacroAssembler* masm); 376 void Generate(MacroAssembler* masm);
377 void GenerateIncremental(MacroAssembler* masm, Mode mode); 377 void GenerateIncremental(MacroAssembler* masm, Mode mode);
378 void CheckNeedsToInformIncrementalMarker( 378 void CheckNeedsToInformIncrementalMarker(
379 MacroAssembler* masm, 379 MacroAssembler* masm,
380 OnNoNeedToInformIncrementalMarker on_no_need, 380 OnNoNeedToInformIncrementalMarker on_no_need,
381 Mode mode); 381 Mode mode);
382 void InformIncrementalMarker(MacroAssembler* masm); 382 void InformIncrementalMarker(MacroAssembler* masm);
383 383
384 Major MajorKey() const { return RecordWrite; } 384 Major MajorKey() const { return RecordWrite; }
385 385
386 int MinorKey() const { 386 uint32_t MinorKey() const {
387 return ObjectBits::encode(object_.code()) | 387 return ObjectBits::encode(object_.code()) |
388 ValueBits::encode(value_.code()) | 388 ValueBits::encode(value_.code()) |
389 AddressBits::encode(address_.code()) | 389 AddressBits::encode(address_.code()) |
390 RememberedSetActionBits::encode(remembered_set_action_); 390 RememberedSetActionBits::encode(remembered_set_action_);
391 } 391 }
392 392
393 void Activate(Code* code) { 393 void Activate(Code* code) {
394 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); 394 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
395 } 395 }
396 396
397 class ObjectBits: public BitField<int, 0, 3> {}; 397 class ObjectBits: public BitField<int, 0, 3> {};
398 class ValueBits: public BitField<int, 3, 3> {}; 398 class ValueBits: public BitField<int, 3, 3> {};
399 class AddressBits: public BitField<int, 6, 3> {}; 399 class AddressBits: public BitField<int, 6, 3> {};
400 class RememberedSetActionBits: public BitField<RememberedSetAction, 9, 1> {}; 400 class RememberedSetActionBits: public BitField<RememberedSetAction, 9, 1> {};
401 401
402 Register object_; 402 Register object_;
403 Register value_; 403 Register value_;
404 Register address_; 404 Register address_;
405 RememberedSetAction remembered_set_action_; 405 RememberedSetAction remembered_set_action_;
406 RegisterAllocation regs_; 406 RegisterAllocation regs_;
407 }; 407 };
408 408
409 409
410 } } // namespace v8::internal 410 } } // namespace v8::internal
411 411
412 #endif // V8_X87_CODE_STUBS_X87_H_ 412 #endif // V8_X87_CODE_STUBS_X87_H_
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698