HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Pie
|
9.0.0_r8
下载
查看原文件
收藏
根目录
external
v8
src
runtime
runtime-function.cc
// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/runtime/runtime-utils.h" #include "src/accessors.h" #include "src/arguments.h" #include "src/compiler.h" #include "src/frames-inl.h" #include "src/isolate-inl.h" #include "src/messages.h" #include "src/wasm/wasm-module.h" namespace v8 { namespace internal { RUNTIME_FUNCTION(Runtime_FunctionGetName) { HandleScope scope(isolate); DCHECK_EQ(1, args.length()); CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); if (function->IsJSBoundFunction()) { RETURN_RESULT_OR_FAILURE( isolate, JSBoundFunction::GetName( isolate, Handle
::cast(function))); } else { return *JSFunction::GetName(isolate, Handle
::cast(function)); } } RUNTIME_FUNCTION(Runtime_FunctionSetName) { HandleScope scope(isolate); DCHECK_EQ(2, args.length()); CONVERT_ARG_HANDLE_CHECKED(JSFunction, f, 0); CONVERT_ARG_HANDLE_CHECKED(String, name, 1); name = String::Flatten(name); f->shared()->set_name(*name); return isolate->heap()->undefined_value(); } RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { SealHandleScope shs(isolate); DCHECK_EQ(1, args.length()); CONVERT_ARG_CHECKED(JSFunction, f, 0); CHECK(f->RemovePrototype()); f->shared()->SetConstructStub( *isolate->builtins()->ConstructedNonConstructable()); return isolate->heap()->undefined_value(); } // TODO(5530): Remove once uses in debug.js are gone. RUNTIME_FUNCTION(Runtime_FunctionGetScript) { HandleScope scope(isolate); DCHECK_EQ(1, args.length()); CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); if (function->IsJSFunction()) { Handle
script( Handle
::cast(function)->shared()->script(), isolate); if (script->IsScript()) { return *Script::GetWrapper(Handle
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册