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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Define the list of registers actually saved at safepoints. | 73 // Define the list of registers actually saved at safepoints. |
74 // Note that the number of saved registers may be smaller than the reserved | 74 // Note that the number of saved registers may be smaller than the reserved |
75 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters. | 75 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters. |
76 static const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved; | 76 static const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved; |
77 static const int kNumSafepointSavedRegisters = | 77 static const int kNumSafepointSavedRegisters = |
78 kNumJSCallerSaved + kNumCalleeSaved; | 78 kNumJSCallerSaved + kNumCalleeSaved; |
79 | 79 |
80 typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved]; | 80 typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved]; |
81 | 81 |
| 82 static const int kUndefIndex = -1; |
| 83 // Map with indexes on stack that corresponds to codes of saved registers. |
| 84 static const int kSafepointRegisterStackIndexMap[kNumRegs] = { |
| 85 kUndefIndex, |
| 86 kUndefIndex, |
| 87 0, // v0 |
| 88 kUndefIndex, |
| 89 1, // a0 |
| 90 2, // a1 |
| 91 3, // a2 |
| 92 4, // a3 |
| 93 kUndefIndex, |
| 94 kUndefIndex, |
| 95 kUndefIndex, |
| 96 kUndefIndex, |
| 97 kUndefIndex, |
| 98 kUndefIndex, |
| 99 kUndefIndex, |
| 100 kUndefIndex, |
| 101 5, // Saved temporaries. |
| 102 6, |
| 103 7, |
| 104 8, |
| 105 9, |
| 106 10, |
| 107 11, |
| 108 12, |
| 109 kUndefIndex, |
| 110 kUndefIndex, |
| 111 kUndefIndex, |
| 112 kUndefIndex, |
| 113 13, // gp |
| 114 14, // sp |
| 115 15, // fp |
| 116 kUndefIndex |
| 117 }; |
| 118 |
82 | 119 |
83 // ---------------------------------------------------- | 120 // ---------------------------------------------------- |
84 | 121 |
85 class StackHandlerConstants : public AllStatic { | 122 class StackHandlerConstants : public AllStatic { |
86 public: | 123 public: |
87 static const int kNextOffset = 0 * kPointerSize; | 124 static const int kNextOffset = 0 * kPointerSize; |
88 static const int kStateOffset = 1 * kPointerSize; | 125 static const int kStateOffset = 1 * kPointerSize; |
89 static const int kFPOffset = 2 * kPointerSize; | 126 static const int kFPOffset = 2 * kPointerSize; |
90 static const int kPCOffset = 3 * kPointerSize; | 127 static const int kPCOffset = 3 * kPointerSize; |
91 | 128 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 210 |
174 inline Object* JavaScriptFrame::function_slot_object() const { | 211 inline Object* JavaScriptFrame::function_slot_object() const { |
175 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 212 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
176 return Memory::Object_at(fp() + offset); | 213 return Memory::Object_at(fp() + offset); |
177 } | 214 } |
178 | 215 |
179 | 216 |
180 } } // namespace v8::internal | 217 } } // namespace v8::internal |
181 | 218 |
182 #endif | 219 #endif |
OLD | NEW |