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

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

Issue 2547043002: [Interpreter] Optimize equality check with null/undefined with a check on the map. (Closed)
Patch Set: Fixed a bug in reducing JSIsUndetectable. Created 4 years 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
OLDNEW
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 1068
1069 v8::HandleScope scope(CcTest::isolate()); 1069 v8::HandleScope scope(CcTest::isolate());
1070 1070
1071 // The serializer only tests the shared code, which is always the unoptimized 1071 // The serializer only tests the shared code, which is always the unoptimized
1072 // code. Don't even bother generating optimized code to avoid timeouts. 1072 // code. Don't even bother generating optimized code to avoid timeouts.
1073 FLAG_always_opt = false; 1073 FLAG_always_opt = false;
1074 1074
1075 Vector<const uint8_t> source = 1075 Vector<const uint8_t> source =
1076 ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"), 1076 ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"),
1077 STATIC_CHAR_VECTOR("for (let i of Object.prototype);"), 1077 STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
1078 STATIC_CHAR_VECTOR("} j=7; j"), 1000); 1078 STATIC_CHAR_VECTOR("} j=7; j"), 1050);
rmcilroy 2016/12/05 10:57:19 Why this change?
mythria 2016/12/05 14:53:11 This test is to check if the code objects goes to
rmcilroy 2016/12/05 19:08:09 Acknowledged.
1079 Handle<String> source_str = 1079 Handle<String> source_str =
1080 isolate->factory()->NewStringFromOneByte(source).ToHandleChecked(); 1080 isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
1081 1081
1082 Handle<JSObject> global(isolate->context()->global_object()); 1082 Handle<JSObject> global(isolate->context()->global_object());
1083 ScriptData* cache = NULL; 1083 ScriptData* cache = NULL;
1084 1084
1085 Handle<SharedFunctionInfo> orig = 1085 Handle<SharedFunctionInfo> orig =
1086 CompileScript(isolate, source_str, Handle<String>(), &cache, 1086 CompileScript(isolate, source_str, Handle<String>(), &cache,
1087 v8::ScriptCompiler::kProduceCodeCache); 1087 v8::ScriptCompiler::kProduceCodeCache);
1088 1088
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 } 2301 }
2302 delete[] blob.data; 2302 delete[] blob.data;
2303 } 2303 }
2304 2304
2305 TEST(SerializationMemoryStats) { 2305 TEST(SerializationMemoryStats) {
2306 FLAG_profile_deserialization = true; 2306 FLAG_profile_deserialization = true;
2307 FLAG_always_opt = false; 2307 FLAG_always_opt = false;
2308 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); 2308 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob();
2309 delete[] blob.data; 2309 delete[] blob.data;
2310 } 2310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698