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

Side by Side Diff: src/arm/lithium-arm.h

Issue 14371005: Various improvements regarding the way we print code code comments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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 | « no previous file | src/arm/lithium-arm.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 // 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 // Interface to the register allocator and iterators. 276 // Interface to the register allocator and iterators.
277 bool IsMarkedAsCall() const { return is_call_; } 277 bool IsMarkedAsCall() const { return is_call_; }
278 278
279 virtual bool HasResult() const = 0; 279 virtual bool HasResult() const = 0;
280 virtual LOperand* result() = 0; 280 virtual LOperand* result() = 0;
281 281
282 LOperand* FirstInput() { return InputAt(0); } 282 LOperand* FirstInput() { return InputAt(0); }
283 LOperand* Output() { return HasResult() ? result() : NULL; } 283 LOperand* Output() { return HasResult() ? result() : NULL; }
284 284
285 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; }
286
285 #ifdef DEBUG 287 #ifdef DEBUG
286 void VerifyCall(); 288 void VerifyCall();
287 #endif 289 #endif
288 290
289 private: 291 private:
290 // Iterator support. 292 // Iterator support.
291 friend class InputIterator; 293 friend class InputIterator;
292 virtual int InputCount() = 0; 294 virtual int InputCount() = 0;
293 virtual LOperand* InputAt(int i) = 0; 295 virtual LOperand* InputAt(int i) = 0;
294 296
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 private: 376 private:
375 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; 377 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
376 HBasicBlock* block_; 378 HBasicBlock* block_;
377 }; 379 };
378 380
379 381
380 class LInstructionGap: public LGap { 382 class LInstructionGap: public LGap {
381 public: 383 public:
382 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } 384 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
383 385
386 virtual bool HasInterestingComment(LCodeGen* gen) const {
387 return !IsRedundant();
388 }
389
384 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 390 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
385 }; 391 };
386 392
387 393
388 class LGoto: public LTemplateInstruction<0, 0, 0> { 394 class LGoto: public LTemplateInstruction<0, 0, 0> {
389 public: 395 public:
390 explicit LGoto(int block_id) : block_id_(block_id) { } 396 explicit LGoto(int block_id) : block_id_(block_id) { }
391 397
398 virtual bool HasInterestingComment(LCodeGen* gen) const;
392 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 399 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
393 virtual void PrintDataTo(StringStream* stream); 400 virtual void PrintDataTo(StringStream* stream);
394 virtual bool IsControl() const { return true; } 401 virtual bool IsControl() const { return true; }
395 402
396 int block_id() const { return block_id_; } 403 int block_id() const { return block_id_; }
397 404
398 private: 405 private:
399 int block_id_; 406 int block_id_;
400 }; 407 };
401 408
(...skipping 27 matching lines...) Expand all
429 public: 436 public:
430 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 437 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
431 }; 438 };
432 439
433 440
434 class LLabel: public LGap { 441 class LLabel: public LGap {
435 public: 442 public:
436 explicit LLabel(HBasicBlock* block) 443 explicit LLabel(HBasicBlock* block)
437 : LGap(block), replacement_(NULL) { } 444 : LGap(block), replacement_(NULL) { }
438 445
446 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
439 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 447 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
440 448
441 virtual void PrintDataTo(StringStream* stream); 449 virtual void PrintDataTo(StringStream* stream);
442 450
443 int block_id() const { return block()->block_id(); } 451 int block_id() const { return block()->block_id(); }
444 bool is_loop_header() const { return block()->IsLoopHeader(); } 452 bool is_loop_header() const { return block()->IsLoopHeader(); }
453 bool is_osr_entry() const { return block()->is_osr_entry(); }
445 Label* label() { return &label_; } 454 Label* label() { return &label_; }
446 LLabel* replacement() const { return replacement_; } 455 LLabel* replacement() const { return replacement_; }
447 void set_replacement(LLabel* label) { replacement_ = label; } 456 void set_replacement(LLabel* label) { replacement_ = label; }
448 bool HasReplacement() const { return replacement_ != NULL; } 457 bool HasReplacement() const { return replacement_ != NULL; }
449 458
450 private: 459 private:
451 Label label_; 460 Label label_;
452 LLabel* replacement_; 461 LLabel* replacement_;
453 }; 462 };
454 463
455 464
456 class LParameter: public LTemplateInstruction<1, 0, 0> { 465 class LParameter: public LTemplateInstruction<1, 0, 0> {
457 public: 466 public:
467 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
458 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 468 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
459 }; 469 };
460 470
461 471
462 class LCallStub: public LTemplateInstruction<1, 0, 0> { 472 class LCallStub: public LTemplateInstruction<1, 0, 0> {
463 public: 473 public:
464 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 474 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
465 DECLARE_HYDROGEN_ACCESSOR(CallStub) 475 DECLARE_HYDROGEN_ACCESSOR(CallStub)
466 476
467 TranscendentalCache::Type transcendental_type() { 477 TranscendentalCache::Type transcendental_type() {
468 return hydrogen()->transcendental_type(); 478 return hydrogen()->transcendental_type();
469 } 479 }
470 }; 480 };
471 481
472 482
473 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { 483 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> {
474 public: 484 public:
485 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
475 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 486 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
476 }; 487 };
477 488
478 489
479 template<int I, int T> 490 template<int I, int T>
480 class LControlInstruction: public LTemplateInstruction<0, I, T> { 491 class LControlInstruction: public LTemplateInstruction<0, I, T> {
481 public: 492 public:
482 virtual bool IsControl() const { return true; } 493 virtual bool IsControl() const { return true; }
483 494
484 int SuccessorCount() { return hydrogen()->SuccessorCount(); } 495 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 LOperand* key() { return inputs_[1]; } 2570 LOperand* key() { return inputs_[1]; }
2560 2571
2561 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") 2572 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
2562 }; 2573 };
2563 2574
2564 2575
2565 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 2576 class LOsrEntry: public LTemplateInstruction<0, 0, 0> {
2566 public: 2577 public:
2567 LOsrEntry(); 2578 LOsrEntry();
2568 2579
2580 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
2569 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2581 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2570 2582
2571 LOperand** SpilledRegisterArray() { return register_spills_; } 2583 LOperand** SpilledRegisterArray() { return register_spills_; }
2572 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; } 2584 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; }
2573 2585
2574 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand); 2586 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand);
2575 void MarkSpilledDoubleRegister(int allocation_index, 2587 void MarkSpilledDoubleRegister(int allocation_index,
2576 LOperand* spill_operand); 2588 LOperand* spill_operand);
2577 2589
2578 private: 2590 private:
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 2859
2848 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2860 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2849 }; 2861 };
2850 2862
2851 #undef DECLARE_HYDROGEN_ACCESSOR 2863 #undef DECLARE_HYDROGEN_ACCESSOR
2852 #undef DECLARE_CONCRETE_INSTRUCTION 2864 #undef DECLARE_CONCRETE_INSTRUCTION
2853 2865
2854 } } // namespace v8::internal 2866 } } // namespace v8::internal
2855 2867
2856 #endif // V8_ARM_LITHIUM_ARM_H_ 2868 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698