OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef RUNTIME_VM_REGEXP_ASSEMBLER_BYTECODE_H_ | 5 #ifndef RUNTIME_VM_REGEXP_ASSEMBLER_BYTECODE_H_ |
6 #define RUNTIME_VM_REGEXP_ASSEMBLER_BYTECODE_H_ | 6 #define RUNTIME_VM_REGEXP_ASSEMBLER_BYTECODE_H_ |
7 | 7 |
8 #include "vm/object.h" | 8 #include "vm/object.h" |
9 #include "vm/regexp_assembler.h" | 9 #include "vm/regexp_assembler.h" |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // extra goto. | 100 // extra goto. |
101 return true; | 101 return true; |
102 } | 102 } |
103 virtual void Print(const char* str) { UNIMPLEMENTED(); } | 103 virtual void Print(const char* str) { UNIMPLEMENTED(); } |
104 virtual void PrintBlocks() { UNIMPLEMENTED(); } | 104 virtual void PrintBlocks() { UNIMPLEMENTED(); } |
105 ///// | 105 ///// |
106 | 106 |
107 static RawInstance* Interpret(const RegExp& regexp, | 107 static RawInstance* Interpret(const RegExp& regexp, |
108 const String& str, | 108 const String& str, |
109 const Smi& start_index, | 109 const Smi& start_index, |
| 110 bool is_sticky, |
110 Zone* zone); | 111 Zone* zone); |
111 | 112 |
112 private: | 113 private: |
113 void Expand(); | 114 void Expand(); |
114 // Code and bitmap emission. | 115 // Code and bitmap emission. |
115 inline void EmitOrLink(BlockLabel* label); | 116 inline void EmitOrLink(BlockLabel* label); |
116 inline void Emit32(uint32_t x); | 117 inline void Emit32(uint32_t x); |
117 inline void Emit16(uint32_t x); | 118 inline void Emit16(uint32_t x); |
118 inline void Emit8(uint32_t x); | 119 inline void Emit8(uint32_t x); |
119 inline void Emit(uint32_t bc, uint32_t arg); | 120 inline void Emit(uint32_t bc, uint32_t arg); |
(...skipping 14 matching lines...) Expand all Loading... |
134 | 135 |
135 static const int kInvalidPC = -1; | 136 static const int kInvalidPC = -1; |
136 | 137 |
137 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeRegExpMacroAssembler); | 138 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeRegExpMacroAssembler); |
138 }; | 139 }; |
139 | 140 |
140 | 141 |
141 } // namespace dart | 142 } // namespace dart |
142 | 143 |
143 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_BYTECODE_H_ | 144 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_BYTECODE_H_ |
OLD | NEW |