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

Unified Diff: src/ia32/cfg-ia32.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
« src/cfg.cc ('K') | « src/compiler.cc ('k') | src/x64/cfg-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/cfg-ia32.cc
===================================================================
--- src/ia32/cfg-ia32.cc (revision 2602)
+++ src/ia32/cfg-ia32.cc (working copy)
@@ -59,9 +59,10 @@
__ mov(ebp, esp);
__ push(esi);
__ push(edi);
- if (local_count_ > 0) {
+ int count = CfgGlobals::current()->fun()->scope()->num_stack_slots();
+ if (count > 0) {
__ Set(eax, Immediate(Factory::undefined_value()));
- for (int i = 0; i < local_count_; i++) {
+ for (int i = 0; i < count; i++) {
__ push(eax);
}
}
@@ -97,7 +98,8 @@
__ RecordJSReturn();
__ mov(esp, ebp);
__ pop(ebp);
- __ ret((parameter_count_ + 1) * kPointerSize);
+ int count = CfgGlobals::current()->fun()->scope()->num_parameters();
+ __ ret((count + 1) * kPointerSize);
}
@@ -111,6 +113,25 @@
__ mov(reg, Immediate(handle_));
}
+
+void SlotLocation::ToRegister(MacroAssembler* masm, Register reg) {
+ switch (type_) {
+ case Slot::PARAMETER: {
+ int count = CfgGlobals::current()->fun()->scope()->num_parameters();
+ __ mov(reg, Operand(ebp, (1 + count - index_) * kPointerSize));
+ break;
+ }
+ case Slot::LOCAL: {
+ const int kOffset = JavaScriptFrameConstants::kLocal0Offset;
+ __ mov(reg, Operand(ebp, kOffset - index_ * kPointerSize));
+ break;
+ }
+ default:
+ UNREACHABLE();
+ }
+}
+
+
#undef __
} } // namespace v8::internal
« src/cfg.cc ('K') | « src/compiler.cc ('k') | src/x64/cfg-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698