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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 10831126: Take advantage of batched results when matching global regexp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and formatting changes. Created 8 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
« no previous file with comments | « no previous file | src/assembler.cc » ('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 4759 matching lines...) Expand 10 before | Expand all | Expand 10 after
4770 // regexp_data: RegExp data (FixedArray) 4770 // regexp_data: RegExp data (FixedArray)
4771 // Check that the number of captures fit in the static offsets vector buffer. 4771 // Check that the number of captures fit in the static offsets vector buffer.
4772 __ ldr(r2, 4772 __ ldr(r2,
4773 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); 4773 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset));
4774 // Calculate number of capture registers (number_of_captures + 1) * 2. This 4774 // Calculate number of capture registers (number_of_captures + 1) * 2. This
4775 // uses the asumption that smis are 2 * their untagged value. 4775 // uses the asumption that smis are 2 * their untagged value.
4776 STATIC_ASSERT(kSmiTag == 0); 4776 STATIC_ASSERT(kSmiTag == 0);
4777 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); 4777 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1);
4778 __ add(r2, r2, Operand(2)); // r2 was a smi. 4778 __ add(r2, r2, Operand(2)); // r2 was a smi.
4779 // Check that the static offsets vector buffer is large enough. 4779 // Check that the static offsets vector buffer is large enough.
4780 __ cmp(r2, Operand(OffsetsVector::kStaticOffsetsVectorSize)); 4780 __ cmp(r2, Operand(Isolate::kJSRegexpStaticOffsetsVectorSize));
4781 __ b(hi, &runtime); 4781 __ b(hi, &runtime);
4782 4782
4783 // r2: Number of capture registers 4783 // r2: Number of capture registers
4784 // regexp_data: RegExp data (FixedArray) 4784 // regexp_data: RegExp data (FixedArray)
4785 // Check that the second argument is a string. 4785 // Check that the second argument is a string.
4786 __ ldr(subject, MemOperand(sp, kSubjectOffset)); 4786 __ ldr(subject, MemOperand(sp, kSubjectOffset));
4787 __ JumpIfSmi(subject, &runtime); 4787 __ JumpIfSmi(subject, &runtime);
4788 Condition is_string = masm->IsObjectStringType(subject, r0); 4788 Condition is_string = masm->IsObjectStringType(subject, r0);
4789 __ b(NegateCondition(is_string), &runtime); 4789 __ b(NegateCondition(is_string), &runtime);
4790 // Get the length of the string to r3. 4790 // Get the length of the string to r3.
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after
7571 7571
7572 __ Pop(lr, r5, r1); 7572 __ Pop(lr, r5, r1);
7573 __ Ret(); 7573 __ Ret();
7574 } 7574 }
7575 7575
7576 #undef __ 7576 #undef __
7577 7577
7578 } } // namespace v8::internal 7578 } } // namespace v8::internal
7579 7579
7580 #endif // V8_TARGET_ARCH_ARM 7580 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698