Skip to content

Commit fde0c59

Browse files
committed
src: update UncompiledData types constants
Ref: #255 PR-URL: #324 Refs: #255 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 2afd59e commit fde0c59

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/llv8-constants.cc

+8-4
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,15 @@ void Types::Load() {
539539
kSharedFunctionInfoType =
540540
LoadConstant("type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE");
541541
kUncompiledDataWithoutPreParsedScopeType = LoadConstant(
542-
"type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_"
543-
"PARSED_SCOPE_TYPE");
542+
{"type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_"
543+
"PARSED_SCOPE_TYPE",
544+
"type_UncompiledDataWithoutPreparseData__UNCOMPILED_DATA_WITHOUT_"
545+
"PREPARSE_DATA_TYPE"});
544546
kUncompiledDataWithPreParsedScopeType = LoadConstant(
545-
"type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_"
546-
"SCOPE_TYPE");
547+
{"type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_"
548+
"SCOPE_TYPE",
549+
"type_UncompiledDataWithPreparseData__UNCOMPILED_DATA_WITH_"
550+
"PREPARSE_DATA_TYPE"});
547551
kScriptType = LoadConstant("type_Script__SCRIPT_TYPE");
548552
kScopeInfoType = LoadConstant("type_ScopeInfo__SCOPE_INFO_TYPE");
549553
kSymbolType = LoadConstant("type_Symbol__SYMBOL_TYPE");

src/llv8-constants.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ class Types : public Module {
524524
int64_t kJSRegExpType;
525525
int64_t kJSDateType;
526526
int64_t kSharedFunctionInfoType;
527-
int64_t kUncompiledDataWithoutPreParsedScopeType;
528-
int64_t kUncompiledDataWithPreParsedScopeType;
527+
Constant<int64_t> kUncompiledDataWithoutPreParsedScopeType;
528+
Constant<int64_t> kUncompiledDataWithPreParsedScopeType;
529529
int64_t kScriptType;
530530
int64_t kScopeInfoType;
531531
int64_t kSymbolType;

src/llv8-inl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ inline bool Value::IsUncompiledData(Error& err) {
144144
int64_t type = heap_object.GetType(err);
145145
if (err.Fail()) return false;
146146

147-
return type == v8()->types()->kUncompiledDataWithoutPreParsedScopeType ||
148-
type == v8()->types()->kUncompiledDataWithPreParsedScopeType;
147+
return type == *v8()->types()->kUncompiledDataWithoutPreParsedScopeType ||
148+
type == *v8()->types()->kUncompiledDataWithPreParsedScopeType;
149149
}
150150

151151

0 commit comments

Comments
 (0)