diff --git a/src/jsregexp.cc b/src/jsregexp.cc index 0813afbe84..1843597e74 100644 --- a/src/jsregexp.cc +++ b/src/jsregexp.cc @@ -6121,7 +6121,7 @@ RegExpEngine::CompilationResult RegExpEngine::Compile( #else // V8_INTERPRETED_REGEXP // Interpreted regexp implementation. EmbeddedVector codes; - RegExpMacroAssemblerIrregexp macro_assembler(codes, zone); + RegExpMacroAssemblerIrregexp macro_assembler(isolate, codes, zone); #endif // V8_INTERPRETED_REGEXP macro_assembler.set_slow_safe(TooMuchRegExpCode(pattern)); diff --git a/src/regexp-macro-assembler-irregexp.cc b/src/regexp-macro-assembler-irregexp.cc index 469fb8cbb3..5574730a57 100644 --- a/src/regexp-macro-assembler-irregexp.cc +++ b/src/regexp-macro-assembler-irregexp.cc @@ -16,14 +16,15 @@ namespace internal { #ifdef V8_INTERPRETED_REGEXP -RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Vector buffer, +RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Isolate* isolate, + Vector buffer, Zone* zone) - : RegExpMacroAssembler(zone), + : RegExpMacroAssembler(isolate, zone), buffer_(buffer), pc_(0), own_buffer_(false), advance_current_end_(kInvalidPC), - isolate_(zone->isolate()) { } + isolate_(isolate) {} RegExpMacroAssemblerIrregexp::~RegExpMacroAssemblerIrregexp() { diff --git a/src/regexp-macro-assembler-irregexp.h b/src/regexp-macro-assembler-irregexp.h index b192c22b6f..781defc297 100644 --- a/src/regexp-macro-assembler-irregexp.h +++ b/src/regexp-macro-assembler-irregexp.h @@ -27,7 +27,8 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { // for code generation and assumes its size to be buffer_size. If the buffer // is too small, a fatal error occurs. No deallocation of the buffer is done // upon destruction of the assembler. - RegExpMacroAssemblerIrregexp(Vector, Zone* zone); + RegExpMacroAssemblerIrregexp(Isolate* isolate, Vector buffer, + Zone* zone); virtual ~RegExpMacroAssemblerIrregexp(); // The byte-code interpreter checks on each push anyway. virtual int stack_limit_slack() { return 1; } diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc index 8aa9ffb015..2fe46d53ea 100644 --- a/test/cctest/test-regexp.cc +++ b/test/cctest/test-regexp.cc @@ -1372,8 +1372,9 @@ TEST(MacroAssemblerNativeLotsOfRegisters) { TEST(MacroAssembler) { byte codes[1024]; - Zone zone(CcTest::i_isolate()); - RegExpMacroAssemblerIrregexp m(Vector(codes, 1024), &zone); + Zone zone; + RegExpMacroAssemblerIrregexp m(CcTest::i_isolate(), Vector(codes, 1024), + &zone); // ^f(o)o. Label start, fail, backtrack;