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

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

Issue 12900: Irregexp:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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
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 29 matching lines...) Expand all
40 virtual void AdvanceCurrentPosition(int by); 40 virtual void AdvanceCurrentPosition(int by);
41 virtual void AdvanceRegister(int reg, int by); 41 virtual void AdvanceRegister(int reg, int by);
42 virtual void Backtrack(); 42 virtual void Backtrack();
43 virtual void Bind(Label* label); 43 virtual void Bind(Label* label);
44 virtual void CheckBitmap(uc16 start, Label* bitmap, Label* on_zero); 44 virtual void CheckBitmap(uc16 start, Label* bitmap, Label* on_zero);
45 virtual void CheckCharacter(uc16 c, Label* on_equal); 45 virtual void CheckCharacter(uc16 c, Label* on_equal);
46 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); 46 virtual void CheckCharacterGT(uc16 limit, Label* on_greater);
47 virtual void CheckCharacterLT(uc16 limit, Label* on_less); 47 virtual void CheckCharacterLT(uc16 limit, Label* on_less);
48 virtual void CheckCharacters(Vector<const uc16> str, 48 virtual void CheckCharacters(Vector<const uc16> str,
49 int cp_offset, 49 int cp_offset,
50 Label* on_failure); 50 Label* on_failure,
51 virtual void CheckCurrentPosition(int register_index, Label* on_equal); 51 bool check_end_of_string);
52 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position);
52 virtual void CheckNotAtStart(Label* on_not_at_start); 53 virtual void CheckNotAtStart(Label* on_not_at_start);
53 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); 54 virtual void CheckNotBackReference(int start_reg, Label* on_no_match);
54 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, 55 virtual void CheckNotBackReferenceIgnoreCase(int start_reg,
55 Label* on_no_match); 56 Label* on_no_match);
56 virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal); 57 virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal);
57 virtual void CheckNotCharacter(uc16 c, Label* on_not_equal); 58 virtual void CheckNotCharacter(uc16 c, Label* on_not_equal);
58 virtual void CheckNotCharacterAfterOr(uc16 c, uc16 mask, Label* on_not_equal); 59 virtual void CheckNotCharacterAfterOr(uc16 c, uc16 mask, Label* on_not_equal);
59 virtual void CheckNotCharacterAfterMinusOr(uc16 c, 60 virtual void CheckNotCharacterAfterMinusOr(uc16 c,
60 uc16 mask, 61 uc16 mask,
61 Label* on_not_equal); 62 Label* on_not_equal);
62 virtual void DispatchByteMap(uc16 start, 63 virtual void DispatchByteMap(uc16 start,
63 Label* byte_map, 64 Label* byte_map,
64 const Vector<Label*>& destinations); 65 const Vector<Label*>& destinations);
65 virtual void DispatchHalfNibbleMap(uc16 start, 66 virtual void DispatchHalfNibbleMap(uc16 start,
66 Label* half_nibble_map, 67 Label* half_nibble_map,
67 const Vector<Label*>& destinations); 68 const Vector<Label*>& destinations);
68 virtual void DispatchHighByteMap(byte start, 69 virtual void DispatchHighByteMap(byte start,
69 Label* byte_map, 70 Label* byte_map,
70 const Vector<Label*>& destinations); 71 const Vector<Label*>& destinations);
71 virtual void EmitOrLink(Label* label); 72 virtual void EmitOrLink(Label* label);
72 virtual void Fail(); 73 virtual void Fail();
73 virtual Handle<Object> GetCode(); 74 virtual Handle<Object> GetCode(Handle<String> source);
74 virtual void GoTo(Label* label); 75 virtual void GoTo(Label* label);
75 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); 76 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge);
76 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); 77 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt);
77 virtual IrregexpImplementation Implementation(); 78 virtual IrregexpImplementation Implementation();
78 virtual void LoadCurrentCharacter(int cp_offset, Label* on_end_of_input); 79 virtual void LoadCurrentCharacter(int cp_offset, Label* on_end_of_input);
80 virtual void LoadCurrentCharacterUnchecked(int cp_offset);
81
79 virtual void PopCurrentPosition(); 82 virtual void PopCurrentPosition();
80 virtual void PopRegister(int register_index); 83 virtual void PopRegister(int register_index);
81 virtual void PushBacktrack(Label* label); 84 virtual void PushBacktrack(Label* label);
82 virtual void PushCurrentPosition(); 85 virtual void PushCurrentPosition();
83 virtual void PushRegister(int register_index); 86 virtual void PushRegister(int register_index);
84 virtual void ReadCurrentPositionFromRegister(int reg); 87 virtual void ReadCurrentPositionFromRegister(int reg);
85 virtual void ReadStackPointerFromRegister(int reg); 88 virtual void ReadStackPointerFromRegister(int reg);
86 virtual void SetRegister(int register_index, int to); 89 virtual void SetRegister(int register_index, int to);
87 virtual void Succeed(); 90 virtual void Succeed();
88 virtual void WriteCurrentPositionToRegister(int reg); 91 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset);
89 virtual void WriteStackPointerToRegister(int reg); 92 virtual void WriteStackPointerToRegister(int reg);
90 93
91 template <typename T> 94 template <typename T>
92 static inline bool Execute(Code* code, 95 static inline bool Execute(Code* code,
93 T** input, 96 T** input,
94 int start_offset, 97 int start_offset,
95 int end_offset, 98 int end_offset,
96 int* output, 99 int* output,
97 bool at_start) { 100 bool at_start) {
98 typedef bool (*matcher)(T**, int, int, int*, int); 101 typedef bool (*matcher)(T**, int, int, int*, int);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // The register containing the current character after LoadCurrentCharacter. 135 // The register containing the current character after LoadCurrentCharacter.
133 Register current_character(); 136 Register current_character();
134 137
135 // Byte size of chars in the string to match (decided by the Mode argument) 138 // Byte size of chars in the string to match (decided by the Mode argument)
136 size_t char_size(); 139 size_t char_size();
137 140
138 // Equivalent to a conditional branch to the label, unless the label 141 // Equivalent to a conditional branch to the label, unless the label
139 // is NULL, in which case it is a conditional Backtrack. 142 // is NULL, in which case it is a conditional Backtrack.
140 void BranchOrBacktrack(Condition condition, Label* to); 143 void BranchOrBacktrack(Condition condition, Label* to);
141 144
142 // Read a character from input at the given offset from the current
143 // position.
144 void LoadCurrentCharToRegister(int cp_offset);
145
146 // Load the address of a "constant buffer" (a slice of a byte array) 145 // Load the address of a "constant buffer" (a slice of a byte array)
147 // into a register. The address is computed from the ByteArray* address 146 // into a register. The address is computed from the ByteArray* address
148 // and an offset. Uses no extra registers. 147 // and an offset. Uses no extra registers.
149 void LoadConstantBufferAddress(Register reg, ArraySlice* buffer); 148 void LoadConstantBufferAddress(Register reg, ArraySlice* buffer);
150 149
151 // Adds code that checks whether preemption has been requested 150 // Adds code that checks whether preemption has been requested
152 // (and checks if we have hit the stack limit too). 151 // (and checks if we have hit the stack limit too).
153 void CheckStackLimit(); 152 void CheckStackLimit();
154 153
155 MacroAssembler* masm_; 154 MacroAssembler* masm_;
(...skipping 12 matching lines...) Expand all
168 Label start_label_; 167 Label start_label_;
169 Label success_label_; 168 Label success_label_;
170 Label exit_label_; 169 Label exit_label_;
171 // Handle used to represent the generated code object itself. 170 // Handle used to represent the generated code object itself.
172 Handle<Object> self_; 171 Handle<Object> self_;
173 }; 172 };
174 173
175 }} // namespace v8::internal 174 }} // namespace v8::internal
176 175
177 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */ 176 #endif /* REGEXP_MACRO_ASSEMBLER_IA32_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698