Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOJSEngineNativeWrappers.h File Reference
import "OOCocoa.h"
+ Include dependency graph for OOJSEngineNativeWrappers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OOJS_PROFILE   OOLITE_DEBUG
 
#define OOJS_PROFILE_ENTER   {
 
#define OOJS_PROFILE_EXIT_VAL(rval)
 
#define OOJS_PROFILE_EXIT_VOID   } return;
 
#define OOJS_PROFILE_ENTER_FOR_NATIVE   @try {
 
#define OOJS_NATIVE_ENTER(cx)
 
#define OOJS_NATIVE_EXIT
 
#define OOJS_PROFILE_EXIT   OOJS_PROFILE_EXIT_VAL(0)
 
#define OOJS_PROFILE_EXIT_JSVAL   OOJS_PROFILE_EXIT_VAL(JSVAL_VOID)
 
#define OOJS_BEGIN_FULL_NATIVE(context)
 
#define OOJS_END_FULL_NATIVE
 
#define OOJS_DECLARE_PROFILE_STACK_FRAME(name)
 
#define OOJSProfileEnter(frame, function)
 
#define OOJSProfileExit(frame)
 

Functions

void OOJSReportWrappedException (JSContext *context, id exception)
 
void OOJSUnreachable (const char *function, const char *file, unsigned line) NO_RETURN_FUNC
 

Macro Definition Documentation

◆ OOJS_BEGIN_FULL_NATIVE

