11cb0ef41Sopenharmony_ci// Copyright 2021 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#ifndef V8_CODEGEN_SCRIPT_DETAILS_H_
61cb0ef41Sopenharmony_ci#define V8_CODEGEN_SCRIPT_DETAILS_H_
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ci#include "include/v8-script.h"
91cb0ef41Sopenharmony_ci#include "src/common/globals.h"
101cb0ef41Sopenharmony_ci#include "src/objects/fixed-array.h"
111cb0ef41Sopenharmony_ci#include "src/objects/objects.h"
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_cinamespace v8 {
141cb0ef41Sopenharmony_cinamespace internal {
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_cistruct ScriptDetails {
171cb0ef41Sopenharmony_ci  ScriptDetails()
181cb0ef41Sopenharmony_ci      : line_offset(0), column_offset(0), repl_mode(REPLMode::kNo) {}
191cb0ef41Sopenharmony_ci  explicit ScriptDetails(
201cb0ef41Sopenharmony_ci      Handle<Object> script_name,
211cb0ef41Sopenharmony_ci      ScriptOriginOptions origin_options = v8::ScriptOriginOptions())
221cb0ef41Sopenharmony_ci      : line_offset(0),
231cb0ef41Sopenharmony_ci        column_offset(0),
241cb0ef41Sopenharmony_ci        name_obj(script_name),
251cb0ef41Sopenharmony_ci        repl_mode(REPLMode::kNo),
261cb0ef41Sopenharmony_ci        origin_options(origin_options) {}
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ci  int line_offset;
291cb0ef41Sopenharmony_ci  int column_offset;
301cb0ef41Sopenharmony_ci  MaybeHandle<Object> name_obj;
311cb0ef41Sopenharmony_ci  MaybeHandle<Object> source_map_url;
321cb0ef41Sopenharmony_ci  MaybeHandle<Object> host_defined_options;
331cb0ef41Sopenharmony_ci  REPLMode repl_mode;
341cb0ef41Sopenharmony_ci  const ScriptOriginOptions origin_options;
351cb0ef41Sopenharmony_ci};
361cb0ef41Sopenharmony_ci
371cb0ef41Sopenharmony_ci}  // namespace internal
381cb0ef41Sopenharmony_ci}  // namespace v8
391cb0ef41Sopenharmony_ci
401cb0ef41Sopenharmony_ci#endif  // V8_CODEGEN_SCRIPT_DETAILS_H_
41