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

Unified Diff: src/arm/cfg-arm.cc

Issue 159701: Restructure to support recursive invocation of the CFG builder. Add... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 | « no previous file | src/cfg.h » ('j') | src/cfg.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/cfg-arm.cc
===================================================================
--- src/arm/cfg-arm.cc (revision 2602)
+++ src/arm/cfg-arm.cc (working copy)
@@ -56,9 +56,10 @@
Comment cmnt(masm, "[ EntryNode");
__ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
__ add(fp, sp, Operand(2 * kPointerSize));
- if (local_count_ > 0) {
+ int count = CfgGlobals::current()->fun()->scope()->num_stack_slots();
+ if (count > 0) {
__ mov(ip, Operand(Factory::undefined_value()));
- for (int i = 0; i < local_count_; i++) {
+ for (int i = 0; i < count; i++) {
__ push(ip);
}
}
@@ -84,7 +85,8 @@
}
__ mov(sp, fp);
__ ldm(ia_w, sp, fp.bit() | lr.bit());
- __ add(sp, sp, Operand((parameter_count_ + 1) * kPointerSize));
+ int count = CfgGlobals::current()->fun()->scope()->num_parameters();
+ __ add(sp, sp, Operand((count + 1) * kPointerSize));
__ Jump(lr);
}
@@ -99,6 +101,24 @@
__ mov(reg, Operand(handle_));
}
+
+void SlotLocation::ToRegister(MacroAssembler* masm, Register reg) {
+ switch (type_) {
+ case Slot::PARAMETER: {
+ int count = CfgGlobals::current()->fun()->scope()->num_parameters();
+ __ ldr(reg, MemOperand(fp, (1 + count - index_) * kPointerSize));
+ break;
+ }
+ case Slot::LOCAL: {
+ const int kOffset = JavaScriptFrameConstants::kLocal0Offset;
+ __ ldr(reg, MemOperand(fp, kOffset - index_ * kPointerSize));
+ break;
+ }
+ default:
+ UNREACHABLE();
+ }
+}
+
#undef __
} } // namespace v8::internal
« no previous file with comments | « no previous file | src/cfg.h » ('j') | src/cfg.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698