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

Unified Diff: test/cctest/test-serialize.cc

Issue 2226233002: [test] Speedup serializer test for large code objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-preserve-bytecode-1
Patch Set: Rebased. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index a2e29db133582f952d550a3e4fa6a54cb3a498c0..480699c97ccafb577d6b1f9c3d7702e95cc514bf 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -1060,10 +1060,14 @@ TEST(CodeSerializerLargeCodeObject) {
v8::HandleScope scope(CcTest::isolate());
+ // The serializer only tests the shared code, which is always the unoptimized
+ // code. Don't even bother generating optimized code to avoid timeouts.
+ FLAG_always_opt = false;
+
Vector<const uint8_t> source =
- ConstructSource(STATIC_CHAR_VECTOR("var j=1; try { if (j) throw 1;"),
- STATIC_CHAR_VECTOR("for(var i=0;i<1;i++)j++;"),
- STATIC_CHAR_VECTOR("} catch (e) { j=7; } j"), 10000);
+ ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (!j) {"),
+ STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
+ STATIC_CHAR_VECTOR("} j=7; j"), 1500);
Handle<String> source_str =
isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
@@ -1074,7 +1078,7 @@ TEST(CodeSerializerLargeCodeObject) {
CompileScript(isolate, source_str, Handle<String>(), &cache,
v8::ScriptCompiler::kProduceCodeCache);
- CHECK(isolate->heap()->InSpace(orig->code(), LO_SPACE));
+ CHECK(isolate->heap()->InSpace(orig->abstract_code(), LO_SPACE));
Handle<SharedFunctionInfo> copy;
{
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698