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

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

Issue 22876009: Improve and simplify removal of unreachable code (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback Created 7 years, 2 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 | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 396 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
397 return !IsRedundant(); 397 return !IsRedundant();
398 } 398 }
399 399
400 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 400 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
401 }; 401 };
402 402
403 403
404 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { 404 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
405 public: 405 public:
406 explicit LGoto(int block_id) : block_id_(block_id) { } 406 explicit LGoto(HBasicBlock* block) : block_(block) { }
407 407
408 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; 408 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
409 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 409 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
410 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 410 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
411 virtual bool IsControl() const V8_OVERRIDE { return true; } 411 virtual bool IsControl() const V8_OVERRIDE { return true; }
412 412
413 int block_id() const { return block_id_; } 413 int block_id() const { return block_->block_id(); }
414 414
415 private: 415 private:
416 int block_id_; 416 HBasicBlock* block_;
417 }; 417 };
418 418
419 419
420 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { 420 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
421 public: 421 public:
422 LLazyBailout() : gap_instructions_size_(0) { } 422 LLazyBailout() : gap_instructions_size_(0) { }
423 423
424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
425 425
426 void set_gap_instructions_size(int gap_instructions_size) { 426 void set_gap_instructions_size(int gap_instructions_size) {
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 next_block_(NULL), 2565 next_block_(NULL),
2566 argument_count_(0), 2566 argument_count_(0),
2567 allocator_(allocator), 2567 allocator_(allocator),
2568 position_(RelocInfo::kNoPosition), 2568 position_(RelocInfo::kNoPosition),
2569 instruction_pending_deoptimization_environment_(NULL), 2569 instruction_pending_deoptimization_environment_(NULL),
2570 pending_deoptimization_ast_id_(BailoutId::None()) { } 2570 pending_deoptimization_ast_id_(BailoutId::None()) { }
2571 2571
2572 // Build the sequence for the graph. 2572 // Build the sequence for the graph.
2573 LPlatformChunk* Build(); 2573 LPlatformChunk* Build();
2574 2574
2575 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2576
2575 // Declare methods that deal with the individual node types. 2577 // Declare methods that deal with the individual node types.
2576 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2578 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2577 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2579 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2578 #undef DECLARE_DO 2580 #undef DECLARE_DO
2579 2581
2580 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); 2582 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val);
2581 2583
2582 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2584 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2583 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2585 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2584 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2586 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 2724
2723 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2725 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2724 }; 2726 };
2725 2727
2726 #undef DECLARE_HYDROGEN_ACCESSOR 2728 #undef DECLARE_HYDROGEN_ACCESSOR
2727 #undef DECLARE_CONCRETE_INSTRUCTION 2729 #undef DECLARE_CONCRETE_INSTRUCTION
2728 2730
2729 } } // namespace v8::int 2731 } } // namespace v8::int
2730 2732
2731 #endif // V8_X64_LITHIUM_X64_H_ 2733 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698