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

Unified Diff: src/bootstrapper.cc

Issue 981213002: Do not include code objects for functions in the start-up snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove inlcude Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 9d2fc4368a60b2e4b5cd194007bfb8b93fda727d..87cd0d4a0cca13da51dd2134e55dd7b1fd9b81b7 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2107,14 +2107,12 @@ bool Genesis::InstallNatives() {
}
// Install natives.
- for (int i = Natives::GetDebuggerCount();
- i < Natives::GetBuiltinsCount();
- i++) {
+ int i = Natives::GetDebuggerCount();
+ if (!CompileBuiltin(isolate(), i)) return false;
+ if (!InstallJSBuiltins(builtins)) return false;
+
+ for (++i; i < Natives::GetBuiltinsCount(); ++i) {
if (!CompileBuiltin(isolate(), i)) return false;
- // TODO(ager): We really only need to install the JS builtin
- // functions on the builtins object after compiling and running
- // runtime.js.
- if (!InstallJSBuiltins(builtins)) return false;
}
InstallNativeFunctions();
@@ -2610,15 +2608,7 @@ bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) {
Handle<Object> function_object = Object::GetProperty(
isolate(), builtins, Builtins::GetName(id)).ToHandleChecked();
Handle<JSFunction> function = Handle<JSFunction>::cast(function_object);
- // TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
- // the correct solution is to restore the context register after invoking
- // builtins from full-codegen.
- function->shared()->DisableOptimization(kBuiltinFunctionCannotBeOptimized);
builtins->set_javascript_builtin(id, *function);
- if (!Compiler::EnsureCompiled(function, CLEAR_EXCEPTION)) {
- return false;
- }
- builtins->set_javascript_builtin_code(id, function->shared()->code());
}
return true;
}
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698