| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/ast/ast-type-bounds.h" | 10 #include "src/ast/ast-type-bounds.h" |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 | 2264 |
| 2265 void VisitDelete(UnaryOperation* expr); | 2265 void VisitDelete(UnaryOperation* expr); |
| 2266 void VisitVoid(UnaryOperation* expr); | 2266 void VisitVoid(UnaryOperation* expr); |
| 2267 void VisitTypeof(UnaryOperation* expr); | 2267 void VisitTypeof(UnaryOperation* expr); |
| 2268 void VisitNot(UnaryOperation* expr); | 2268 void VisitNot(UnaryOperation* expr); |
| 2269 | 2269 |
| 2270 void VisitComma(BinaryOperation* expr); | 2270 void VisitComma(BinaryOperation* expr); |
| 2271 void VisitLogicalExpression(BinaryOperation* expr); | 2271 void VisitLogicalExpression(BinaryOperation* expr); |
| 2272 void VisitArithmeticExpression(BinaryOperation* expr); | 2272 void VisitArithmeticExpression(BinaryOperation* expr); |
| 2273 | 2273 |
| 2274 void VisitLoopBody(IterationStatement* stmt, | 2274 void VisitLoopBody(IterationStatement* stmt, BailoutId stack_check_id, |
| 2275 HBasicBlock* loop_entry); | 2275 HBasicBlock* loop_entry); |
| 2276 | 2276 |
| 2277 void BuildForInBody(ForInStatement* stmt, Variable* each_var, | 2277 void BuildForInBody(ForInStatement* stmt, Variable* each_var, |
| 2278 HValue* enumerable); | 2278 HValue* enumerable); |
| 2279 | 2279 |
| 2280 // Create a back edge in the flow graph. body_exit is the predecessor | 2280 // Create a back edge in the flow graph. body_exit is the predecessor |
| 2281 // block and loop_entry is the successor block. loop_successor is the | 2281 // block and loop_entry is the successor block. loop_successor is the |
| 2282 // block where control flow exits the loop normally (e.g., via failure of | 2282 // block where control flow exits the loop normally (e.g., via failure of |
| 2283 // the condition) and break_block is the block where control flow breaks | 2283 // the condition) and break_block is the block where control flow breaks |
| 2284 // from the loop. All blocks except loop_entry can be NULL. The return | 2284 // from the loop. All blocks except loop_entry can be NULL. The return |
| 2285 // value is the new successor block which is the join of loop_successor | 2285 // value is the new successor block which is the join of loop_successor |
| 2286 // and break_block, or NULL. | 2286 // and break_block, or NULL. |
| 2287 HBasicBlock* CreateLoop(IterationStatement* statement, | 2287 HBasicBlock* CreateLoop(IterationStatement* statement, |
| 2288 HBasicBlock* loop_entry, | 2288 HBasicBlock* loop_entry, |
| 2289 HBasicBlock* body_exit, | 2289 HBasicBlock* body_exit, |
| 2290 HBasicBlock* loop_successor, | 2290 HBasicBlock* loop_successor, |
| 2291 HBasicBlock* break_block); | 2291 HBasicBlock* break_block); |
| 2292 | 2292 |
| 2293 // Build a loop entry | 2293 // Build a loop entry |
| 2294 HBasicBlock* BuildLoopEntry(); | 2294 HBasicBlock* BuildLoopEntry(); |
| 2295 | 2295 |
| 2296 // Builds a loop entry respectful of OSR requirements | 2296 // Builds a loop entry respectful of OSR requirements |
| 2297 HBasicBlock* BuildLoopEntry(IterationStatement* statement); | 2297 HBasicBlock* BuildLoopEntry(IterationStatement* statement); |
| 2298 | 2298 |
| 2299 HBasicBlock* JoinContinue(IterationStatement* statement, | 2299 HBasicBlock* JoinContinue(IterationStatement* statement, |
| 2300 HBasicBlock* exit_block, | 2300 BailoutId continue_id, HBasicBlock* exit_block, |
| 2301 HBasicBlock* continue_block); | 2301 HBasicBlock* continue_block); |
| 2302 | 2302 |
| 2303 HValue* Top() const { return environment()->Top(); } | 2303 HValue* Top() const { return environment()->Top(); } |
| 2304 void Drop(int n) { environment()->Drop(n); } | 2304 void Drop(int n) { environment()->Drop(n); } |
| 2305 void Bind(Variable* var, HValue* value) { environment()->Bind(var, value); } | 2305 void Bind(Variable* var, HValue* value) { environment()->Bind(var, value); } |
| 2306 bool IsEligibleForEnvironmentLivenessAnalysis(Variable* var, | 2306 bool IsEligibleForEnvironmentLivenessAnalysis(Variable* var, |
| 2307 int index, | 2307 int index, |
| 2308 HEnvironment* env) { | 2308 HEnvironment* env) { |
| 2309 if (!FLAG_analyze_environment_liveness) return false; | 2309 if (!FLAG_analyze_environment_liveness) return false; |
| 2310 // |this| and |arguments| are always live; zapping parameters isn't | 2310 // |this| and |arguments| are always live; zapping parameters isn't |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3042 } | 3042 } |
| 3043 | 3043 |
| 3044 private: | 3044 private: |
| 3045 HOptimizedGraphBuilder* builder_; | 3045 HOptimizedGraphBuilder* builder_; |
| 3046 }; | 3046 }; |
| 3047 | 3047 |
| 3048 } // namespace internal | 3048 } // namespace internal |
| 3049 } // namespace v8 | 3049 } // namespace v8 |
| 3050 | 3050 |
| 3051 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3051 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
| OLD | NEW |