| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 virtual void SetRegister(int register_index, int to); | 97 virtual void SetRegister(int register_index, int to); |
| 98 virtual void Succeed(); | 98 virtual void Succeed(); |
| 99 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); | 99 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); |
| 100 virtual void ClearRegisters(int reg_from, int reg_to); | 100 virtual void ClearRegisters(int reg_from, int reg_to); |
| 101 virtual void WriteStackPointerToRegister(int reg); | 101 virtual void WriteStackPointerToRegister(int reg); |
| 102 | 102 |
| 103 static Result Match(Handle<Code> regexp, | 103 static Result Match(Handle<Code> regexp, |
| 104 Handle<String> subject, | 104 Handle<String> subject, |
| 105 int* offsets_vector, | 105 int* offsets_vector, |
| 106 int offsets_vector_length, | 106 int offsets_vector_length, |
| 107 int previous_index); | 107 int previous_index, |
| 108 Isolate* isolate); |
| 108 | 109 |
| 109 static Result Execute(Code* code, | 110 static Result Execute(Code* code, |
| 110 String* input, | 111 String* input, |
| 111 int start_offset, | 112 int start_offset, |
| 112 const byte* input_start, | 113 const byte* input_start, |
| 113 const byte* input_end, | 114 const byte* input_end, |
| 114 int* output, | 115 int* output, |
| 115 bool at_start); | 116 bool at_start); |
| 116 | 117 |
| 117 // Called from RegExp if the stack-guard is triggered. | 118 // Called from RegExp if the stack-guard is triggered. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 135 // use this space to store the register passed parameters. | 136 // use this space to store the register passed parameters. |
| 136 static const int kInputString = kFrameAlign; | 137 static const int kInputString = kFrameAlign; |
| 137 // StartIndex is passed as 32 bit int. | 138 // StartIndex is passed as 32 bit int. |
| 138 static const int kStartIndex = kInputString + kPointerSize; | 139 static const int kStartIndex = kInputString + kPointerSize; |
| 139 static const int kInputStart = kStartIndex + kPointerSize; | 140 static const int kInputStart = kStartIndex + kPointerSize; |
| 140 static const int kInputEnd = kInputStart + kPointerSize; | 141 static const int kInputEnd = kInputStart + kPointerSize; |
| 141 static const int kRegisterOutput = kInputEnd + kPointerSize; | 142 static const int kRegisterOutput = kInputEnd + kPointerSize; |
| 142 static const int kStackHighEnd = kRegisterOutput + kPointerSize; | 143 static const int kStackHighEnd = kRegisterOutput + kPointerSize; |
| 143 // DirectCall is passed as 32 bit int (values 0 or 1). | 144 // DirectCall is passed as 32 bit int (values 0 or 1). |
| 144 static const int kDirectCall = kStackHighEnd + kPointerSize; | 145 static const int kDirectCall = kStackHighEnd + kPointerSize; |
| 146 static const int kIsolate = kDirectCall + kPointerSize; |
| 145 #else | 147 #else |
| 146 // In AMD64 ABI Calling Convention, the first six integer parameters | 148 // In AMD64 ABI Calling Convention, the first six integer parameters |
| 147 // are passed as registers, and caller must allocate space on the stack | 149 // are passed as registers, and caller must allocate space on the stack |
| 148 // if it wants them stored. We push the parameters after the frame pointer. | 150 // if it wants them stored. We push the parameters after the frame pointer. |
| 149 static const int kInputString = kFramePointer - kPointerSize; | 151 static const int kInputString = kFramePointer - kPointerSize; |
| 150 static const int kStartIndex = kInputString - kPointerSize; | 152 static const int kStartIndex = kInputString - kPointerSize; |
| 151 static const int kInputStart = kStartIndex - kPointerSize; | 153 static const int kInputStart = kStartIndex - kPointerSize; |
| 152 static const int kInputEnd = kInputStart - kPointerSize; | 154 static const int kInputEnd = kInputStart - kPointerSize; |
| 153 static const int kRegisterOutput = kInputEnd - kPointerSize; | 155 static const int kRegisterOutput = kInputEnd - kPointerSize; |
| 154 static const int kStackHighEnd = kRegisterOutput - kPointerSize; | 156 static const int kStackHighEnd = kRegisterOutput - kPointerSize; |
| 155 static const int kDirectCall = kFrameAlign; | 157 static const int kDirectCall = kFrameAlign; |
| 158 static const int kIsolate = kDirectCall + kPointerSize; |
| 156 #endif | 159 #endif |
| 157 | 160 |
| 158 #ifdef _WIN64 | 161 #ifdef _WIN64 |
| 159 // Microsoft calling convention has three callee-saved registers | 162 // Microsoft calling convention has three callee-saved registers |
| 160 // (that we are using). We push these after the frame pointer. | 163 // (that we are using). We push these after the frame pointer. |
| 161 static const int kBackup_rsi = kFramePointer - kPointerSize; | 164 static const int kBackup_rsi = kFramePointer - kPointerSize; |
| 162 static const int kBackup_rdi = kBackup_rsi - kPointerSize; | 165 static const int kBackup_rdi = kBackup_rsi - kPointerSize; |
| 163 static const int kBackup_rbx = kBackup_rdi - kPointerSize; | 166 static const int kBackup_rbx = kBackup_rdi - kPointerSize; |
| 164 static const int kLastCalleeSaveRegister = kBackup_rbx; | 167 static const int kLastCalleeSaveRegister = kBackup_rbx; |
| 165 #else | 168 #else |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 Label exit_label_; | 272 Label exit_label_; |
| 270 Label check_preempt_label_; | 273 Label check_preempt_label_; |
| 271 Label stack_overflow_label_; | 274 Label stack_overflow_label_; |
| 272 }; | 275 }; |
| 273 | 276 |
| 274 #endif // V8_INTERPRETED_REGEXP | 277 #endif // V8_INTERPRETED_REGEXP |
| 275 | 278 |
| 276 }} // namespace v8::internal | 279 }} // namespace v8::internal |
| 277 | 280 |
| 278 #endif // V8_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ | 281 #endif // V8_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |