Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: src/regexp-macro-assembler-ia32.h

Issue 17203: Periodic merge from bleeding_edge to experimental code generator... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/regexp-macro-assembler.h ('k') | src/regexp-macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 Label* on_no_match); 60 Label* on_no_match);
61 virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal); 61 virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal);
62 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); 62 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal);
63 virtual void CheckNotCharacterAfterAnd(uint32_t c, 63 virtual void CheckNotCharacterAfterAnd(uint32_t c,
64 uint32_t mask, 64 uint32_t mask,
65 Label* on_not_equal); 65 Label* on_not_equal);
66 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, 66 virtual void CheckNotCharacterAfterMinusAnd(uc16 c,
67 uc16 minus, 67 uc16 minus,
68 uc16 mask, 68 uc16 mask,
69 Label* on_not_equal); 69 Label* on_not_equal);
70 virtual bool CheckSpecialCharacterClass(uc16 type,
71 int cp_offset,
72 bool check_offset,
73 Label* on_no_match);
70 virtual void DispatchByteMap(uc16 start, 74 virtual void DispatchByteMap(uc16 start,
71 Label* byte_map, 75 Label* byte_map,
72 const Vector<Label*>& destinations); 76 const Vector<Label*>& destinations);
73 virtual void DispatchHalfNibbleMap(uc16 start, 77 virtual void DispatchHalfNibbleMap(uc16 start,
74 Label* half_nibble_map, 78 Label* half_nibble_map,
75 const Vector<Label*>& destinations); 79 const Vector<Label*>& destinations);
76 virtual void DispatchHighByteMap(byte start, 80 virtual void DispatchHighByteMap(byte start,
77 Label* byte_map, 81 Label* byte_map,
78 const Vector<Label*>& destinations); 82 const Vector<Label*>& destinations);
79 virtual void EmitOrLink(Label* label); 83 virtual void EmitOrLink(Label* label);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 static const int kMaxInlineStringTests = 32; 141 static const int kMaxInlineStringTests = 32;
138 142
139 // Compares two-byte strings case insensitively. 143 // Compares two-byte strings case insensitively.
140 static int CaseInsensitiveCompareUC16(uc16** buffer, 144 static int CaseInsensitiveCompareUC16(uc16** buffer,
141 int byte_offset1, 145 int byte_offset1,
142 int byte_offset2, 146 int byte_offset2,
143 size_t byte_length); 147 size_t byte_length);
144 148
145 void LoadCurrentCharacterUnchecked(int cp_offset, int characters); 149 void LoadCurrentCharacterUnchecked(int cp_offset, int characters);
146 150
151 // Adds code that checks whether preemption has been requested
152 // (and checks if we have hit the stack limit too).
153 void CheckStackLimit();
154
147 // Called from RegExp if the stack-guard is triggered. 155 // Called from RegExp if the stack-guard is triggered.
148 // If the code object is relocated, the return address is fixed before 156 // If the code object is relocated, the return address is fixed before
149 // returning. 157 // returning.
150 static int CheckStackGuardState(Address return_address, Code* re_code); 158 static int CheckStackGuardState(Address return_address, Code* re_code);
151 159
160 // Checks whether the given offset from the current position is before
161 // the end of the string.
162 void CheckPosition(int cp_offset, Label* on_outside_input);
163
152 // The ebp-relative location of a regexp register. 164 // The ebp-relative location of a regexp register.
153 Operand register_location(int register_index); 165 Operand register_location(int register_index);
154 166
155 // The register containing the current character after LoadCurrentCharacter. 167 // The register containing the current character after LoadCurrentCharacter.
156 Register current_character(); 168 Register current_character();
157 169
158 // Byte size of chars in the string to match (decided by the Mode argument) 170 // Byte size of chars in the string to match (decided by the Mode argument)
159 size_t char_size(); 171 size_t char_size();
160 172
161 // Equivalent to a conditional branch to the label, unless the label 173 // Equivalent to a conditional branch to the label, unless the label
162 // is NULL, in which case it is a conditional Backtrack. 174 // is NULL, in which case it is a conditional Backtrack.
163 void BranchOrBacktrack(Condition condition, Label* to); 175 void BranchOrBacktrack(Condition condition, Label* to);
164 176
165 // Load the address of a "constant buffer" (a slice of a byte array) 177 // Load the address of a "constant buffer" (a slice of a byte array)
166 // into a register. The address is computed from the ByteArray* address 178 // into a register. The address is computed from the ByteArray* address
167 // and an offset. Uses no extra registers. 179 // and an offset. Uses no extra registers.
168 void LoadConstantBufferAddress(Register reg, ArraySlice* buffer); 180 void LoadConstantBufferAddress(Register reg, ArraySlice* buffer);
169 181
170 // Adds code that checks whether preemption has been requested
171 // (and checks if we have hit the stack limit too).
172 void CheckStackLimit();
173
174 // Call and return internally in the generated code in a way that 182 // Call and return internally in the generated code in a way that
175 // is GC-safe (i.e., doesn't leave absolute code addresses on the stack) 183 // is GC-safe (i.e., doesn't leave absolute code addresses on the stack)
176 void SafeCall(Label* to); 184 void SafeCall(Label* to);
177 void SafeReturn(); 185 void SafeReturn();
178 186
179 // Before calling a C-function from generated code, align arguments on stack. 187 // Before calling a C-function from generated code, align arguments on stack.
180 // After aligning the frame, arguments must be stored in esp[0], esp[4], 188 // After aligning the frame, arguments must be stored in esp[0], esp[4],
181 // etc., not pushed. The argument count assumes all arguments are word sized. 189 // etc., not pushed. The argument count assumes all arguments are word sized.
182 void FrameAlign(int num_arguments); 190 void FrameAlign(int num_arguments);
183 // Calls a C function and cleans up the space for arguments allocated 191 // Calls a C function and cleans up the space for arguments allocated
(...skipping 20 matching lines...) Expand all
204 Label backtrack_label_; 212 Label backtrack_label_;
205 Label exit_label_; 213 Label exit_label_;
206 Label check_preempt_label_; 214 Label check_preempt_label_;
207 // Handle used to represent the generated code object itself. 215 // Handle used to represent the generated code object itself.
208 Handle<Object> self_; 216 Handle<Object> self_;
209 }; 217 };
210 218
211 }} // namespace v8::internal 219 }} // namespace v8::internal
212 220
213 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */ 221 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler.h ('k') | src/regexp-macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698