| 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 17 matching lines...) Expand all Loading... |
| 28 #ifndef V8_JUMP_TARGET_H_ | 28 #ifndef V8_JUMP_TARGET_H_ |
| 29 #define V8_JUMP_TARGET_H_ | 29 #define V8_JUMP_TARGET_H_ |
| 30 | 30 |
| 31 namespace v8 { namespace internal { | 31 namespace v8 { namespace internal { |
| 32 | 32 |
| 33 // Forward declarations. | 33 // Forward declarations. |
| 34 class FrameElement; | 34 class FrameElement; |
| 35 class Result; | 35 class Result; |
| 36 class VirtualFrame; | 36 class VirtualFrame; |
| 37 | 37 |
| 38 | |
| 39 // ------------------------------------------------------------------------- | 38 // ------------------------------------------------------------------------- |
| 40 // Jump targets | 39 // Jump targets |
| 41 // | 40 // |
| 42 // A jump target is an abstraction of a basic-block entry in generated | 41 // A jump target is an abstraction of a basic-block entry in generated |
| 43 // code. It collects all the virtual frames reaching the block by | 42 // code. It collects all the virtual frames reaching the block by |
| 44 // forward jumps and pairs them with labels for the merge code along | 43 // forward jumps and pairs them with labels for the merge code along |
| 45 // all forward-reaching paths. When bound, an expected frame for the | 44 // all forward-reaching paths. When bound, an expected frame for the |
| 46 // block is determined and code is generated to merge to the expected | 45 // block is determined and code is generated to merge to the expected |
| 47 // frame. For backward jumps, the merge code is generated at the edge | 46 // frame. For backward jumps, the merge code is generated at the edge |
| 48 // leaving the predecessor block. | 47 // leaving the predecessor block. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void DoBranch(Condition cc, Hint hint); | 191 void DoBranch(Condition cc, Hint hint); |
| 193 void DoBind(int mergable_elements); | 192 void DoBind(int mergable_elements); |
| 194 | 193 |
| 195 private: | 194 private: |
| 196 static bool compiling_deferred_code_; | 195 static bool compiling_deferred_code_; |
| 197 | 196 |
| 198 // Add a virtual frame reaching this labeled block via a forward jump, | 197 // Add a virtual frame reaching this labeled block via a forward jump, |
| 199 // and a corresponding merge code label. | 198 // and a corresponding merge code label. |
| 200 void AddReachingFrame(VirtualFrame* frame); | 199 void AddReachingFrame(VirtualFrame* frame); |
| 201 | 200 |
| 202 // Compute a frame to use for entry to this block. Mergable elements | 201 // Perform initialization required during entry frame computation |
| 203 // is as described for the Bind function. | 202 // after setting the virtual frame element at index in frame to be |
| 203 // target. |
| 204 inline void InitializeEntryElement(int index, FrameElement* target); |
| 205 |
| 206 // Compute a frame to use for entry to this block. Mergable |
| 207 // elements is as described for the Bind function. |
| 204 void ComputeEntryFrame(int mergable_elements); | 208 void ComputeEntryFrame(int mergable_elements); |
| 205 | 209 |
| 206 DISALLOW_COPY_AND_ASSIGN(JumpTarget); | 210 DISALLOW_COPY_AND_ASSIGN(JumpTarget); |
| 207 }; | 211 }; |
| 208 | 212 |
| 209 | 213 |
| 210 // ------------------------------------------------------------------------- | 214 // ------------------------------------------------------------------------- |
| 211 // Break targets | 215 // Break targets |
| 212 // | 216 // |
| 213 // A break target is a jump target that can be used to break out of a | 217 // A break target is a jump target that can be used to break out of a |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 bool is_shadowing_; | 309 bool is_shadowing_; |
| 306 #endif | 310 #endif |
| 307 | 311 |
| 308 DISALLOW_COPY_AND_ASSIGN(ShadowTarget); | 312 DISALLOW_COPY_AND_ASSIGN(ShadowTarget); |
| 309 }; | 313 }; |
| 310 | 314 |
| 311 | 315 |
| 312 } } // namespace v8::internal | 316 } } // namespace v8::internal |
| 313 | 317 |
| 314 #endif // V8_JUMP_TARGET_H_ | 318 #endif // V8_JUMP_TARGET_H_ |
| OLD | NEW |