| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 | 94 |
| 95 | 95 |
| 96 class EntryFrameConstants : public AllStatic { | 96 class EntryFrameConstants : public AllStatic { |
| 97 public: | 97 public: |
| 98 static const int kCallerFPOffset = -3 * kPointerSize; | 98 static const int kCallerFPOffset = -3 * kPointerSize; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 | 101 |
| 102 class ExitFrameConstants : public AllStatic { | 102 class ExitFrameConstants : public AllStatic { |
| 103 public: | 103 public: |
| 104 static const int kDebugMarkOffset = -1 * kPointerSize; | 104 // See some explanation in MacroAssembler::EnterExitFrame. |
| 105 // Must be the same as kDebugMarkOffset. Alias introduced when upgrading. | 105 // This marks the top of the extra allocated stack space. |
| 106 static const int kCodeOffset = -1 * kPointerSize; | 106 static const int kStackSpaceOffset = -3 * kPointerSize; |
| 107 |
| 108 static const int kCodeOffset = -2 * kPointerSize; |
| 109 |
| 107 static const int kSPOffset = -1 * kPointerSize; | 110 static const int kSPOffset = -1 * kPointerSize; |
| 108 | 111 |
| 109 // TODO(mips): Use a patched sp value on the stack instead. | |
| 110 // A marker of 0 indicates that double registers are saved. | |
| 111 static const int kMarkerOffset = -2 * kPointerSize; | |
| 112 | |
| 113 // The caller fields are below the frame pointer on the stack. | 112 // The caller fields are below the frame pointer on the stack. |
| 114 static const int kCallerFPOffset = +0 * kPointerSize; | 113 static const int kCallerFPOffset = +0 * kPointerSize; |
| 115 // The calling JS function is between FP and PC. | 114 // The calling JS function is between FP and PC. |
| 116 static const int kCallerPCOffset = +1 * kPointerSize; | 115 static const int kCallerPCOffset = +1 * kPointerSize; |
| 117 | 116 |
| 117 // MIPS-specific: a pointer to the old sp to avoid unnecessary calculations. |
| 118 static const int kCallerSPOffset = +2 * kPointerSize; |
| 119 |
| 118 // FP-relative displacement of the caller's SP. | 120 // FP-relative displacement of the caller's SP. |
| 119 static const int kCallerSPDisplacement = +3 * kPointerSize; | 121 static const int kCallerSPDisplacement = +2 * kPointerSize; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 | 124 |
| 123 class StandardFrameConstants : public AllStatic { | 125 class StandardFrameConstants : public AllStatic { |
| 124 public: | 126 public: |
| 125 static const int kExpressionsOffset = -3 * kPointerSize; | 127 static const int kExpressionsOffset = -3 * kPointerSize; |
| 126 static const int kMarkerOffset = -2 * kPointerSize; | 128 static const int kMarkerOffset = -2 * kPointerSize; |
| 127 static const int kContextOffset = -1 * kPointerSize; | 129 static const int kContextOffset = -1 * kPointerSize; |
| 128 static const int kCallerFPOffset = 0 * kPointerSize; | 130 static const int kCallerFPOffset = 0 * kPointerSize; |
| 129 static const int kCallerPCOffset = +1 * kPointerSize; | 131 static const int kCallerPCOffset = +1 * kPointerSize; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 173 |
| 172 inline Object* JavaScriptFrame::function_slot_object() const { | 174 inline Object* JavaScriptFrame::function_slot_object() const { |
| 173 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 175 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
| 174 return Memory::Object_at(fp() + offset); | 176 return Memory::Object_at(fp() + offset); |
| 175 } | 177 } |
| 176 | 178 |
| 177 | 179 |
| 178 } } // namespace v8::internal | 180 } } // namespace v8::internal |
| 179 | 181 |
| 180 #endif | 182 #endif |
| OLD | NEW |