Skip to content

Commit

Permalink
src: update RegExp type constant for V8 8.1
Browse files Browse the repository at this point in the history
PR-URL: #361
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
mmarchini committed Apr 27, 2020
1 parent dd57bfb commit c86eb43
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/llv8-constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,8 @@ void Types::Load() {
kFixedArrayType = LoadConstant("type_FixedArray__FIXED_ARRAY_TYPE");
kJSArrayBufferType = LoadConstant("type_JSArrayBuffer__JS_ARRAY_BUFFER_TYPE");
kJSTypedArrayType = LoadConstant("type_JSTypedArray__JS_TYPED_ARRAY_TYPE");
kJSRegExpType = LoadConstant("type_JSRegExp__JS_REGEXP_TYPE");
kJSRegExpType = LoadConstant(
{"type_JSRegExp__JS_REG_EXP_TYPE", "type_JSRegExp__JS_REGEXP_TYPE"});
kJSDateType = LoadConstant("type_JSDate__JS_DATE_TYPE");
kSharedFunctionInfoType =
LoadConstant("type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE");
Expand Down
2 changes: 1 addition & 1 deletion src/llv8-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ class Types : public Module {
int64_t kFixedArrayType;
int64_t kJSArrayBufferType;
int64_t kJSTypedArrayType;
int64_t kJSRegExpType;
Constant<int64_t> kJSRegExpType;
int64_t kJSDateType;
int64_t kSharedFunctionInfoType;
Constant<int64_t> kUncompiledDataWithoutPreParsedScopeType;
Expand Down
2 changes: 1 addition & 1 deletion src/llv8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ std::string HeapObject::GetTypeName(Error& err) {
return "(Function)";
}

if (type == v8()->types()->kJSRegExpType) {
if (type == *v8()->types()->kJSRegExpType) {
return "(RegExp)";
}

Expand Down
2 changes: 1 addition & 1 deletion src/printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ std::string Printer::Stringify(v8::HeapObject heap_object, Error& err) {
return pre + Stringify(fn, err);
}

if (type == llv8_->types()->kJSRegExpType) {
if (type == *llv8_->types()->kJSRegExpType) {
v8::JSRegExp re(heap_object);
return pre + Stringify(re, err);
}
Expand Down

0 comments on commit c86eb43

Please sign in to comment.