Skip to content

Commit

Permalink
src: update UncompiledData types constants
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarchini committed Nov 8, 2019
1 parent 2afd59e commit 66a175b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
12 changes: 8 additions & 4 deletions src/llv8-constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,16 @@ void Types::Load() {
kJSDateType = LoadConstant("type_JSDate__JS_DATE_TYPE");
kSharedFunctionInfoType =
LoadConstant("type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE");
kUncompiledDataWithoutPreParsedScopeType = LoadConstant(
kUncompiledDataWithoutPreParsedScopeType = LoadConstant({
"type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_"
"PARSED_SCOPE_TYPE");
kUncompiledDataWithPreParsedScopeType = LoadConstant(
"PARSED_SCOPE_TYPE",
"type_UncompiledDataWithoutPreparseData__UNCOMPILED_DATA_WITHOUT_"
"PREPARSE_DATA_TYPE"});
kUncompiledDataWithPreParsedScopeType = LoadConstant({
"type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_"
"SCOPE_TYPE");
"SCOPE_TYPE",
"type_UncompiledDataWithPreparseData__UNCOMPILED_DATA_WITH_"
"PREPARSE_DATA_TYPE"});
kScriptType = LoadConstant("type_Script__SCRIPT_TYPE");
kScopeInfoType = LoadConstant("type_ScopeInfo__SCOPE_INFO_TYPE");
kSymbolType = LoadConstant("type_Symbol__SYMBOL_TYPE");
Expand Down
4 changes: 2 additions & 2 deletions src/llv8-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ class Types : public Module {
int64_t kJSRegExpType;
int64_t kJSDateType;
int64_t kSharedFunctionInfoType;
int64_t kUncompiledDataWithoutPreParsedScopeType;
int64_t kUncompiledDataWithPreParsedScopeType;
Constant<int64_t> kUncompiledDataWithoutPreParsedScopeType;
Constant<int64_t> kUncompiledDataWithPreParsedScopeType;
int64_t kScriptType;
int64_t kScopeInfoType;
int64_t kSymbolType;
Expand Down
4 changes: 2 additions & 2 deletions src/llv8-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ inline bool Value::IsUncompiledData(Error& err) {
int64_t type = heap_object.GetType(err);
if (err.Fail()) return false;

return type == v8()->types()->kUncompiledDataWithoutPreParsedScopeType ||
type == v8()->types()->kUncompiledDataWithPreParsedScopeType;
return type == *v8()->types()->kUncompiledDataWithoutPreParsedScopeType ||
type == *v8()->types()->kUncompiledDataWithPreParsedScopeType;
}


Expand Down

0 comments on commit 66a175b

Please sign in to comment.