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

Side by Side Diff: src/mksnapshot.cc

Issue 543010: Port FastNewClosureStub introduced for ia32 in r3477 to x64 and arm. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/ia32/codegen-ia32.cc ('k') | src/x64/codegen-x64.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Print the usage if an error occurs when parsing the command line 144 // Print the usage if an error occurs when parsing the command line
145 // flags or if the help flag is set. 145 // flags or if the help flag is set.
146 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); 146 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
147 if (result > 0 || argc != 2 || i::FLAG_help) { 147 if (result > 0 || argc != 2 || i::FLAG_help) {
148 ::printf("Usage: %s [flag] ... outfile\n", argv[0]); 148 ::printf("Usage: %s [flag] ... outfile\n", argv[0]);
149 i::FlagList::PrintHelp(); 149 i::FlagList::PrintHelp();
150 return !i::FLAG_help; 150 return !i::FLAG_help;
151 } 151 }
152 i::Serializer::Enable(); 152 i::Serializer::Enable();
153 Persistent<Context> context = v8::Context::New(); 153 Persistent<Context> context = v8::Context::New();
154 ASSERT(!context.IsEmpty());
154 // Make sure all builtin scripts are cached. 155 // Make sure all builtin scripts are cached.
155 { HandleScope scope; 156 { HandleScope scope;
156 for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) { 157 for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) {
157 i::Bootstrapper::NativesSourceLookup(i); 158 i::Bootstrapper::NativesSourceLookup(i);
158 } 159 }
159 } 160 }
160 context.Dispose(); 161 context.Dispose();
161 CppByteSink sink(argv[1]); 162 CppByteSink sink(argv[1]);
162 i::Serializer ser(&sink); 163 i::Serializer ser(&sink);
163 // This results in a somewhat smaller snapshot, probably because it gets rid 164 // This results in a somewhat smaller snapshot, probably because it gets rid
164 // of some things that are cached between garbage collections. 165 // of some things that are cached between garbage collections.
165 i::Heap::CollectAllGarbage(true); 166 i::Heap::CollectAllGarbage(true);
166 ser.Serialize(); 167 ser.Serialize();
167 return 0; 168 return 0;
168 } 169 }
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698