Skip to content

Commit

Permalink
src: update UncompiledData types constants
Browse files Browse the repository at this point in the history
Ref: #255

PR-URL: #324
Refs: #255
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
mmarchini committed Dec 9, 2019
1 parent 2afd59e commit fde0c59
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 @@ -539,11 +539,15 @@ void Types::Load() {
kSharedFunctionInfoType =
LoadConstant("type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE");
kUncompiledDataWithoutPreParsedScopeType = LoadConstant(
"type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_"
"PARSED_SCOPE_TYPE");
{"type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_"
"PARSED_SCOPE_TYPE",
"type_UncompiledDataWithoutPreparseData__UNCOMPILED_DATA_WITHOUT_"
"PREPARSE_DATA_TYPE"});
kUncompiledDataWithPreParsedScopeType = LoadConstant(
"type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_"
"SCOPE_TYPE");
{"type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_"
"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 fde0c59

Please sign in to comment.