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

Side by Side Diff: src/jsregexp.cc

Issue 210063004: Callers of ElementsAccessor::SetCapacityAndLength() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/json-stringifier.h ('k') | src/objects.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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 return isolate->factory()->null_value(); 683 return isolate->factory()->null_value();
684 } 684 }
685 685
686 686
687 Handle<JSArray> RegExpImpl::SetLastMatchInfo(Handle<JSArray> last_match_info, 687 Handle<JSArray> RegExpImpl::SetLastMatchInfo(Handle<JSArray> last_match_info,
688 Handle<String> subject, 688 Handle<String> subject,
689 int capture_count, 689 int capture_count,
690 int32_t* match) { 690 int32_t* match) {
691 ASSERT(last_match_info->HasFastObjectElements()); 691 ASSERT(last_match_info->HasFastObjectElements());
692 int capture_register_count = (capture_count + 1) * 2; 692 int capture_register_count = (capture_count + 1) * 2;
693 last_match_info->EnsureSize(capture_register_count + kLastMatchOverhead); 693 JSArray::EnsureSize(last_match_info,
694 capture_register_count + kLastMatchOverhead);
694 DisallowHeapAllocation no_allocation; 695 DisallowHeapAllocation no_allocation;
695 FixedArray* array = FixedArray::cast(last_match_info->elements()); 696 FixedArray* array = FixedArray::cast(last_match_info->elements());
696 if (match != NULL) { 697 if (match != NULL) {
697 for (int i = 0; i < capture_register_count; i += 2) { 698 for (int i = 0; i < capture_register_count; i += 2) {
698 SetCapture(array, i, match[i]); 699 SetCapture(array, i, match[i]);
699 SetCapture(array, i + 1, match[i + 1]); 700 SetCapture(array, i + 1, match[i + 1]);
700 } 701 }
701 } 702 }
702 SetLastCaptureCount(array, capture_register_count); 703 SetLastCaptureCount(array, capture_register_count);
703 SetLastSubject(array, *subject); 704 SetLastSubject(array, *subject);
(...skipping 5419 matching lines...) Expand 10 before | Expand all | Expand 10 after
6123 } 6124 }
6124 6125
6125 return compiler.Assemble(&macro_assembler, 6126 return compiler.Assemble(&macro_assembler,
6126 node, 6127 node,
6127 data->capture_count, 6128 data->capture_count,
6128 pattern); 6129 pattern);
6129 } 6130 }
6130 6131
6131 6132
6132 }} // namespace v8::internal 6133 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/json-stringifier.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698