#define OOJS_BEGIN_FULL_NATIVE ( context)
Value:
{ \
(void)(context); \
OOJSPauseTimeLimiter(); \
@try \
{

Definition at line 141 of file OOJSEngineNativeWrappers.h.

141#define OOJS_BEGIN_FULL_NATIVE(context) \
142 { \
143 (void)(context); \
144 OOJSPauseTimeLimiter(); \
145 @try \
146 {

Referenced by ConsoleInspectEntity(), ConsoleSetProperty(), ConsoleWriteJSMemoryStats(), ConsoleWriteMemoryStats(), GetJSSystemInfoForSystem(), GlobalExpandDescription(), GlobalKeyBindingDescription(), GlobalLog(), GlobalTakeSnapShot(), OOSound(OOJavaScriptExtentions)::oo_jsClassName, OOSoundSource(OOJavaScriptExtentions)::oo_jsClassName, ShipAddCargoEntity(), ShipSetMaterialsInternal(), ShipSpawn(), SoundSourcePlay(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), StationCanDockShip(), StationDecreaseAlertLevel(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), SystemAddMoon(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemGetProperty(), SystemInfoRouteToSystem(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemStaticSystemIDForName(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), and VisualEffectSetMaterialsInternal().

◆ OOJS_DECLARE_PROFILE_STACK_FRAME

#define OOJS_DECLARE_PROFILE_STACK_FRAME ( name)

Definition at line 189 of file OOJSEngineNativeWrappers.h.

◆ OOJS_END_FULL_NATIVE

#define OOJS_END_FULL_NATIVE
Value:
} \
@finally \
{ \
OOJSResumeTimeLimiter(); \
} \
}

Definition at line 148 of file OOJSEngineNativeWrappers.h.

148#define OOJS_END_FULL_NATIVE \
149 } \
150 @finally \
151 { \
152 OOJSResumeTimeLimiter(); \
153 } \
154 }

Referenced by ConsoleInspectEntity(), ConsoleSetProperty(), ConsoleWriteJSMemoryStats(), ConsoleWriteMemoryStats(), GetJSSystemInfoForSystem(), GlobalExpandDescription(), GlobalKeyBindingDescription(), GlobalLog(), GlobalTakeSnapShot(), OOSound(OOJavaScriptExtentions)::oo_jsClassName, OOSoundSource(OOJavaScriptExtentions)::oo_jsClassName, ShipAddCargoEntity(), ShipSetMaterialsInternal(), ShipSpawn(), SoundSourcePlay(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), StationCanDockShip(), StationDecreaseAlertLevel(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), SystemAddMoon(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemGetProperty(), SystemInfoRouteToSystem(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemStaticSystemIDForName(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), and VisualEffectSetMaterialsInternal().

◆ OOJS_NATIVE_ENTER

#define OOJS_NATIVE_ENTER ( cx)
Value:
{ \
JSContext *oojsNativeContext = (cx); \
#define OOJS_PROFILE_ENTER_FOR_NATIVE

Definition at line 84 of file OOJSEngineNativeWrappers.h.

84#define OOJS_NATIVE_ENTER(cx) \
85 { \
86 JSContext *oojsNativeContext = (cx); \
87 OOJS_PROFILE_ENTER_FOR_NATIVE

Referenced by ClockAddSeconds(), ClockClockStringForTime(), ClockGetProperty(), ConsoleClearConsole(), ConsoleConsoleMessage(), ConsoleDisplayMessagesInClass(), ConsoleGarbageCollect(), ConsoleGetProfile(), ConsoleGetProperty(), ConsoleInspectEntity(), ConsoleIsExecutableJavaScript(), ConsoleProfile(), ConsoleScriptStack(), ConsoleSetDisplayMessagesInClass(), ConsoleSetProperty(), ConsoleSettingsDeleteProperty(), ConsoleSettingsGetProperty(), ConsoleSettingsSetProperty(), ConsoleTrace(), ConsoleWriteJSMemoryStats(), ConsoleWriteLogMarker(), ConsoleWriteMemoryStats(), OOJSTimer::dealloc, OOManifest::dealloc, DockGetProperty(), DockSetProperty(), EntityGetProperty(), EntitySetProperty(), EquipmentInfoGetAllEqipment(), EquipmentInfoGetProperty(), EquipmentInfoSetProperty(), ExhaustPlumeGetProperty(), ExhaustPlumeSetProperty(), FlasherGetProperty(), FlasherSetProperty(), FontMeasureString(), DockEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOExhaustPlumeEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOFlasherEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOPlanetEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOSunEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOVisualEffectEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOWaypointEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, StationEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, WormholeEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalGetColorSaturation(), GlobalGetGuiColorSettingForKey(), GlobalGetProperty(), GlobalGetScreenBackgroundForKey(), GlobalIsValidFrameCallback(), GlobalKeyBindingDescription(), GlobalLog(), GlobalRandomInhabitantsDescription(), GlobalRandomName(), GlobalRemoveFrameCallback(), GlobalSetColorSaturation(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetProperty(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalTakeSnapShot(), JSClockToString(), ManifestComment(), ManifestGetProperty(), ManifestSetComment(), ManifestSetProperty(), ManifestShortComment(), MissionAddMessageText(), MissionGetProperty(), MissionMarkSystem(), MissionRunScreen(), MissionRunShipLibrary(), MissionSetInstructionsInternal(), MissionSetProperty(), MissionUnmarkSystem(), MissionVariablesDeleteProperty(), MissionVariablesEnumerate(), MissionVariablesGetProperty(), MissionVariablesSetProperty(), OOEquipmentType(OOJavaScriptExtensions)::oo_clearJSSelf:, OOShipGroup(OOJavaScriptExtensions)::oo_clearJSSelf:, OOSound(OOJavaScriptExtentions)::oo_jsClassName, OOSoundSource(OOJavaScriptExtentions)::oo_jsClassName, OOJSObjectWrapperToString(), OOJSUnconstructableConstruct(), OoliteCompareVersion(), OoliteGetProperty(), PlanetGetProperty(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerCommsMessage(), PlayerConsoleMessage(), PlayerDecreaseContractReputation(), PlayerDecreaseParcelReputation(), PlayerDecreasePassengerReputation(), PlayerEndScenario(), PlayerGetProperty(), PlayerIncreaseContractReputation(), PlayerIncreaseParcelReputation(), PlayerIncreasePassengerReputation(), PlayerReplaceShip(), PlayerSetEscapePodDestination(), PlayerSetPlayerRole(), PlayerSetProperty(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipCancelDockingRequest(), PlayerShipCancelHyperspaceCountdown(), PlayerShipDisengageAutopilot(), PlayerShipEngageAutopilotToStation(), PlayerShipGetProperty(), PlayerShipHideHUDSelector(), PlayerShipLaunch(), PlayerShipRemoveAllCargo(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipResetCustomView(), PlayerShipResetScannerZoom(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetProperty(), PlayerShipShowHUDSelector(), PlayerShipTakeInternalDamage(), PlayerShipUseSpecialCargo(), PlayerStopAudioMessage(), QuaternionToSource(), QuaternionToString(), OOJavaScriptEngine(OOMonitorSupportInternal)::sendMonitorLogMessage:withMessageClass:inContext:, ShipAbandonShip(), ShipAddCargoEntity(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDeployEscorts(), ShipDockEscorts(), ShipDumpCargo(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipExitAI(), ShipExitSystem(), ShipExplode(), ShipFindNearestStation(), ShipFireECM(), ShipFireMissile(), ShipGetProperty(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupGetProperty(), ShipGroupRemoveShip(), ShipGroupSetProperty(), ShipHasEquipmentProviding(), ShipHasRole(), ShipReactToAIMessage(), ShipRemove(), ShipRemoveEquipment(), ShipRestoreSubEntities(), ShipRunLegacyScriptActions(), ShipSelectNewMissile(), ShipSendAIMessage(), ShipSetAI(), ShipSetBounty(), ShipSetCargo(), ShipSetCargoType(), ShipSetCrew(), ShipSetEquipmentStatus(), ShipSetMaterials(), ShipSetProperty(), ShipSetScript(), ShipSetShaders(), ShipSpawn(), ShipStaticKeys(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticRoles(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), SoundGetProperty(), SoundSourceConstruct(), SoundSourceGetProperty(), SoundSourcePlay(), SoundSourceSetProperty(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), StationAbortAllDockings(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationCanDockShip(), StationDecreaseAlertLevel(), StationDockPlayer(), StationGetProperty(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetProperty(), SunGetProperty(), SunGoNova(), SystemAddMoon(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemFilteredEntities(), SystemGetProperty(), SystemInfoDistanceToSystem(), SystemInfoEnumerate(), SystemInfoGetProperty(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSetProperty(), SystemInfoSetPropertyMethod(), SystemInfoStaticFilteredSystems(), SystemInfoStaticSetInterstellarProperty(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemLocationFromCode(), SystemSendAllShipsAway(), SystemSetPopulator(), SystemSetProperty(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemStaticInfoForSystem(), SystemStaticSystemIDForName(), SystemStaticSystemNameForID(), SystemToString(), TimerConstruct(), TimerGetProperty(), TimerSetProperty(), TimerStart(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), VectorToSource(), VectorToString(), VisualEffectGetProperty(), VisualEffectRemove(), VisualEffectScale(), VisualEffectSetMaterials(), VisualEffectSetProperty(), VisualEffectSetShaders(), WaypointGetProperty(), WorldScriptsEnumerate(), WorldScriptsGetProperty(), and WormholeGetProperty().

◆ OOJS_NATIVE_EXIT

#define OOJS_NATIVE_EXIT
Value:
} @catch(id exception) { \
OOJSReportWrappedException(oojsNativeContext, exception); \
return NO; \
OOJS_PROFILE_EXIT_VAL(NO) \
}

Definition at line 89 of file OOJSEngineNativeWrappers.h.

89#define OOJS_NATIVE_EXIT \
90 } @catch(id exception) { \
91 OOJSReportWrappedException(oojsNativeContext, exception); \
92 return NO; \
93 OOJS_PROFILE_EXIT_VAL(NO) \
94 }

Referenced by ClockAddSeconds(), ClockClockStringForTime(), ClockGetProperty(), ConsoleClearConsole(), ConsoleConsoleMessage(), ConsoleDisplayMessagesInClass(), ConsoleGarbageCollect(), ConsoleGetProfile(), ConsoleGetProperty(), ConsoleInspectEntity(), ConsoleIsExecutableJavaScript(), ConsoleProfile(), ConsoleScriptStack(), ConsoleSetDisplayMessagesInClass(), ConsoleSetProperty(), ConsoleSettingsDeleteProperty(), ConsoleSettingsGetProperty(), ConsoleSettingsSetProperty(), ConsoleTrace(), ConsoleWriteJSMemoryStats(), ConsoleWriteLogMarker(), ConsoleWriteMemoryStats(), OOJSTimer::dealloc, OOManifest::dealloc, DockGetProperty(), DockSetProperty(), EntityGetProperty(), EntitySetProperty(), EquipmentInfoGetAllEqipment(), EquipmentInfoGetProperty(), EquipmentInfoSetProperty(), ExhaustPlumeGetProperty(), ExhaustPlumeSetProperty(), FlasherGetProperty(), FlasherSetProperty(), FontMeasureString(), DockEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOExhaustPlumeEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOFlasherEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOPlanetEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOSunEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOVisualEffectEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, OOWaypointEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, StationEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, WormholeEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalGetColorSaturation(), GlobalGetGuiColorSettingForKey(), GlobalGetProperty(), GlobalGetScreenBackgroundForKey(), GlobalIsValidFrameCallback(), GlobalKeyBindingDescription(), GlobalLog(), GlobalRandomInhabitantsDescription(), GlobalRandomName(), GlobalRemoveFrameCallback(), GlobalSetColorSaturation(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetProperty(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalTakeSnapShot(), JSClockToString(), ManifestComment(), ManifestGetProperty(), ManifestSetComment(), ManifestSetProperty(), ManifestShortComment(), MissionAddMessageText(), MissionGetProperty(), MissionMarkSystem(), MissionRunScreen(), MissionRunShipLibrary(), MissionSetInstructionsInternal(), MissionSetProperty(), MissionUnmarkSystem(), MissionVariablesDeleteProperty(), MissionVariablesEnumerate(), MissionVariablesGetProperty(), MissionVariablesSetProperty(), OOEquipmentType(OOJavaScriptExtensions)::oo_clearJSSelf:, OOShipGroup(OOJavaScriptExtensions)::oo_clearJSSelf:, OOSound(OOJavaScriptExtentions)::oo_jsClassName, OOSoundSource(OOJavaScriptExtentions)::oo_jsClassName, OOJSObjectWrapperToString(), OOJSUnconstructableConstruct(), OoliteCompareVersion(), OoliteGetProperty(), PlanetGetProperty(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerCommsMessage(), PlayerConsoleMessage(), PlayerDecreaseContractReputation(), PlayerDecreaseParcelReputation(), PlayerDecreasePassengerReputation(), PlayerEndScenario(), PlayerGetProperty(), PlayerIncreaseContractReputation(), PlayerIncreaseParcelReputation(), PlayerIncreasePassengerReputation(), PlayerReplaceShip(), PlayerSetEscapePodDestination(), PlayerSetPlayerRole(), PlayerSetProperty(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipCancelDockingRequest(), PlayerShipCancelHyperspaceCountdown(), PlayerShipDisengageAutopilot(), PlayerShipEngageAutopilotToStation(), PlayerShipGetProperty(), PlayerShipHideHUDSelector(), PlayerShipLaunch(), PlayerShipRemoveAllCargo(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipResetCustomView(), PlayerShipResetScannerZoom(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetProperty(), PlayerShipShowHUDSelector(), PlayerShipTakeInternalDamage(), PlayerShipUseSpecialCargo(), PlayerStopAudioMessage(), QuaternionToSource(), QuaternionToString(), OOJavaScriptEngine(OOMonitorSupportInternal)::sendMonitorLogMessage:withMessageClass:inContext:, ShipAbandonShip(), ShipAddCargoEntity(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDeployEscorts(), ShipDockEscorts(), ShipDumpCargo(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipExitAI(), ShipExitSystem(), ShipExplode(), ShipFindNearestStation(), ShipFireECM(), ShipFireMissile(), ShipGetProperty(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupGetProperty(), ShipGroupRemoveShip(), ShipGroupSetProperty(), ShipHasEquipmentProviding(), ShipHasRole(), ShipReactToAIMessage(), ShipRemove(), ShipRemoveEquipment(), ShipRestoreSubEntities(), ShipRunLegacyScriptActions(), ShipSelectNewMissile(), ShipSendAIMessage(), ShipSetAI(), ShipSetBounty(), ShipSetCargo(), ShipSetCargoType(), ShipSetCrew(), ShipSetEquipmentStatus(), ShipSetMaterials(), ShipSetProperty(), ShipSetScript(), ShipSetShaders(), ShipSpawn(), ShipStaticKeys(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticRoles(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), SoundGetProperty(), SoundSourceConstruct(), SoundSourceGetProperty(), SoundSourcePlay(), SoundSourceSetProperty(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), StationAbortAllDockings(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationCanDockShip(), StationDecreaseAlertLevel(), StationDockPlayer(), StationGetProperty(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetProperty(), SunGetProperty(), SunGoNova(), SystemAddMoon(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemFilteredEntities(), SystemGetProperty(), SystemInfoDistanceToSystem(), SystemInfoEnumerate(), SystemInfoGetProperty(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSetProperty(), SystemInfoSetPropertyMethod(), SystemInfoStaticFilteredSystems(), SystemInfoStaticSetInterstellarProperty(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemLocationFromCode(), SystemSendAllShipsAway(), SystemSetPopulator(), SystemSetProperty(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemStaticInfoForSystem(), SystemStaticSystemIDForName(), SystemStaticSystemNameForID(), SystemToString(), TimerConstruct(), TimerGetProperty(), TimerSetProperty(), TimerStart(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), VectorToSource(), VectorToString(), VisualEffectGetProperty(), VisualEffectRemove(), VisualEffectScale(), VisualEffectSetMaterials(), VisualEffectSetProperty(), VisualEffectSetShaders(), WaypointGetProperty(), WorldScriptsEnumerate(), WorldScriptsGetProperty(), and WormholeGetProperty().

◆ OOJS_PROFILE

#define OOJS_PROFILE   OOLITE_DEBUG

Definition at line 50 of file OOJSEngineNativeWrappers.h.

◆ OOJS_PROFILE_ENTER

#define OOJS_PROFILE_ENTER   {

Definition at line 77 of file OOJSEngineNativeWrappers.h.

Referenced by CompareEntitiesByDistance(), ConsoleFinalize(), DebugMonitorToJSConsole(), DescribeValue(), EntityDumpState(), EntityFromArgumentList(), FindJSVisibleEntities(), FindShips(), GetJSSystemInfoForSystem(), GetRelativeToAndRange(), HPVectorToJSValue(), PlayerEntity(OOJavaScriptExtensions)::javaScriptEngineWillReset:, JSArrayFromNSArray(), JSDockGetDockEntity(), JSDockGetShipEntity(), JSEntityIsJavaScriptSearchablePredicate(), JSEntityIsJavaScriptVisiblePredicate(), JSExhaustPlumeGetExhaustPlumeEntity(), JSFlasherGetFlasherEntity(), JSFunctionPredicate(), JSNewNSArrayValue(), JSNewNSDictionaryValue(), JSObjectFromNSDictionary(), JSObjectGetQuaternion(), JSObjectGetVector(), JSQuaternionSetQuaternion(), JSQuaternionWithQuaternion(), JSStationGetShipEntity(), JSStationGetStationEntity(), JSValueToEquipmentKeyRelaxed(), JSValueToEquipmentType(), JSVectorSetHPVector(), JSVectorWithHPVector(), JSVectorWithVector(), JSVisualEffectGetVisualEffectEntity(), JSWaypointGetWaypointEntity(), JSWormholeGetWormholeEntity(), OOJSArgumentListGetNumberNoError(), OOJSCallObjCObjectMethod(), OOJSDictionaryFromJSObject(), OOJSDictionaryFromJSValue(), OOJSDictionaryFromStringTable(), OOJSNativeObjectFromJSObject(), OOJSNativeObjectFromJSValue(), OOJSObjectGetterImplPRIVATE(), OOJSObjectWrapperFinalize(), OOStringFromJSString(), OOStringFromJSValue(), OOStringFromJSValueEvenIfNull(), QuaternionConjugate(), QuaternionConstruct(), QuaternionDot(), QuaternionFromArgumentListNoErrorInternal(), QuaternionGetProperty(), QuaternionMultiply(), QuaternionNormalize(), QuaternionRotate(), QuaternionRotateX(), QuaternionRotateY(), QuaternionRotateZ(), QuaternionSetProperty(), QuaternionStaticRandom(), QuaternionToArray(), QuaternionToJSValue(), QuaternionVectorForward(), QuaternionVectorRight(), QuaternionVectorUp(), RemoveOrExplodeShip(), ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAdjustCargo(), ShipBecomeCascadeExplosion(), ShipBroadcastCascadeImminent(), ShipBroadcastDistressMessage(), ShipCheckCourseToDestination(), ShipCheckScanner(), ShipClearDefenseTargets(), ShipDamageAssessment(), ShipEnterWormhole(), ShipGetMaterials(), ShipGetSafeCourseToDestination(), ShipGetShaders(), ShipMarkTargetForFines(), ShipNotifyGroupOfWormhole(), ShipOfferToEscort(), ShipPatrolReportIn(), ShipPerformAttack(), ShipPerformCollect(), ShipPerformEscort(), ShipPerformFaceDestination(), ShipPerformFlee(), ShipPerformFlyToRangeFromDestination(), ShipPerformHold(), ShipPerformIdle(), ShipPerformIntercept(), ShipPerformLandOnPlanet(), ShipPerformMining(), ShipPerformScriptedAI(), ShipPerformScriptedAttackAI(), ShipPerformStop(), ShipPerformTumble(), ShipRecallDockingInstructions(), ShipRemoveCollisionException(), ShipRemoveDefenseTarget(), ShipRequestDockingInstructions(), ShipRequestHelpFromGroup(), ShipSetMaterialsInternal(), ShipThreatAssessment(), ShipThrowSpark(), ShipUpdateEscortFormation(), SoundFromJSValue(), SpecialJSWarning(), SystemInfoDeleteProperty(), SystemInfoFinalize(), TimerFinalize(), VectorAdd(), VectorAngleTo(), VectorConstruct(), VectorCross(), VectorDirection(), VectorDistanceTo(), VectorDot(), VectorFinalize(), VectorFromArgumentListNoErrorInternal(), VectorGetProperty(), VectorMagnitude(), VectorMultiply(), VectorRotateBy(), VectorRotationTo(), VectorSetProperty(), VectorSquaredDistanceTo(), VectorSquaredMagnitude(), VectorStaticInterpolate(), VectorStaticRandom(), VectorStaticRandomDirection(), VectorStaticRandomDirectionAndLength(), VectorSubtract(), VectorToArray(), VectorToJSValue(), VectorTripleProduct(), VisualEffectGetMaterials(), VisualEffectGetShaders(), and VisualEffectSetMaterialsInternal().

◆ OOJS_PROFILE_ENTER_FOR_NATIVE

#define OOJS_PROFILE_ENTER_FOR_NATIVE   @try {

Definition at line 80 of file OOJSEngineNativeWrappers.h.

◆ OOJS_PROFILE_EXIT

#define OOJS_PROFILE_EXIT   OOJS_PROFILE_EXIT_VAL(0)

Definition at line 107 of file OOJSEngineNativeWrappers.h.

Referenced by CompareEntitiesByDistance(), DebugMonitorToJSConsole(), DescribeValue(), EntityDumpState(), EntityFromArgumentList(), FindJSVisibleEntities(), FindShips(), GetRelativeToAndRange(), HPVectorToJSValue(), PlayerEntity(OOJavaScriptExtensions)::javaScriptEngineWillReset:, JSArrayFromNSArray(), JSDockGetDockEntity(), JSDockGetShipEntity(), JSEntityIsJavaScriptSearchablePredicate(), JSEntityIsJavaScriptVisiblePredicate(), JSExhaustPlumeGetExhaustPlumeEntity(), JSFlasherGetFlasherEntity(), JSFunctionPredicate(), JSNewNSArrayValue(), JSNewNSDictionaryValue(), JSObjectFromNSDictionary(), JSObjectGetQuaternion(), JSObjectGetVector(), JSQuaternionSetQuaternion(), JSQuaternionWithQuaternion(), JSStationGetShipEntity(), JSStationGetStationEntity(), JSValueToEquipmentKeyRelaxed(), JSValueToEquipmentType(), JSVectorSetHPVector(), JSVectorWithHPVector(), JSVectorWithVector(), JSVisualEffectGetVisualEffectEntity(), JSWaypointGetWaypointEntity(), JSWormholeGetWormholeEntity(), OOJSArgumentListGetNumberNoError(), OOJSCallObjCObjectMethod(), OOJSDictionaryFromJSObject(), OOJSDictionaryFromJSValue(), OOJSDictionaryFromStringTable(), OOJSNativeObjectFromJSObject(), OOJSNativeObjectFromJSValue(), OOJSObjectGetterImplPRIVATE(), OOStringFromJSString(), OOStringFromJSValue(), OOStringFromJSValueEvenIfNull(), QuaternionConjugate(), QuaternionConstruct(), QuaternionDot(), QuaternionFromArgumentListNoErrorInternal(), QuaternionGetProperty(), QuaternionMultiply(), QuaternionNormalize(), QuaternionRotate(), QuaternionRotateX(), QuaternionRotateY(), QuaternionRotateZ(), QuaternionSetProperty(), QuaternionStaticRandom(), QuaternionToArray(), QuaternionToJSValue(), QuaternionVectorForward(), QuaternionVectorRight(), QuaternionVectorUp(), RemoveOrExplodeShip(), ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAdjustCargo(), ShipBecomeCascadeExplosion(), ShipBroadcastCascadeImminent(), ShipBroadcastDistressMessage(), ShipCheckCourseToDestination(), ShipCheckScanner(), ShipClearDefenseTargets(), ShipDamageAssessment(), ShipEnterWormhole(), ShipGetMaterials(), ShipGetSafeCourseToDestination(), ShipGetShaders(), ShipMarkTargetForFines(), ShipNotifyGroupOfWormhole(), ShipOfferToEscort(), ShipPatrolReportIn(), ShipPerformAttack(), ShipPerformCollect(), ShipPerformEscort(), ShipPerformFaceDestination(), ShipPerformFlee(), ShipPerformFlyToRangeFromDestination(), ShipPerformHold(), ShipPerformIdle(), ShipPerformIntercept(), ShipPerformLandOnPlanet(), ShipPerformMining(), ShipPerformScriptedAI(), ShipPerformScriptedAttackAI(), ShipPerformStop(), ShipPerformTumble(), ShipRecallDockingInstructions(), ShipRemoveCollisionException(), ShipRemoveDefenseTarget(), ShipRequestDockingInstructions(), ShipRequestHelpFromGroup(), ShipSetMaterialsInternal(), ShipThreatAssessment(), ShipThrowSpark(), ShipUpdateEscortFormation(), SoundFromJSValue(), SpecialJSWarning(), SystemInfoDeleteProperty(), VectorAdd(), VectorAngleTo(), VectorConstruct(), VectorCross(), VectorDirection(), VectorDistanceTo(), VectorDot(), VectorFromArgumentListNoErrorInternal(), VectorGetProperty(), VectorMagnitude(), VectorMultiply(), VectorRotateBy(), VectorRotationTo(), VectorSetProperty(), VectorSquaredDistanceTo(), VectorSquaredMagnitude(), VectorStaticInterpolate(), VectorStaticRandom(), VectorStaticRandomDirection(), VectorStaticRandomDirectionAndLength(), VectorSubtract(), VectorToArray(), VectorToJSValue(), VectorTripleProduct(), VisualEffectGetMaterials(), VisualEffectGetShaders(), and VisualEffectSetMaterialsInternal().

◆ OOJS_PROFILE_EXIT_JSVAL

#define OOJS_PROFILE_EXIT_JSVAL   OOJS_PROFILE_EXIT_VAL(JSVAL_VOID)

Definition at line 108 of file OOJSEngineNativeWrappers.h.

Referenced by GetJSSystemInfoForSystem().

◆ OOJS_PROFILE_EXIT_VAL

#define OOJS_PROFILE_EXIT_VAL ( rval)
Value:
} OOJSUnreachable(__FUNCTION__, __FILE__, __LINE__); return (rval);
void OOJSUnreachable(const char *function, const char *file, unsigned line) NO_RETURN_FUNC

Definition at line 78 of file OOJSEngineNativeWrappers.h.

◆ OOJS_PROFILE_EXIT_VOID

#define OOJS_PROFILE_EXIT_VOID   } return;

◆ OOJSProfileEnter

#define OOJSProfileEnter ( frame,
function )
Value:
do {} while (0)

Definition at line 190 of file OOJSEngineNativeWrappers.h.

◆ OOJSProfileExit

#define OOJSProfileExit ( frame)
Value:
do {} while (0)

Definition at line 191 of file OOJSEngineNativeWrappers.h.

Function Documentation

◆ OOJSReportWrappedException()

void OOJSReportWrappedException ( JSContext * context,
id exception )

Definition at line 1050 of file OOJavaScriptEngine.m.

1051{
1052 if (!JS_IsExceptionPending(context))
1053 {
1054 if ([exception isKindOfClass:[NSException class]]) OOJSReportError(context, @"Native exception: %@", [exception reason]);
1055 else OOJSReportError(context, @"Unidentified native exception");
1056 }
1057 // Else, let the pending exception propagate.
1058}
void OOJSReportError(JSContext *context, NSString *format,...)

References OOJSReportError().

+ Here is the call graph for this function:

◆ OOJSUnreachable()

void OOJSUnreachable ( const char * function,
const char * file,
unsigned line )

Definition at line 1063 of file OOJavaScriptEngine.m.

1064{
1065 OOLog(@"fatal.unreachable", @"Supposedly unreachable statement reached in %s (%@:%u) -- terminating.", function, OOLogAbbreviatedFileName(file), line);
1066 abort();
1067}
#define OOLog(class, format,...)
Definition OOLogging.h:88
NSString * OOLogAbbreviatedFileName(const char *inName)
Definition OOLogging.m:839

References OOLog, and OOLogAbbreviatedFileName().

+ Here is the call graph for this function: