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

Side by Side Diff: src/jsregexp.cc

Issue 21014: RegExp: Fix missing adaption of debug check after changing definition of a Trace being trivial. (Closed)
Patch Set: Created 11 years, 10 months 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 } 1500 }
1501 } 1501 }
1502 1502
1503 1503
1504 // This is called as we come into a loop choice node and some other tricky 1504 // This is called as we come into a loop choice node and some other tricky
1505 // nodes. It normalizes the state of the code generator to ensure we can 1505 // nodes. It normalizes the state of the code generator to ensure we can
1506 // generate generic code. 1506 // generate generic code.
1507 void Trace::Flush(RegExpCompiler* compiler, RegExpNode* successor) { 1507 void Trace::Flush(RegExpCompiler* compiler, RegExpNode* successor) {
1508 RegExpMacroAssembler* assembler = compiler->macro_assembler(); 1508 RegExpMacroAssembler* assembler = compiler->macro_assembler();
1509 1509
1510 ASSERT(actions_ != NULL || 1510 ASSERT(!is_trivial());
1511 cp_offset_ != 0 ||
1512 backtrack() != NULL ||
1513 characters_preloaded_ != 0 ||
1514 quick_check_performed_.characters() != 0 ||
1515 bound_checked_up_to_ != 0);
1516 1511
1517 if (actions_ == NULL && backtrack() == NULL) { 1512 if (actions_ == NULL && backtrack() == NULL) {
1518 // Here we just have some deferred cp advances to fix and we are back to 1513 // Here we just have some deferred cp advances to fix and we are back to
1519 // a normal situation. We may also have to forget some information gained 1514 // a normal situation. We may also have to forget some information gained
1520 // through a quick check that was already performed. 1515 // through a quick check that was already performed.
1521 if (cp_offset_ != 0) assembler->AdvanceCurrentPosition(cp_offset_); 1516 if (cp_offset_ != 0) assembler->AdvanceCurrentPosition(cp_offset_);
1522 // Create a new trivial state and generate the node with that. 1517 // Create a new trivial state and generate the node with that.
1523 Trace new_state; 1518 Trace new_state;
1524 successor->Emit(compiler, &new_state); 1519 successor->Emit(compiler, &new_state);
1525 return; 1520 return;
(...skipping 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after
4870 EmbeddedVector<byte, 1024> codes; 4865 EmbeddedVector<byte, 1024> codes;
4871 RegExpMacroAssemblerIrregexp macro_assembler(codes); 4866 RegExpMacroAssemblerIrregexp macro_assembler(codes);
4872 return compiler.Assemble(&macro_assembler, 4867 return compiler.Assemble(&macro_assembler,
4873 node, 4868 node,
4874 data->capture_count, 4869 data->capture_count,
4875 pattern); 4870 pattern);
4876 } 4871 }
4877 4872
4878 4873
4879 }} // namespace v8::internal 4874 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698