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

Side by Side Diff: src/hydrogen.h

Issue 25039003: Only call into the HOsrBuilder if required for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nits 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 | « 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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 virtual bool BuildGraph() V8_OVERRIDE; 1774 virtual bool BuildGraph() V8_OVERRIDE;
1775 1775
1776 // Simple accessors. 1776 // Simple accessors.
1777 BreakAndContinueScope* break_scope() const { return break_scope_; } 1777 BreakAndContinueScope* break_scope() const { return break_scope_; }
1778 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } 1778 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; }
1779 1779
1780 bool inline_bailout() { return inline_bailout_; } 1780 bool inline_bailout() { return inline_bailout_; }
1781 1781
1782 HValue* context() { return environment()->context(); } 1782 HValue* context() { return environment()->context(); }
1783 1783
1784 HOsrBuilder* osr() const { return osr_; }
1785
1784 void Bailout(BailoutReason reason); 1786 void Bailout(BailoutReason reason);
1785 1787
1786 HBasicBlock* CreateJoin(HBasicBlock* first, 1788 HBasicBlock* CreateJoin(HBasicBlock* first,
1787 HBasicBlock* second, 1789 HBasicBlock* second,
1788 BailoutId join_id); 1790 BailoutId join_id);
1789 1791
1790 FunctionState* function_state() const { return function_state_; } 1792 FunctionState* function_state() const { return function_state_; }
1791 1793
1792 void VisitDeclarations(ZoneList<Declaration*>* declarations); 1794 void VisitDeclarations(ZoneList<Declaration*>* declarations);
1793 1795
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 // the condition) and break_block is the block where control flow breaks 1881 // the condition) and break_block is the block where control flow breaks
1880 // from the loop. All blocks except loop_entry can be NULL. The return 1882 // from the loop. All blocks except loop_entry can be NULL. The return
1881 // value is the new successor block which is the join of loop_successor 1883 // value is the new successor block which is the join of loop_successor
1882 // and break_block, or NULL. 1884 // and break_block, or NULL.
1883 HBasicBlock* CreateLoop(IterationStatement* statement, 1885 HBasicBlock* CreateLoop(IterationStatement* statement,
1884 HBasicBlock* loop_entry, 1886 HBasicBlock* loop_entry,
1885 HBasicBlock* body_exit, 1887 HBasicBlock* body_exit,
1886 HBasicBlock* loop_successor, 1888 HBasicBlock* loop_successor,
1887 HBasicBlock* break_block); 1889 HBasicBlock* break_block);
1888 1890
1891 // Build a loop entry
1892 HBasicBlock* BuildLoopEntry();
1893
1894 // Builds a loop entry respectful of OSR requirements
1895 HBasicBlock* BuildLoopEntry(IterationStatement* statement);
1896
1889 HBasicBlock* JoinContinue(IterationStatement* statement, 1897 HBasicBlock* JoinContinue(IterationStatement* statement,
1890 HBasicBlock* exit_block, 1898 HBasicBlock* exit_block,
1891 HBasicBlock* continue_block); 1899 HBasicBlock* continue_block);
1892 1900
1893 HValue* Top() const { return environment()->Top(); } 1901 HValue* Top() const { return environment()->Top(); }
1894 void Drop(int n) { environment()->Drop(n); } 1902 void Drop(int n) { environment()->Drop(n); }
1895 void Bind(Variable* var, HValue* value) { environment()->Bind(var, value); } 1903 void Bind(Variable* var, HValue* value) { environment()->Bind(var, value); }
1896 bool IsEligibleForEnvironmentLivenessAnalysis(Variable* var, 1904 bool IsEligibleForEnvironmentLivenessAnalysis(Variable* var,
1897 int index, 1905 int index,
1898 HValue* value, 1906 HValue* value,
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 } 2461 }
2454 2462
2455 private: 2463 private:
2456 HGraphBuilder* builder_; 2464 HGraphBuilder* builder_;
2457 }; 2465 };
2458 2466
2459 2467
2460 } } // namespace v8::internal 2468 } } // namespace v8::internal
2461 2469
2462 #endif // V8_HYDROGEN_H_ 2470 #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