Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: src/jsregexp.cc

Issue 1145653004: ARM64: Propagate notification about aborted compilation from RegExpEngine to MacroAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/regexp-macro-assembler-arm64.h ('k') | src/regexp-macro-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/compilation-cache.h" 9 #include "src/compilation-cache.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 macro_assembler_->PushBacktrack(&fail); 1084 macro_assembler_->PushBacktrack(&fail);
1085 Trace new_trace; 1085 Trace new_trace;
1086 start->Emit(this, &new_trace); 1086 start->Emit(this, &new_trace);
1087 macro_assembler_->Bind(&fail); 1087 macro_assembler_->Bind(&fail);
1088 macro_assembler_->Fail(); 1088 macro_assembler_->Fail();
1089 while (!work_list.is_empty()) { 1089 while (!work_list.is_empty()) {
1090 RegExpNode* node = work_list.RemoveLast(); 1090 RegExpNode* node = work_list.RemoveLast();
1091 node->set_on_work_list(false); 1091 node->set_on_work_list(false);
1092 if (!node->label()->is_bound()) node->Emit(this, &new_trace); 1092 if (!node->label()->is_bound()) node->Emit(this, &new_trace);
1093 } 1093 }
1094 if (reg_exp_too_big_) return IrregexpRegExpTooBig(isolate_); 1094 if (reg_exp_too_big_) {
1095 macro_assembler_->AbortedCodeGeneration();
1096 return IrregexpRegExpTooBig(isolate_);
1097 }
1095 1098
1096 Handle<HeapObject> code = macro_assembler_->GetCode(pattern); 1099 Handle<HeapObject> code = macro_assembler_->GetCode(pattern);
1097 heap->IncreaseTotalRegexpCodeGenerated(code->Size()); 1100 heap->IncreaseTotalRegexpCodeGenerated(code->Size());
1098 work_list_ = NULL; 1101 work_list_ = NULL;
1099 #ifdef ENABLE_DISASSEMBLER 1102 #ifdef ENABLE_DISASSEMBLER
1100 if (FLAG_print_code) { 1103 if (FLAG_print_code) {
1101 CodeTracer::Scope trace_scope(heap->isolate()->GetCodeTracer()); 1104 CodeTracer::Scope trace_scope(heap->isolate()->GetCodeTracer());
1102 OFStream os(trace_scope.file()); 1105 OFStream os(trace_scope.file());
1103 Handle<Code>::cast(code)->Disassemble(pattern->ToCString().get(), os); 1106 Handle<Code>::cast(code)->Disassemble(pattern->ToCString().get(), os);
1104 } 1107 }
(...skipping 5047 matching lines...) Expand 10 before | Expand all | Expand 10 after
6152 Heap* heap = pattern->GetHeap(); 6155 Heap* heap = pattern->GetHeap();
6153 bool too_much = pattern->length() > RegExpImpl::kRegExpTooLargeToOptimize; 6156 bool too_much = pattern->length() > RegExpImpl::kRegExpTooLargeToOptimize;
6154 if (heap->total_regexp_code_generated() > RegExpImpl::kRegExpCompiledLimit && 6157 if (heap->total_regexp_code_generated() > RegExpImpl::kRegExpCompiledLimit &&
6155 heap->isolate()->memory_allocator()->SizeExecutable() > 6158 heap->isolate()->memory_allocator()->SizeExecutable() >
6156 RegExpImpl::kRegExpExecutableMemoryLimit) { 6159 RegExpImpl::kRegExpExecutableMemoryLimit) {
6157 too_much = true; 6160 too_much = true;
6158 } 6161 }
6159 return too_much; 6162 return too_much;
6160 } 6163 }
6161 }} // namespace v8::internal 6164 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/regexp-macro-assembler-arm64.h ('k') | src/regexp-macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698