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

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

Issue 17409: Check for empty repetitions. (Closed)
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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 Label* half_nibble_map, 99 Label* half_nibble_map,
100 const Vector<Label*>& destinations); 100 const Vector<Label*>& destinations);
101 virtual void DispatchByteMap(uc16 start, 101 virtual void DispatchByteMap(uc16 start,
102 Label* byte_map, 102 Label* byte_map,
103 const Vector<Label*>& destinations); 103 const Vector<Label*>& destinations);
104 virtual void DispatchHighByteMap(byte start, 104 virtual void DispatchHighByteMap(byte start,
105 Label* byte_map, 105 Label* byte_map,
106 const Vector<Label*>& destinations); 106 const Vector<Label*>& destinations);
107 virtual void IfRegisterLT(int register_index, int comparand, Label* if_lt); 107 virtual void IfRegisterLT(int register_index, int comparand, Label* if_lt);
108 virtual void IfRegisterGE(int register_index, int comparand, Label* if_ge); 108 virtual void IfRegisterGE(int register_index, int comparand, Label* if_ge);
109 virtual void IfRegisterEqPos(int register_index, Label* if_eq);
109 110
110 virtual IrregexpImplementation Implementation(); 111 virtual IrregexpImplementation Implementation();
111 virtual Handle<Object> GetCode(Handle<String> source); 112 virtual Handle<Object> GetCode(Handle<String> source);
112 private: 113 private:
113 void Expand(); 114 void Expand();
114 // Code and bitmap emission. 115 // Code and bitmap emission.
115 inline void Emit32(uint32_t x); 116 inline void Emit32(uint32_t x);
116 inline void Emit16(uint32_t x); 117 inline void Emit16(uint32_t x);
117 inline void Emit(uint32_t x); 118 inline void Emit(uint32_t x);
118 // Bytecode buffer. 119 // Bytecode buffer.
119 int length(); 120 int length();
120 void Copy(Address a); 121 void Copy(Address a);
121 122
122 // The buffer into which code and relocation info are generated. 123 // The buffer into which code and relocation info are generated.
123 Vector<byte> buffer_; 124 Vector<byte> buffer_;
124 // The program counter. 125 // The program counter.
125 int pc_; 126 int pc_;
126 // True if the assembler owns the buffer, false if buffer is external. 127 // True if the assembler owns the buffer, false if buffer is external.
127 bool own_buffer_; 128 bool own_buffer_;
128 Label backtrack_; 129 Label backtrack_;
129 130
130 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); 131 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp);
131 }; 132 };
132 133
133 } } // namespace v8::internal 134 } } // namespace v8::internal
134 135
135 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ 136 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698