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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 virtual void PushRegister(int register_index); | 81 virtual void PushRegister(int register_index); |
82 virtual void ReadCurrentPositionFromRegister(int reg); | 82 virtual void ReadCurrentPositionFromRegister(int reg); |
83 virtual void ReadStackPointerFromRegister(int reg); | 83 virtual void ReadStackPointerFromRegister(int reg); |
84 virtual void SetRegister(int register_index, int to); | 84 virtual void SetRegister(int register_index, int to); |
85 virtual void Succeed(); | 85 virtual void Succeed(); |
86 virtual void WriteCurrentPositionToRegister(int reg); | 86 virtual void WriteCurrentPositionToRegister(int reg); |
87 virtual void WriteStackPointerToRegister(int reg); | 87 virtual void WriteStackPointerToRegister(int reg); |
88 | 88 |
89 private: | 89 private: |
90 // Offsets from ebp of arguments to function. | 90 // Offsets from ebp of arguments to function. |
91 static const int kBackup_edi = 1 * sizeof(uint32_t); | 91 static const int kBackup_ebx = sizeof(uint32_t); |
Lasse Reichstein
2008/11/27 09:26:09
I'm wondering whether sizeof(uint32_t) should be r
| |
92 static const int kBackup_esi= 2 * sizeof(uint32_t); | 92 static const int kBackup_edi = kBackup_ebx + sizeof(uint32_t); |
93 static const int kInputBuffer = 4 * sizeof(uint32_t); | 93 static const int kBackup_esi = kBackup_edi + sizeof(uint32_t); |
94 static const int kInputStartOffset = 5 * sizeof(uint32_t); | 94 static const int kReturn_eip = kBackup_esi + sizeof(uint32_t); |
95 static const int kInputEndOffset = 6 * sizeof(uint32_t); | 95 static const int kInputBuffer = kReturn_eip + sizeof(uint32_t); |
96 static const int kRegisterOutput = 7 * sizeof(uint32_t); | 96 static const int kInputStartOffset = kInputBuffer + sizeof(uint32_t); |
97 static const int kInputEndOffset = kInputStartOffset + sizeof(uint32_t); | |
98 static const int kRegisterOutput = kInputEndOffset + sizeof(uint32_t); | |
97 | 99 |
98 // Initial size of code buffer. | 100 // Initial size of code buffer. |
99 static const size_t kRegExpCodeSize = 1024; | 101 static const size_t kRegExpCodeSize = 1024; |
100 // Initial size of constant buffers allocated during compilation. | 102 // Initial size of constant buffers allocated during compilation. |
101 static const int kRegExpConstantsSize = 256; | 103 static const int kRegExpConstantsSize = 256; |
102 // Only unroll loops up to this length. | 104 // Only unroll loops up to this length. |
103 static const int kMaxInlineStringTests = 8; | 105 static const int kMaxInlineStringTests = 8; |
104 // Special "character" marking end of input. | 106 // Special "character" marking end of input. |
105 static const uint32_t kEndOfInput = ~0; | 107 static const uint32_t kEndOfInput = ~0; |
106 | 108 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 Label start_label_; | 155 Label start_label_; |
154 Label success_label_; | 156 Label success_label_; |
155 Label exit_label_; | 157 Label exit_label_; |
156 // Handle used to represent the generated code object itself. | 158 // Handle used to represent the generated code object itself. |
157 Handle<Object> self_; | 159 Handle<Object> self_; |
158 }; | 160 }; |
159 | 161 |
160 }} // namespace v8::internal | 162 }} // namespace v8::internal |
161 | 163 |
162 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */ | 164 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */ |
OLD | NEW |