1 // Copyright 2021 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_CODEGEN_SCRIPT_DETAILS_H_ 6 #define V8_CODEGEN_SCRIPT_DETAILS_H_ 7 8 #include "include/v8-script.h" 9 #include "src/common/globals.h" 10 #include "src/objects/fixed-array.h" 11 #include "src/objects/objects.h" 12 13 namespace v8 { 14 namespace internal { 15 16 struct ScriptDetails { ScriptDetailsScriptDetails17 ScriptDetails() 18 : line_offset(0), column_offset(0), repl_mode(REPLMode::kNo) {} 19 explicit ScriptDetails( 20 Handle<Object> script_name, 21 ScriptOriginOptions origin_options = v8::ScriptOriginOptions()) 22 : line_offset(0), 23 column_offset(0), 24 name_obj(script_name), 25 repl_mode(REPLMode::kNo), 26 origin_options(origin_options) {} 27 28 int line_offset; 29 int column_offset; 30 MaybeHandle<Object> name_obj; 31 MaybeHandle<Object> source_map_url; 32 MaybeHandle<Object> host_defined_options; 33 REPLMode repl_mode; 34 const ScriptOriginOptions origin_options; 35 }; 36 37 } // namespace internal 38 } // namespace v8 39 40 #endif // V8_CODEGEN_SCRIPT_DETAILS_H_ 41