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

Side by Side Diff: src/safepoint-table.h

Issue 10443114: Progress towards making Zones independent of Isolates and Threads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits and rebase on current bleeding_edge Created 8 years, 6 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/runtime.cc ('k') | src/splay-tree.h » ('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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } Kind; 176 } Kind;
177 177
178 enum DeoptMode { 178 enum DeoptMode {
179 kNoLazyDeopt, 179 kNoLazyDeopt,
180 kLazyDeopt 180 kLazyDeopt
181 }; 181 };
182 182
183 static const int kNoDeoptimizationIndex = 183 static const int kNoDeoptimizationIndex =
184 (1 << (SafepointEntry::kDeoptIndexBits)) - 1; 184 (1 << (SafepointEntry::kDeoptIndexBits)) - 1;
185 185
186 void DefinePointerSlot(int index) { indexes_->Add(index); } 186 void DefinePointerSlot(int index, Zone* zone) { indexes_->Add(index, zone); }
187 void DefinePointerRegister(Register reg); 187 void DefinePointerRegister(Register reg);
188 188
189 private: 189 private:
190 Safepoint(ZoneList<int>* indexes, ZoneList<int>* registers) : 190 Safepoint(ZoneList<int>* indexes, ZoneList<int>* registers) :
191 indexes_(indexes), registers_(registers) { } 191 indexes_(indexes), registers_(registers) { }
192 ZoneList<int>* indexes_; 192 ZoneList<int>* indexes_;
193 ZoneList<int>* registers_; 193 ZoneList<int>* registers_;
194 194
195 friend class SafepointTableBuilder; 195 friend class SafepointTableBuilder;
196 }; 196 };
197 197
198 198
199 class SafepointTableBuilder BASE_EMBEDDED { 199 class SafepointTableBuilder BASE_EMBEDDED {
200 public: 200 public:
201 SafepointTableBuilder() 201 explicit SafepointTableBuilder(Zone* zone)
202 : deoptimization_info_(32), 202 : deoptimization_info_(32, zone),
203 deopt_index_list_(32), 203 deopt_index_list_(32, zone),
204 indexes_(32), 204 indexes_(32, zone),
205 registers_(32), 205 registers_(32, zone),
206 emitted_(false), 206 emitted_(false),
207 last_lazy_safepoint_(0) { } 207 last_lazy_safepoint_(0),
208 zone_(zone) { }
208 209
209 // Get the offset of the emitted safepoint table in the code. 210 // Get the offset of the emitted safepoint table in the code.
210 unsigned GetCodeOffset() const; 211 unsigned GetCodeOffset() const;
211 212
212 // Define a new safepoint for the current position in the body. 213 // Define a new safepoint for the current position in the body.
213 Safepoint DefineSafepoint(Assembler* assembler, 214 Safepoint DefineSafepoint(Assembler* assembler,
214 Safepoint::Kind kind, 215 Safepoint::Kind kind,
215 int arguments, 216 int arguments,
216 Safepoint::DeoptMode mode); 217 Safepoint::DeoptMode mode);
217 218
(...skipping 17 matching lines...) Expand all
235 236
236 ZoneList<DeoptimizationInfo> deoptimization_info_; 237 ZoneList<DeoptimizationInfo> deoptimization_info_;
237 ZoneList<unsigned> deopt_index_list_; 238 ZoneList<unsigned> deopt_index_list_;
238 ZoneList<ZoneList<int>*> indexes_; 239 ZoneList<ZoneList<int>*> indexes_;
239 ZoneList<ZoneList<int>*> registers_; 240 ZoneList<ZoneList<int>*> registers_;
240 241
241 unsigned offset_; 242 unsigned offset_;
242 bool emitted_; 243 bool emitted_;
243 int last_lazy_safepoint_; 244 int last_lazy_safepoint_;
244 245
246 Zone* zone_;
247
245 DISALLOW_COPY_AND_ASSIGN(SafepointTableBuilder); 248 DISALLOW_COPY_AND_ASSIGN(SafepointTableBuilder);
246 }; 249 };
247 250
248 } } // namespace v8::internal 251 } } // namespace v8::internal
249 252
250 #endif // V8_SAFEPOINT_TABLE_H_ 253 #endif // V8_SAFEPOINT_TABLE_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/splay-tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698