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

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

Issue 8568013: Introduce read buffer for external strings when using charAt (ia32). (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/lithium-codegen-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 2d4f4cdb2f551966f55b646299f27c3c014400c9..95a35965a11751938c3daa6652d7733667d2bace 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2578,9 +2578,9 @@ void MacroAssembler::EnsureNotWhite(
// Since both black and grey have a 1 in the first position and white does
// not have a 1 there we only need to check one bit.
test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize));
- j(not_zero, &done, Label::kNear);
if (FLAG_debug_code) {
+ j(not_zero, &done);
// Check for impossible bit pattern.
Label ok;
push(mask_scratch);
@@ -2591,6 +2591,8 @@ void MacroAssembler::EnsureNotWhite(
int3();
bind(&ok);
pop(mask_scratch);
+ } else {
+ j(not_zero, &done, Label::kNear);
}
// Value is white. We check whether it is data that doesn't need scanning.
@@ -2621,13 +2623,15 @@ void MacroAssembler::EnsureNotWhite(
// If it's external, the length is just ExternalString::kSize.
// Otherwise it's String::kHeaderSize + string->length() * (1 or 2).
Label not_external;
- // External strings are the only ones with the kExternalStringTag bit
- // set.
+ // External strings are the only ones with the kExternalStringTag bit set.
ASSERT_EQ(0, kSeqStringTag & kExternalStringTag);
ASSERT_EQ(0, kConsStringTag & kExternalStringTag);
test_b(instance_type, kExternalStringTag);
j(zero, &not_external, Label::kNear);
mov(length, Immediate(ExternalString::kSize));
+ test_b(instance_type, kBufferedStringTag);
+ j(zero, &is_data_object, Label::kNear);
+ mov(length, Immediate(ExternalString::kExtendedSize));
jmp(&is_data_object, Label::kNear);
bind(&not_external);
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698