Oolite 1.91.0.7650-250121-affa790
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(), ShipAddCargoEntity(), ShipSetMaterialsInternal(), ShipSpawn(), SoundSourcePlay(), SoundSourcePlayOrRepeat(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), SoundStaticStopMusic(), 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(), ShipAddCargoEntity(), ShipSetMaterialsInternal(), ShipSpawn(), SoundSourcePlay(), SoundSourcePlayOrRepeat(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), SoundStaticStopMusic(), 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(), DockGetProperty(), DockIsQueued(), DockSetProperty(), EntityGetProperty(), EntitySetProperty(), EquipmentInfoGetAllEqipment(), EquipmentInfoGetProperty(), EquipmentInfoSetProperty(), EquipmentInfoStaticInfoForKey(), ExhaustPlumeGetProperty(), ExhaustPlumeRemove(), ExhaustPlumeSetProperty(), FlasherGetProperty(), FlasherRemove(), FlasherSetProperty(), FontMeasureString(), GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalGetColorSaturation(), GlobalGetGuiColorSettingForKey(), GlobalGetProperty(), GlobalGetScreenBackgroundForKey(), GlobalIsValidFrameCallback(), GlobalKeyBindingDescription(), GlobalLog(), GlobalPauseGame(), GlobalRandomInhabitantsDescription(), GlobalRandomName(), GlobalRemoveFrameCallback(), GlobalSetColorSaturation(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetProperty(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalTakeSnapShot(), JSClockToString(), ManifestComment(), ManifestGetProperty(), ManifestSetComment(), ManifestSetProperty(), ManifestSetShortComment(), ManifestShortComment(), MissionAddMessageText(), MissionGetProperty(), MissionMarkSystem(), MissionRunScreen(), MissionRunShipLibrary(), MissionSetInstructionsInternal(), MissionSetProperty(), MissionUnmarkSystem(), MissionVariablesDeleteProperty(), MissionVariablesEnumerate(), MissionVariablesGetProperty(), MissionVariablesSetProperty(), OOJSObjectWrapperToString(), OOJSUnconstructableConstruct(), OoliteCompareVersion(), OoliteGetProperty(), PlanetGetProperty(), PlanetSetProperty(), 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(), ShipAbandonShip(), ShipAddCargoEntity(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDeployEscorts(), ShipDockEscorts(), ShipDumpCargo(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipExitAI(), ShipExitSystem(), ShipExplode(), ShipFindNearestStation(), ShipFireECM(), ShipFireMissile(), ShipGetProperty(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupContainsShip(), 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(), SoundSourcePlayOrRepeat(), SoundSourceSetProperty(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), SoundStaticStopMusic(), StationAbortAllDockings(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationCanDockShip(), StationDecreaseAlertLevel(), StationDockPlayer(), StationGetProperty(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetProperty(), SunCancelNova(), 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(), TimerStop(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), VectorToSource(), VectorToString(), VisualEffectGetProperty(), VisualEffectRemove(), VisualEffectRestoreSubEntities(), VisualEffectScale(), VisualEffectSetMaterials(), VisualEffectSetProperty(), VisualEffectSetShaders(), WaypointGetProperty(), WaypointSetProperty(), WorldScriptsEnumerate(), WorldScriptsGetProperty(), WormholeGetProperty(), and WormholeSetProperty().

◆ 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(), DockGetProperty(), DockIsQueued(), DockSetProperty(), EntityGetProperty(), EntitySetProperty(), EquipmentInfoGetAllEqipment(), EquipmentInfoGetProperty(), EquipmentInfoSetProperty(), EquipmentInfoStaticInfoForKey(), ExhaustPlumeGetProperty(), ExhaustPlumeRemove(), ExhaustPlumeSetProperty(), FlasherGetProperty(), FlasherRemove(), FlasherSetProperty(), FontMeasureString(), GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalGetColorSaturation(), GlobalGetGuiColorSettingForKey(), GlobalGetProperty(), GlobalGetScreenBackgroundForKey(), GlobalIsValidFrameCallback(), GlobalKeyBindingDescription(), GlobalLog(), GlobalPauseGame(), GlobalRandomInhabitantsDescription(), GlobalRandomName(), GlobalRemoveFrameCallback(), GlobalSetColorSaturation(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetProperty(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalTakeSnapShot(), JSClockToString(), ManifestComment(), ManifestGetProperty(), ManifestSetComment(), ManifestSetProperty(), ManifestSetShortComment(), ManifestShortComment(), MissionAddMessageText(), MissionGetProperty(), MissionMarkSystem(), MissionRunScreen(), MissionRunShipLibrary(), MissionSetInstructionsInternal(), MissionSetProperty(), MissionUnmarkSystem(), MissionVariablesDeleteProperty(), MissionVariablesEnumerate(), MissionVariablesGetProperty(), MissionVariablesSetProperty(), OOJSObjectWrapperToString(), OOJSUnconstructableConstruct(), OoliteCompareVersion(), OoliteGetProperty(), PlanetGetProperty(), PlanetSetProperty(), 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(), ShipAbandonShip(), ShipAddCargoEntity(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDeployEscorts(), ShipDockEscorts(), ShipDumpCargo(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipExitAI(), ShipExitSystem(), ShipExplode(), ShipFindNearestStation(), ShipFireECM(), ShipFireMissile(), ShipGetProperty(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupContainsShip(), 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(), SoundSourcePlayOrRepeat(), SoundSourceSetProperty(), SoundSourceStop(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticPlayMusic(), SoundStaticStopMusic(), StationAbortAllDockings(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationCanDockShip(), StationDecreaseAlertLevel(), StationDockPlayer(), StationGetProperty(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetProperty(), SunCancelNova(), 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(), TimerStop(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), VectorToSource(), VectorToString(), VisualEffectGetProperty(), VisualEffectRemove(), VisualEffectRestoreSubEntities(), VisualEffectScale(), VisualEffectSetMaterials(), VisualEffectSetProperty(), VisualEffectSetShaders(), WaypointGetProperty(), WaypointSetProperty(), WorldScriptsEnumerate(), WorldScriptsGetProperty(), WormholeGetProperty(), and WormholeSetProperty().

◆ 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 Universe::addShipAt:withRole:withinRadius:, Universe::addShipsAt:withRole:quantity:withinRadius:asGroup:, Universe::addVisualEffectAt:withKey:, OOJavaScriptConsoleController::appendMessage:colorKey:emphasisRange:, OOMesh(Private)::calculateBoundingVolumes, OOMesh(Private)::calculateVertexNormalsAndTangentsWithFaceRefs:, OOMesh(Private)::calculateVertexTangentsWithFaceRefs:, OOMesh(Private)::checkNormalsAndAdjustWinding, CompareEntitiesByDistance(), NSString(OOJavaScriptExtensions)::concatenationOfStringsFromJavaScriptValues:count:separator:inContext:, ConsoleFinalize(), Universe::currentSystemData, DebugMonitorToJSConsole(), DescribeValue(), EntityDumpState(), EntityFromArgumentList(), NSString(OOJavaScriptExtensions)::escapedForJavaScriptLiteral, Universe::findEntitiesMatchingPredicate:parameter:inRange:ofEntity:, FindJSVisibleEntities(), FindShips(), OOMesh(Private)::generateFaceTangents, Universe::generateSystemData:useCache:, GetJSSystemInfoForSystem(), OOMesh(Private)::getNormal:andTangent:forVertex:inSmoothGroup:, GetRelativeToAndRange(), HPVectorToJSValue(), OOJSValue::initWithJSValue:inContext:, DockEntity::initWithKey:definition:, OOVisualEffectEntity::initWithKey:definition:, ShipEntity::initWithKey:definition:, StationEntity::initWithKey:definition:, OOMesh(Private)::initWithName:cacheKey:materialDictionary:shadersDictionary:smooth:shaderMacros:shaderBindingTarget:scaleFactor:cacheWriteable:, 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(), OOMesh(Private)::loadData:scaleFactor:, OOMesh(Private)::modelData, Universe::newDockWithName:andScaleFactor:, Universe::newShipWithName:usePlayerProxy:isSubentity:andScaleFactor:, Universe::newShipWithRole:, Universe::newVisualEffectWithName:, NSObject(OOJavaScriptConversion)::oo_jsDescriptionWithClassName:, NSNumber(OOJavaScriptConversion)::oo_jsValueInContext:, NSString(OOJavaScriptExtensions)::oo_jsValueInContext:, 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(), Universe::randomShipKeyForRoleRespectingConditions:, RemoveOrExplodeShip(), OOMesh(Private)::setModelFromModelData:name:, ShipEntity::setUpFromDictionary:, ShipEntity(Private)::setUpOneSubentity:, DockEntity::setUpShipFromDictionary:, ShipEntity::setUpShipFromDictionary:, StationEntity::setUpShipFromDictionary:, ShipEntity::setUpSubEntities, OOMesh(Private)::setUpVertexArrays, OOVisualEffectEntity::setUpVisualEffectFromDictionary:, ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAdjustCargo(), ShipBecomeCascadeExplosion(), ShipBroadcastCascadeImminent(), ShipBroadcastDistressMessage(), ShipCheckCourseToDestination(), ShipCheckScanner(), Universe::shipClassForShipDictionary:, 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(), NSString(OOJavaScriptExtensions)::stringWithJavaScriptParameters:count:inContext:, SystemInfoDeleteProperty(), SystemInfoFinalize(), GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:, TimerFinalize(), ValidateContracts(), OOJSValue::valueWithJSObject:inContext:, OOJSValue::valueWithJSValue:inContext:, 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 Universe::addShipAt:withRole:withinRadius:, Universe::addShipsAt:withRole:quantity:withinRadius:asGroup:, Universe::addVisualEffectAt:withKey:, CompareEntitiesByDistance(), NSString(OOJavaScriptExtensions)::concatenationOfStringsFromJavaScriptValues:count:separator:inContext:, Universe::currentSystemData, DebugMonitorToJSConsole(), DescribeValue(), EntityDumpState(), EntityFromArgumentList(), NSString(OOJavaScriptExtensions)::escapedForJavaScriptLiteral, Universe::findEntitiesMatchingPredicate:parameter:inRange:ofEntity:, FindJSVisibleEntities(), FindShips(), Universe::generateSystemData:useCache:, GetRelativeToAndRange(), HPVectorToJSValue(), OOJSValue::initWithJSValue:inContext:, DockEntity::initWithKey:definition:, OOVisualEffectEntity::initWithKey:definition:, ShipEntity::initWithKey:definition:, StationEntity::initWithKey:definition:, OOMesh(Private)::initWithName:cacheKey:materialDictionary:shadersDictionary:smooth:shaderMacros:shaderBindingTarget:scaleFactor:cacheWriteable:, 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(), OOMesh(Private)::loadData:scaleFactor:, OOMesh(Private)::modelData, Universe::newDockWithName:andScaleFactor:, Universe::newShipWithName:usePlayerProxy:isSubentity:andScaleFactor:, Universe::newShipWithRole:, Universe::newVisualEffectWithName:, NSObject(OOJavaScriptConversion)::oo_jsDescriptionWithClassName:, 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(), Universe::randomShipKeyForRoleRespectingConditions:, RemoveOrExplodeShip(), OOMesh(Private)::setModelFromModelData:name:, ShipEntity(Private)::setUpOneSubentity:, DockEntity::setUpShipFromDictionary:, ShipEntity::setUpShipFromDictionary:, StationEntity::setUpShipFromDictionary:, ShipEntity::setUpSubEntities, OOMesh(Private)::setUpVertexArrays, OOVisualEffectEntity::setUpVisualEffectFromDictionary:, ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAdjustCargo(), ShipBecomeCascadeExplosion(), ShipBroadcastCascadeImminent(), ShipBroadcastDistressMessage(), ShipCheckCourseToDestination(), ShipCheckScanner(), Universe::shipClassForShipDictionary:, 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(), NSString(OOJavaScriptExtensions)::stringWithJavaScriptParameters:count:inContext:, SystemInfoDeleteProperty(), GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:, ValidateContracts(), OOJSValue::valueWithJSObject:inContext:, OOJSValue::valueWithJSValue:inContext:, 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

◆ 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)

Definition at line 78 of file OOJSEngineNativeWrappers.h.

◆ OOJS_PROFILE_EXIT_VOID

◆ 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: