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 30 matching lines...) Expand all Loading... |
41 // all forward-reaching paths. When bound, an expected frame for the | 41 // all forward-reaching paths. When bound, an expected frame for the |
42 // block is determined and code is generated to merge to the expected | 42 // block is determined and code is generated to merge to the expected |
43 // frame. For backward jumps, the merge code is generated at the edge | 43 // frame. For backward jumps, the merge code is generated at the edge |
44 // leaving the predecessor block. | 44 // leaving the predecessor block. |
45 // | 45 // |
46 // A jump target must have been reached via control flow (either by | 46 // A jump target must have been reached via control flow (either by |
47 // jumping, branching, or falling through) at the time it is bound. | 47 // jumping, branching, or falling through) at the time it is bound. |
48 // In particular, this means that at least one of the control-flow | 48 // In particular, this means that at least one of the control-flow |
49 // graph edges reaching the target must be a forward edge. | 49 // graph edges reaching the target must be a forward edge. |
50 | 50 |
51 class JumpTarget : public ZoneObject { // Shadows are dynamically allocated. | 51 class JumpTarget : public Malloced { // Shadows are dynamically allocated. |
52 public: | 52 public: |
53 // Forward-only jump targets can only be reached by forward CFG edges. | 53 // Forward-only jump targets can only be reached by forward CFG edges. |
54 enum Directionality { FORWARD_ONLY, BIDIRECTIONAL }; | 54 enum Directionality { FORWARD_ONLY, BIDIRECTIONAL }; |
55 | 55 |
56 // Construct a jump target with a given code generator used to generate | 56 // Construct a jump target with a given code generator used to generate |
57 // code and to provide access to a current frame. | 57 // code and to provide access to a current frame. |
58 explicit JumpTarget(CodeGenerator* cgen, | 58 explicit JumpTarget(CodeGenerator* cgen, |
59 Directionality direction = FORWARD_ONLY); | 59 Directionality direction = FORWARD_ONLY); |
60 | 60 |
61 // Construct a jump target without a code generator. A code | 61 // Construct a jump target without a code generator. A code |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 bool is_shadowing_; | 305 bool is_shadowing_; |
306 #endif | 306 #endif |
307 | 307 |
308 DISALLOW_COPY_AND_ASSIGN(ShadowTarget); | 308 DISALLOW_COPY_AND_ASSIGN(ShadowTarget); |
309 }; | 309 }; |
310 | 310 |
311 | 311 |
312 } } // namespace v8::internal | 312 } } // namespace v8::internal |
313 | 313 |
314 #endif // V8_JUMP_TARGET_H_ | 314 #endif // V8_JUMP_TARGET_H_ |
OLD | NEW |