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

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

Issue 2866008: [Isolates] Move contents of Top into Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: ensure we're synced Created 10 years, 6 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 | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-serialize.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 1211
1212 NativeRegExpMacroAssembler::Result result = 1212 NativeRegExpMacroAssembler::Result result =
1213 Execute(*code, 1213 Execute(*code,
1214 *input, 1214 *input,
1215 0, 1215 0,
1216 start_adr, 1216 start_adr,
1217 start_adr + input->length(), 1217 start_adr + input->length(),
1218 NULL); 1218 NULL);
1219 1219
1220 CHECK_EQ(NativeRegExpMacroAssembler::EXCEPTION, result); 1220 CHECK_EQ(NativeRegExpMacroAssembler::EXCEPTION, result);
1221 CHECK(Top::has_pending_exception()); 1221 CHECK(Isolate::Current()->has_pending_exception());
1222 Top::clear_pending_exception(); 1222 Isolate::Current()->clear_pending_exception();
1223 } 1223 }
1224 1224
1225 1225
1226 TEST(MacroAssemblerNativeLotsOfRegisters) { 1226 TEST(MacroAssemblerNativeLotsOfRegisters) {
1227 v8::V8::Initialize(); 1227 v8::V8::Initialize();
1228 ContextInitializer initializer; 1228 ContextInitializer initializer;
1229 1229
1230 ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 2); 1230 ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 2);
1231 1231
1232 // At least 2048, to ensure the allocated space for registers 1232 // At least 2048, to ensure the allocated space for registers
(...skipping 26 matching lines...) Expand all
1259 *input, 1259 *input,
1260 0, 1260 0,
1261 start_adr, 1261 start_adr,
1262 start_adr + input->length(), 1262 start_adr + input->length(),
1263 captures); 1263 captures);
1264 1264
1265 CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result); 1265 CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
1266 CHECK_EQ(0, captures[0]); 1266 CHECK_EQ(0, captures[0]);
1267 CHECK_EQ(42, captures[1]); 1267 CHECK_EQ(42, captures[1]);
1268 1268
1269 Top::clear_pending_exception(); 1269 Isolate::Current()->clear_pending_exception();
1270 } 1270 }
1271 1271
1272 #else // V8_INTERPRETED_REGEXP 1272 #else // V8_INTERPRETED_REGEXP
1273 1273
1274 TEST(MacroAssembler) { 1274 TEST(MacroAssembler) {
1275 V8::Initialize(NULL); 1275 V8::Initialize(NULL);
1276 byte codes[1024]; 1276 byte codes[1024];
1277 RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024)); 1277 RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024));
1278 // ^f(o)o. 1278 // ^f(o)o.
1279 Label fail, fail2, start; 1279 Label fail, fail2, start;
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 bool in_second = CharacterInSet(&l2, i); 1799 bool in_second = CharacterInSet(&l2, i);
1800 CHECK((in_first || in_second) == CharacterInSet(&all, i)); 1800 CHECK((in_first || in_second) == CharacterInSet(&all, i));
1801 } 1801 }
1802 } 1802 }
1803 1803
1804 1804
1805 TEST(Graph) { 1805 TEST(Graph) {
1806 V8::Initialize(NULL); 1806 V8::Initialize(NULL);
1807 Execute("\\b\\w+\\b", false, true, true); 1807 Execute("\\b\\w+\\b", false, true, true);
1808 } 1808 }
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698