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

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

Issue 2724833002: Migrate Object.prototype.valueOf to CSA (Closed)
Patch Set: Separate CL & fixes Created 3 years, 9 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
« src/bootstrapper.cc ('K') | « src/js/v8natives.js ('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 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 v8::HandleScope h_scope(isolate); 861 v8::HandleScope h_scope(isolate);
862 v8::Local<v8::Context> context = v8::Context::New(isolate); 862 v8::Local<v8::Context> context = v8::Context::New(isolate);
863 delete[] warm.data; 863 delete[] warm.data;
864 v8::Context::Scope c_scope(context); 864 v8::Context::Scope c_scope(context);
865 // Running the warmup script has effect on whether functions are 865 // Running the warmup script has effect on whether functions are
866 // pre-compiled, but does not pollute the context. 866 // pre-compiled, but does not pollute the context.
867 CHECK(IsCompiled("f")); 867 CHECK(IsCompiled("f"));
868 CHECK(IsCompiled("Math.abs")); 868 CHECK(IsCompiled("Math.abs"));
869 CHECK(!IsCompiled("g")); 869 CHECK(!IsCompiled("g"));
870 CHECK(!IsCompiled("String.raw")); 870 CHECK(!IsCompiled("String.raw"));
871 CHECK(!IsCompiled("Object.valueOf")); 871 CHECK(!IsCompiled("Array.prototype.sort"));
872 CHECK_EQ(5, CompileRun("a")->Int32Value(context).FromJust()); 872 CHECK_EQ(5, CompileRun("a")->Int32Value(context).FromJust());
873 } 873 }
874 isolate->Dispose(); 874 isolate->Dispose();
875 } 875 }
876 876
877 TEST(CustomSnapshotDataBlobImmortalImmovableRoots) { 877 TEST(CustomSnapshotDataBlobImmortalImmovableRoots) {
878 DisableAlwaysOpt(); 878 DisableAlwaysOpt();
879 // Flood the startup snapshot with shared function infos. If they are 879 // Flood the startup snapshot with shared function infos. If they are
880 // serialized before the immortal immovable root, the root will no longer end 880 // serialized before the immortal immovable root, the root will no longer end
881 // up on the first page. 881 // up on the first page.
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 } 2459 }
2460 delete[] blob.data; 2460 delete[] blob.data;
2461 } 2461 }
2462 2462
2463 TEST(SerializationMemoryStats) { 2463 TEST(SerializationMemoryStats) {
2464 FLAG_profile_deserialization = true; 2464 FLAG_profile_deserialization = true;
2465 FLAG_always_opt = false; 2465 FLAG_always_opt = false;
2466 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); 2466 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob();
2467 delete[] blob.data; 2467 delete[] blob.data;
2468 } 2468 }
OLDNEW
« src/bootstrapper.cc ('K') | « src/js/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698