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

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

Issue 246643014: CodeStubs contain their corresponding Isolate* now. (part 1) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback. Rebased. Created 6 years, 8 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/ia32/builtins-ia32.cc ('k') | src/ia32/code-stubs-ia32.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 namespace internal { 35 namespace internal {
36 36
37 37
38 void ArrayNativeCode(MacroAssembler* masm, 38 void ArrayNativeCode(MacroAssembler* masm,
39 bool construct_call, 39 bool construct_call,
40 Label* call_generic_code); 40 Label* call_generic_code);
41 41
42 42
43 class StoreBufferOverflowStub: public PlatformCodeStub { 43 class StoreBufferOverflowStub: public PlatformCodeStub {
44 public: 44 public:
45 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) 45 StoreBufferOverflowStub(Isolate* isolate, SaveFPRegsMode save_fp)
46 : save_doubles_(save_fp) { 46 : PlatformCodeStub(isolate), save_doubles_(save_fp) {
47 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || save_fp == kDontSaveFPRegs); 47 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || save_fp == kDontSaveFPRegs);
48 } 48 }
49 49
50 void Generate(MacroAssembler* masm); 50 void Generate(MacroAssembler* masm);
51 51
52 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); 52 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
53 virtual bool SometimesSetsUpAFrame() { return false; } 53 virtual bool SometimesSetsUpAFrame() { return false; }
54 54
55 private: 55 private:
56 SaveFPRegsMode save_doubles_; 56 SaveFPRegsMode save_doubles_;
(...skipping 28 matching lines...) Expand all
85 Register hash, 85 Register hash,
86 Register scratch); 86 Register scratch);
87 87
88 private: 88 private:
89 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); 89 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper);
90 }; 90 };
91 91
92 92
93 class SubStringStub: public PlatformCodeStub { 93 class SubStringStub: public PlatformCodeStub {
94 public: 94 public:
95 SubStringStub() {} 95 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
96 96
97 private: 97 private:
98 Major MajorKey() { return SubString; } 98 Major MajorKey() { return SubString; }
99 int MinorKey() { return 0; } 99 int MinorKey() { return 0; }
100 100
101 void Generate(MacroAssembler* masm); 101 void Generate(MacroAssembler* masm);
102 }; 102 };
103 103
104 104
105 class StringCompareStub: public PlatformCodeStub { 105 class StringCompareStub: public PlatformCodeStub {
106 public: 106 public:
107 StringCompareStub() { } 107 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
108 108
109 // Compares two flat ASCII strings and returns result in eax. 109 // Compares two flat ASCII strings and returns result in eax.
110 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, 110 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
111 Register left, 111 Register left,
112 Register right, 112 Register right,
113 Register scratch1, 113 Register scratch1,
114 Register scratch2, 114 Register scratch2,
115 Register scratch3); 115 Register scratch3);
116 116
117 // Compares two flat ASCII strings for equality and returns result 117 // Compares two flat ASCII strings for equality and returns result
(...skipping 17 matching lines...) Expand all
135 Register scratch, 135 Register scratch,
136 Label* chars_not_equal, 136 Label* chars_not_equal,
137 Label::Distance chars_not_equal_near = Label::kFar); 137 Label::Distance chars_not_equal_near = Label::kFar);
138 }; 138 };
139 139
140 140
141 class NameDictionaryLookupStub: public PlatformCodeStub { 141 class NameDictionaryLookupStub: public PlatformCodeStub {
142 public: 142 public:
143 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; 143 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
144 144
145 NameDictionaryLookupStub(Register dictionary, 145 NameDictionaryLookupStub(Isolate* isolate,
146 Register dictionary,
146 Register result, 147 Register result,
147 Register index, 148 Register index,
148 LookupMode mode) 149 LookupMode mode)
149 : dictionary_(dictionary), result_(result), index_(index), mode_(mode) { } 150 : PlatformCodeStub(isolate),
151 dictionary_(dictionary), result_(result), index_(index), mode_(mode) { }
150 152
151 void Generate(MacroAssembler* masm); 153 void Generate(MacroAssembler* masm);
152 154
153 static void GenerateNegativeLookup(MacroAssembler* masm, 155 static void GenerateNegativeLookup(MacroAssembler* masm,
154 Label* miss, 156 Label* miss,
155 Label* done, 157 Label* done,
156 Register properties, 158 Register properties,
157 Handle<Name> name, 159 Handle<Name> name,
158 Register r0); 160 Register r0);
159 161
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 197
196 Register dictionary_; 198 Register dictionary_;
197 Register result_; 199 Register result_;
198 Register index_; 200 Register index_;
199 LookupMode mode_; 201 LookupMode mode_;
200 }; 202 };
201 203
202 204
203 class RecordWriteStub: public PlatformCodeStub { 205 class RecordWriteStub: public PlatformCodeStub {
204 public: 206 public:
205 RecordWriteStub(Register object, 207 RecordWriteStub(Isolate* isolate,
208 Register object,
206 Register value, 209 Register value,
207 Register address, 210 Register address,
208 RememberedSetAction remembered_set_action, 211 RememberedSetAction remembered_set_action,
209 SaveFPRegsMode fp_mode) 212 SaveFPRegsMode fp_mode)
210 : object_(object), 213 : PlatformCodeStub(isolate),
214 object_(object),
211 value_(value), 215 value_(value),
212 address_(address), 216 address_(address),
213 remembered_set_action_(remembered_set_action), 217 remembered_set_action_(remembered_set_action),
214 save_fp_regs_mode_(fp_mode), 218 save_fp_regs_mode_(fp_mode),
215 regs_(object, // An input reg. 219 regs_(object, // An input reg.
216 address, // An input reg. 220 address, // An input reg.
217 value) { // One scratch reg. 221 value) { // One scratch reg.
218 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || fp_mode == kDontSaveFPRegs); 222 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || fp_mode == kDontSaveFPRegs);
219 } 223 }
220 224
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 Register address_; 458 Register address_;
455 RememberedSetAction remembered_set_action_; 459 RememberedSetAction remembered_set_action_;
456 SaveFPRegsMode save_fp_regs_mode_; 460 SaveFPRegsMode save_fp_regs_mode_;
457 RegisterAllocation regs_; 461 RegisterAllocation regs_;
458 }; 462 };
459 463
460 464
461 } } // namespace v8::internal 465 } } // namespace v8::internal
462 466
463 #endif // V8_IA32_CODE_STUBS_IA32_H_ 467 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698