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

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

Issue 18148: Use unspilled frames in unary operations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 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
« no previous file with comments | « src/virtual-frame-ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-ia32.cc
===================================================================
--- src/virtual-frame-ia32.cc (revision 1100)
+++ src/virtual-frame-ia32.cc (working copy)
@@ -250,27 +250,22 @@
void VirtualFrame::PrepareForCall(int frame_arg_count) {
ASSERT(height() >= frame_arg_count);
- // Below the stack pointer, spill all registers and make sure that
- // locals have the right values by sync'ing them. The sync'ing is
- // necessary to give the debugger a consistent view of the values of
- // locals in the frame.
- for (int i = 0; i <= stack_pointer_; i++) {
+ // Below the arguments to the function being called, spill all registers and
+ // make sure that locals have the right values by synching them. The synching
+ // is necessary to give the debugger a consistent view of the values of
+ // locals in the frame. Spill the arguments to the function being called.
+ int arg_base_index = elements_.length() - frame_arg_count;
+ for (int i = 0; i < arg_base_index; i++) {
FrameElement element = elements_[i];
if (element.is_register()) {
SpillElementAt(i);
- } else if (element.is_valid() && i < expression_base_index()) {
+ } else if (element.is_valid()) {
SyncElementAt(i);
}
}
-
- // Above the stack pointer, spill registers and sync everything else (ie,
- // constants).
- for (int i = stack_pointer_ + 1; i < elements_.length(); i++) {
- if (elements_[i].is_register()) {
- SpillElementAt(i);
- } else {
- SyncElementAt(i);
- }
+ // The arguments are spilled.
+ for (int i = arg_base_index; i < elements_.length(); i++) {
+ SpillElementAt(i);
}
// Forget the frame elements that will be popped by the call.
@@ -898,12 +893,15 @@
}
-void VirtualFrame::InvokeBuiltin(Builtins::JavaScript id,
- InvokeFlag flag,
- int frame_arg_count) {
+Result VirtualFrame::InvokeBuiltin(Builtins::JavaScript id,
+ InvokeFlag flag,
+ int frame_arg_count) {
ASSERT(cgen_->HasValidEntryRegisters());
PrepareForCall(frame_arg_count);
__ InvokeBuiltin(id, flag);
+ Result result = cgen_->allocator()->Allocate(eax);
+ ASSERT(result.is_valid());
+ return result;
}
« no previous file with comments | « src/virtual-frame-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698