| OLD | NEW |
| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // should_normalize, the true and false labels are ignored. | 444 // should_normalize, the true and false labels are ignored. |
| 445 void PrepareForBailoutBeforeSplit(Expression* expr, | 445 void PrepareForBailoutBeforeSplit(Expression* expr, |
| 446 bool should_normalize, | 446 bool should_normalize, |
| 447 Label* if_true, | 447 Label* if_true, |
| 448 Label* if_false); | 448 Label* if_false); |
| 449 | 449 |
| 450 // If enabled, emit debug code for checking that the current context is | 450 // If enabled, emit debug code for checking that the current context is |
| 451 // neither a with nor a catch context. | 451 // neither a with nor a catch context. |
| 452 void EmitDebugCheckDeclarationContext(Variable* variable); | 452 void EmitDebugCheckDeclarationContext(Variable* variable); |
| 453 | 453 |
| 454 // Platform-specific code for checking the stack limit at the back edge of | |
| 455 // a loop. | |
| 456 // This is meant to be called at loop back edges, |back_edge_target| is | 454 // This is meant to be called at loop back edges, |back_edge_target| is |
| 457 // the jump target of the back edge and is used to approximate the amount | 455 // the jump target of the back edge and is used to approximate the amount |
| 458 // of code inside the loop. | 456 // of code inside the loop. |
| 459 void EmitStackCheck(IterationStatement* stmt, Label* back_edge_target); | 457 void EmitBackEdgeBookkeeping(IterationStatement* stmt, |
| 460 // Record the OSR AST id corresponding to a stack check in the code. | 458 Label* back_edge_target); |
| 461 void RecordStackCheck(BailoutId osr_ast_id); | 459 // Record the OSR AST id corresponding to a back edge in the code. |
| 460 void RecordBackEdge(BailoutId osr_ast_id); |
| 462 // Emit a table of stack check ids and pcs into the code stream. Return | 461 // Emit a table of stack check ids and pcs into the code stream. Return |
| 463 // the offset of the start of the table. | 462 // the offset of the start of the table. |
| 464 unsigned EmitStackCheckTable(); | 463 unsigned EmitStackCheckTable(); |
| 465 | 464 |
| 466 void EmitProfilingCounterDecrement(int delta); | 465 void EmitProfilingCounterDecrement(int delta); |
| 467 void EmitProfilingCounterReset(); | 466 void EmitProfilingCounterReset(); |
| 468 | 467 |
| 469 // Platform-specific return sequence | 468 // Platform-specific return sequence |
| 470 void EmitReturnSequence(); | 469 void EmitReturnSequence(); |
| 471 | 470 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 CompilationInfo* info_; | 809 CompilationInfo* info_; |
| 811 Scope* scope_; | 810 Scope* scope_; |
| 812 Label return_label_; | 811 Label return_label_; |
| 813 NestedStatement* nesting_stack_; | 812 NestedStatement* nesting_stack_; |
| 814 int loop_depth_; | 813 int loop_depth_; |
| 815 ZoneList<Handle<Object> >* globals_; | 814 ZoneList<Handle<Object> >* globals_; |
| 816 Handle<FixedArray> modules_; | 815 Handle<FixedArray> modules_; |
| 817 int module_index_; | 816 int module_index_; |
| 818 const ExpressionContext* context_; | 817 const ExpressionContext* context_; |
| 819 ZoneList<BailoutEntry> bailout_entries_; | 818 ZoneList<BailoutEntry> bailout_entries_; |
| 819 // TODO(svenpanne) Rename this to something like back_edges_ and rename |
| 820 // related functions accordingly. |
| 820 ZoneList<BailoutEntry> stack_checks_; | 821 ZoneList<BailoutEntry> stack_checks_; |
| 821 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_; | 822 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_; |
| 822 int ic_total_count_; | 823 int ic_total_count_; |
| 823 Handle<FixedArray> handler_table_; | 824 Handle<FixedArray> handler_table_; |
| 824 Handle<JSGlobalPropertyCell> profiling_counter_; | 825 Handle<JSGlobalPropertyCell> profiling_counter_; |
| 825 bool generate_debug_code_; | 826 bool generate_debug_code_; |
| 826 Zone* zone_; | 827 Zone* zone_; |
| 827 | 828 |
| 828 friend class NestedStatement; | 829 friend class NestedStatement; |
| 829 | 830 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 850 } | 851 } |
| 851 | 852 |
| 852 private: | 853 private: |
| 853 Zone* zone_; | 854 Zone* zone_; |
| 854 }; | 855 }; |
| 855 | 856 |
| 856 | 857 |
| 857 } } // namespace v8::internal | 858 } } // namespace v8::internal |
| 858 | 859 |
| 859 #endif // V8_FULL_CODEGEN_H_ | 860 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |