| OLD | NEW |
| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 HEnvironment* Copy() const; | 418 HEnvironment* Copy() const; |
| 419 HEnvironment* CopyWithoutHistory() const; | 419 HEnvironment* CopyWithoutHistory() const; |
| 420 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; | 420 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; |
| 421 | 421 |
| 422 // Create an "inlined version" of this environment, where the original | 422 // Create an "inlined version" of this environment, where the original |
| 423 // environment is the outer environment but the top expression stack | 423 // environment is the outer environment but the top expression stack |
| 424 // elements are moved to an inner environment as parameters. | 424 // elements are moved to an inner environment as parameters. |
| 425 HEnvironment* CopyForInlining(Handle<JSFunction> target, | 425 HEnvironment* CopyForInlining(Handle<JSFunction> target, |
| 426 FunctionLiteral* function, | 426 FunctionLiteral* function, |
| 427 HConstant* undefined, | 427 HConstant* undefined, |
| 428 CallKind call_kind) const; | 428 CallKind call_kind, |
| 429 bool context_change) const; |
| 429 | 430 |
| 430 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); | 431 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); |
| 431 | 432 |
| 432 void ClearHistory() { | 433 void ClearHistory() { |
| 433 pop_count_ = 0; | 434 pop_count_ = 0; |
| 434 push_count_ = 0; | 435 push_count_ = 0; |
| 435 assigned_variables_.Rewind(0); | 436 assigned_variables_.Rewind(0); |
| 436 } | 437 } |
| 437 | 438 |
| 438 void SetValueAt(int index, HValue* value) { | 439 void SetValueAt(int index, HValue* value) { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 | 687 |
| 687 // Search the break stack for a break or continue target. | 688 // Search the break stack for a break or continue target. |
| 688 HBasicBlock* Get(BreakableStatement* stmt, BreakType type); | 689 HBasicBlock* Get(BreakableStatement* stmt, BreakType type); |
| 689 | 690 |
| 690 private: | 691 private: |
| 691 BreakAndContinueInfo* info_; | 692 BreakAndContinueInfo* info_; |
| 692 HGraphBuilder* owner_; | 693 HGraphBuilder* owner_; |
| 693 BreakAndContinueScope* next_; | 694 BreakAndContinueScope* next_; |
| 694 }; | 695 }; |
| 695 | 696 |
| 697 #ifdef V8_TARGET_ARCH_IA32 |
| 698 static const bool kInlineContextChangeAllowed = true; |
| 699 #else |
| 700 static const bool kInlineContextChangeAllowed = false; |
| 701 #endif |
| 702 |
| 696 HGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle); | 703 HGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle); |
| 697 | 704 |
| 698 HGraph* CreateGraph(); | 705 HGraph* CreateGraph(); |
| 699 | 706 |
| 700 // Simple accessors. | 707 // Simple accessors. |
| 701 HGraph* graph() const { return graph_; } | 708 HGraph* graph() const { return graph_; } |
| 702 BreakAndContinueScope* break_scope() const { return break_scope_; } | 709 BreakAndContinueScope* break_scope() const { return break_scope_; } |
| 703 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } | 710 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } |
| 704 | 711 |
| 705 HBasicBlock* current_block() const { return current_block_; } | 712 HBasicBlock* current_block() const { return current_block_; } |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 const char* filename_; | 1241 const char* filename_; |
| 1235 HeapStringAllocator string_allocator_; | 1242 HeapStringAllocator string_allocator_; |
| 1236 StringStream trace_; | 1243 StringStream trace_; |
| 1237 int indent_; | 1244 int indent_; |
| 1238 }; | 1245 }; |
| 1239 | 1246 |
| 1240 | 1247 |
| 1241 } } // namespace v8::internal | 1248 } } // namespace v8::internal |
| 1242 | 1249 |
| 1243 #endif // V8_HYDROGEN_H_ | 1250 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |