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

Side by Side Diff: src/jsregexp.cc

Issue 1221433021: Move SmartPointer to base. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some unecessary header includes Created 5 years, 5 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
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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 if (required_registers < 0) { 589 if (required_registers < 0) {
590 // Compiling failed with an exception. 590 // Compiling failed with an exception.
591 DCHECK(isolate->has_pending_exception()); 591 DCHECK(isolate->has_pending_exception());
592 return MaybeHandle<Object>(); 592 return MaybeHandle<Object>();
593 } 593 }
594 594
595 int32_t* output_registers = NULL; 595 int32_t* output_registers = NULL;
596 if (required_registers > Isolate::kJSRegexpStaticOffsetsVectorSize) { 596 if (required_registers > Isolate::kJSRegexpStaticOffsetsVectorSize) {
597 output_registers = NewArray<int32_t>(required_registers); 597 output_registers = NewArray<int32_t>(required_registers);
598 } 598 }
599 SmartArrayPointer<int32_t> auto_release(output_registers); 599 base::SmartArrayPointer<int32_t> auto_release(output_registers);
600 if (output_registers == NULL) { 600 if (output_registers == NULL) {
601 output_registers = isolate->jsregexp_static_offsets_vector(); 601 output_registers = isolate->jsregexp_static_offsets_vector();
602 } 602 }
603 603
604 int res = RegExpImpl::IrregexpExecRaw( 604 int res = RegExpImpl::IrregexpExecRaw(
605 regexp, subject, previous_index, output_registers, required_registers); 605 regexp, subject, previous_index, output_registers, required_registers);
606 if (res == RE_SUCCESS) { 606 if (res == RE_SUCCESS) {
607 int capture_count = 607 int capture_count =
608 IrregexpNumberOfCaptures(FixedArray::cast(regexp->data())); 608 IrregexpNumberOfCaptures(FixedArray::cast(regexp->data()));
609 return SetLastMatchInfo( 609 return SetLastMatchInfo(
(...skipping 5792 matching lines...) Expand 10 before | Expand all | Expand 10 after
6402 bool too_much = pattern->length() > RegExpImpl::kRegExpTooLargeToOptimize; 6402 bool too_much = pattern->length() > RegExpImpl::kRegExpTooLargeToOptimize;
6403 if (heap->total_regexp_code_generated() > RegExpImpl::kRegExpCompiledLimit && 6403 if (heap->total_regexp_code_generated() > RegExpImpl::kRegExpCompiledLimit &&
6404 heap->isolate()->memory_allocator()->SizeExecutable() > 6404 heap->isolate()->memory_allocator()->SizeExecutable() >
6405 RegExpImpl::kRegExpExecutableMemoryLimit) { 6405 RegExpImpl::kRegExpExecutableMemoryLimit) {
6406 too_much = true; 6406 too_much = true;
6407 } 6407 }
6408 return too_much; 6408 return too_much;
6409 } 6409 }
6410 } // namespace internal 6410 } // namespace internal
6411 } // namespace v8 6411 } // namespace v8
OLDNEW
« BUILD.gn ('K') | « src/interface-descriptors.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698