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

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

Issue 596011: Change GenerateLoadStringLength to have two scratch registers on all platform... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/ia32/ic-ia32.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
===================================================================
--- src/ia32/stub-cache-ia32.cc (revision 3819)
+++ src/ia32/stub-cache-ia32.cc (working copy)
@@ -226,13 +226,14 @@
void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
Register receiver,
- Register scratch,
+ Register scratch1,
+ Register scratch2,
Label* miss) {
Label load_length, check_wrapper;
// Check if the object is a string leaving the instance type in the
// scratch register.
- GenerateStringCheck(masm, receiver, scratch, miss, &check_wrapper);
+ GenerateStringCheck(masm, receiver, scratch1, miss, &check_wrapper);
// Load length from the string and convert to a smi.
__ bind(&load_length);
@@ -242,13 +243,13 @@
// Check if the object is a JSValue wrapper.
__ bind(&check_wrapper);
- __ cmp(scratch, JS_VALUE_TYPE);
+ __ cmp(scratch1, JS_VALUE_TYPE);
__ j(not_equal, miss, not_taken);
// Check if the wrapped value is a string and load the length
// directly if it is.
- __ mov(receiver, FieldOperand(receiver, JSValue::kValueOffset));
- GenerateStringCheck(masm, receiver, scratch, miss, miss);
+ __ mov(scratch2, FieldOperand(receiver, JSValue::kValueOffset));
+ GenerateStringCheck(masm, scratch2, scratch1, miss, miss);
__ jmp(&load_length);
}
@@ -1773,7 +1774,7 @@
__ cmp(Operand(eax), Immediate(Handle<String>(name)));
__ j(not_equal, &miss, not_taken);
- GenerateLoadStringLength(masm(), ecx, edx, &miss);
+ GenerateLoadStringLength(masm(), ecx, edx, ebx, &miss);
__ bind(&miss);
__ DecrementCounter(&Counters::keyed_load_string_length, 1);
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698