OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 inline void CopyTo(JumpTarget* destination) { | 94 inline void CopyTo(JumpTarget* destination) { |
95 *destination = *this; | 95 *destination = *this; |
96 } | 96 } |
97 | 97 |
98 // Emit a jump to the target. There must be a current frame at the | 98 // Emit a jump to the target. There must be a current frame at the |
99 // jump and there will be no current frame after the jump. | 99 // jump and there will be no current frame after the jump. |
100 virtual void Jump(); | 100 virtual void Jump(); |
101 | 101 |
102 // Emit a conditional branch to the target. There must be a current | 102 // Emit a conditional branch to the target. There must be a current |
103 // frame at the branch. The current frame will fall through to the | 103 // frame at the branch. The current frame will fall through to the |
104 // code after the branch. The arg is a result that is live both at | 104 // code after the branch. |
105 // the target and the fall-through. | |
106 virtual void Branch(Condition cc, Hint hint = no_hint); | 105 virtual void Branch(Condition cc, Hint hint = no_hint); |
107 | 106 |
108 // Bind a jump target. If there is no current frame at the binding | 107 // Bind a jump target. If there is no current frame at the binding |
109 // site, there must be at least one frame reaching via a forward | 108 // site, there must be at least one frame reaching via a forward |
110 // jump. | 109 // jump. |
111 virtual void Bind(); | 110 virtual void Bind(); |
112 | 111 |
113 // Emit a call to a jump target. There must be a current frame at | 112 // Emit a call to a jump target. There must be a current frame at |
114 // the call. The frame at the target is the same as the current | 113 // the call. The frame at the target is the same as the current |
115 // frame except for an extra return address on top of it. The frame | 114 // frame except for an extra return address on top of it. The frame |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 183 |
185 private: | 184 private: |
186 // The expected height of the expression stack where the target will | 185 // The expected height of the expression stack where the target will |
187 // be bound, statically known at initialization time. | 186 // be bound, statically known at initialization time. |
188 int expected_height_; | 187 int expected_height_; |
189 }; | 188 }; |
190 | 189 |
191 } } // namespace v8::internal | 190 } } // namespace v8::internal |
192 | 191 |
193 #endif // V8_JUMP_TARGET_LIGHT_H_ | 192 #endif // V8_JUMP_TARGET_LIGHT_H_ |
OLD | NEW |