#include <stdlib.h>
#include <limits>
#include "src/builtins/accessors.h"
#include "src/common/globals.h"
#include "src/common/message-template.h"
#include "src/execution/arguments-inl.h"
#include "src/execution/isolate-inl.h"
#include "src/logging/log.h"
#include "src/objects/hash-table-inl.h"
#include "src/objects/literal-objects-inl.h"
#include "src/objects/lookup-inl.h"
#include "src/objects/smi.h"
#include "src/runtime/runtime.h"
namespace v8 {
namespace internal {
RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) { … }
RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) { … }
RUNTIME_FUNCTION(Runtime_ThrowStaticPrototypeError) { … }
RUNTIME_FUNCTION(Runtime_ThrowSuperAlreadyCalledError) { … }
RUNTIME_FUNCTION(Runtime_ThrowSuperNotCalled) { … }
namespace {
Tagged<Object> ThrowNotSuperConstructor(Isolate* isolate,
Handle<Object> constructor,
DirectHandle<JSFunction> function) { … }
}
RUNTIME_FUNCTION(Runtime_ThrowNotSuperConstructor) { … }
namespace {
template <typename Dictionary>
Handle<Name> KeyToName(Isolate* isolate, Handle<Object> key) { … }
template <>
Handle<Name> KeyToName<NumberDictionary>(Isolate* isolate, Handle<Object> key) { … }
template <typename Dictionary>
MaybeHandle<Object> GetMethodAndSetName(Isolate* isolate,
RuntimeArguments& args,
Tagged<Smi> index,
DirectHandle<String> name_prefix,
Handle<Object> key) { … }
Tagged<Object> GetMethodWithSharedName(Isolate* isolate, RuntimeArguments& args,
Tagged<Object> index) { … }
template <typename Dictionary>
Handle<Dictionary> ShallowCopyDictionaryTemplate(
Isolate* isolate, Handle<Dictionary> dictionary_template) { … }
template <typename Dictionary>
bool SubstituteValues(Isolate* isolate, Handle<Dictionary> dictionary,
RuntimeArguments& args) { … }
template <typename Dictionary>
void UpdateProtectors(Isolate* isolate, Handle<JSObject> receiver,
DirectHandle<Dictionary> properties_dictionary) { … }
void UpdateProtectors(Isolate* isolate, Handle<JSObject> receiver,
DirectHandle<DescriptorArray> properties_template) { … }
bool AddDescriptorsByTemplate(
Isolate* isolate, DirectHandle<Map> map,
DirectHandle<DescriptorArray> descriptors_template,
Handle<NumberDictionary> elements_dictionary_template,
Handle<JSObject> receiver, RuntimeArguments& args) { … }
template <typename T>
Handle<T> ToHandle(Handle<T> h) { … }
template <typename T>
Handle<T> ToHandle(MaybeHandle<T> h) { … }
template <typename Dictionary>
bool AddDescriptorsByTemplate(
Isolate* isolate, DirectHandle<Map> map,
Handle<Dictionary> properties_dictionary_template,
Handle<NumberDictionary> elements_dictionary_template,
DirectHandle<FixedArray> computed_properties, Handle<JSObject> receiver,
RuntimeArguments& args) { … }
Handle<JSObject> CreateClassPrototype(Isolate* isolate) { … }
bool InitClassPrototype(Isolate* isolate,
DirectHandle<ClassBoilerplate> class_boilerplate,
Handle<JSObject> prototype,
Handle<HeapObject> prototype_parent,
DirectHandle<JSFunction> constructor,
RuntimeArguments& args) { … }
bool InitClassConstructor(Isolate* isolate,
DirectHandle<ClassBoilerplate> class_boilerplate,
Handle<HeapObject> constructor_parent,
Handle<JSFunction> constructor,
RuntimeArguments& args) { … }
MaybeHandle<Object> DefineClass(
Isolate* isolate, DirectHandle<ClassBoilerplate> class_boilerplate,
Handle<Object> super_class, Handle<JSFunction> constructor,
RuntimeArguments& args) { … }
}
RUNTIME_FUNCTION(Runtime_DefineClass) { … }
namespace {
enum class SuperMode { … };
MaybeHandle<JSReceiver> GetSuperHolder(Isolate* isolate,
Handle<JSObject> home_object,
SuperMode mode, PropertyKey* key) { … }
MaybeHandle<Object> LoadFromSuper(Isolate* isolate, Handle<Object> receiver,
Handle<JSObject> home_object,
PropertyKey* key) { … }
}
RUNTIME_FUNCTION(Runtime_LoadFromSuper) { … }
RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) { … }
namespace {
MaybeHandle<Object> StoreToSuper(Isolate* isolate, Handle<JSObject> home_object,
Handle<Object> receiver, PropertyKey* key,
Handle<Object> value,
StoreOrigin store_origin) { … }
}
RUNTIME_FUNCTION(Runtime_StoreToSuper) { … }
RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper) { … }
}
}