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

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

Issue 10825472: Revert r12258, r12300 and r12302 (global regexp). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add empty line Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 CHECK_PARSE_EQ("[\\111]", "[I]"); 260 CHECK_PARSE_EQ("[\\111]", "[I]");
261 CHECK_PARSE_EQ("[\\1111]", "[I 1]"); 261 CHECK_PARSE_EQ("[\\1111]", "[I 1]");
262 CHECK_PARSE_EQ("\\x34", "'\x34'"); 262 CHECK_PARSE_EQ("\\x34", "'\x34'");
263 CHECK_PARSE_EQ("\\x60", "'\x60'"); 263 CHECK_PARSE_EQ("\\x60", "'\x60'");
264 CHECK_PARSE_EQ("\\x3z", "'x3z'"); 264 CHECK_PARSE_EQ("\\x3z", "'x3z'");
265 CHECK_PARSE_EQ("\\c", "'\\c'"); 265 CHECK_PARSE_EQ("\\c", "'\\c'");
266 CHECK_PARSE_EQ("\\u0034", "'\x34'"); 266 CHECK_PARSE_EQ("\\u0034", "'\x34'");
267 CHECK_PARSE_EQ("\\u003z", "'u003z'"); 267 CHECK_PARSE_EQ("\\u003z", "'u003z'");
268 CHECK_PARSE_EQ("foo[z]*", "(: 'foo' (# 0 - g [z]))"); 268 CHECK_PARSE_EQ("foo[z]*", "(: 'foo' (# 0 - g [z]))");
269 269
270 CHECK_SIMPLE("", false);
271 CHECK_SIMPLE("a", true); 270 CHECK_SIMPLE("a", true);
272 CHECK_SIMPLE("a|b", false); 271 CHECK_SIMPLE("a|b", false);
273 CHECK_SIMPLE("a\\n", false); 272 CHECK_SIMPLE("a\\n", false);
274 CHECK_SIMPLE("^a", false); 273 CHECK_SIMPLE("^a", false);
275 CHECK_SIMPLE("a$", false); 274 CHECK_SIMPLE("a$", false);
276 CHECK_SIMPLE("a\\b!", false); 275 CHECK_SIMPLE("a\\b!", false);
277 CHECK_SIMPLE("a\\Bb", false); 276 CHECK_SIMPLE("a\\Bb", false);
278 CHECK_SIMPLE("a*", false); 277 CHECK_SIMPLE("a*", false);
279 CHECK_SIMPLE("a*?", false); 278 CHECK_SIMPLE("a*?", false);
280 CHECK_SIMPLE("a?", false); 279 CHECK_SIMPLE("a?", false);
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 1342
1344 isolate->clear_pending_exception(); 1343 isolate->clear_pending_exception();
1345 } 1344 }
1346 1345
1347 #else // V8_INTERPRETED_REGEXP 1346 #else // V8_INTERPRETED_REGEXP
1348 1347
1349 TEST(MacroAssembler) { 1348 TEST(MacroAssembler) {
1350 V8::Initialize(NULL); 1349 V8::Initialize(NULL);
1351 byte codes[1024]; 1350 byte codes[1024];
1352 RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024), 1351 RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024),
1353 Isolate::Current()->runtime_zone()); 1352 Isolate::Current()->zone());
1354 // ^f(o)o. 1353 // ^f(o)o.
1355 Label fail, fail2, start; 1354 Label fail, fail2, start;
1356 uc16 foo_chars[3]; 1355 uc16 foo_chars[3];
1357 foo_chars[0] = 'f'; 1356 foo_chars[0] = 'f';
1358 foo_chars[1] = 'o'; 1357 foo_chars[1] = 'o';
1359 foo_chars[2] = 'o'; 1358 foo_chars[2] = 'o';
1360 Vector<const uc16> foo(foo_chars, 3); 1359 Vector<const uc16> foo(foo_chars, 3);
1361 m.SetRegister(4, 42); 1360 m.SetRegister(4, 42);
1362 m.PushRegister(4, RegExpMacroAssembler::kNoStackLimitCheck); 1361 m.PushRegister(4, RegExpMacroAssembler::kNoStackLimitCheck);
1363 m.AdvanceRegister(4, 42); 1362 m.AdvanceRegister(4, 42);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 ZoneList<CharacterRange> first_only(4, Isolate::Current()->runtime_zone()); 1801 ZoneList<CharacterRange> first_only(4, Isolate::Current()->runtime_zone());
1803 ZoneList<CharacterRange> second_only(4, Isolate::Current()->runtime_zone()); 1802 ZoneList<CharacterRange> second_only(4, Isolate::Current()->runtime_zone());
1804 ZoneList<CharacterRange> both(4, Isolate::Current()->runtime_zone()); 1803 ZoneList<CharacterRange> both(4, Isolate::Current()->runtime_zone());
1805 } 1804 }
1806 1805
1807 1806
1808 TEST(Graph) { 1807 TEST(Graph) {
1809 V8::Initialize(NULL); 1808 V8::Initialize(NULL);
1810 Execute("\\b\\w+\\b", false, true, true); 1809 Execute("\\b\\w+\\b", false, true, true);
1811 } 1810 }
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698