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

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

Issue 6368009: ARM: Implement StringLength and StringCharCodeAt in the lithium-arm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 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
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 1c35b682ef93b90f7c2fbf961eac5a42778192e2..307db0f5f62ae5bef02c9f7ccb5e5a4e9e4588a0 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -2656,8 +2656,8 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
LStringCharCodeAt* instr_;
};
- DeferredStringCharCodeAt* deferred = new DeferredStringCharCodeAt(this,
- instr);
+ DeferredStringCharCodeAt* deferred
+ = new DeferredStringCharCodeAt(this, instr);
Register string = ToRegister(instr->string());
Register index = no_reg;
@@ -2712,11 +2712,13 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1);
if (index.is_valid()) {
Søren Thygesen Gjesse 2011/01/20 12:56:41 instr->index()->IsConstantOperand()?
Mads Ager (chromium) 2011/01/20 14:07:52 Done.
__ movzx_w(result, FieldOperand(string,
- index, times_2,
+ index,
+ times_2,
SeqTwoByteString::kHeaderSize));
} else {
- __ movzx_w(result, FieldOperand(
- string, SeqTwoByteString::kHeaderSize + 2 * const_index));
+ __ movzx_w(result,
+ FieldOperand(string,
+ SeqTwoByteString::kHeaderSize + 2 * const_index));
}
__ jmp(&done);
@@ -2725,7 +2727,8 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
__ bind(&ascii_string);
if (index.is_valid()) {
Søren Thygesen Gjesse 2011/01/20 12:56:41 Ditto.
Mads Ager (chromium) 2011/01/20 14:07:52 Done.
__ movzx_b(result, FieldOperand(string,
- index, times_1,
+ index,
+ times_1,
SeqAsciiString::kHeaderSize));
} else {
__ movzx_b(result, FieldOperand(string,

Powered by Google App Engine
This is Rietveld 408576698