| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 CompilationInfo* top_info() { return info_; } | 984 CompilationInfo* top_info() { return info_; } |
| 985 | 985 |
| 986 HGraph* CreateGraph(); | 986 HGraph* CreateGraph(); |
| 987 | 987 |
| 988 // Bailout environment manipulation. | 988 // Bailout environment manipulation. |
| 989 void Push(HValue* value) { environment()->Push(value); } | 989 void Push(HValue* value) { environment()->Push(value); } |
| 990 HValue* Pop() { return environment()->Pop(); } | 990 HValue* Pop() { return environment()->Pop(); } |
| 991 | 991 |
| 992 // Adding instructions. | 992 // Adding instructions. |
| 993 HInstruction* AddInstruction(HInstruction* instr); | 993 HInstruction* AddInstruction(HInstruction* instr); |
| 994 |
| 995 template<class I> |
| 996 I* Add() { return static_cast<I*>(AddInstruction(new(zone()) I())); } |
| 997 |
| 998 template<class I, class P1> |
| 999 I* Add(P1 p1) { |
| 1000 return static_cast<I*>(AddInstruction(new(zone()) I(p1))); |
| 1001 } |
| 1002 |
| 1003 template<class I, class P1, class P2> |
| 1004 I* Add(P1 p1, P2 p2) { |
| 1005 return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2))); |
| 1006 } |
| 1007 |
| 1008 template<class I, class P1, class P2, class P3> |
| 1009 I* Add(P1 p1, P2 p2, P3 p3) { |
| 1010 return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2, p3))); |
| 1011 } |
| 1012 |
| 994 void AddSimulate(BailoutId id, | 1013 void AddSimulate(BailoutId id, |
| 995 RemovableSimulate removable = FIXED_SIMULATE); | 1014 RemovableSimulate removable = FIXED_SIMULATE); |
| 996 HBoundsCheck* AddBoundsCheck(HValue* index, HValue* length); | |
| 997 | 1015 |
| 998 HReturn* AddReturn(HValue* value); | 1016 HReturn* AddReturn(HValue* value); |
| 999 | 1017 |
| 1000 void IncrementInNoSideEffectsScope() { | 1018 void IncrementInNoSideEffectsScope() { |
| 1001 no_side_effects_scope_count_++; | 1019 no_side_effects_scope_count_++; |
| 1002 } | 1020 } |
| 1003 | 1021 |
| 1004 void DecrementInNoSideEffectsScope() { | 1022 void DecrementInNoSideEffectsScope() { |
| 1005 no_side_effects_scope_count_--; | 1023 no_side_effects_scope_count_--; |
| 1006 } | 1024 } |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 EmbeddedVector<char, 64> filename_; | 2054 EmbeddedVector<char, 64> filename_; |
| 2037 HeapStringAllocator string_allocator_; | 2055 HeapStringAllocator string_allocator_; |
| 2038 StringStream trace_; | 2056 StringStream trace_; |
| 2039 int indent_; | 2057 int indent_; |
| 2040 }; | 2058 }; |
| 2041 | 2059 |
| 2042 | 2060 |
| 2043 } } // namespace v8::internal | 2061 } } // namespace v8::internal |
| 2044 | 2062 |
| 2045 #endif // V8_HYDROGEN_H_ | 2063 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |