Skip to content

Commit c86eb43

Browse files
committed
src: update RegExp type constant for V8 8.1
PR-URL: #361 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent dd57bfb commit c86eb43

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/llv8-constants.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ void Types::Load() {
619619
kFixedArrayType = LoadConstant("type_FixedArray__FIXED_ARRAY_TYPE");
620620
kJSArrayBufferType = LoadConstant("type_JSArrayBuffer__JS_ARRAY_BUFFER_TYPE");
621621
kJSTypedArrayType = LoadConstant("type_JSTypedArray__JS_TYPED_ARRAY_TYPE");
622-
kJSRegExpType = LoadConstant("type_JSRegExp__JS_REGEXP_TYPE");
622+
kJSRegExpType = LoadConstant(
623+
{"type_JSRegExp__JS_REG_EXP_TYPE", "type_JSRegExp__JS_REGEXP_TYPE"});
623624
kJSDateType = LoadConstant("type_JSDate__JS_DATE_TYPE");
624625
kSharedFunctionInfoType =
625626
LoadConstant("type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE");

src/llv8-constants.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ class Types : public Module {
545545
int64_t kFixedArrayType;
546546
int64_t kJSArrayBufferType;
547547
int64_t kJSTypedArrayType;
548-
int64_t kJSRegExpType;
548+
Constant<int64_t> kJSRegExpType;
549549
int64_t kJSDateType;
550550
int64_t kSharedFunctionInfoType;
551551
Constant<int64_t> kUncompiledDataWithoutPreParsedScopeType;

src/llv8.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ std::string HeapObject::GetTypeName(Error& err) {
660660
return "(Function)";
661661
}
662662

663-
if (type == v8()->types()->kJSRegExpType) {
663+
if (type == *v8()->types()->kJSRegExpType) {
664664
return "(RegExp)";
665665
}
666666

src/printer.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ std::string Printer::Stringify(v8::HeapObject heap_object, Error& err) {
726726
return pre + Stringify(fn, err);
727727
}
728728

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

0 commit comments

Comments
 (0)