diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/objects/script.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/objects/script.h')
-rw-r--r-- | chromium/v8/src/objects/script.h | 54 |
1 files changed, 5 insertions, 49 deletions
diff --git a/chromium/v8/src/objects/script.h b/chromium/v8/src/objects/script.h index d5876de2e0a..9ce44c770fd 100644 --- a/chromium/v8/src/objects/script.h +++ b/chromium/v8/src/objects/script.h @@ -11,6 +11,7 @@ #include "src/objects/fixed-array.h" #include "src/objects/objects.h" #include "src/objects/struct.h" +#include "torque-generated/bit-fields-tq.h" // Has to be the last include (doesn't have include guards): #include "src/objects/object-macros.h" @@ -20,7 +21,7 @@ namespace v8 { namespace internal { // Script describes a script which has been added to the VM. -class Script : public Struct { +class Script : public TorqueGeneratedScript<Script, Struct> { public: // Script ID used for temporary scripts, which shouldn't be added to the // script list. @@ -45,31 +46,9 @@ class Script : public Struct { COMPILATION_STATE_COMPILED = 1 }; - // [source]: the script source. - DECL_ACCESSORS(source, Object) - - // [name]: the script name. - DECL_ACCESSORS(name, Object) - - // [id]: the script id. - DECL_INT_ACCESSORS(id) - - // [line_offset]: script line offset in resource from where it was extracted. - DECL_INT_ACCESSORS(line_offset) - - // [column_offset]: script column offset in resource from where it was - // extracted. - DECL_INT_ACCESSORS(column_offset) - - // [context_data]: context data for the context this script was compiled in. - DECL_ACCESSORS(context_data, Object) - // [type]: the script type. DECL_INT_ACCESSORS(type) - // [line_ends]: FixedArray of line ends positions. - DECL_ACCESSORS(line_ends, Object) - DECL_ACCESSORS(eval_from_shared_or_wrapped_arguments, Object) // [eval_from_shared]: for eval scripts the shared function info for the @@ -95,15 +74,6 @@ class Script : public Struct { // function infos created from this script. DECL_ACCESSORS(shared_function_infos, WeakFixedArray) - // [flags]: Holds an exciting bitfield. - DECL_INT_ACCESSORS(flags) - - // [source_url]: sourceURL from magic comment - DECL_ACCESSORS(source_url, Object) - - // [source_mapping_url]: sourceMappingURL magic comment - DECL_ACCESSORS(source_mapping_url, Object) - // [wasm_breakpoint_infos]: the list of {BreakPointInfo} objects describing // all WebAssembly breakpoints for modules/instances managed via this script. // This must only be called if the type of this script is TYPE_WASM. @@ -120,9 +90,6 @@ class Script : public Struct { // This must only be called if the type of this script is TYPE_WASM. DECL_ACCESSORS(wasm_weak_instance_list, WeakArrayList) - // [host_defined_options]: Options defined by the embedder. - DECL_ACCESSORS(host_defined_options, FixedArray) - // [compilation_type]: how the the script was compiled. Encoded in the // 'flags' field. inline CompilationType compilation_type(); @@ -144,8 +111,6 @@ class Script : public Struct { inline v8::ScriptOriginOptions origin_options(); inline void set_origin_options(ScriptOriginOptions origin_options); - DECL_CAST(Script) - // If script source is an external string, check that the underlying // resource is accessible. Otherwise, always return true. inline bool HasValidSource(); @@ -218,20 +183,11 @@ class Script : public Struct { DECL_PRINTER(Script) DECL_VERIFIER(Script) - DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, - TORQUE_GENERATED_SCRIPT_FIELDS) - private: // Bit positions in the flags field. - static const int kCompilationTypeBit = 0; - static const int kCompilationStateBit = 1; - static const int kREPLModeBit = 2; - static const int kOriginOptionsShift = 3; - static const int kOriginOptionsSize = 4; - static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1) - << kOriginOptionsShift; - - OBJECT_CONSTRUCTORS(Script, Struct); + DEFINE_TORQUE_GENERATED_SCRIPT_FLAGS() + + TQ_OBJECT_CONSTRUCTORS(Script) }; } // namespace internal |