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

Side by Side Diff: src/runtime/runtime-regexp.cc

Issue 2384403006: Remove unnecessary statics (Closed)
Patch Set: Remove unnecessary statics Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/conversions-inl.h" 8 #include "src/conversions-inl.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } else { 374 } else {
375 FindStringIndices(isolate, subject_vector, pattern_vector, indices, 375 FindStringIndices(isolate, subject_vector, pattern_vector, indices,
376 limit); 376 limit);
377 } 377 }
378 } 378 }
379 } 379 }
380 } 380 }
381 } 381 }
382 382
383 namespace { 383 namespace {
384 static List<int>* GetRewindedRegexpIndicesList(Isolate* isolate) { 384 List<int>* GetRewindedRegexpIndicesList(Isolate* isolate) {
385 List<int>* list = isolate->regexp_indices(); 385 List<int>* list = isolate->regexp_indices();
386 list->Rewind(0); 386 list->Rewind(0);
387 return list; 387 return list;
388 } 388 }
389 389
390 static void TruncateRegexpIndicesList(Isolate* isolate) { 390 void TruncateRegexpIndicesList(Isolate* isolate) {
391 // Same size as smallest zone segment, preserving behavior from the runtime 391 // Same size as smallest zone segment, preserving behavior from the
392 // zone. 392 // runtime zone.
393 static const size_t kMaxRegexpIndicesListCapacity = 8 * KB; 393 static const size_t kMaxRegexpIndicesListCapacity = 8 * KB;
394 if (isolate->regexp_indices()->capacity() > kMaxRegexpIndicesListCapacity) { 394 if (isolate->regexp_indices()->capacity() > kMaxRegexpIndicesListCapacity) {
395 isolate->regexp_indices()->Clear(); // Throw away backing storage 395 isolate->regexp_indices()->Clear(); // Throw away backing storage
396 } 396 }
397 } 397 }
398 } // namespace 398 } // namespace
399 399
400 template <typename ResultSeqString> 400 template <typename ResultSeqString>
401 MUST_USE_RESULT static Object* StringReplaceGlobalAtomRegExpWithString( 401 MUST_USE_RESULT static Object* StringReplaceGlobalAtomRegExpWithString(
402 Isolate* isolate, Handle<String> subject, Handle<JSRegExp> pattern_regexp, 402 Isolate* isolate, Handle<String> subject, Handle<JSRegExp> pattern_regexp,
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 1020
1021 1021
1022 RUNTIME_FUNCTION(Runtime_IsRegExp) { 1022 RUNTIME_FUNCTION(Runtime_IsRegExp) {
1023 SealHandleScope shs(isolate); 1023 SealHandleScope shs(isolate);
1024 DCHECK(args.length() == 1); 1024 DCHECK(args.length() == 1);
1025 CONVERT_ARG_CHECKED(Object, obj, 0); 1025 CONVERT_ARG_CHECKED(Object, obj, 0);
1026 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); 1026 return isolate->heap()->ToBoolean(obj->IsJSRegExp());
1027 } 1027 }
1028 } // namespace internal 1028 } // namespace internal
1029 } // namespace v8 1029 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698