MCPcopy Create free account
hub / github.com/ZDoom/gzdoom / Resolve

Method Resolve

src/scripting/backend/codegen_doom.cpp:447–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445//==========================================================================
446
447FxExpression *FxActionSpecialCall::Resolve(FCompileContext& ctx)
448{
449 CHECKRESOLVED();
450 bool failed = false;
451
452 SAFE_RESOLVE_OPT(Self, ctx);
453 for (unsigned i = 0; i < ArgList.Size(); i++)
454 {
455 ArgList[i] = ArgList[i]->Resolve(ctx);
456 if (ArgList[i] == nullptr)
457 {
458 failed = true;
459 }
460 else if (Special < 0 && i == 0)
461 {
462 if (ArgList[i]->ValueType == TypeString)
463 {
464 ArgList[i] = new FxNameCast(ArgList[i]);
465 ArgList[i] = ArgList[i]->Resolve(ctx);
466 if (ArgList[i] == nullptr)
467 {
468 failed = true;
469 }
470 }
471 else if (ArgList[i]->ValueType != TypeName)
472 {
473 ScriptPosition.Message(MSG_ERROR, "Name expected for parameter %d", i);
474 failed = true;
475 }
476 }
477 else if (!ArgList[i]->IsInteger())
478 {
479 if (ArgList[i]->ValueType->GetRegType() == REGT_FLOAT /* lax */)
480 {
481 ArgList[i] = new FxIntCast(ArgList[i], ctx.FromDecorate);
482 ArgList[i] = ArgList[i]->Resolve(ctx);
483 if (ArgList[i] == nullptr)
484 {
485 delete this;
486 return nullptr;
487 }
488 }
489 else
490 {
491 ScriptPosition.Message(MSG_ERROR, "Integer expected for parameter %d", i);
492 failed = true;
493 }
494 }
495 }
496
497
498 if (failed)
499 {
500 delete this;
501 return nullptr;
502 }
503 ValueType = TypeSInt32;
504 return this;

Callers 11

CustomTypeCastFunction · 0.45
CheckForCustomAdditionFunction · 0.45
CheckForDefaultFunction · 0.45
CheckForLineSpecialFunction · 0.45
ResolveForDefaultFunction · 0.45
CheckForMemberDefaultFunction · 0.45
UnravelVarArgAJumpFunction · 0.45
DispatchPropertyMethod · 0.45
ParseExpressionFunction · 0.45

Calls 15

NewPointerFunction · 0.85
NewClassPointerFunction · 0.85
ValidateActorFunction · 0.85
MessageMethod · 0.80
IsIntegerMethod · 0.80
GetRegTypeMethod · 0.80
isRealPointerMethod · 0.80
toPointerMethod · 0.80
IsDescendantOfMethod · 0.80
GetStatesMethod · 0.80
IsNumericMethod · 0.80
IsAncestorOfMethod · 0.80

Tested by

no test coverage detected