OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 inline void Push(Label* label); | 240 inline void Push(Label* label); |
241 | 241 |
242 // Pops a value from the backtrack stack. Reads the word at the stack pointer | 242 // Pops a value from the backtrack stack. Reads the word at the stack pointer |
243 // (rcx) and increments it by a word size. | 243 // (rcx) and increments it by a word size. |
244 inline void Pop(Register target); | 244 inline void Pop(Register target); |
245 | 245 |
246 // Drops the top value from the backtrack stack without reading it. | 246 // Drops the top value from the backtrack stack without reading it. |
247 // Increments the stack pointer (rcx) by a word size. | 247 // Increments the stack pointer (rcx) by a word size. |
248 inline void Drop(); | 248 inline void Drop(); |
249 | 249 |
250 // Before calling a C-function from generated code, align arguments on stack. | |
251 // After aligning the frame, arguments must be stored in esp[0], esp[4], | |
252 // etc., not pushed. The argument count assumes all arguments are word sized. | |
253 // Some compilers/platforms require the stack to be aligned when calling | |
254 // C++ code. | |
255 // Needs a scratch register to do some arithmetic. This register will be | |
256 // trashed. | |
257 inline void FrameAlign(int num_arguments); | |
258 | |
259 // Calls a C function and cleans up the space for arguments allocated | |
260 // by FrameAlign. The called function is not allowed to trigger a garbage | |
261 // collection, since that might move the code and invalidate the return | |
262 // address (unless this is somehow accounted for by the called function). | |
263 inline void CallCFunction(ExternalReference function, int num_arguments); | |
264 | |
265 MacroAssembler* masm_; | 250 MacroAssembler* masm_; |
266 | 251 |
267 ZoneList<int> code_relative_fixup_positions_; | 252 ZoneList<int> code_relative_fixup_positions_; |
268 | 253 |
269 // Which mode to generate code for (ASCII or UC16). | 254 // Which mode to generate code for (ASCII or UC16). |
270 Mode mode_; | 255 Mode mode_; |
271 | 256 |
272 // One greater than maximal register index actually used. | 257 // One greater than maximal register index actually used. |
273 int num_registers_; | 258 int num_registers_; |
274 | 259 |
275 // Number of registers to output at the end (the saved registers | 260 // Number of registers to output at the end (the saved registers |
276 // are always 0..num_saved_registers_-1) | 261 // are always 0..num_saved_registers_-1) |
277 int num_saved_registers_; | 262 int num_saved_registers_; |
278 | 263 |
279 // Labels used internally. | 264 // Labels used internally. |
280 Label entry_label_; | 265 Label entry_label_; |
281 Label start_label_; | 266 Label start_label_; |
282 Label success_label_; | 267 Label success_label_; |
283 Label backtrack_label_; | 268 Label backtrack_label_; |
284 Label exit_label_; | 269 Label exit_label_; |
285 Label check_preempt_label_; | 270 Label check_preempt_label_; |
286 Label stack_overflow_label_; | 271 Label stack_overflow_label_; |
287 }; | 272 }; |
288 | 273 |
289 #endif // V8_NATIVE_REGEXP | 274 #endif // V8_NATIVE_REGEXP |
290 | 275 |
291 }} // namespace v8::internal | 276 }} // namespace v8::internal |
292 | 277 |
293 #endif // V8_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ | 278 #endif // V8_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |