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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 8584003: Add external strings support to regexp in generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index 58eead772b067f9c5f550b0b53b2d18ba9d90f92..6d991acc735c86dddb8b9b546d26641ef0e0419a 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -568,10 +568,10 @@ void StringCharLoadGenerator::Generate(MacroAssembler* masm,
__ j(zero, call_runtime);
Register scratch = string;
__ mov(scratch, FieldOperand(string, HeapObject::kMapOffset));
- __ cmp(scratch, Immediate(factory->external_ascii_string_map()));
- __ j(equal, &ascii_external, Label::kNear);
- __ cmp(scratch, Immediate(factory->external_ascii_symbol_map()));
- __ j(equal, &ascii_external, Label::kNear);
+ STATIC_ASSERT(kTwoByteStringTag == 0);
+ __ test_b(FieldOperand(scratch, Map::kInstanceTypeOffset),
+ kStringEncodingMask);
+ __ j(not_zero, &ascii_external);
// Two-byte string.
__ movzx_w(result, Operand(result, index, times_2, 0));
__ jmp(&done);
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698