| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // ------------------------------------------------------------------------- | 50 // ------------------------------------------------------------------------- |
| 51 // Virtual frames | 51 // Virtual frames |
| 52 // | 52 // |
| 53 // The virtual frame is an abstraction of the physical stack frame. It | 53 // The virtual frame is an abstraction of the physical stack frame. It |
| 54 // encapsulates the parameters, frame-allocated locals, and the expression | 54 // encapsulates the parameters, frame-allocated locals, and the expression |
| 55 // stack. It supports push/pop operations on the expression stack, as well | 55 // stack. It supports push/pop operations on the expression stack, as well |
| 56 // as random access to the expression stack elements, locals, and | 56 // as random access to the expression stack elements, locals, and |
| 57 // parameters. | 57 // parameters. |
| 58 | 58 |
| 59 class VirtualFrame : public Malloced{ | 59 class VirtualFrame : public Malloced { |
| 60 public: | 60 public: |
| 61 // Construct a virtual frame with the given code generator used to | 61 // Construct a virtual frame with the given code generator used to |
| 62 // generate code. | 62 // generate code. |
| 63 explicit VirtualFrame(CodeGenerator* cgen); | 63 explicit VirtualFrame(CodeGenerator* cgen); |
| 64 | 64 |
| 65 // Construct a virtual frame that is a clone of an existing one, initially | 65 // Construct a virtual frame that is a clone of an existing one, initially |
| 66 // with an identical state. | 66 // with an identical state. |
| 67 explicit VirtualFrame(VirtualFrame* original); | 67 explicit VirtualFrame(VirtualFrame* original); |
| 68 | 68 |
| 69 int height() const { | 69 int height() const { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 int local0_index() const { return param0_index() + parameter_count_ + 4; } | 189 int local0_index() const { return param0_index() + parameter_count_ + 4; } |
| 190 | 190 |
| 191 // The index of the base of the expression stack. | 191 // The index of the base of the expression stack. |
| 192 int expression_base_index() const { return local0_index() + local_count_; } | 192 int expression_base_index() const { return local0_index() + local_count_; } |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 | 195 |
| 196 } } // namespace v8::internal | 196 } } // namespace v8::internal |
| 197 | 197 |
| 198 #endif // V8_VIRTUAL_FRAME_ARM_H_ | 198 #endif // V8_VIRTUAL_FRAME_ARM_H_ |
| OLD | NEW |