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

Unified Diff: src/regexp-macro-assembler-ia32.cc

Issue 45010: Remove all uses of StringShape variables, since that has proven... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/prettyprinter.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp-macro-assembler-ia32.cc
===================================================================
--- src/regexp-macro-assembler-ia32.cc (revision 1519)
+++ src/regexp-macro-assembler-ia32.cc (working copy)
@@ -985,16 +985,14 @@
int* offsets_vector,
int offsets_vector_length,
int previous_index) {
- StringShape shape(*subject);
-
// Character offsets into string.
int start_offset = previous_index;
- int end_offset = subject->length(shape);
+ int end_offset = subject->length();
- if (shape.IsCons()) {
+ if (StringShape(*subject).IsCons()) {
subject =
Handle<String>(String::cast(ConsString::cast(*subject)->first()));
- } else if (shape.IsSliced()) {
+ } else if (StringShape(*subject).IsSliced()) {
SlicedString* slice = SlicedString::cast(*subject);
start_offset += slice->start();
end_offset += slice->start();
@@ -1002,13 +1000,12 @@
}
// String is now either Sequential or External
- StringShape flatshape(*subject);
- bool is_ascii = flatshape.IsAsciiRepresentation();
+ bool is_ascii = StringShape(*subject).IsAsciiRepresentation();
int char_size_shift = is_ascii ? 0 : 1;
RegExpMacroAssemblerIA32::Result res;
- if (flatshape.IsExternal()) {
+ if (StringShape(*subject).IsExternal()) {
const byte* address;
if (is_ascii) {
ExternalAsciiString* ext = ExternalAsciiString::cast(*subject);
« no previous file with comments | « src/prettyprinter.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698