diff --git a/src/regexp/jsregexp-inl.h b/src/regexp/jsregexp-inl.h index 756210b218..926fec2868 100644 --- a/src/regexp/jsregexp-inl.h +++ b/src/regexp/jsregexp-inl.h @@ -75,6 +75,10 @@ int32_t* RegExpImpl::GlobalCache::LastSuccessfulMatch() { return ®ister_array_[index]; } +RegExpEngine::CompilationResult::CompilationResult(Isolate* isolate, + const char* error_message) + : error_message(error_message), + code(ReadOnlyRoots(isolate).the_hole_value()) {} } // namespace internal } // namespace v8 diff --git a/src/regexp/jsregexp.h b/src/regexp/jsregexp.h index e2d41febb4..0c4def20e8 100644 --- a/src/regexp/jsregexp.h +++ b/src/regexp/jsregexp.h @@ -1504,15 +1504,12 @@ struct RegExpCompileData { class RegExpEngine: public AllStatic { public: struct CompilationResult { - CompilationResult(Isolate* isolate, const char* error_message) - : error_message(error_message), - code(ReadOnlyRoots(isolate).the_hole_value()), - num_registers(0) {} + inline CompilationResult(Isolate* isolate, const char* error_message); CompilationResult(Object* code, int registers) - : error_message(nullptr), code(code), num_registers(registers) {} - const char* error_message; - Object* code; - int num_registers; + : code(code), num_registers(registers) {} + const char* const error_message = nullptr; + Object* const code; + int const num_registers = 0; }; static CompilationResult Compile(Isolate* isolate, Zone* zone, diff --git a/tools/generate-header-include-checks.py b/tools/generate-header-include-checks.py index 7316d9bbcc..a76be5be1c 100755 --- a/tools/generate-header-include-checks.py +++ b/tools/generate-header-include-checks.py @@ -29,7 +29,6 @@ AUTO_EXCLUDE = [ # flag-definitions.h needs a mode set for being included. 'src/flag-definitions.h', # blacklist of headers we need to fix (https://crbug.com/v8/7965). - 'src/regexp/jsregexp.h', 'src/transitions.h', ] AUTO_EXCLUDE_PATTERNS = [