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

Side by Side Diff: test/cctest/test-regexp.cc

Issue 10943: Wire Regexp2000 up to the normal JS RegExp object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 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
« src/jsregexp.cc ('K') | « src/objects-inl.h ('k') | 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 static void Execute(const char* input, 332 static void Execute(const char* input,
333 const char* str, 333 const char* str,
334 bool dot_output = false) { 334 bool dot_output = false) {
335 v8::HandleScope scope; 335 v8::HandleScope scope;
336 unibrow::Utf8InputBuffer<> buffer(input, strlen(input)); 336 unibrow::Utf8InputBuffer<> buffer(input, strlen(input));
337 ZoneScope zone_scope(DELETE_ON_EXIT); 337 ZoneScope zone_scope(DELETE_ON_EXIT);
338 RegExpParseResult result; 338 RegExpParseResult result;
339 if (!v8::internal::ParseRegExp(&buffer, &result)) 339 if (!v8::internal::ParseRegExp(&buffer, &result))
340 return; 340 return;
341 RegExpNode* node = RegExpEngine::Compile(&result); 341 RegExpNode* node = NULL;
342 Handle<FixedArray> compiled = RegExpEngine::Compile(&result, &node);
342 USE(node); 343 USE(node);
343 #ifdef DEBUG 344 #ifdef DEBUG
344 if (dot_output) { 345 if (dot_output) {
345 RegExpEngine::DotPrint(input, node); 346 RegExpEngine::DotPrint(input, node);
346 exit(0); 347 exit(0);
347 } 348 }
348 #endif // DEBUG 349 #endif // DEBUG
349 } 350 }
350 351
351 352
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 DispatchTable table; 695 DispatchTable table;
695 CharacterClassNode::AddInverseToTable(ranges, &table, 0); 696 CharacterClassNode::AddInverseToTable(ranges, &table, 0);
696 CHECK(!table.Get(0xFFFE)->Get(0)); 697 CHECK(!table.Get(0xFFFE)->Get(0));
697 CHECK(table.Get(0xFFFF)->Get(0)); 698 CHECK(table.Get(0xFFFF)->Get(0));
698 } 699 }
699 700
700 701
701 TEST(Graph) { 702 TEST(Graph) {
702 Execute("a|(b|c)|d", "", true); 703 Execute("a|(b|c)|d", "", true);
703 } 704 }
OLDNEW
« src/jsregexp.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698