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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1419813010: [runtime] Remove the very dangerous %_CallFunction intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/crankshaft/hydrogen.h ('k') | src/debug/debug.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 239cd60a7229fc925840abeb14792a9f61e91b1f..f238b5b4c88c521e9a183a801bbeb89fe09d821c 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -12714,52 +12714,6 @@ void HOptimizedGraphBuilder::GenerateCall(CallRuntime* call) {
}
-// Fast call for custom callbacks.
-void HOptimizedGraphBuilder::GenerateCallFunction(CallRuntime* call) {
- // 1 ~ The function to call is not itself an argument to the call.
- int arg_count = call->arguments()->length() - 1;
- DCHECK(arg_count >= 1); // There's always at least a receiver.
-
- CHECK_ALIVE(VisitExpressions(call->arguments()));
- // The function is the last argument
- HValue* function = Pop();
- // Push the arguments to the stack
- PushArgumentsFromEnvironment(arg_count);
-
- IfBuilder if_is_jsfunction(this);
- if_is_jsfunction.If<HHasInstanceTypeAndBranch>(function, JS_FUNCTION_TYPE);
-
- if_is_jsfunction.Then();
- {
- HInstruction* invoke_result =
- Add<HInvokeFunction>(function, arg_count);
- if (!ast_context()->IsEffect()) {
- Push(invoke_result);
- }
- Add<HSimulate>(call->id(), FIXED_SIMULATE);
- }
-
- if_is_jsfunction.Else();
- {
- HInstruction* call_result =
- Add<HCallFunction>(function, arg_count);
- if (!ast_context()->IsEffect()) {
- Push(call_result);
- }
- Add<HSimulate>(call->id(), FIXED_SIMULATE);
- }
- if_is_jsfunction.End();
-
- if (ast_context()->IsEffect()) {
- // EffectContext::ReturnValue ignores the value, so we can just pass
- // 'undefined' (as we do not have the call result anymore).
- return ast_context()->ReturnValue(graph()->GetConstantUndefined());
- } else {
- return ast_context()->ReturnValue(Pop());
- }
-}
-
-
// Fast call to math functions.
void HOptimizedGraphBuilder::GenerateMathPow(CallRuntime* call) {
DCHECK_EQ(2, call->arguments()->length());
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/debug/debug.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698