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

Side by Side Diff: runtime/vm/regexp_assembler_bytecode.h

Issue 2510783002: VM: Optimize RegExp.matchAsPrefix(...) by generating a sticky RegExp specialization. (Closed)
Patch Set: Done Created 4 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
« no previous file with comments | « runtime/vm/regexp.cc ('k') | runtime/vm/regexp_assembler_bytecode.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/regexp.cc ('k') | runtime/vm/regexp_assembler_bytecode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698