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

Side by Side Diff: src/runtime.cc

Issue 7832002: Enable slices of external strings (in the tentative implementation). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6011 matching lines...) Expand 10 before | Expand all | Expand 10 after
6022 } 6022 }
6023 } else { 6023 } else {
6024 FindStringIndices(isolate, 6024 FindStringIndices(isolate,
6025 subject_vector, 6025 subject_vector,
6026 pattern_content.ToUC16Vector(), 6026 pattern_content.ToUC16Vector(),
6027 &indices, 6027 &indices,
6028 limit); 6028 limit);
6029 } 6029 }
6030 } else { 6030 } else {
6031 Vector<const uc16> subject_vector = subject_content.ToUC16Vector(); 6031 Vector<const uc16> subject_vector = subject_content.ToUC16Vector();
6032 if (pattern->IsAsciiRepresentation()) { 6032 if (pattern_content.IsAscii()) {
6033 FindStringIndices(isolate, 6033 FindStringIndices(isolate,
6034 subject_vector, 6034 subject_vector,
6035 pattern_content.ToAsciiVector(), 6035 pattern_content.ToAsciiVector(),
6036 &indices, 6036 &indices,
6037 limit); 6037 limit);
6038 } else { 6038 } else {
6039 FindStringIndices(isolate, 6039 FindStringIndices(isolate,
6040 subject_vector, 6040 subject_vector,
6041 pattern_content.ToUC16Vector(), 6041 pattern_content.ToUC16Vector(),
6042 &indices, 6042 &indices,
(...skipping 6950 matching lines...) Expand 10 before | Expand all | Expand 10 after
12993 } else { 12993 } else {
12994 // Handle last resort GC and make sure to allow future allocations 12994 // Handle last resort GC and make sure to allow future allocations
12995 // to grow the heap without causing GCs (if possible). 12995 // to grow the heap without causing GCs (if possible).
12996 isolate->counters()->gc_last_resort_from_js()->Increment(); 12996 isolate->counters()->gc_last_resort_from_js()->Increment();
12997 isolate->heap()->CollectAllGarbage(false); 12997 isolate->heap()->CollectAllGarbage(false);
12998 } 12998 }
12999 } 12999 }
13000 13000
13001 13001
13002 } } // namespace v8::internal 13002 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698