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

Side by Side Diff: src/hydrogen.h

Issue 10834247: Use the correct oracle in TestContext::BuildBranch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/hydrogen.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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 private: 665 private:
666 ArgumentsAllowedFlag flag_; 666 ArgumentsAllowedFlag flag_;
667 }; 667 };
668 668
669 669
670 class TestContext: public AstContext { 670 class TestContext: public AstContext {
671 public: 671 public:
672 TestContext(HGraphBuilder* owner, 672 TestContext(HGraphBuilder* owner,
673 Expression* condition, 673 Expression* condition,
674 TypeFeedbackOracle* oracle,
674 HBasicBlock* if_true, 675 HBasicBlock* if_true,
675 HBasicBlock* if_false) 676 HBasicBlock* if_false)
676 : AstContext(owner, Expression::kTest), 677 : AstContext(owner, Expression::kTest),
677 condition_(condition), 678 condition_(condition),
679 oracle_(oracle),
678 if_true_(if_true), 680 if_true_(if_true),
679 if_false_(if_false) { 681 if_false_(if_false) {
680 } 682 }
681 683
682 virtual void ReturnValue(HValue* value); 684 virtual void ReturnValue(HValue* value);
683 virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); 685 virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id);
684 virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); 686 virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id);
685 687
686 static TestContext* cast(AstContext* context) { 688 static TestContext* cast(AstContext* context) {
687 ASSERT(context->IsTest()); 689 ASSERT(context->IsTest());
688 return reinterpret_cast<TestContext*>(context); 690 return reinterpret_cast<TestContext*>(context);
689 } 691 }
690 692
691 Expression* condition() const { return condition_; } 693 Expression* condition() const { return condition_; }
694 TypeFeedbackOracle* oracle() const { return oracle_; }
692 HBasicBlock* if_true() const { return if_true_; } 695 HBasicBlock* if_true() const { return if_true_; }
693 HBasicBlock* if_false() const { return if_false_; } 696 HBasicBlock* if_false() const { return if_false_; }
694 697
695 private: 698 private:
696 // Build the shared core part of the translation unpacking a value into 699 // Build the shared core part of the translation unpacking a value into
697 // control flow. 700 // control flow.
698 void BuildBranch(HValue* value); 701 void BuildBranch(HValue* value);
699 702
700 Expression* condition_; 703 Expression* condition_;
704 TypeFeedbackOracle* oracle_;
701 HBasicBlock* if_true_; 705 HBasicBlock* if_true_;
702 HBasicBlock* if_false_; 706 HBasicBlock* if_false_;
703 }; 707 };
704 708
705 709
706 enum ReturnHandlingFlag { 710 enum ReturnHandlingFlag {
707 NORMAL_RETURN, 711 NORMAL_RETURN,
708 DROP_EXTRA_ON_RETURN, 712 DROP_EXTRA_ON_RETURN,
709 CONSTRUCT_CALL_RETURN 713 CONSTRUCT_CALL_RETURN
710 }; 714 };
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 const char* filename_; 1471 const char* filename_;
1468 HeapStringAllocator string_allocator_; 1472 HeapStringAllocator string_allocator_;
1469 StringStream trace_; 1473 StringStream trace_;
1470 int indent_; 1474 int indent_;
1471 }; 1475 };
1472 1476
1473 1477
1474 } } // namespace v8::internal 1478 } } // namespace v8::internal
1475 1479
1476 #endif // V8_HYDROGEN_H_ 1480 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698