11cb0ef41Sopenharmony_ci// Copyright 2020 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci@abstract 61cb0ef41Sopenharmony_ciextern class JSFunctionOrBoundFunctionOrWrappedFunction extends JSObject { 71cb0ef41Sopenharmony_ci} 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciextern class JSBoundFunction extends 101cb0ef41Sopenharmony_ci JSFunctionOrBoundFunctionOrWrappedFunction { 111cb0ef41Sopenharmony_ci // The wrapped function object. 121cb0ef41Sopenharmony_ci bound_target_function: Callable; 131cb0ef41Sopenharmony_ci // The value that is always passed as the this value when calling the wrapped 141cb0ef41Sopenharmony_ci // function. 151cb0ef41Sopenharmony_ci bound_this: JSAny|SourceTextModule; 161cb0ef41Sopenharmony_ci // A list of values whose elements are used as the first arguments to any call 171cb0ef41Sopenharmony_ci // to the wrapped function. 181cb0ef41Sopenharmony_ci bound_arguments: FixedArray; 191cb0ef41Sopenharmony_ci} 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ciextern class JSWrappedFunction extends 221cb0ef41Sopenharmony_ci JSFunctionOrBoundFunctionOrWrappedFunction { 231cb0ef41Sopenharmony_ci // The wrapped function object. 241cb0ef41Sopenharmony_ci wrapped_target_function: Callable; 251cb0ef41Sopenharmony_ci // The creation context. 261cb0ef41Sopenharmony_ci context: NativeContext; 271cb0ef41Sopenharmony_ci} 281cb0ef41Sopenharmony_ci 291cb0ef41Sopenharmony_ci// This class does not use the generated verifier, so if you change anything 301cb0ef41Sopenharmony_ci// here, please also update JSFunctionVerify in objects-debug.cc. 311cb0ef41Sopenharmony_ci@highestInstanceTypeWithinParentClassRange 321cb0ef41Sopenharmony_ciextern class JSFunction extends JSFunctionOrBoundFunctionOrWrappedFunction { 331cb0ef41Sopenharmony_ci shared_function_info: SharedFunctionInfo; 341cb0ef41Sopenharmony_ci context: Context; 351cb0ef41Sopenharmony_ci feedback_cell: FeedbackCell; 361cb0ef41Sopenharmony_ci @if(V8_EXTERNAL_CODE_SPACE) code: CodeDataContainer; 371cb0ef41Sopenharmony_ci @ifnot(V8_EXTERNAL_CODE_SPACE) code: Code; 381cb0ef41Sopenharmony_ci // Space for the following field may or may not be allocated. 391cb0ef41Sopenharmony_ci prototype_or_initial_map: JSReceiver|Map; 401cb0ef41Sopenharmony_ci} 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ci// Class constructors are special, because they are callable, but [[Call]] will 431cb0ef41Sopenharmony_ci// raise an exception. 441cb0ef41Sopenharmony_ci// See ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList ). 451cb0ef41Sopenharmony_ci@doNotGenerateCast 461cb0ef41Sopenharmony_ci@highestInstanceTypeWithinParentClassRange 471cb0ef41Sopenharmony_ciextern class JSClassConstructor extends JSFunction 481cb0ef41Sopenharmony_ci generates 'TNode<JSFunction>'; 491cb0ef41Sopenharmony_ci 501cb0ef41Sopenharmony_citype JSFunctionWithPrototypeSlot extends JSFunction; 51