Chromium Code Reviews

Unified Diff: src/runtime.cc

Issue 22562002: Convert FastNewClosureStub into hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index a9121ce851d578c650e45d2083bbbdd857bcb489..25dcfe9af4e1528409528d503607a13eb2fa59e0 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7917,6 +7917,23 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewStrictArgumentsFast) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NewClosureBailout) {
+ HandleScope scope(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
+ Handle<Context> context(isolate->context());
+
+ // The caller ensures that we pretenure closures that are assigned
+ // directly to properties.
+ PretenureFlag pretenure_flag = NOT_TENURED;
+ Handle<JSFunction> result =
+ isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
+ context,
+ pretenure_flag);
+ return *result;
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_NewClosure) {
HandleScope scope(isolate);
ASSERT(args.length() == 3);
« src/code-stubs-hydrogen.cc ('K') | « src/runtime.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine