chromium/v8/src/objects/module.cc

// Copyright 2017 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/objects/module.h"

#include <unordered_map>
#include <unordered_set>

#include "src/api/api-inl.h"
#include "src/ast/modules.h"
#include "src/builtins/accessors.h"
#include "src/common/assert-scope.h"
#include "src/heap/heap-inl.h"
#include "src/objects/cell-inl.h"
#include "src/objects/hash-table-inl.h"
#include "src/objects/js-generator-inl.h"
#include "src/objects/module-inl.h"
#include "src/objects/objects-inl.h"
#include "src/objects/property-descriptor.h"
#include "src/objects/source-text-module.h"
#include "src/objects/synthetic-module-inl.h"
#include "src/utils/ostreams.h"

namespace v8 {
namespace internal {

namespace {
#ifdef DEBUG
void PrintModuleName(Tagged<Module> module, std::ostream& os) {}

void PrintStatusTransition(Tagged<Module> module, Module::Status old_status) {}

void PrintStatusMessage(Tagged<Module> module, const char* message) {}
#endif  // DEBUG

void SetStatusInternal(Tagged<Module> module, Module::Status new_status) {}

}  // end namespace

#ifdef DEBUG
// static
const char* Module::StatusString(Module::Status status) {}
#endif  // DEBUG

void Module::SetStatus(Status new_status) {}

void Module::RecordError(Isolate* isolate, Tagged<Object> error) {}

void Module::ResetGraph(Isolate* isolate, Handle<Module> module) {}

void Module::Reset(Isolate* isolate, Handle<Module> module) {}

Tagged<Object> Module::GetException() {}

MaybeHandle<Cell> Module::ResolveExport(Isolate* isolate, Handle<Module> module,
                                        Handle<String> module_specifier,
                                        Handle<String> export_name,
                                        MessageLocation loc, bool must_resolve,
                                        Module::ResolveSet* resolve_set) {}

bool Module::Instantiate(Isolate* isolate, Handle<Module> module,
                         v8::Local<v8::Context> context,
                         v8::Module::ResolveModuleCallback callback) {}

bool Module::PrepareInstantiate(Isolate* isolate, Handle<Module> module,
                                v8::Local<v8::Context> context,
                                v8::Module::ResolveModuleCallback callback) {}

bool Module::FinishInstantiate(Isolate* isolate, Handle<Module> module,
                               ZoneForwardList<Handle<SourceTextModule>>* stack,
                               unsigned* dfs_index, Zone* zone) {}

MaybeHandle<Object> Module::Evaluate(Isolate* isolate, Handle<Module> module) {}

Handle<JSModuleNamespace> Module::GetModuleNamespace(Isolate* isolate,
                                                     Handle<Module> module) {}

bool JSModuleNamespace::HasExport(Isolate* isolate, Handle<String> name) {}

MaybeHandle<Object> JSModuleNamespace::GetExport(Isolate* isolate,
                                                 Handle<String> name) {}

Maybe<PropertyAttributes> JSModuleNamespace::GetPropertyAttributes(
    LookupIterator* it) {}

// ES
// https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-defineownproperty-p-desc
// static
Maybe<bool> JSModuleNamespace::DefineOwnProperty(
    Isolate* isolate, Handle<JSModuleNamespace> object, Handle<Object> key,
    PropertyDescriptor* desc, Maybe<ShouldThrow> should_throw) {}

bool Module::IsGraphAsync(Isolate* isolate) const {}

}  // namespace internal
}  // namespace v8