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

Side by Side Diff: src/x64/code-stubs-x64.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/x64/builtins-x64.cc ('k') | src/x64/code-stubs-x64.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 20 matching lines...) Expand all
31 #include "ic-inl.h" 31 #include "ic-inl.h"
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 36
37 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); 37 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
38 38
39 class StoreBufferOverflowStub: public PlatformCodeStub { 39 class StoreBufferOverflowStub: public PlatformCodeStub {
40 public: 40 public:
41 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) 41 StoreBufferOverflowStub(Isolate* isolate, SaveFPRegsMode save_fp)
42 : save_doubles_(save_fp) { } 42 : PlatformCodeStub(isolate), save_doubles_(save_fp) { }
43 43
44 void Generate(MacroAssembler* masm); 44 void Generate(MacroAssembler* masm);
45 45
46 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); 46 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
47 virtual bool SometimesSetsUpAFrame() { return false; } 47 virtual bool SometimesSetsUpAFrame() { return false; }
48 48
49 private: 49 private:
50 SaveFPRegsMode save_doubles_; 50 SaveFPRegsMode save_doubles_;
51 51
52 Major MajorKey() { return StoreBufferOverflow; } 52 Major MajorKey() { return StoreBufferOverflow; }
(...skipping 26 matching lines...) Expand all
79 Register hash, 79 Register hash,
80 Register scratch); 80 Register scratch);
81 81
82 private: 82 private:
83 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); 83 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper);
84 }; 84 };
85 85
86 86
87 class SubStringStub: public PlatformCodeStub { 87 class SubStringStub: public PlatformCodeStub {
88 public: 88 public:
89 SubStringStub() {} 89 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
90 90
91 private: 91 private:
92 Major MajorKey() { return SubString; } 92 Major MajorKey() { return SubString; }
93 int MinorKey() { return 0; } 93 int MinorKey() { return 0; }
94 94
95 void Generate(MacroAssembler* masm); 95 void Generate(MacroAssembler* masm);
96 }; 96 };
97 97
98 98
99 class StringCompareStub: public PlatformCodeStub { 99 class StringCompareStub: public PlatformCodeStub {
100 public: 100 public:
101 StringCompareStub() {} 101 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
102 102
103 // Compares two flat ASCII strings and returns result in rax. 103 // Compares two flat ASCII strings and returns result in rax.
104 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, 104 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
105 Register left, 105 Register left,
106 Register right, 106 Register right,
107 Register scratch1, 107 Register scratch1,
108 Register scratch2, 108 Register scratch2,
109 Register scratch3, 109 Register scratch3,
110 Register scratch4); 110 Register scratch4);
111 111
(...skipping 18 matching lines...) Expand all
130 Register scratch, 130 Register scratch,
131 Label* chars_not_equal, 131 Label* chars_not_equal,
132 Label::Distance near_jump = Label::kFar); 132 Label::Distance near_jump = Label::kFar);
133 }; 133 };
134 134
135 135
136 class NameDictionaryLookupStub: public PlatformCodeStub { 136 class NameDictionaryLookupStub: public PlatformCodeStub {
137 public: 137 public:
138 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; 138 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
139 139
140 NameDictionaryLookupStub(Register dictionary, 140 NameDictionaryLookupStub(Isolate* isolate,
141 Register dictionary,
141 Register result, 142 Register result,
142 Register index, 143 Register index,
143 LookupMode mode) 144 LookupMode mode)
144 : dictionary_(dictionary), result_(result), index_(index), mode_(mode) { } 145 : PlatformCodeStub(isolate),
146 dictionary_(dictionary),
147 result_(result),
148 index_(index),
149 mode_(mode) { }
145 150
146 void Generate(MacroAssembler* masm); 151 void Generate(MacroAssembler* masm);
147 152
148 static void GenerateNegativeLookup(MacroAssembler* masm, 153 static void GenerateNegativeLookup(MacroAssembler* masm,
149 Label* miss, 154 Label* miss,
150 Label* done, 155 Label* done,
151 Register properties, 156 Register properties,
152 Handle<Name> name, 157 Handle<Name> name,
153 Register r0); 158 Register r0);
154 159
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 195
191 Register dictionary_; 196 Register dictionary_;
192 Register result_; 197 Register result_;
193 Register index_; 198 Register index_;
194 LookupMode mode_; 199 LookupMode mode_;
195 }; 200 };
196 201
197 202
198 class RecordWriteStub: public PlatformCodeStub { 203 class RecordWriteStub: public PlatformCodeStub {
199 public: 204 public:
200 RecordWriteStub(Register object, 205 RecordWriteStub(Isolate* isolate,
206 Register object,
201 Register value, 207 Register value,
202 Register address, 208 Register address,
203 RememberedSetAction remembered_set_action, 209 RememberedSetAction remembered_set_action,
204 SaveFPRegsMode fp_mode) 210 SaveFPRegsMode fp_mode)
205 : object_(object), 211 : PlatformCodeStub(isolate),
212 object_(object),
206 value_(value), 213 value_(value),
207 address_(address), 214 address_(address),
208 remembered_set_action_(remembered_set_action), 215 remembered_set_action_(remembered_set_action),
209 save_fp_regs_mode_(fp_mode), 216 save_fp_regs_mode_(fp_mode),
210 regs_(object, // An input reg. 217 regs_(object, // An input reg.
211 address, // An input reg. 218 address, // An input reg.
212 value) { // One scratch reg. 219 value) { // One scratch reg.
213 } 220 }
214 221
215 enum Mode { 222 enum Mode {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 RememberedSetAction remembered_set_action_; 436 RememberedSetAction remembered_set_action_;
430 SaveFPRegsMode save_fp_regs_mode_; 437 SaveFPRegsMode save_fp_regs_mode_;
431 Label slow_; 438 Label slow_;
432 RegisterAllocation regs_; 439 RegisterAllocation regs_;
433 }; 440 };
434 441
435 442
436 } } // namespace v8::internal 443 } } // namespace v8::internal
437 444
438 #endif // V8_X64_CODE_STUBS_X64_H_ 445 #endif // V8_X64_CODE_STUBS_X64_H_
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698