Home | History | Annotate | Download | only in src

Lines Matching defs:call

1337   // the loop header. If a call instruction is encountered the backwards branch
1338 // is dominated by a call and the stack check in the backwards branch can be
1954 // Skip all blocks already processed by the recursive call.
2369 #define CHECK_BAILOUT(call) \
2371 call; \
2376 #define CHECK_ALIVE(call) \
2378 call; \
2620 HInstruction* HGraphBuilder::PreProcessCall(Instruction* call) {
2621 int count = call->argument_count();
2630 return call;
2852 // Return from an inlined construct call. In a test context the return
2885 // expression context of the call.
5055 void HGraphBuilder::AddCheckConstantFunction(Call* expr,
5075 void HGraphBuilder::HandlePolymorphicCallNamed(Call* expr,
5103 PrintF("Trying to inline the polymorphic call to %s\n",
5111 HCallConstantFunction* call =
5113 call->set_position(expr->position());
5114 PreProcessCall(call);
5115 AddInstruction(call);
5116 if (!ast_context()->IsEffect()) Push(call);
5131 HCallNamed* call = new(zone()) HCallNamed(context, name, argument_count);
5132 call->set_position(expr->position());
5133 PreProcessCall(call);
5136 AddInstruction(call);
5137 if (!ast_context()->IsEffect()) Push(call);
5140 return ast_context()->ReturnInstruction(call, expr->id());
5185 // Precondition: call is monomorphic and we have found a target with the
5345 // Save the pending call context and type feedback oracle. Set up new ones
5393 // Bail out if the inline function did, as we cannot residualize a call
5467 bool HGraphBuilder::TryInlineCall(Call* expr, bool drop_extra) {
5468 // The function call we are inlining is a method call if the call
5469 // is a property call.
5495 bool HGraphBuilder::TryInlineBuiltinFunctionCall(Call* expr, bool drop_extra) {
5526 bool HGraphBuilder::TryInlineBuiltinMethodCall(Call* expr,
5723 bool HGraphBuilder::TryCallApply(Call* expr) {
5789 HInvokeFunction* call = new(zone()) HInvokeFunction(
5794 call->set_position(expr->position());
5795 ast_context()->ReturnInstruction(call, expr->id());
5801 void HGraphBuilder::VisitCall(Call* expr) {
5807 HInstruction* call = NULL;
5812 // Keyed function call.
5825 call = new(zone()) HCallKeyed(context, key, argument_count);
5826 call->set_position(expr->position());
5828 return ast_context()->ReturnInstruction(call, expr->id());
5831 // Named function call.
5863 // When the target has a custom call IC generator, use the IC,
5867 call = PreProcessCall(
5873 call = PreProcessCall(
5884 call = PreProcessCall(
5894 return Bailout("possible direct call to eval");
5941 call = PreProcessCall(new(zone()) HCallKnownGlobal(expr->target(),
5950 call = new(zone()) HCallGlobal(context, var->name(), argument_count);
5979 call = PreProcessCall(new(zone()) HInvokeFunction(context,
5996 call = new(zone()) HCallFunction(context, function, argument_count);
6001 call->set_position(expr->position());
6002 return ast_context()->ReturnInstruction(call, expr->id());
6056 HInstruction* call = PreProcessCall(
6058 call->set_position(expr->position());
6059 return ast_context()->ReturnInstruction(call, expr->id());
6062 // argument to the construct call.
6066 HInstruction* call =
6069 call->set_position(expr->position());
6070 return ast_context()->ReturnInstruction(call, expr->id());
6095 return Bailout("call to a JavaScript runtime function");
6103 // Call to an inline function.
6111 // Call the inline code generator using the pointer-to-member.
6120 HCallRuntime* call =
6122 call->set_position(RelocInfo::kNoPosition);
6124 return ast_context()->ReturnInstruction(call, expr->id());
6559 CallRuntime* call = expr->left()->AsCallRuntime();
6560 if (call == NULL) return false;
6564 if (!call->name()->IsEqualTo(CStrVector("_ClassOf"))) return false;
6565 ASSERT(call->arguments()->length() == 1);
6801 CallRuntime* call = expr->left()->AsCallRuntime();
6802 ASSERT(call->arguments()->length() == 1);
6803 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7116 void HGraphBuilder::GenerateIsSmi(CallRuntime* call) {
7117 ASSERT(call->arguments()->length() == 1);
7118 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7121 return ast_context()->ReturnControl(result, call->id());
7125 void HGraphBuilder::GenerateIsSpecObject(CallRuntime* call) {
7126 ASSERT(call->arguments()->length() == 1);
7127 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7133 return ast_context()->ReturnControl(result, call->id());
7137 void HGraphBuilder::GenerateIsFunction(CallRuntime* call) {
7138 ASSERT(call->arguments()->length() == 1);
7139 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7143 return ast_context()->ReturnControl(result, call->id());
7147 void HGraphBuilder::GenerateHasCachedArrayIndex(CallRuntime* call) {
7148 ASSERT(call->arguments()->length() == 1);
7149 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7153 return ast_context()->ReturnControl(result, call->id());
7157 void HGraphBuilder::GenerateIsArray(CallRuntime* call) {
7158 ASSERT(call->arguments()->length() == 1);
7159 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7163 return ast_context()->ReturnControl(result, call->id());
7167 void HGraphBuilder::GenerateIsRegExp(CallRuntime* call) {
7168 ASSERT(call->arguments()->length() == 1);
7169 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7173 return ast_context()->ReturnControl(result, call->id());
7177 void HGraphBuilder::GenerateIsObject(CallRuntime* call) {
7178 ASSERT(call->arguments()->length() == 1);
7179 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7182 return ast_context()->ReturnControl(result, call->id());
7186 void HGraphBuilder::GenerateIsNonNegativeSmi(CallRuntime* call) {
7191 void HGraphBuilder::GenerateIsUndetectableObject(CallRuntime* call) {
7192 ASSERT(call->arguments()->length() == 1);
7193 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7197 return ast_context()->ReturnControl(result, call->id());
7202 CallRuntime* call) {
7208 // Support for construct call checks.
7209 void HGraphBuilder::GenerateIsConstructCall(CallRuntime* call) {
7210 ASSERT(call->arguments()->length() == 0);
7219 call->id());
7225 void HGraphBuilder::GenerateArgumentsLength(CallRuntime* call) {
7230 ASSERT(call->arguments()->length() == 0);
7233 return ast_context()->ReturnInstruction(result, call->id());
7237 void HGraphBuilder::GenerateArguments(CallRuntime* call) {
7242 ASSERT(call->arguments()->length() == 1);
7243 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7249 return ast_context()->ReturnInstruction(result, call->id());
7254 void HGraphBuilder::GenerateClassOf(CallRuntime* call) {
7261 void HGraphBuilder::GenerateValueOf(CallRuntime* call) {
7262 ASSERT(call->arguments()->length() == 1);
7263 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7266 return ast_context()->ReturnInstruction(result, call->id());
7270 void HGraphBuilder::GenerateDateField(CallRuntime* call) {
7271 ASSERT(call->arguments()->length() == 2);
7272 ASSERT_NE(NULL, call->arguments()->at(1)->AsLiteral());
7273 Smi* index = Smi::cast(*(call->arguments()->at(1)->AsLiteral()->handle()));
7274 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7277 return ast_context()->ReturnInstruction(result, call->id());
7281 void HGraphBuilder::GenerateSetValueOf(CallRuntime* call) {
7282 ASSERT(call->arguments()->length() == 2);
7283 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7284 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
7317 join->SetJoinId(call->id());
7324 void HGraphBuilder::GenerateStringCharCodeAt(CallRuntime* call) {
7325 ASSERT(call->arguments()->length() == 2);
7326 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7327 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
7332 return ast_context()->ReturnInstruction(result, call->id());
7337 void HGraphBuilder::GenerateStringCharFromCode(CallRuntime* call
7338 ASSERT(call->arguments()->length() == 1);
7339 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7344 return ast_context()->ReturnInstruction(result, call->id());
7349 void HGraphBuilder::GenerateStringCharAt(CallRuntime* call) {
7350 ASSERT(call->arguments()->length() == 2);
7351 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7352 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
7360 return ast_context()->ReturnInstruction(result, call->id());
7365 void HGraphBuilder::GenerateObjectEquals(CallRuntime* call) {
7366 ASSERT(call->arguments()->length() == 2);
7367 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7368 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
7373 return ast_context()->ReturnControl(result, call->id());
7377 void HGraphBuilder::GenerateLog(CallRuntime* call) {
7384 void HGraphBuilder::GenerateRandomHeapNumber(CallRuntime* call) {
7389 return ast_context()->ReturnInstruction(result, call->id());
7394 void HGraphBuilder::GenerateStringAdd(CallRuntime* call) {
7395 ASSERT_EQ(2, call->arguments()->length());
7396 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7400 return ast_context()->ReturnInstruction(result, call->id());
7405 void HGraphBuilder::GenerateSubString(CallRuntime* call) {
7406 ASSERT_EQ(3, call->arguments()->length());
7407 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7411 return ast_context()->ReturnInstruction(result, call->id());
7416 void HGraphBuilder::GenerateStringCompare(CallRuntime* call) {
7417 ASSERT_EQ(2, call->arguments()->length());
7418 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7423 return ast_context()->ReturnInstruction(result, call->id());
7428 void HGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
7429 ASSERT_EQ(4, call->arguments()->length());
7430 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7434 return ast_context()->ReturnInstruction(result, call->id());
7439 void HGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) {
7440 ASSERT_EQ(3, call->arguments()->length());
7441 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7446 return ast_context()->ReturnInstruction(result, call->id());
7451 void HGraphBuilder::GenerateGetFromCache(CallRuntime* call) {
7457 void HGraphBuilder::GenerateNumberToString(CallRuntime* call) {
7458 ASSERT_EQ(1, call->arguments()->length());
7459 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7464 return ast_context()->ReturnInstruction(result, call->id());
7468 // Fast call for custom callbacks.
7469 void HGraphBuilder::GenerateCallFunction(CallRuntime* call) {
7470 // 1 ~ The function to call is not itself an argument to the call.
7471 int arg_count = call->arguments()->length() - 1;
7475 CHECK_ALIVE(VisitArgument(call->arguments()->at(i)));
7477 CHECK_ALIVE(VisitForValue(call->arguments()->last()));
7507 join->SetJoinId(call->id());
7512 // Fast call to math functions.
7513 void HGraphBuilder::GenerateMathPow(CallRuntime* call) {
7514 ASSERT_EQ(2, call->arguments()->length());
7515 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7516 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
7520 return ast_context()->ReturnInstruction(result, call->id());
7524 void HGraphBuilder::GenerateMathSin(CallRuntime* call) {
7525 ASSERT_EQ(1, call->arguments()->length());
7526 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7532 return ast_context()->ReturnInstruction(result, call->id());
7536 void HGraphBuilder::GenerateMathCos(CallRuntime* call) {
7537 ASSERT_EQ(1, call->arguments()->length());
7538 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7544 return ast_context()->ReturnInstruction(result, call->id());
7548 void HGraphBuilder::GenerateMathTan(CallRuntime* call) {
7549 ASSERT_EQ(1, call->arguments()->length());
7550 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7556 return ast_context()->ReturnInstruction(result, call->id());
7560 void HGraphBuilder::GenerateMathLog(CallRuntime* call) {
7561 ASSERT_EQ(1, call->arguments()->length());
7562 CHECK_ALIVE(VisitArgumentList(call->arguments()));
7568 return ast_context()->ReturnInstruction(result, call->id());
7572 void HGraphBuilder::GenerateMathSqrt(CallRuntime* call) {
7578 void HGraphBuilder::GenerateIsRegExpEquivalent(CallRuntime* call) {
7583 void HGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) {
7584 ASSERT(call->arguments()->length() == 1);
7585 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
7588 return ast_context()->ReturnInstruction(result, call->id());
7592 void HGraphBuilder::GenerateFastAsciiArrayJoin(CallRuntime* call) {