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

Unified Diff: src/stub-cache.cc

Issue 96763002: Reupload CallIC changes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 1 month 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/stub-cache.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 5121cad6a4bb54575ec4f2476f145fa81614d246..cb68b89efb37eb1d4d25b7ffb7d7d480a860f8b2 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -1128,12 +1128,69 @@ void StubCompiler::LookupPostInterceptor(Handle<JSObject> holder,
#define __ ACCESS_MASM(masm())
+CallKind CallStubCompiler::call_kind() {
+ return CallICBase::Contextual::decode(extra_state_)
+ ? CALL_AS_FUNCTION
+ : CALL_AS_METHOD;
+}
+
+
void CallStubCompiler::HandlerFrontendFooter(Label* miss) {
__ bind(miss);
GenerateMissBranch();
}
+void CallStubCompiler::GenerateJumpFunctionIgnoreReceiver(
+ Handle<JSFunction> function) {
+ ParameterCount expected(function);
+ __ InvokeFunction(function, expected, arguments(),
+ JUMP_FUNCTION, NullCallWrapper(), call_kind());
+}
+
+
+void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
+ Handle<JSFunction> function) {
+ PatchGlobalProxy(object);
+ GenerateJumpFunctionIgnoreReceiver(function);
+}
+
+
+void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
+ Register actual_closure,
+ Handle<JSFunction> function) {
+ PatchGlobalProxy(object);
+ ParameterCount expected(function);
+ __ InvokeFunction(actual_closure, expected, arguments(),
+ JUMP_FUNCTION, NullCallWrapper(), call_kind());
+}
+
+
+Handle<Code> CallStubCompiler::CompileCallConstant(
+ Handle<Object> object,
+ Handle<JSObject> holder,
+ Handle<Name> name,
+ CheckType check,
+ Handle<JSFunction> function) {
+ if (HasCustomCallGenerator(function)) {
+ Handle<Code> code = CompileCustomCall(object, holder,
+ Handle<Cell>::null(),
+ function, Handle<String>::cast(name),
+ Code::FAST);
+ // A null handle means bail out to the regular compiler code below.
+ if (!code.is_null()) return code;
+ }
+
+ Label miss;
+ HandlerFrontendHeader(object, holder, name, check, &miss);
+ GenerateJumpFunction(object, function);
+ HandlerFrontendFooter(&miss);
+
+ // Return the generated code.
+ return GetCode(function);
+}
+
+
Register LoadStubCompiler::HandlerFrontendHeader(
Handle<Type> type,
Register object_reg,
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698