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

Side by Side Diff: src/crankshaft/x64/lithium-x64.h

Issue 1780043004: [crankshaft] Fixing ES6 tail call elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ignition crash is not related to TCE, issue number updated Created 4 years, 9 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
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_CRANKSHAFT_X64_LITHIUM_X64_H_ 5 #ifndef V8_CRANKSHAFT_X64_LITHIUM_X64_H_
6 #define V8_CRANKSHAFT_X64_LITHIUM_X64_H_ 6 #define V8_CRANKSHAFT_X64_LITHIUM_X64_H_
7 7
8 #include "src/crankshaft/hydrogen.h" 8 #include "src/crankshaft/hydrogen.h"
9 #include "src/crankshaft/lithium.h" 9 #include "src/crankshaft/lithium.h"
10 #include "src/crankshaft/lithium-allocator.h" 10 #include "src/crankshaft/lithium-allocator.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 214 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
215 LPointerMap* pointer_map() const { return pointer_map_.get(); } 215 LPointerMap* pointer_map() const { return pointer_map_.get(); }
216 bool HasPointerMap() const { return pointer_map_.is_set(); } 216 bool HasPointerMap() const { return pointer_map_.is_set(); }
217 217
218 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 218 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
219 HValue* hydrogen_value() const { return hydrogen_value_; } 219 HValue* hydrogen_value() const { return hydrogen_value_; }
220 220
221 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 221 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
222 bool IsCall() const { return IsCallBits::decode(bit_field_); } 222 bool IsCall() const { return IsCallBits::decode(bit_field_); }
223 223
224 void MarkAsTailCall() {
225 bit_field_ = IsTailCallBits::update(bit_field_, true);
226 }
227 bool IsTailCall() const { return IsTailCallBits::decode(bit_field_); }
228
224 // Interface to the register allocator and iterators. 229 // Interface to the register allocator and iterators.
225 bool ClobbersTemps() const { return IsCall(); } 230 bool ClobbersTemps() const { return IsCall(); }
226 bool ClobbersRegisters() const { return IsCall(); } 231 bool ClobbersRegisters() const { return IsCall(); }
227 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { 232 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const {
228 return IsCall(); 233 return IsCall();
229 } 234 }
230 235
231 // Interface to the register allocator and iterators. 236 // Interface to the register allocator and iterators.
232 bool IsMarkedAsCall() const { return IsCall(); } 237 bool IsMarkedAsCall() const { return IsCall(); }
233 238
(...skipping 18 matching lines...) Expand all
252 257
253 private: 258 private:
254 // Iterator support. 259 // Iterator support.
255 friend class InputIterator; 260 friend class InputIterator;
256 261
257 friend class TempIterator; 262 friend class TempIterator;
258 virtual int TempCount() = 0; 263 virtual int TempCount() = 0;
259 virtual LOperand* TempAt(int i) = 0; 264 virtual LOperand* TempAt(int i) = 0;
260 265
261 class IsCallBits: public BitField<bool, 0, 1> {}; 266 class IsCallBits: public BitField<bool, 0, 1> {};
267 class IsTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {};
262 268
263 LEnvironment* environment_; 269 LEnvironment* environment_;
264 SetOncePointer<LPointerMap> pointer_map_; 270 SetOncePointer<LPointerMap> pointer_map_;
265 HValue* hydrogen_value_; 271 HValue* hydrogen_value_;
266 int bit_field_; 272 int bit_field_;
267 }; 273 };
268 274
269 275
270 // R = number of result operands (0 or 1). 276 // R = number of result operands (0 or 1).
271 template<int R> 277 template<int R>
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2646 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2641 }; 2647 };
2642 2648
2643 #undef DECLARE_HYDROGEN_ACCESSOR 2649 #undef DECLARE_HYDROGEN_ACCESSOR
2644 #undef DECLARE_CONCRETE_INSTRUCTION 2650 #undef DECLARE_CONCRETE_INSTRUCTION
2645 2651
2646 } // namespace internal 2652 } // namespace internal
2647 } // namespace v8 2653 } // namespace v8
2648 2654
2649 #endif // V8_CRANKSHAFT_X64_LITHIUM_X64_H_ 2655 #endif // V8_CRANKSHAFT_X64_LITHIUM_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698