Commit 32d4d8e9 authored by jgruber's avatar jgruber Committed by Commit bot

[regexp] Fix check for FLAG_harmony_regexp_dotall

Bool flags can be as small as one byte, so testing an IntPtr-sized value
is incorrect.

BUG=v8:6172

Review-Url: https://codereview.chromium.org/2792963002
Cr-Commit-Position: refs/heads/master@{#44343}
parent 668dcf3b
......@@ -1368,8 +1368,8 @@ TF_BUILTIN(RegExpPrototypeMultilineGetter, RegExpBuiltinsAssembler) {
Node* RegExpBuiltinsAssembler::IsDotAllEnabled(Isolate* isolate) {
Node* flag_ptr = ExternalConstant(
ExternalReference::address_of_regexp_dotall_flag(isolate));
Node* flag_value = Load(MachineType::IntPtr(), flag_ptr);
return WordNotEqual(flag_value, IntPtrConstant(0));
Node* const flag_value = Load(MachineType::Int8(), flag_ptr);
return Word32NotEqual(flag_value, Int32Constant(0));
}
// ES #sec-get-regexp.prototype.dotAll
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment