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

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

Issue 10825472: Revert r12258, r12300 and r12302 (global regexp). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add empty line 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/jsregexp.cc ('k') | src/runtime.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 4959 matching lines...) Expand 10 before | Expand all | Expand 10 after
4970 // regexp_data: RegExp data (FixedArray) 4970 // regexp_data: RegExp data (FixedArray)
4971 // Check that the number of captures fit in the static offsets vector buffer. 4971 // Check that the number of captures fit in the static offsets vector buffer.
4972 __ lw(a2, 4972 __ lw(a2,
4973 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); 4973 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset));
4974 // Calculate number of capture registers (number_of_captures + 1) * 2. This 4974 // Calculate number of capture registers (number_of_captures + 1) * 2. This
4975 // uses the asumption that smis are 2 * their untagged value. 4975 // uses the asumption that smis are 2 * their untagged value.
4976 STATIC_ASSERT(kSmiTag == 0); 4976 STATIC_ASSERT(kSmiTag == 0);
4977 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); 4977 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1);
4978 __ Addu(a2, a2, Operand(2)); // a2 was a smi. 4978 __ Addu(a2, a2, Operand(2)); // a2 was a smi.
4979 // Check that the static offsets vector buffer is large enough. 4979 // Check that the static offsets vector buffer is large enough.
4980 __ Branch( 4980 __ Branch(&runtime, hi, a2, Operand(OffsetsVector::kStaticOffsetsVectorSize));
4981 &runtime, hi, a2, Operand(Isolate::kJSRegexpStaticOffsetsVectorSize));
4982 4981
4983 // a2: Number of capture registers 4982 // a2: Number of capture registers
4984 // regexp_data: RegExp data (FixedArray) 4983 // regexp_data: RegExp data (FixedArray)
4985 // Check that the second argument is a string. 4984 // Check that the second argument is a string.
4986 __ lw(subject, MemOperand(sp, kSubjectOffset)); 4985 __ lw(subject, MemOperand(sp, kSubjectOffset));
4987 __ JumpIfSmi(subject, &runtime); 4986 __ JumpIfSmi(subject, &runtime);
4988 __ GetObjectType(subject, a0, a0); 4987 __ GetObjectType(subject, a0, a0);
4989 __ And(a0, a0, Operand(kIsNotStringMask)); 4988 __ And(a0, a0, Operand(kIsNotStringMask));
4990 STATIC_ASSERT(kStringTag == 0); 4989 STATIC_ASSERT(kStringTag == 0);
4991 __ Branch(&runtime, ne, a0, Operand(zero_reg)); 4990 __ Branch(&runtime, ne, a0, Operand(zero_reg));
(...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after
7826 __ Pop(ra, t1, a1); 7825 __ Pop(ra, t1, a1);
7827 __ Ret(); 7826 __ Ret();
7828 } 7827 }
7829 7828
7830 7829
7831 #undef __ 7830 #undef __
7832 7831
7833 } } // namespace v8::internal 7832 } } // namespace v8::internal
7834 7833
7835 #endif // V8_TARGET_ARCH_MIPS 7834 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698