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

Issue 1825513002: PPC: [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/ppc/lithium-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC_LITHIUM_PPC_H_ 5 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_
6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ 6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 213 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
214 LPointerMap* pointer_map() const { return pointer_map_.get(); } 214 LPointerMap* pointer_map() const { return pointer_map_.get(); }
215 bool HasPointerMap() const { return pointer_map_.is_set(); } 215 bool HasPointerMap() const { return pointer_map_.is_set(); }
216 216
217 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 217 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
218 HValue* hydrogen_value() const { return hydrogen_value_; } 218 HValue* hydrogen_value() const { return hydrogen_value_; }
219 219
220 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 220 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
221 bool IsCall() const { return IsCallBits::decode(bit_field_); } 221 bool IsCall() const { return IsCallBits::decode(bit_field_); }
222 222
223 void MarkAsSyntacticTailCall() {
224 bit_field_ = IsSyntacticTailCallBits::update(bit_field_, true);
225 }
226 bool IsSyntacticTailCall() const {
227 return IsSyntacticTailCallBits::decode(bit_field_);
228 }
229
223 // Interface to the register allocator and iterators. 230 // Interface to the register allocator and iterators.
224 bool ClobbersTemps() const { return IsCall(); } 231 bool ClobbersTemps() const { return IsCall(); }
225 bool ClobbersRegisters() const { return IsCall(); } 232 bool ClobbersRegisters() const { return IsCall(); }
226 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { 233 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const {
227 return IsCall(); 234 return IsCall();
228 } 235 }
229 236
230 // Interface to the register allocator and iterators. 237 // Interface to the register allocator and iterators.
231 bool IsMarkedAsCall() const { return IsCall(); } 238 bool IsMarkedAsCall() const { return IsCall(); }
232 239
(...skipping 14 matching lines...) Expand all
247 254
248 private: 255 private:
249 // Iterator support. 256 // Iterator support.
250 friend class InputIterator; 257 friend class InputIterator;
251 258
252 friend class TempIterator; 259 friend class TempIterator;
253 virtual int TempCount() = 0; 260 virtual int TempCount() = 0;
254 virtual LOperand* TempAt(int i) = 0; 261 virtual LOperand* TempAt(int i) = 0;
255 262
256 class IsCallBits : public BitField<bool, 0, 1> {}; 263 class IsCallBits : public BitField<bool, 0, 1> {};
264 class IsSyntacticTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {
265 };
257 266
258 LEnvironment* environment_; 267 LEnvironment* environment_;
259 SetOncePointer<LPointerMap> pointer_map_; 268 SetOncePointer<LPointerMap> pointer_map_;
260 HValue* hydrogen_value_; 269 HValue* hydrogen_value_;
261 int bit_field_; 270 int bit_field_;
262 }; 271 };
263 272
264 273
265 // R = number of result operands (0 or 1). 274 // R = number of result operands (0 or 1).
266 template <int R> 275 template <int R>
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 2554
2546 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2555 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2547 }; 2556 };
2548 2557
2549 #undef DECLARE_HYDROGEN_ACCESSOR 2558 #undef DECLARE_HYDROGEN_ACCESSOR
2550 #undef DECLARE_CONCRETE_INSTRUCTION 2559 #undef DECLARE_CONCRETE_INSTRUCTION
2551 } // namespace internal 2560 } // namespace internal
2552 } // namespace v8 2561 } // namespace v8
2553 2562
2554 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ 2563 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/ppc/lithium-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698