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

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

Issue 42638: In the IA32 code genrator, handle call ICs and constructor calls the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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-arm.h ('k') | src/virtual-frame-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-arm.cc
===================================================================
--- src/virtual-frame-arm.cc (revision 1615)
+++ src/virtual-frame-arm.cc (working copy)
@@ -317,7 +317,7 @@
}
-Result VirtualFrame::RawCallStub(CodeStub* stub, int frame_arg_count) {
+Result VirtualFrame::RawCallStub(CodeStub* stub) {
ASSERT(cgen_->HasValidEntryRegisters());
__ CallStub(stub);
Result result = cgen_->allocator()->Allocate(r0);
@@ -326,22 +326,20 @@
}
-Result VirtualFrame::CallRuntime(Runtime::Function* f,
- int frame_arg_count) {
- PrepareForCall(frame_arg_count, frame_arg_count);
+Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) {
+ PrepareForCall(arg_count, arg_count);
ASSERT(cgen_->HasValidEntryRegisters());
- __ CallRuntime(f, frame_arg_count);
+ __ CallRuntime(f, arg_count);
Result result = cgen_->allocator()->Allocate(r0);
ASSERT(result.is_valid());
return result;
}
-Result VirtualFrame::CallRuntime(Runtime::FunctionId id,
- int frame_arg_count) {
- PrepareForCall(frame_arg_count, frame_arg_count);
+Result VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) {
+ PrepareForCall(arg_count, arg_count);
ASSERT(cgen_->HasValidEntryRegisters());
- __ CallRuntime(id, frame_arg_count);
+ __ CallRuntime(id, arg_count);
Result result = cgen_->allocator()->Allocate(r0);
ASSERT(result.is_valid());
return result;
@@ -351,9 +349,9 @@
Result VirtualFrame::InvokeBuiltin(Builtins::JavaScript id,
InvokeJSFlags flags,
Result* arg_count_register,
- int frame_arg_count) {
+ int arg_count) {
ASSERT(arg_count_register->reg().is(r0));
- PrepareForCall(frame_arg_count, frame_arg_count);
+ PrepareForCall(arg_count, arg_count);
arg_count_register->Unuse();
__ InvokeBuiltin(id, flags);
Result result = cgen_->allocator()->Allocate(r0);
@@ -373,6 +371,33 @@
Result VirtualFrame::CallCodeObject(Handle<Code> code,
RelocInfo::Mode rmode,
+ int dropped_args) {
+ int spilled_args = 0;
+ switch (code->kind()) {
+ case Code::CALL_IC:
+ spilled_args = dropped_args + 1;
+ break;
+ case Code::FUNCTION:
+ spilled_args = dropped_args + 1;
+ break;
+ case Code::KEYED_LOAD_IC:
+ ASSERT(dropped_args == 0);
+ spilled_args = 2;
+ break;
+ default:
+ // The other types of code objects are called with values
+ // in specific registers, and are handled in functions with
+ // a different signature.
+ UNREACHABLE();
+ break;
+ }
+ PrepareForCall(spilled_args, dropped_args);
+ return RawCallCodeObject(code, rmode);
+}
+
+
+Result VirtualFrame::CallCodeObject(Handle<Code> code,
+ RelocInfo::Mode rmode,
Result* arg,
int dropped_args) {
int spilled_args = 0;
« no previous file with comments | « src/virtual-frame-arm.h ('k') | src/virtual-frame-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698