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

Side by Side Diff: src/runtime.cc

Issue 7477045: Tentative implementation of string slices (hidden under the flag --string-slices). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implemented some changes suggested by Anton. Created 9 years, 4 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 3563 matching lines...) Expand 10 before | Expand all | Expand 10 after
3574 // No matches at all, return failure or exception result directly. 3574 // No matches at all, return failure or exception result directly.
3575 return result; 3575 return result;
3576 } 3576 }
3577 3577
3578 3578
3579 RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExecMultiple) { 3579 RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExecMultiple) {
3580 ASSERT(args.length() == 4); 3580 ASSERT(args.length() == 4);
3581 HandleScope handles(isolate); 3581 HandleScope handles(isolate);
3582 3582
3583 CONVERT_ARG_CHECKED(String, subject, 1); 3583 CONVERT_ARG_CHECKED(String, subject, 1);
3584 if (!subject->IsFlat()) { FlattenString(subject); } 3584 if (!subject->IsFlatAndTruncated()) FlattenOrTruncateString(subject);
3585 CONVERT_ARG_CHECKED(JSRegExp, regexp, 0); 3585 CONVERT_ARG_CHECKED(JSRegExp, regexp, 0);
3586 CONVERT_ARG_CHECKED(JSArray, last_match_info, 2); 3586 CONVERT_ARG_CHECKED(JSArray, last_match_info, 2);
3587 CONVERT_ARG_CHECKED(JSArray, result_array, 3); 3587 CONVERT_ARG_CHECKED(JSArray, result_array, 3);
3588 3588
3589 ASSERT(last_match_info->HasFastElements()); 3589 ASSERT(last_match_info->HasFastElements());
3590 ASSERT(regexp->GetFlags().is_global()); 3590 ASSERT(regexp->GetFlags().is_global());
3591 Handle<FixedArray> result_elements; 3591 Handle<FixedArray> result_elements;
3592 if (result_array->HasFastElements()) { 3592 if (result_array->HasFastElements()) {
3593 result_elements = 3593 result_elements =
3594 Handle<FixedArray>(FixedArray::cast(result_array->elements())); 3594 Handle<FixedArray>(FixedArray::cast(result_array->elements()));
(...skipping 9156 matching lines...) Expand 10 before | Expand all | Expand 10 after
12751 } else { 12751 } else {
12752 // Handle last resort GC and make sure to allow future allocations 12752 // Handle last resort GC and make sure to allow future allocations
12753 // to grow the heap without causing GCs (if possible). 12753 // to grow the heap without causing GCs (if possible).
12754 isolate->counters()->gc_last_resort_from_js()->Increment(); 12754 isolate->counters()->gc_last_resort_from_js()->Increment();
12755 isolate->heap()->CollectAllGarbage(false); 12755 isolate->heap()->CollectAllGarbage(false);
12756 } 12756 }
12757 } 12757 }
12758 12758
12759 12759
12760 } } // namespace v8::internal 12760 } } // namespace v8::internal
OLDNEW
« src/objects.h ('K') | « src/regexp-macro-assembler.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698