Skip to content

Instantly share code, notes, and snippets.

@michaelficarra
Created August 11, 2010 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelficarra/519138 to your computer and use it in GitHub Desktop.
Save michaelficarra/519138 to your computer and use it in GitHub Desktop.
Function.TRACE_ALL = Function.TRACE_NONE = 0
constants = [
'TRACE_ARGUMENTS'
'TRACE_CONTEXT'
'TRACE_RETURN'
'TRACE_TIME'
'TRACE_STACK'
]
for constant, n in constants
# calculate powers of two to assign to the constants. this allows
# any combination of constants to be defined as a single value
Function.TRACE_ALL |= Function[constant] = 1 << n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment