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

Unified Diff: src/arm/virtual-frame-arm.cc

Issue 1846002: Refactor assignment in the ARM code generator... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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/arm/virtual-frame-arm.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/virtual-frame-arm.cc
===================================================================
--- src/arm/virtual-frame-arm.cc (revision 4568)
+++ src/arm/virtual-frame-arm.cc (working copy)
@@ -304,6 +304,21 @@
}
+void VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) {
+ Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
+ PopToR0();
+ if (is_contextual) {
+ SpillAll();
+ __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
+ } else {
+ EmitPop(r1);
+ SpillAll();
+ }
+ __ mov(r2, Operand(name));
+ CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
+}
+
+
void VirtualFrame::CallKeyedLoadIC() {
Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
@@ -311,6 +326,7 @@
void VirtualFrame::CallKeyedStoreIC() {
+ ASSERT(SpilledScope::is_spilled());
Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
}
@@ -477,6 +493,38 @@
}
+void VirtualFrame::Dup() {
+ AssertIsNotSpilled();
+ switch (top_of_stack_state_) {
+ case NO_TOS_REGISTERS:
+ __ ldr(r0, MemOperand(sp, 0));
+ top_of_stack_state_ = R0_TOS;
+ break;
+ case R0_TOS:
+ __ mov(r1, r0);
+ top_of_stack_state_ = R0_R1_TOS;
+ break;
+ case R1_TOS:
+ __ mov(r0, r1);
+ top_of_stack_state_ = R0_R1_TOS;
+ break;
+ case R0_R1_TOS:
+ __ push(r1);
+ __ mov(r1, r0);
+ // No need to change state as r0 and r1 now contains the same value.
+ break;
+ case R1_R0_TOS:
+ __ push(r0);
+ __ mov(r0, r1);
+ // No need to change state as r0 and r1 now contains the same value.
+ break;
+ default:
+ UNREACHABLE();
+ }
+ element_count_++;
+}
+
+
Register VirtualFrame::PopToRegister(Register but_not_to_this_one) {
ASSERT(but_not_to_this_one.is(r0) ||
but_not_to_this_one.is(r1) ||
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698