| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index ca72c9796d4421bf38fd8c3e8303a5f6ab07d904..2bf9395a840b8908749ca67ce383e1804f5fa984 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -2859,19 +2859,20 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
|
| __ test(result, Immediate(kStringRepresentationMask));
|
| __ j(not_zero, deferred->entry());
|
|
|
| - // Check for 1-byte or 2-byte string.
|
| + // Check for ASCII or two-byte string.
|
| __ bind(&flat_string);
|
| STATIC_ASSERT(kAsciiStringTag != 0);
|
| __ test(result, Immediate(kStringEncodingMask));
|
| __ j(not_zero, &ascii_string);
|
|
|
| - // 2-byte string.
|
| - // Load the 2-byte character code into the result register.
|
| + // Two-byte string.
|
| + // Load the two-byte character code into the result register.
|
| STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1);
|
| if (instr->index()->IsConstantOperand()) {
|
| __ movzx_w(result,
|
| FieldOperand(string,
|
| - SeqTwoByteString::kHeaderSize + 2 * const_index));
|
| + SeqTwoByteString::kHeaderSize +
|
| + (kUC16Size * const_index)));
|
| } else {
|
| __ movzx_w(result, FieldOperand(string,
|
| index,
|
|
|