| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 5fe1f9dc5bcb33a93581e2f2ed100d58cfe5c5f0..368f698d12afb8ae6945105d78b3d5186fce029a 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -2059,6 +2059,24 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SpecialArrayFunctions) {
|
| }
|
|
|
|
|
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_IsClassicModeFunction) {
|
| + NoHandleAllocation ha(isolate);
|
| + ASSERT(args.length() == 1);
|
| + CONVERT_ARG_CHECKED(JSReceiver, callable, 0);
|
| + if (!callable->IsJSFunction()) {
|
| + HandleScope scope(isolate);
|
| + bool threw = false;
|
| + Handle<Object> delegate =
|
| + Execution::TryGetFunctionDelegate(Handle<JSReceiver>(callable), &threw);
|
| + if (threw) return Failure::Exception();
|
| + callable = JSFunction::cast(*delegate);
|
| + }
|
| + JSFunction* function = JSFunction::cast(callable);
|
| + SharedFunctionInfo* shared = function->shared();
|
| + return isolate->heap()->ToBoolean(shared->is_classic_mode());
|
| +}
|
| +
|
| +
|
| RUNTIME_FUNCTION(MaybeObject*, Runtime_GetDefaultReceiver) {
|
| NoHandleAllocation ha(isolate);
|
| ASSERT(args.length() == 1);
|
|
|