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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 1857001: Revert "Changing string length field type from int to SMI." (Closed)
Patch Set: Created 10 years, 8 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/x64/macro-assembler-x64.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 8b36f9ee5c417e78fcb148ceef755b6cd24e78c8..a78f8b11b424bd2da551354c58aae1a61367116a 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -327,7 +327,8 @@ void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
GenerateStringCheck(masm, receiver, scratch1, miss, &check_wrapper);
// Load length directly from the string.
- __ movq(rax, FieldOperand(receiver, String::kLengthOffset));
+ __ movl(rax, FieldOperand(receiver, String::kLengthOffset));
+ __ Integer32ToSmi(rax, rax);
__ ret(0);
// Check if the object is a JSValue wrapper.
@@ -339,7 +340,8 @@ void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
// directly if it is.
__ movq(scratch2, FieldOperand(receiver, JSValue::kValueOffset));
GenerateStringCheck(masm, scratch2, scratch1, miss, miss);
- __ movq(rax, FieldOperand(scratch2, String::kLengthOffset));
+ __ movl(rax, FieldOperand(scratch2, String::kLengthOffset));
+ __ Integer32ToSmi(rax, rax);
__ ret(0);
}
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698