| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 virtual void WriteStackPointerToRegister(int reg); | 109 virtual void WriteStackPointerToRegister(int reg); |
| 110 | 110 |
| 111 static Result Execute(Code* code, | 111 static Result Execute(Code* code, |
| 112 Address* input, | 112 Address* input, |
| 113 int start_offset, | 113 int start_offset, |
| 114 int end_offset, | 114 int end_offset, |
| 115 int* output, | 115 int* output, |
| 116 bool at_start); | 116 bool at_start); |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 // Offsets from ebp of arguments to function and stored registers. | 119 // Offsets from ebp of function parameters and stored registers. |
| 120 static const int kBackup_ebx = sizeof(uint32_t); | 120 static const int kFramePointer = 0; |
| 121 static const int kBackup_edi = kBackup_ebx + sizeof(uint32_t); | 121 // Above the frame pointer - function parameters and return address. |
| 122 static const int kBackup_esi = kBackup_edi + sizeof(uint32_t); | 122 static const int kReturn_eip = kFramePointer + kPointerSize; |
| 123 static const int kReturn_eip = kBackup_esi + sizeof(uint32_t); | 123 static const int kInputBuffer = kReturn_eip + kPointerSize; |
| 124 static const int kInputBuffer = kReturn_eip + sizeof(uint32_t); | 124 static const int kInputStartOffset = kInputBuffer + kPointerSize; |
| 125 static const int kInputStartOffset = kInputBuffer + sizeof(uint32_t); | 125 static const int kInputEndOffset = kInputStartOffset + kPointerSize; |
| 126 static const int kInputEndOffset = kInputStartOffset + sizeof(uint32_t); | 126 static const int kRegisterOutput = kInputEndOffset + kPointerSize; |
| 127 static const int kRegisterOutput = kInputEndOffset + sizeof(uint32_t); | 127 static const int kAtStart = kRegisterOutput + kPointerSize; |
| 128 static const int kAtStart = kRegisterOutput + sizeof(uint32_t); | 128 static const int kStackHighEnd = kAtStart + kPointerSize; |
| 129 static const int kStackHighEnd = kAtStart + sizeof(uint32_t); | 129 // Below the frame pointer - local stack variables. |
| 130 static const int kBackup_esi = kFramePointer - kPointerSize; |
| 131 static const int kBackup_edi = kBackup_esi - kPointerSize; |
| 132 static const int kBackup_ebx = kBackup_edi - kPointerSize; |
| 133 // First register address. Following registers are below it on the stack. |
| 134 static const int kRegisterZero = kBackup_ebx - kPointerSize; |
| 130 | 135 |
| 131 // Initial size of code buffer. | 136 // Initial size of code buffer. |
| 132 static const size_t kRegExpCodeSize = 1024; | 137 static const size_t kRegExpCodeSize = 1024; |
| 133 // Initial size of constant buffers allocated during compilation. | 138 // Initial size of constant buffers allocated during compilation. |
| 134 static const int kRegExpConstantsSize = 256; | 139 static const int kRegExpConstantsSize = 256; |
| 135 // Only unroll loops up to this length. | |
| 136 static const int kMaxInlineStringTests = 32; | |
| 137 | 140 |
| 138 // Compares two-byte strings case insensitively. | 141 // Compares two-byte strings case insensitively. |
| 139 // Called from generated RegExp code. | 142 // Called from generated RegExp code. |
| 140 static int CaseInsensitiveCompareUC16(uc16** buffer, | 143 static int CaseInsensitiveCompareUC16(uc16** buffer, |
| 141 int byte_offset1, | 144 int byte_offset1, |
| 142 int byte_offset2, | 145 int byte_offset2, |
| 143 size_t byte_length); | 146 size_t byte_length); |
| 144 | 147 |
| 145 // Load a number of characters at the given offset from the | 148 // Load a number of characters at the given offset from the |
| 146 // current position, into the current-character register. | 149 // current position, into the current-character register. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 Label check_preempt_label_; | 247 Label check_preempt_label_; |
| 245 Label stack_overflow_label_; | 248 Label stack_overflow_label_; |
| 246 | 249 |
| 247 // Handle used to represent the generated code object itself. | 250 // Handle used to represent the generated code object itself. |
| 248 Handle<Object> self_; | 251 Handle<Object> self_; |
| 249 }; | 252 }; |
| 250 | 253 |
| 251 }} // namespace v8::internal | 254 }} // namespace v8::internal |
| 252 | 255 |
| 253 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */ | 256 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */ |
| OLD | NEW |