| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 VM_REGEXP_H_ | 5 #ifndef VM_REGEXP_H_ |
| 6 #define VM_REGEXP_H_ | 6 #define VM_REGEXP_H_ |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 bool contains_anchor; | 1365 bool contains_anchor; |
| 1366 String& error; | 1366 String& error; |
| 1367 intptr_t capture_count; | 1367 intptr_t capture_count; |
| 1368 }; | 1368 }; |
| 1369 | 1369 |
| 1370 | 1370 |
| 1371 class RegExpEngine: public AllStatic { | 1371 class RegExpEngine: public AllStatic { |
| 1372 public: | 1372 public: |
| 1373 struct CompilationResult { | 1373 struct CompilationResult { |
| 1374 explicit CompilationResult(const char* error_message) | 1374 explicit CompilationResult(const char* error_message) |
| 1375 : macro_assembler(NULL), | 1375 : graph_entry(NULL), |
| 1376 graph_entry(NULL), | |
| 1377 num_blocks(-1), | 1376 num_blocks(-1), |
| 1378 num_stack_locals(-1), | 1377 num_stack_locals(-1), |
| 1379 error_message(error_message) {} | 1378 error_message(error_message) {} |
| 1380 CompilationResult(IRRegExpMacroAssembler* macro_assembler, | 1379 CompilationResult(GraphEntryInstr* graph_entry, |
| 1381 GraphEntryInstr* graph_entry, | |
| 1382 intptr_t num_blocks, | 1380 intptr_t num_blocks, |
| 1383 intptr_t num_stack_locals) | 1381 intptr_t num_stack_locals) |
| 1384 : macro_assembler(macro_assembler), | 1382 : graph_entry(graph_entry), |
| 1385 graph_entry(graph_entry), | |
| 1386 num_blocks(num_blocks), | 1383 num_blocks(num_blocks), |
| 1387 num_stack_locals(num_stack_locals), | 1384 num_stack_locals(num_stack_locals), |
| 1388 error_message(NULL) {} | 1385 error_message(NULL) {} |
| 1389 | 1386 |
| 1390 IRRegExpMacroAssembler* macro_assembler; | |
| 1391 GraphEntryInstr* graph_entry; | 1387 GraphEntryInstr* graph_entry; |
| 1392 const intptr_t num_blocks; | 1388 const intptr_t num_blocks; |
| 1393 const intptr_t num_stack_locals; | 1389 const intptr_t num_stack_locals; |
| 1394 | |
| 1395 const char* error_message; | 1390 const char* error_message; |
| 1396 }; | 1391 }; |
| 1397 | 1392 |
| 1398 static CompilationResult Compile( | 1393 static CompilationResult Compile( |
| 1399 RegExpCompileData* input, | 1394 RegExpCompileData* input, |
| 1400 const ParsedFunction* parsed_function, | 1395 const ParsedFunction* parsed_function, |
| 1401 const ZoneGrowableArray<const ICData*>& ic_data_array); | 1396 const ZoneGrowableArray<const ICData*>& ic_data_array); |
| 1402 | 1397 |
| 1403 static RawJSRegExp* CreateJSRegExp( | 1398 static RawJSRegExp* CreateJSRegExp( |
| 1404 Isolate* isolate, | 1399 Isolate* isolate, |
| 1405 const String& pattern, | 1400 const String& pattern, |
| 1406 bool multi_line, | 1401 bool multi_line, |
| 1407 bool ignore_case); | 1402 bool ignore_case); |
| 1408 | 1403 |
| 1409 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1404 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1410 }; | 1405 }; |
| 1411 | 1406 |
| 1412 } // namespace dart | 1407 } // namespace dart |
| 1413 | 1408 |
| 1414 #endif // VM_REGEXP_H_ | 1409 #endif // VM_REGEXP_H_ |
| OLD | NEW |