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/hydrogen.h

Issue 7012010: Don't use environment values at certain deoptimize-instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void SetJoinId(int id); 118 void SetJoinId(int id);
119 119
120 void Finish(HControlInstruction* last); 120 void Finish(HControlInstruction* last);
121 void FinishExit(HControlInstruction* instruction); 121 void FinishExit(HControlInstruction* instruction);
122 void Goto(HBasicBlock* block, bool include_stack_check = false); 122 void Goto(HBasicBlock* block, bool include_stack_check = false);
123 123
124 int PredecessorIndexOf(HBasicBlock* predecessor) const; 124 int PredecessorIndexOf(HBasicBlock* predecessor) const;
125 void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); } 125 void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); }
126 void AssignCommonDominator(HBasicBlock* other); 126 void AssignCommonDominator(HBasicBlock* other);
127 127
128 void FinishExitWithDeoptimization() { 128 void FinishExitWithDeoptimization(HDeoptimize::UseEnvironment has_uses) {
129 FinishExit(CreateDeoptimize()); 129 FinishExit(CreateDeoptimize(has_uses));
130 } 130 }
131 131
132 // Add the inlined function exit sequence, adding an HLeaveInlined 132 // Add the inlined function exit sequence, adding an HLeaveInlined
133 // instruction and updating the bailout environment. 133 // instruction and updating the bailout environment.
134 void AddLeaveInlined(HValue* return_value, HBasicBlock* target); 134 void AddLeaveInlined(HValue* return_value, HBasicBlock* target);
135 135
136 // If a target block is tagged as an inline function return, all 136 // If a target block is tagged as an inline function return, all
137 // predecessors should contain the inlined exit sequence: 137 // predecessors should contain the inlined exit sequence:
138 // 138 //
139 // LeaveInlined 139 // LeaveInlined
140 // Simulate (caller's environment) 140 // Simulate (caller's environment)
141 // Goto (target block) 141 // Goto (target block)
142 bool IsInlineReturnTarget() const { return is_inline_return_target_; } 142 bool IsInlineReturnTarget() const { return is_inline_return_target_; }
143 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } 143 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; }
144 144
145 inline Zone* zone(); 145 inline Zone* zone();
146 146
147 #ifdef DEBUG 147 #ifdef DEBUG
148 void Verify(); 148 void Verify();
149 #endif 149 #endif
150 150
151 private: 151 private:
152 void RegisterPredecessor(HBasicBlock* pred); 152 void RegisterPredecessor(HBasicBlock* pred);
153 void AddDominatedBlock(HBasicBlock* block); 153 void AddDominatedBlock(HBasicBlock* block);
154 154
155 HSimulate* CreateSimulate(int id); 155 HSimulate* CreateSimulate(int id);
156 HDeoptimize* CreateDeoptimize(); 156 HDeoptimize* CreateDeoptimize(HDeoptimize::UseEnvironment has_uses);
157 157
158 int block_id_; 158 int block_id_;
159 HGraph* graph_; 159 HGraph* graph_;
160 ZoneList<HPhi*> phis_; 160 ZoneList<HPhi*> phis_;
161 HInstruction* first_; 161 HInstruction* first_;
162 HInstruction* last_; 162 HInstruction* last_;
163 HControlInstruction* end_; 163 HControlInstruction* end_;
164 HLoopInformation* loop_information_; 164 HLoopInformation* loop_information_;
165 ZoneList<HBasicBlock*> predecessors_; 165 ZoneList<HBasicBlock*> predecessors_;
166 HBasicBlock* dominator_; 166 HBasicBlock* dominator_;
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 const char* filename_; 1193 const char* filename_;
1194 HeapStringAllocator string_allocator_; 1194 HeapStringAllocator string_allocator_;
1195 StringStream trace_; 1195 StringStream trace_;
1196 int indent_; 1196 int indent_;
1197 }; 1197 };
1198 1198
1199 1199
1200 } } // namespace v8::internal 1200 } } // namespace v8::internal
1201 1201
1202 #endif // V8_HYDROGEN_H_ 1202 #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