mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Remove debug code and seftable.txt
This commit is contained in:
parent
214d4a8a57
commit
b7700b7aab
2 changed files with 0 additions and 275 deletions
|
@ -369,8 +369,6 @@ def LoadLibrary(builtins = None, fndata = None):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
functions[curr_fn]['delay'] = value
|
functions[curr_fn]['delay'] = value
|
||||||
#word = match_flag.group(1) or match_flag.group(2) or match_flag.group(4) or match_flag.group(5)
|
|
||||||
#print curr_fn, repr(word)
|
|
||||||
else:
|
else:
|
||||||
warning(u"Syntax error in %s line %d, skipping: %s"
|
warning(u"Syntax error in %s line %d, skipping: %s"
|
||||||
% (ufndata, linenum, uline))
|
% (ufndata, linenum, uline))
|
||||||
|
@ -393,23 +391,4 @@ def LoadLibrary(builtins = None, fndata = None):
|
||||||
if 'SEF' in functions[i] and 'delay' in functions[i]:
|
if 'SEF' in functions[i] and 'delay' in functions[i]:
|
||||||
warning(u"Side-effect-free function %s contradicts delay" % ui)
|
warning(u"Side-effect-free function %s contradicts delay" % ui)
|
||||||
|
|
||||||
# FIXME: Temp: Load the seftable to compare it with the ftable.
|
|
||||||
f = open('seftable.txt', 'rb')
|
|
||||||
try:
|
|
||||||
while True:
|
|
||||||
line = f.readline()
|
|
||||||
if line == '':
|
|
||||||
break
|
|
||||||
line = line.strip()
|
|
||||||
if line and line[0] != '#':# and line in functions:
|
|
||||||
#if 'SEF' not in functions[line]:
|
|
||||||
# warning(u"Function %s SEF mismatch" % line)
|
|
||||||
#functions[line]['SEF2'] = True
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
f.close()
|
|
||||||
for line in functions:
|
|
||||||
if 'SEF' in functions[line] and 'SEF2' not in functions[line]:
|
|
||||||
pass#warning(u"Function %s SEF mismatch2" % line)
|
|
||||||
|
|
||||||
return events, constants, functions
|
return events, constants, functions
|
||||||
|
|
254
seftable.txt
254
seftable.txt
|
@ -1,254 +0,0 @@
|
||||||
# Side-effect-free table
|
|
||||||
#
|
|
||||||
# Copyright © 2015-2017 Sei Lisa. All rights reserved.
|
|
||||||
#
|
|
||||||
# This file is part of LSL PyOptimizer.
|
|
||||||
#
|
|
||||||
# LSL PyOptimizer is free software: you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# LSL PyOptimizer is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with LSL PyOptimizer. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# This is a list of functions that can be optimized out if they appear in
|
|
||||||
# side-effect-free expressions, e.g. alone as a statement, or assigned to
|
|
||||||
# a never used variable.
|
|
||||||
|
|
||||||
# Some of these functions actually have the side effect of consuming "energy".
|
|
||||||
# That's considered a misfeature that can be optimized out here.
|
|
||||||
llAbs
|
|
||||||
llAcos
|
|
||||||
llAgentInExperience
|
|
||||||
llAngleBetween
|
|
||||||
llAsin
|
|
||||||
llAtan2
|
|
||||||
llAvatarOnLinkSitTarget
|
|
||||||
llAvatarOnSitTarget
|
|
||||||
llAxes2Rot
|
|
||||||
llAxisAngle2Rot
|
|
||||||
llBase64ToInteger
|
|
||||||
llBase64ToString
|
|
||||||
llCSV2List
|
|
||||||
llCeil
|
|
||||||
llCloud
|
|
||||||
llCos
|
|
||||||
llDeleteSubList
|
|
||||||
llDeleteSubString
|
|
||||||
llDetectedGrab
|
|
||||||
llDetectedGroup
|
|
||||||
llDetectedKey
|
|
||||||
llDetectedLinkNumber
|
|
||||||
llDetectedName
|
|
||||||
llDetectedOwner
|
|
||||||
llDetectedPos
|
|
||||||
llDetectedRot
|
|
||||||
llDetectedTouchBinormal
|
|
||||||
llDetectedTouchFace
|
|
||||||
llDetectedTouchNormal
|
|
||||||
llDetectedTouchPos
|
|
||||||
llDetectedTouchST
|
|
||||||
llDetectedTouchUV
|
|
||||||
llDetectedType
|
|
||||||
llDetectedVel
|
|
||||||
llDumpList2String
|
|
||||||
llEdgeOfWorld
|
|
||||||
llEscapeURL
|
|
||||||
llEuler2Rot
|
|
||||||
llFabs
|
|
||||||
llFloor
|
|
||||||
llFrand
|
|
||||||
llGenerateKey
|
|
||||||
llGetAccel
|
|
||||||
llGetAgentInfo
|
|
||||||
llGetAgentLanguage
|
|
||||||
llGetAgentList
|
|
||||||
llGetAgentSize
|
|
||||||
llGetAlpha
|
|
||||||
llGetAnimation
|
|
||||||
llGetAnimationList
|
|
||||||
# This may have the side effect of erring but we optimize it out
|
|
||||||
llGetAnimationOverride
|
|
||||||
llGetAttached
|
|
||||||
llGetAttachedList
|
|
||||||
llGetBoundingBox
|
|
||||||
# This may have the side effect of erring but we optimize it out
|
|
||||||
llGetCameraPos
|
|
||||||
# This may have the side effect of erring but we optimize it out
|
|
||||||
llGetCameraRot
|
|
||||||
llGetCenterOfMass
|
|
||||||
# Has a forced delay, so we disable it
|
|
||||||
#llGetClosestNavPoint
|
|
||||||
llGetColor
|
|
||||||
llGetCreator
|
|
||||||
llGetDate
|
|
||||||
llGetDisplayName
|
|
||||||
llGetEnergy
|
|
||||||
llGetEnv
|
|
||||||
llGetExperienceDetails
|
|
||||||
llGetExperienceErrorMessage
|
|
||||||
llGetExperienceList
|
|
||||||
llGetForce
|
|
||||||
llGetFreeMemory
|
|
||||||
llGetFreeURLs
|
|
||||||
llGetGMTclock
|
|
||||||
llGetGeometricCenter
|
|
||||||
llGetHTTPHeader
|
|
||||||
llGetInventoryCreator
|
|
||||||
llGetInventoryKey
|
|
||||||
llGetInventoryName
|
|
||||||
llGetInventoryNumber
|
|
||||||
llGetInventoryPermMask
|
|
||||||
llGetInventoryType
|
|
||||||
llGetKey
|
|
||||||
llGetLandOwnerAt
|
|
||||||
llGetLinkKey
|
|
||||||
llGetLinkMedia
|
|
||||||
llGetLinkName
|
|
||||||
llGetLinkNumber
|
|
||||||
llGetLinkNumberOfSides
|
|
||||||
llGetLinkPrimitiveParams
|
|
||||||
llGetListEntryType
|
|
||||||
llGetListLength
|
|
||||||
llGetLocalPos
|
|
||||||
llGetLocalRot
|
|
||||||
llGetMass
|
|
||||||
llGetMassMKS
|
|
||||||
llGetMaxScaleFactor
|
|
||||||
llGetMemoryLimit
|
|
||||||
llGetMinScaleFactor
|
|
||||||
llGetNumberOfPrims
|
|
||||||
llGetNumberOfSides
|
|
||||||
llGetObjectDesc
|
|
||||||
llGetObjectDetails
|
|
||||||
llGetObjectMass
|
|
||||||
llGetObjectName
|
|
||||||
llGetObjectPermMask
|
|
||||||
llGetObjectPrimCount
|
|
||||||
llGetOmega
|
|
||||||
llGetOwner
|
|
||||||
llGetOwnerKey
|
|
||||||
llGetParcelDetails
|
|
||||||
llGetParcelFlags
|
|
||||||
llGetParcelMaxPrims
|
|
||||||
llGetParcelMusicURL
|
|
||||||
llGetParcelPrimCount
|
|
||||||
# Forced 2.0 second delay so excluded
|
|
||||||
#llGetParcelPrimOwners
|
|
||||||
llGetPermissions
|
|
||||||
llGetPermissionsKey
|
|
||||||
llGetPhysicsMaterial
|
|
||||||
llGetPos
|
|
||||||
# Forced delay so excluded
|
|
||||||
#llGetPrimMediaParams
|
|
||||||
# Forced delay so excluded
|
|
||||||
#llGetPrimitiveParams
|
|
||||||
llGetRegionAgentCount
|
|
||||||
llGetRegionCorner
|
|
||||||
llGetRegionFPS
|
|
||||||
llGetRegionFlags
|
|
||||||
llGetRegionName
|
|
||||||
llGetRegionTimeDilation
|
|
||||||
llGetRootPosition
|
|
||||||
llGetRootRotation
|
|
||||||
llGetRot
|
|
||||||
llGetSPMaxMemory
|
|
||||||
llGetScale
|
|
||||||
llGetScriptName
|
|
||||||
llGetScriptState
|
|
||||||
llGetSimStats
|
|
||||||
# 10 second delay (?!) so excluded
|
|
||||||
#llGetSimulatorHostname
|
|
||||||
llGetStartParameter
|
|
||||||
# No info on this function, we conservatively remove it
|
|
||||||
#llGetStaticPath
|
|
||||||
llGetStatus
|
|
||||||
llGetSubString
|
|
||||||
llGetSunDirection
|
|
||||||
llGetTexture
|
|
||||||
llGetTextureOffset
|
|
||||||
llGetTextureRot
|
|
||||||
llGetTextureScale
|
|
||||||
llGetTime
|
|
||||||
llGetTimeOfDay
|
|
||||||
llGetTimestamp
|
|
||||||
llGetTorque
|
|
||||||
llGetUnixTime
|
|
||||||
llGetUsedMemory
|
|
||||||
llGetUsername
|
|
||||||
llGetVel
|
|
||||||
llGetWallclock
|
|
||||||
llGround
|
|
||||||
llGroundContour
|
|
||||||
llGroundNormal
|
|
||||||
llGroundSlope
|
|
||||||
llInsertString
|
|
||||||
llIntegerToBase64
|
|
||||||
llJson2List
|
|
||||||
llJsonGetValue
|
|
||||||
llJsonSetValue
|
|
||||||
llJsonValueType
|
|
||||||
llKey2Name
|
|
||||||
llList2CSV
|
|
||||||
llList2Float
|
|
||||||
llList2Integer
|
|
||||||
llList2Json
|
|
||||||
llList2Key
|
|
||||||
llList2List
|
|
||||||
llList2ListStrided
|
|
||||||
llList2Rot
|
|
||||||
llList2String
|
|
||||||
llList2Vector
|
|
||||||
llListFindList
|
|
||||||
llListInsertList
|
|
||||||
llListRandomize
|
|
||||||
llListReplaceList
|
|
||||||
llListSort
|
|
||||||
llListStatistics
|
|
||||||
llLog
|
|
||||||
llLog10
|
|
||||||
llMD5String
|
|
||||||
# 1 second delay so excluded
|
|
||||||
#llModPow
|
|
||||||
llOverMyLand
|
|
||||||
llParseString2List
|
|
||||||
llParseStringKeepNulls
|
|
||||||
llPointAt
|
|
||||||
llPow
|
|
||||||
llRot2Angle
|
|
||||||
llRot2Axis
|
|
||||||
llRot2Euler
|
|
||||||
llRot2Fwd
|
|
||||||
llRot2Left
|
|
||||||
llRot2Up
|
|
||||||
llRotBetween
|
|
||||||
llRound
|
|
||||||
llSHA1String
|
|
||||||
llSameGroup
|
|
||||||
llScriptDanger
|
|
||||||
llSin
|
|
||||||
llSqrt
|
|
||||||
llStringLength
|
|
||||||
llStringToBase64
|
|
||||||
llStringTrim
|
|
||||||
llSubStringIndex
|
|
||||||
llTakeCamera
|
|
||||||
llTan
|
|
||||||
llToLower
|
|
||||||
llToUpper
|
|
||||||
llUnescapeURL
|
|
||||||
llVecDist
|
|
||||||
llVecMag
|
|
||||||
llVecNorm
|
|
||||||
llWater
|
|
||||||
llWind
|
|
||||||
llXorBase64
|
|
||||||
# Forced delay so excluded
|
|
||||||
#llXorBase64Strings
|
|
||||||
llXorBase64StringsCorrect
|
|
Loading…
Add table
Add a link
Reference in a new issue