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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 596096: Refactoring various pieces of post interceptor caching. (Closed)
Patch Set: Fix incorrect indentation Created 10 years, 10 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
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index f6e44bc6274498778be00e04e756b2b043550cf7..3913a9b78336f2680a1993c391a0ae1415e40ae9 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -386,6 +386,16 @@ void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
}
+void MacroAssembler::CallExternalReference(const ExternalReference& ext,
+ int num_arguments) {
+ movq(rax, Immediate(num_arguments));
+ movq(rbx, ext);
+
+ CEntryStub stub(1);
+ CallStub(&stub);
+}
+
+
void MacroAssembler::TailCallRuntime(ExternalReference const& ext,
int num_arguments,
int result_size) {
@@ -1892,6 +1902,21 @@ void MacroAssembler::InvokeFunction(Register function,
}
+void MacroAssembler::InvokeFunction(JSFunction* function,
+ const ParameterCount& actual) {
+ ASSERT(function->is_compiled());
+ // Get the function and setup the context.
+ Move(rdi, Handle<JSFunction>(function));
+ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
+
+ // Jump to the cached code (tail call).
+ Handle<Code> code(function->code());
+ ParameterCount expected(function->shared()->formal_parameter_count());
+ InvokeCode(code, expected, actual,
+ RelocInfo::CODE_TARGET, JUMP_FUNCTION);
+}
+
+
void MacroAssembler::EnterFrame(StackFrame::Type type) {
push(rbp);
movq(rbp, rsp);

Powered by Google App Engine
This is Rietveld 408576698