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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 return reinterpret_cast<TestContext*>(context); | 572 return reinterpret_cast<TestContext*>(context); |
573 } | 573 } |
574 | 574 |
575 Expression* condition() const { return condition_; } | 575 Expression* condition() const { return condition_; } |
576 HBasicBlock* if_true() const { return if_true_; } | 576 HBasicBlock* if_true() const { return if_true_; } |
577 HBasicBlock* if_false() const { return if_false_; } | 577 HBasicBlock* if_false() const { return if_false_; } |
578 | 578 |
579 private: | 579 private: |
580 // Build the shared core part of the translation unpacking a value into | 580 // Build the shared core part of the translation unpacking a value into |
581 // control flow. | 581 // control flow. |
582 void BuildBranch(HValue* value); | 582 void BuildBranch(HValue* value, HControlInstruction* test); |
583 | 583 |
584 Expression* condition_; | 584 Expression* condition_; |
585 HBasicBlock* if_true_; | 585 HBasicBlock* if_true_; |
586 HBasicBlock* if_false_; | 586 HBasicBlock* if_false_; |
587 }; | 587 }; |
588 | 588 |
589 | 589 |
590 class FunctionState BASE_EMBEDDED { | 590 class FunctionState BASE_EMBEDDED { |
591 public: | 591 public: |
592 FunctionState(HGraphBuilder* owner, | 592 FunctionState(HGraphBuilder* owner, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // Adding instructions. | 699 // Adding instructions. |
700 HInstruction* AddInstruction(HInstruction* instr); | 700 HInstruction* AddInstruction(HInstruction* instr); |
701 void AddSimulate(int ast_id); | 701 void AddSimulate(int ast_id); |
702 | 702 |
703 // Bailout environment manipulation. | 703 // Bailout environment manipulation. |
704 void Push(HValue* value) { environment()->Push(value); } | 704 void Push(HValue* value) { environment()->Push(value); } |
705 HValue* Pop() { return environment()->Pop(); } | 705 HValue* Pop() { return environment()->Pop(); } |
706 | 706 |
707 void Bailout(const char* reason); | 707 void Bailout(const char* reason); |
708 | 708 |
| 709 void MaterializeBoolean(HControlInstruction* instr, int join_id); |
| 710 |
709 private: | 711 private: |
710 // Type of a member function that generates inline code for a native function. | 712 // Type of a member function that generates inline code for a native function. |
711 typedef void (HGraphBuilder::*InlineFunctionGenerator)(CallRuntime* call); | 713 typedef void (HGraphBuilder::*InlineFunctionGenerator)(CallRuntime* call); |
712 | 714 |
713 // Forward declarations for inner scope classes. | 715 // Forward declarations for inner scope classes. |
714 class SubgraphScope; | 716 class SubgraphScope; |
715 | 717 |
716 static const InlineFunctionGenerator kInlineFunctionGenerators[]; | 718 static const InlineFunctionGenerator kInlineFunctionGenerators[]; |
717 | 719 |
718 static const int kMaxCallPolymorphism = 4; | 720 static const int kMaxCallPolymorphism = 4; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 const char* filename_; | 1212 const char* filename_; |
1211 HeapStringAllocator string_allocator_; | 1213 HeapStringAllocator string_allocator_; |
1212 StringStream trace_; | 1214 StringStream trace_; |
1213 int indent_; | 1215 int indent_; |
1214 }; | 1216 }; |
1215 | 1217 |
1216 | 1218 |
1217 } } // namespace v8::internal | 1219 } } // namespace v8::internal |
1218 | 1220 |
1219 #endif // V8_HYDROGEN_H_ | 1221 #endif // V8_HYDROGEN_H_ |
OLD | NEW |