| 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);
|
|
|