OLD | NEW |
1 // Copyright 2008-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 static const int kFramePointer = 0; | 128 static const int kFramePointer = 0; |
129 // Above the frame pointer - function parameters and return address. | 129 // Above the frame pointer - function parameters and return address. |
130 static const int kReturn_eip = kFramePointer + kPointerSize; | 130 static const int kReturn_eip = kFramePointer + kPointerSize; |
131 static const int kFrameAlign = kReturn_eip + kPointerSize; | 131 static const int kFrameAlign = kReturn_eip + kPointerSize; |
132 // Parameters. | 132 // Parameters. |
133 static const int kInputString = kFrameAlign; | 133 static const int kInputString = kFrameAlign; |
134 static const int kStartIndex = kInputString + kPointerSize; | 134 static const int kStartIndex = kInputString + kPointerSize; |
135 static const int kInputStart = kStartIndex + kPointerSize; | 135 static const int kInputStart = kStartIndex + kPointerSize; |
136 static const int kInputEnd = kInputStart + kPointerSize; | 136 static const int kInputEnd = kInputStart + kPointerSize; |
137 static const int kRegisterOutput = kInputEnd + kPointerSize; | 137 static const int kRegisterOutput = kInputEnd + kPointerSize; |
138 static const int kStackHighEnd = kRegisterOutput + kPointerSize; | 138 // For the case of global regular expression, we have room to store at least |
| 139 // one set of capture results. For the case of non-global regexp, we ignore |
| 140 // this value. |
| 141 static const int kNumOutputRegisters = kRegisterOutput + kPointerSize; |
| 142 static const int kStackHighEnd = kNumOutputRegisters + kPointerSize; |
139 static const int kDirectCall = kStackHighEnd + kPointerSize; | 143 static const int kDirectCall = kStackHighEnd + kPointerSize; |
140 static const int kIsolate = kDirectCall + kPointerSize; | 144 static const int kIsolate = kDirectCall + kPointerSize; |
141 // Below the frame pointer - local stack variables. | 145 // Below the frame pointer - local stack variables. |
142 // When adding local variables remember to push space for them in | 146 // When adding local variables remember to push space for them in |
143 // the frame in GetCode. | 147 // the frame in GetCode. |
144 static const int kBackup_esi = kFramePointer - kPointerSize; | 148 static const int kBackup_esi = kFramePointer - kPointerSize; |
145 static const int kBackup_edi = kBackup_esi - kPointerSize; | 149 static const int kBackup_edi = kBackup_esi - kPointerSize; |
146 static const int kBackup_ebx = kBackup_edi - kPointerSize; | 150 static const int kBackup_ebx = kBackup_edi - kPointerSize; |
147 static const int kInputStartMinusOne = kBackup_ebx - kPointerSize; | 151 static const int kSuccessfulCaptures = kBackup_ebx - kPointerSize; |
| 152 static const int kInputStartMinusOne = kSuccessfulCaptures - kPointerSize; |
148 // First register address. Following registers are below it on the stack. | 153 // First register address. Following registers are below it on the stack. |
149 static const int kRegisterZero = kInputStartMinusOne - kPointerSize; | 154 static const int kRegisterZero = kInputStartMinusOne - kPointerSize; |
150 | 155 |
151 // Initial size of code buffer. | 156 // Initial size of code buffer. |
152 static const size_t kRegExpCodeSize = 1024; | 157 static const size_t kRegExpCodeSize = 1024; |
153 | 158 |
154 // Load a number of characters at the given offset from the | 159 // Load a number of characters at the given offset from the |
155 // current position, into the current-character register. | 160 // current position, into the current-character register. |
156 void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); | 161 void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); |
157 | 162 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 Label backtrack_label_; | 223 Label backtrack_label_; |
219 Label exit_label_; | 224 Label exit_label_; |
220 Label check_preempt_label_; | 225 Label check_preempt_label_; |
221 Label stack_overflow_label_; | 226 Label stack_overflow_label_; |
222 }; | 227 }; |
223 #endif // V8_INTERPRETED_REGEXP | 228 #endif // V8_INTERPRETED_REGEXP |
224 | 229 |
225 }} // namespace v8::internal | 230 }} // namespace v8::internal |
226 | 231 |
227 #endif // V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ | 232 #endif // V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |