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

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

Issue 10872010: Reland regexp global optimizations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « src/assembler.cc ('k') | src/isolate.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 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after
3741 3741
3742 // ecx: RegExp data (FixedArray) 3742 // ecx: RegExp data (FixedArray)
3743 // Check that the number of captures fit in the static offsets vector buffer. 3743 // Check that the number of captures fit in the static offsets vector buffer.
3744 __ mov(edx, FieldOperand(ecx, JSRegExp::kIrregexpCaptureCountOffset)); 3744 __ mov(edx, FieldOperand(ecx, JSRegExp::kIrregexpCaptureCountOffset));
3745 // Calculate number of capture registers (number_of_captures + 1) * 2. This 3745 // Calculate number of capture registers (number_of_captures + 1) * 2. This
3746 // uses the asumption that smis are 2 * their untagged value. 3746 // uses the asumption that smis are 2 * their untagged value.
3747 STATIC_ASSERT(kSmiTag == 0); 3747 STATIC_ASSERT(kSmiTag == 0);
3748 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); 3748 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1);
3749 __ add(edx, Immediate(2)); // edx was a smi. 3749 __ add(edx, Immediate(2)); // edx was a smi.
3750 // Check that the static offsets vector buffer is large enough. 3750 // Check that the static offsets vector buffer is large enough.
3751 __ cmp(edx, OffsetsVector::kStaticOffsetsVectorSize); 3751 __ cmp(edx, Isolate::kJSRegexpStaticOffsetsVectorSize);
3752 __ j(above, &runtime); 3752 __ j(above, &runtime);
3753 3753
3754 // ecx: RegExp data (FixedArray) 3754 // ecx: RegExp data (FixedArray)
3755 // edx: Number of capture registers 3755 // edx: Number of capture registers
3756 // Check that the second argument is a string. 3756 // Check that the second argument is a string.
3757 __ mov(eax, Operand(esp, kSubjectOffset)); 3757 __ mov(eax, Operand(esp, kSubjectOffset));
3758 __ JumpIfSmi(eax, &runtime); 3758 __ JumpIfSmi(eax, &runtime);
3759 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx); 3759 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx);
3760 __ j(NegateCondition(is_string), &runtime); 3760 __ j(NegateCondition(is_string), &runtime);
3761 // Get the length of the string to ebx. 3761 // Get the length of the string to ebx.
(...skipping 3742 matching lines...) Expand 10 before | Expand all | Expand 10 after
7504 // Restore ecx. 7504 // Restore ecx.
7505 __ pop(ecx); 7505 __ pop(ecx);
7506 __ ret(0); 7506 __ ret(0);
7507 } 7507 }
7508 7508
7509 #undef __ 7509 #undef __
7510 7510
7511 } } // namespace v8::internal 7511 } } // namespace v8::internal
7512 7512
7513 #endif // V8_TARGET_ARCH_IA32 7513 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698