Commit 0353a1ef authored by John Barboza's avatar John Barboza Committed by Commit Bot

Avoid disassembling Interpreted Regexp code

I found that v8 will crash when --print-code is turned on while Regexp
is interpreted. It crashes when trying to print Relocation info during
Disassembly. It should probably avoid printing out disassembly when the
Code object is a bytecode regexp.

Bug: 
Change-Id: I35b531cb03996a303248652871452266c78fee38
Reviewed-on: https://chromium-review.googlesource.com/642127Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47718}
parent 765e6f03
...@@ -1088,7 +1088,7 @@ RegExpEngine::CompilationResult RegExpCompiler::Assemble( ...@@ -1088,7 +1088,7 @@ RegExpEngine::CompilationResult RegExpCompiler::Assemble(
Handle<HeapObject> code = macro_assembler_->GetCode(pattern); Handle<HeapObject> code = macro_assembler_->GetCode(pattern);
isolate->IncreaseTotalRegexpCodeGenerated(code->Size()); isolate->IncreaseTotalRegexpCodeGenerated(code->Size());
work_list_ = NULL; work_list_ = NULL;
#ifdef ENABLE_DISASSEMBLER #if defined(ENABLE_DISASSEMBLER) && !defined(V8_INTERPRETED_REGEXP)
if (FLAG_print_code) { if (FLAG_print_code) {
CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
OFStream os(trace_scope.file()); OFStream os(trace_scope.file());
......
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