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

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

Issue 1819273003: X87: [crankshaft] Fixing ES6 tail call elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/crankshaft/x87/lithium-x87.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_X87_LITHIUM_X87_H_ 5 #ifndef V8_CRANKSHAFT_X87_LITHIUM_X87_H_
6 #define V8_CRANKSHAFT_X87_LITHIUM_X87_H_ 6 #define V8_CRANKSHAFT_X87_LITHIUM_X87_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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 219 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
220 LPointerMap* pointer_map() const { return pointer_map_.get(); } 220 LPointerMap* pointer_map() const { return pointer_map_.get(); }
221 bool HasPointerMap() const { return pointer_map_.is_set(); } 221 bool HasPointerMap() const { return pointer_map_.is_set(); }
222 222
223 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 223 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
224 HValue* hydrogen_value() const { return hydrogen_value_; } 224 HValue* hydrogen_value() const { return hydrogen_value_; }
225 225
226 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 226 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
227 bool IsCall() const { return IsCallBits::decode(bit_field_); } 227 bool IsCall() const { return IsCallBits::decode(bit_field_); }
228 228
229 void MarkAsSyntacticTailCall() {
230 bit_field_ = IsSyntacticTailCallBits::update(bit_field_, true);
231 }
232 bool IsSyntacticTailCall() const {
233 return IsSyntacticTailCallBits::decode(bit_field_);
234 }
235
229 // Interface to the register allocator and iterators. 236 // Interface to the register allocator and iterators.
230 bool ClobbersTemps() const { return IsCall(); } 237 bool ClobbersTemps() const { return IsCall(); }
231 bool ClobbersRegisters() const { return IsCall(); } 238 bool ClobbersRegisters() const { return IsCall(); }
232 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { 239 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const {
233 return IsCall() || 240 return IsCall() ||
234 // We only have rudimentary X87Stack tracking, thus in general 241 // We only have rudimentary X87Stack tracking, thus in general
235 // cannot handle phi-nodes. 242 // cannot handle phi-nodes.
236 (IsControl()); 243 (IsControl());
237 } 244 }
238 245
(...skipping 18 matching lines...) Expand all
257 264
258 private: 265 private:
259 // Iterator support. 266 // Iterator support.
260 friend class InputIterator; 267 friend class InputIterator;
261 268
262 friend class TempIterator; 269 friend class TempIterator;
263 virtual int TempCount() = 0; 270 virtual int TempCount() = 0;
264 virtual LOperand* TempAt(int i) = 0; 271 virtual LOperand* TempAt(int i) = 0;
265 272
266 class IsCallBits: public BitField<bool, 0, 1> {}; 273 class IsCallBits: public BitField<bool, 0, 1> {};
274 class IsSyntacticTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {
275 };
267 276
268 LEnvironment* environment_; 277 LEnvironment* environment_;
269 SetOncePointer<LPointerMap> pointer_map_; 278 SetOncePointer<LPointerMap> pointer_map_;
270 HValue* hydrogen_value_; 279 HValue* hydrogen_value_;
271 int bit_field_; 280 int bit_field_;
272 }; 281 };
273 282
274 283
275 // R = number of result operands (0 or 1). 284 // R = number of result operands (0 or 1).
276 template<int R> 285 template<int R>
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2681 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2673 }; 2682 };
2674 2683
2675 #undef DECLARE_HYDROGEN_ACCESSOR 2684 #undef DECLARE_HYDROGEN_ACCESSOR
2676 #undef DECLARE_CONCRETE_INSTRUCTION 2685 #undef DECLARE_CONCRETE_INSTRUCTION
2677 2686
2678 } // namespace internal 2687 } // namespace internal
2679 } // namespace v8 2688 } // namespace v8
2680 2689
2681 #endif // V8_CRANKSHAFT_X87_LITHIUM_X87_H_ 2690 #endif // V8_CRANKSHAFT_X87_LITHIUM_X87_H_
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/x87/lithium-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698