Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: src/arm/frames-arm.h

Issue 118500: Get rid of the notion of "parameter pointer" that no longer exists in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Callee-saved registers preserved when switching from C to JavaScript 62 // Callee-saved registers preserved when switching from C to JavaScript
63 static const RegList kCalleeSaved = 63 static const RegList kCalleeSaved =
64 1 << 4 | // r4 v1 64 1 << 4 | // r4 v1
65 1 << 5 | // r5 v2 65 1 << 5 | // r5 v2
66 1 << 6 | // r6 v3 66 1 << 6 | // r6 v3
67 1 << 7 | // r7 v4 67 1 << 7 | // r7 v4
68 1 << 8 | // r8 v5 (cp in JavaScript code) 68 1 << 8 | // r8 v5 (cp in JavaScript code)
69 kR9Available 69 kR9Available
70 << 9 | // r9 v6 70 << 9 | // r9 v6
71 1 << 10 | // r10 v7 (pp in JavaScript code) 71 1 << 10 | // r10 v7
72 1 << 11; // r11 v8 (fp in JavaScript code) 72 1 << 11; // r11 v8 (fp in JavaScript code)
73 73
74 static const int kNumCalleeSaved = 7 + kR9Available; 74 static const int kNumCalleeSaved = 7 + kR9Available;
75 75
76 76
77 // ---------------------------------------------------- 77 // ----------------------------------------------------
78 78
79 79
80 class StackHandlerConstants : public AllStatic { 80 class StackHandlerConstants : public AllStatic {
81 public: 81 public:
(...skipping 15 matching lines...) Expand all
97 class ExitFrameConstants : public AllStatic { 97 class ExitFrameConstants : public AllStatic {
98 public: 98 public:
99 // Exit frames have a debug marker on the stack. 99 // Exit frames have a debug marker on the stack.
100 static const int kSPDisplacement = -1 * kPointerSize; 100 static const int kSPDisplacement = -1 * kPointerSize;
101 101
102 // The debug marker is just above the frame pointer. 102 // The debug marker is just above the frame pointer.
103 static const int kDebugMarkOffset = -1 * kPointerSize; 103 static const int kDebugMarkOffset = -1 * kPointerSize;
104 104
105 static const int kSavedRegistersOffset = 0 * kPointerSize; 105 static const int kSavedRegistersOffset = 0 * kPointerSize;
106 106
107 // Let the parameters pointer for exit frames point just below the
108 // frame structure on the stack.
109 static const int kPPDisplacement = 3 * kPointerSize;
110
111 // The caller fields are below the frame pointer on the stack. 107 // The caller fields are below the frame pointer on the stack.
112 static const int kCallerFPOffset = +0 * kPointerSize; 108 static const int kCallerFPOffset = +0 * kPointerSize;
113 static const int kCallerPPOffset = +1 * kPointerSize; 109 // The calling JS function is between FP and PC.
114 static const int kCallerPCOffset = +2 * kPointerSize; 110 static const int kCallerPCOffset = +2 * kPointerSize;
111
112 // FP-relative displacement of the caller's SP. It points just
113 // below the saved PC.
114 static const int kCallerSPDisplacement = +3 * kPointerSize;
115 }; 115 };
116 116
117 117
118 class StandardFrameConstants : public AllStatic { 118 class StandardFrameConstants : public AllStatic {
119 public: 119 public:
120 static const int kExpressionsOffset = -3 * kPointerSize; 120 static const int kExpressionsOffset = -3 * kPointerSize;
121 static const int kMarkerOffset = -2 * kPointerSize; 121 static const int kMarkerOffset = -2 * kPointerSize;
122 static const int kContextOffset = -1 * kPointerSize; 122 static const int kContextOffset = -1 * kPointerSize;
123 static const int kCallerFPOffset = 0 * kPointerSize; 123 static const int kCallerFPOffset = 0 * kPointerSize;
124 static const int kCallerPCOffset = +1 * kPointerSize; 124 static const int kCallerPCOffset = +1 * kPointerSize;
125 static const int kCallerSPOffset = +2 * kPointerSize; 125 static const int kCallerSPOffset = +2 * kPointerSize;
126 }; 126 };
127 127
128 128
129 class JavaScriptFrameConstants : public AllStatic { 129 class JavaScriptFrameConstants : public AllStatic {
130 public: 130 public:
131 // FP-relative. 131 // FP-relative.
132 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; 132 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset;
133 static const int kSavedRegistersOffset = +2 * kPointerSize; 133 static const int kSavedRegistersOffset = +2 * kPointerSize;
134 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; 134 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset;
135 135
136 // PP-relative. 136 // Caller SP-relative.
137 static const int kParam0Offset = -2 * kPointerSize; 137 static const int kParam0Offset = -2 * kPointerSize;
138 static const int kReceiverOffset = -1 * kPointerSize; 138 static const int kReceiverOffset = -1 * kPointerSize;
139 }; 139 };
140 140
141 141
142 class ArgumentsAdaptorFrameConstants : public AllStatic { 142 class ArgumentsAdaptorFrameConstants : public AllStatic {
143 public: 143 public:
144 static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset; 144 static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
145 }; 145 };
146 146
147 147
148 class InternalFrameConstants : public AllStatic { 148 class InternalFrameConstants : public AllStatic {
149 public: 149 public:
150 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset; 150 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
151 }; 151 };
152 152
153 153
154 inline Object* JavaScriptFrame::function_slot_object() const { 154 inline Object* JavaScriptFrame::function_slot_object() const {
155 const int offset = JavaScriptFrameConstants::kFunctionOffset; 155 const int offset = JavaScriptFrameConstants::kFunctionOffset;
156 return Memory::Object_at(fp() + offset); 156 return Memory::Object_at(fp() + offset);
157 } 157 }
158 158
159 159
160 } } // namespace v8::internal 160 } } // namespace v8::internal
161 161
162 #endif // V8_ARM_FRAMES_ARM_H_ 162 #endif // V8_ARM_FRAMES_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698