Commit 7b6e2950 authored by antonm@chromium.org's avatar antonm@chromium.org

Faster invocation for most of API calls.

For most of API calls we generate better stub which is faster than invocation
via builtin, so use IC instead of direct call in Hydrogen.

Review URL: http://codereview.chromium.org/6672026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8df50f26
......@@ -4267,10 +4267,12 @@ void HGraphBuilder::VisitCall(Call* expr) {
}
if (HasCustomCallGenerator(expr->target()) ||
CallOptimization(*expr->target()).is_simple_api_call() ||
expr->check_type() != RECEIVER_MAP_CHECK) {
// When the target has a custom call IC generator, use the IC,
// because it is likely to generate better code. Also use the
// IC when a primitive receiver check is required.
// because it is likely to generate better code. Similarly, we
// generate better call stubs for some API functions.
// Also use the IC when a primitive receiver check is required.
HContext* context = new HContext;
AddInstruction(context);
call = PreProcessCall(new HCallNamed(context, name, argument_count));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment