chromium/v8/include/v8-script.h

// Copyright 2021 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.

#ifndef INCLUDE_V8_SCRIPT_H_
#define INCLUDE_V8_SCRIPT_H_

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <tuple>
#include <vector>

#include "v8-callbacks.h"     // NOLINT(build/include_directory)
#include "v8-data.h"          // NOLINT(build/include_directory)
#include "v8-local-handle.h"  // NOLINT(build/include_directory)
#include "v8-maybe.h"         // NOLINT(build/include_directory)
#include "v8-memory-span.h"   // NOLINT(build/include_directory)
#include "v8-message.h"       // NOLINT(build/include_directory)
#include "v8config.h"         // NOLINT(build/include_directory)

namespace v8 {

class Function;
class Message;
class Object;
class PrimitiveArray;
class Script;

namespace internal {
class BackgroundDeserializeTask;
struct ScriptStreamingData;
}  // namespace internal

/**
 * A container type that holds relevant metadata for module loading.
 *
 * This is passed back to the embedder as part of
 * HostImportModuleDynamicallyCallback for module loading.
 */
class V8_EXPORT ScriptOrModule {};

/**
 * A compiled JavaScript script, not yet tied to a Context.
 */
class V8_EXPORT UnboundScript : public Data {};

/**
 * A compiled JavaScript module, not yet tied to a Context.
 */
class V8_EXPORT UnboundModuleScript : public Data {};

/**
 * A location in JavaScript source.
 */
class V8_EXPORT Location {};

class V8_EXPORT ModuleRequest : public Data {};

/**
 * A compiled JavaScript module.
 */
class V8_EXPORT Module : public Data {};

class V8_EXPORT CompileHintsCollector : public Data {};

/**
 * A compiled JavaScript script, tied to a Context which was active when the
 * script was compiled.
 */
class V8_EXPORT Script : public Data {};

enum class ScriptType {};

/**
 * For compiling scripts.
 */
class V8_EXPORT ScriptCompiler {};

ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin,
                               CachedData* data,
                               ConsumeCodeCacheTask* consume_cache_task)
    :{}

ScriptCompiler::Source::Source(Local<String> string, CachedData* data,
                               ConsumeCodeCacheTask* consume_cache_task)
    :{}

ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin,
                               CompileHintCallback callback,
                               void* callback_data)
    :{}

const ScriptCompiler::CachedData* ScriptCompiler::Source::GetCachedData()
    const {}

const ScriptOriginOptions& ScriptCompiler::Source::GetResourceOptions() const {}

const ScriptCompiler::CompilationDetails&
ScriptCompiler::Source::GetCompilationDetails() const {}

ModuleRequest* ModuleRequest::Cast(Data* data) {}

Module* Module::Cast(Data* data) {}

}  // namespace v8

#endif  // INCLUDE_V8_SCRIPT_H_