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

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

Issue 11600: * Rename to Irregexp throughout.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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 21 matching lines...) Expand all
32 32
33 33
34 struct DisjunctDecisionRow { 34 struct DisjunctDecisionRow {
35 RegExpCharacterClass cc; 35 RegExpCharacterClass cc;
36 Label* on_match; 36 Label* on_match;
37 }; 37 };
38 38
39 39
40 class RegExpMacroAssembler { 40 class RegExpMacroAssembler {
41 public: 41 public:
42 enum Re2kImplementation { 42 enum IrregexpImplementation {
43 kIA32Implementation, 43 kIA32Implementation,
44 kARMImplementation, 44 kARMImplementation,
45 kBytecodeImplementation}; 45 kBytecodeImplementation};
46 46
47 RegExpMacroAssembler(); 47 RegExpMacroAssembler();
48 virtual ~RegExpMacroAssembler(); 48 virtual ~RegExpMacroAssembler();
49 virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change. 49 virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change.
50 virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by. 50 virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by.
51 virtual void Backtrack() = 0; 51 virtual void Backtrack() = 0;
52 virtual void Bind(Label* label) = 0; 52 virtual void Bind(Label* label) = 0;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual void EmitOrLink(Label* label) = 0; 110 virtual void EmitOrLink(Label* label) = 0;
111 virtual void Fail() = 0; 111 virtual void Fail() = 0;
112 virtual Handle<Object> GetCode() = 0; 112 virtual Handle<Object> GetCode() = 0;
113 virtual void GoTo(Label* label) = 0; 113 virtual void GoTo(Label* label) = 0;
114 // Check whether a register is >= a given constant and go to a label if it 114 // Check whether a register is >= a given constant and go to a label if it
115 // is. Backtracks instead if the label is NULL. 115 // is. Backtracks instead if the label is NULL.
116 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge) = 0; 116 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge) = 0;
117 // Check whether a register is < a given constant and go to a label if it is. 117 // Check whether a register is < a given constant and go to a label if it is.
118 // Backtracks instead if the label is NULL. 118 // Backtracks instead if the label is NULL.
119 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt) = 0; 119 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt) = 0;
120 virtual Re2kImplementation Implementation() = 0; 120 virtual IrregexpImplementation Implementation() = 0;
121 virtual void LoadCurrentCharacter(int cp_offset, Label* on_end_of_input) = 0; 121 virtual void LoadCurrentCharacter(int cp_offset, Label* on_end_of_input) = 0;
122 virtual void PopCurrentPosition() = 0; 122 virtual void PopCurrentPosition() = 0;
123 virtual void PopRegister(int register_index) = 0; 123 virtual void PopRegister(int register_index) = 0;
124 virtual void PushBacktrack(Label* label) = 0; 124 virtual void PushBacktrack(Label* label) = 0;
125 virtual void PushCurrentPosition() = 0; 125 virtual void PushCurrentPosition() = 0;
126 virtual void PushRegister(int register_index) = 0; 126 virtual void PushRegister(int register_index) = 0;
127 virtual void ReadCurrentPositionFromRegister(int reg) = 0; 127 virtual void ReadCurrentPositionFromRegister(int reg) = 0;
128 virtual void ReadStackPointerFromRegister(int reg) = 0; 128 virtual void ReadStackPointerFromRegister(int reg) = 0;
129 virtual void SetRegister(int register_index, int to) = 0; 129 virtual void SetRegister(int register_index, int to) = 0;
130 virtual void Succeed() = 0; 130 virtual void Succeed() = 0;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 ArraySlice GetBuffer(Vector<T> values); 172 ArraySlice GetBuffer(Vector<T> values);
173 private: 173 private:
174 size_t byte_array_size_; 174 size_t byte_array_size_;
175 Handle<ByteArray> current_byte_array_; 175 Handle<ByteArray> current_byte_array_;
176 int current_byte_array_free_offset_; 176 int current_byte_array_free_offset_;
177 }; 177 };
178 178
179 } } // namespace v8::internal 179 } } // namespace v8::internal
180 180
181 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ 181 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/regexp-macro-assembler-ia32.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698