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

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

Issue 722243002: Indirectly dispatch all backtracking jumps through the same block. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: return on unreachable Created 6 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
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/regexp.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) 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
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 : backtrack_goto(NULL),
1376 graph_entry(NULL), 1376 graph_entry(NULL),
1377 num_blocks(-1), 1377 num_blocks(-1),
1378 num_stack_locals(-1), 1378 num_stack_locals(-1),
1379 error_message(error_message) {} 1379 error_message(error_message) {}
1380 CompilationResult(IRRegExpMacroAssembler* macro_assembler, 1380 CompilationResult(IndirectGotoInstr* backtrack_goto,
1381 GraphEntryInstr* graph_entry, 1381 GraphEntryInstr* graph_entry,
1382 intptr_t num_blocks, 1382 intptr_t num_blocks,
1383 intptr_t num_stack_locals) 1383 intptr_t num_stack_locals)
1384 : macro_assembler(macro_assembler), 1384 : backtrack_goto(backtrack_goto),
1385 graph_entry(graph_entry), 1385 graph_entry(graph_entry),
1386 num_blocks(num_blocks), 1386 num_blocks(num_blocks),
1387 num_stack_locals(num_stack_locals), 1387 num_stack_locals(num_stack_locals),
1388 error_message(NULL) {} 1388 error_message(NULL) {}
1389 1389
1390 IRRegExpMacroAssembler* macro_assembler; 1390 IndirectGotoInstr* backtrack_goto;
1391 GraphEntryInstr* graph_entry; 1391 GraphEntryInstr* graph_entry;
1392 const intptr_t num_blocks; 1392 const intptr_t num_blocks;
1393 const intptr_t num_stack_locals; 1393 const intptr_t num_stack_locals;
1394 1394
1395 const char* error_message; 1395 const char* error_message;
1396 }; 1396 };
1397 1397
1398 static CompilationResult Compile( 1398 static CompilationResult Compile(
1399 RegExpCompileData* input, 1399 RegExpCompileData* input,
1400 const ParsedFunction* parsed_function, 1400 const ParsedFunction* parsed_function,
1401 const ZoneGrowableArray<const ICData*>& ic_data_array); 1401 const ZoneGrowableArray<const ICData*>& ic_data_array);
1402 1402
1403 static RawJSRegExp* CreateJSRegExp( 1403 static RawJSRegExp* CreateJSRegExp(
1404 Isolate* isolate, 1404 Isolate* isolate,
1405 const String& pattern, 1405 const String& pattern,
1406 bool multi_line, 1406 bool multi_line,
1407 bool ignore_case); 1407 bool ignore_case);
1408 1408
1409 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); 1409 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case);
1410 }; 1410 };
1411 1411
1412 } // namespace dart 1412 } // namespace dart
1413 1413
1414 #endif // VM_REGEXP_H_ 1414 #endif // VM_REGEXP_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698