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

Side by Side Diff: src/runtime.cc

Issue 15012016: small misspelling fixes. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/regexp.js ('k') | src/serialize.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 // 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 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after
3369 } 3369 }
3370 3370
3371 // Guessing the number of parts that the final result string is built 3371 // Guessing the number of parts that the final result string is built
3372 // from. Global regexps can match any number of times, so we guess 3372 // from. Global regexps can match any number of times, so we guess
3373 // conservatively. 3373 // conservatively.
3374 int expected_parts = (compiled_replacement.parts() + 1) * 4 + 1; 3374 int expected_parts = (compiled_replacement.parts() + 1) * 4 + 1;
3375 ReplacementStringBuilder builder(isolate->heap(), 3375 ReplacementStringBuilder builder(isolate->heap(),
3376 subject, 3376 subject,
3377 expected_parts); 3377 expected_parts);
3378 3378
3379 // Number of parts added by compiled replacement plus preceeding 3379 // Number of parts added by compiled replacement plus preceding
3380 // string and possibly suffix after last match. It is possible for 3380 // string and possibly suffix after last match. It is possible for
3381 // all components to use two elements when encoded as two smis. 3381 // all components to use two elements when encoded as two smis.
3382 const int parts_added_per_loop = 2 * (compiled_replacement.parts() + 2); 3382 const int parts_added_per_loop = 2 * (compiled_replacement.parts() + 2);
3383 3383
3384 int prev = 0; 3384 int prev = 0;
3385 3385
3386 do { 3386 do {
3387 builder.EnsureCapacity(parts_added_per_loop); 3387 builder.EnsureCapacity(parts_added_per_loop);
3388 3388
3389 int start = current_match[0]; 3389 int start = current_match[0];
(...skipping 9979 matching lines...) Expand 10 before | Expand all | Expand 10 after
13369 // Handle last resort GC and make sure to allow future allocations 13369 // Handle last resort GC and make sure to allow future allocations
13370 // to grow the heap without causing GCs (if possible). 13370 // to grow the heap without causing GCs (if possible).
13371 isolate->counters()->gc_last_resort_from_js()->Increment(); 13371 isolate->counters()->gc_last_resort_from_js()->Increment();
13372 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13372 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13373 "Runtime::PerformGC"); 13373 "Runtime::PerformGC");
13374 } 13374 }
13375 } 13375 }
13376 13376
13377 13377
13378 } } // namespace v8::internal 13378 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/regexp.js ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698