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/ia32/lithium-ia32.h

Issue 1780043004: [crankshaft] Fixing ES6 tail call elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing 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
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/ia32/lithium-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 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_IA32_LITHIUM_IA32_H_ 5 #ifndef V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_
6 #define V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ 6 #define V8_CRANKSHAFT_IA32_LITHIUM_IA32_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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 218 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
219 LPointerMap* pointer_map() const { return pointer_map_.get(); } 219 LPointerMap* pointer_map() const { return pointer_map_.get(); }
220 bool HasPointerMap() const { return pointer_map_.is_set(); } 220 bool HasPointerMap() const { return pointer_map_.is_set(); }
221 221
222 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 222 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
223 HValue* hydrogen_value() const { return hydrogen_value_; } 223 HValue* hydrogen_value() const { return hydrogen_value_; }
224 224
225 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 225 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
226 bool IsCall() const { return IsCallBits::decode(bit_field_); } 226 bool IsCall() const { return IsCallBits::decode(bit_field_); }
227 227
228 void MarkAsSyntacticTailCall() {
229 bit_field_ = IsSyntacticTailCallBits::update(bit_field_, true);
230 }
231 bool IsSyntacticTailCall() const {
232 return IsSyntacticTailCallBits::decode(bit_field_);
233 }
234
228 // Interface to the register allocator and iterators. 235 // Interface to the register allocator and iterators.
229 bool ClobbersTemps() const { return IsCall(); } 236 bool ClobbersTemps() const { return IsCall(); }
230 bool ClobbersRegisters() const { return IsCall(); } 237 bool ClobbersRegisters() const { return IsCall(); }
231 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { 238 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const {
232 return IsCall(); 239 return IsCall();
233 } 240 }
234 241
235 virtual bool HasResult() const = 0; 242 virtual bool HasResult() const = 0;
236 virtual LOperand* result() const = 0; 243 virtual LOperand* result() const = 0;
237 244
(...skipping 14 matching lines...) Expand all
252 259
253 private: 260 private:
254 // Iterator support. 261 // Iterator support.
255 friend class InputIterator; 262 friend class InputIterator;
256 263
257 friend class TempIterator; 264 friend class TempIterator;
258 virtual int TempCount() = 0; 265 virtual int TempCount() = 0;
259 virtual LOperand* TempAt(int i) = 0; 266 virtual LOperand* TempAt(int i) = 0;
260 267
261 class IsCallBits: public BitField<bool, 0, 1> {}; 268 class IsCallBits: public BitField<bool, 0, 1> {};
269 class IsSyntacticTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {
270 };
262 271
263 LEnvironment* environment_; 272 LEnvironment* environment_;
264 SetOncePointer<LPointerMap> pointer_map_; 273 SetOncePointer<LPointerMap> pointer_map_;
265 HValue* hydrogen_value_; 274 HValue* hydrogen_value_;
266 int bit_field_; 275 int bit_field_;
267 }; 276 };
268 277
269 278
270 // R = number of result operands (0 or 1). 279 // R = number of result operands (0 or 1).
271 template<int R> 280 template<int R>
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2665 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2657 }; 2666 };
2658 2667
2659 #undef DECLARE_HYDROGEN_ACCESSOR 2668 #undef DECLARE_HYDROGEN_ACCESSOR
2660 #undef DECLARE_CONCRETE_INSTRUCTION 2669 #undef DECLARE_CONCRETE_INSTRUCTION
2661 2670
2662 } // namespace internal 2671 } // namespace internal
2663 } // namespace v8 2672 } // namespace v8
2664 2673
2665 #endif // V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ 2674 #endif // V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698