chromium/v8/src/runtime/runtime-scopes.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 <memory>

#include "src/builtins/accessors.h"
#include "src/common/message-template.h"
#include "src/deoptimizer/deoptimizer.h"
#include "src/execution/arguments-inl.h"
#include "src/execution/frames-inl.h"
#include "src/execution/isolate-inl.h"
#include "src/execution/isolate.h"
#include "src/handles/handles.h"
#include "src/heap/heap-inl.h"  // For ToBoolean. TODO(jkummerow): Drop.
#include "src/interpreter/bytecode-flags-and-tokens.h"
#include "src/objects/arguments-inl.h"
#include "src/objects/fixed-array.h"
#include "src/objects/heap-object.h"
#include "src/objects/js-disposable-stack-inl.h"
#include "src/objects/js-disposable-stack.h"
#include "src/objects/objects.h"
#include "src/objects/oddball.h"
#include "src/objects/smi.h"
#include "src/objects/tagged.h"
#include "src/runtime/runtime-utils.h"

namespace v8 {
namespace internal {

RUNTIME_FUNCTION(Runtime_ThrowConstAssignError) {}

RUNTIME_FUNCTION(Runtime_ThrowUsingAssignError) {}

namespace {

enum class RedeclarationType {};

Tagged<Object> ThrowRedeclarationError(Isolate* isolate, Handle<String> name,
                                       RedeclarationType redeclaration_type) {}

// May throw a RedeclarationError.
Tagged<Object> DeclareGlobal(Isolate* isolate, Handle<JSGlobalObject> global,
                             Handle<String> name, Handle<Object> value,
                             PropertyAttributes attr, bool is_var,
                             RedeclarationType redeclaration_type) {}

}  // namespace

RUNTIME_FUNCTION(Runtime_DeclareModuleExports) {}

RUNTIME_FUNCTION(Runtime_DeclareGlobals) {}

RUNTIME_FUNCTION(Runtime_InitializeDisposableStack) {}

Tagged<Object> AddToDisposableStack(Isolate* isolate,
                                    DirectHandle<JSDisposableStackBase> stack,
                                    Handle<Object> value,
                                    DisposeMethodCallType type,
                                    DisposeMethodHint hint) {}

RUNTIME_FUNCTION(Runtime_AddDisposableValue) {}

RUNTIME_FUNCTION(Runtime_AddAsyncDisposableValue) {}

RUNTIME_FUNCTION(Runtime_DisposeDisposableStack) {}

RUNTIME_FUNCTION(Runtime_HandleExceptionsInDisposeDisposableStack) {}

namespace {

Tagged<Object> DeclareEvalHelper(Isolate* isolate, Handle<String> name,
                                 Handle<Object> value) {}

}  // namespace

RUNTIME_FUNCTION(Runtime_DeclareEvalFunction) {}

RUNTIME_FUNCTION(Runtime_DeclareEvalVar) {}

namespace {

// Find the arguments of the JavaScript function invocation that called
// into C++ code. Collect these in a newly allocated array of handles.
std::unique_ptr<Handle<Object>[]> GetCallerArguments(Isolate* isolate,
                                                     int* total_argc) {}

template <typename T>
Handle<JSObject> NewSloppyArguments(Isolate* isolate, Handle<JSFunction> callee,
                                    T parameters, int argument_count) {}

class HandleArguments {};

class ParameterArguments {};

}  // namespace

RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {}

RUNTIME_FUNCTION(Runtime_NewStrictArguments) {}


RUNTIME_FUNCTION(Runtime_NewRestParameter) {}

RUNTIME_FUNCTION(Runtime_NewClosure) {}

RUNTIME_FUNCTION(Runtime_NewClosure_Tenured) {}

RUNTIME_FUNCTION(Runtime_NewFunctionContext) {}

// TODO(jgruber): Rename these functions to 'New...Context'.
RUNTIME_FUNCTION(Runtime_PushWithContext) {}

// TODO(jgruber): Rename these functions to 'New...Context'.
RUNTIME_FUNCTION(Runtime_PushCatchContext) {}

// TODO(jgruber): Rename these functions to 'New...Context'.
RUNTIME_FUNCTION(Runtime_PushBlockContext) {}


RUNTIME_FUNCTION(Runtime_DeleteLookupSlot) {}


namespace {

MaybeHandle<Object> LoadLookupSlot(Isolate* isolate, Handle<String> name,
                                   ShouldThrow should_throw,
                                   Handle<Object>* receiver_return = nullptr) {}

}  // namespace


RUNTIME_FUNCTION(Runtime_LoadLookupSlot) {}


RUNTIME_FUNCTION(Runtime_LoadLookupSlotInsideTypeof) {}


RUNTIME_FUNCTION_RETURN_PAIR(Runtime_LoadLookupSlotForCall) {}

RUNTIME_FUNCTION(Runtime_LoadLookupSlotForCall_Baseline) {}

namespace {

MaybeHandle<Object> StoreLookupSlot(
    Isolate* isolate, Handle<Context> context, Handle<String> name,
    Handle<Object> value, LanguageMode language_mode,
    ContextLookupFlags context_lookup_flags = FOLLOW_CHAINS) {}

}  // namespace


RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Sloppy) {}

RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) {}

// Store into a dynamic declaration context for sloppy-mode block-scoped
// function hoisting which leaks out of an eval.
RUNTIME_FUNCTION(Runtime_StoreLookupSlot_SloppyHoisting) {}

RUNTIME_FUNCTION(Runtime_StoreGlobalNoHoleCheckForReplLetOrConst) {}

}  // namespace internal
}  // namespace v8