# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/obj-armv7l-unknown-linux-gnueabi/js/src//" # 1 "" #define __STDC__ 1 #define __cplusplus 1 #define __STDC_HOSTED__ 1 #define __GNUC__ 4 #define __GNUC_MINOR__ 5 #define __GNUC_PATCHLEVEL__ 4 #define __GNUG__ 4 #define __SIZE_TYPE__ unsigned int #define __PTRDIFF_TYPE__ int #define __WCHAR_TYPE__ unsigned int #define __WINT_TYPE__ unsigned int #define __INTMAX_TYPE__ long long int #define __UINTMAX_TYPE__ long long unsigned int #define __CHAR16_TYPE__ short unsigned int #define __CHAR32_TYPE__ unsigned int #define __SIG_ATOMIC_TYPE__ int #define __INT8_TYPE__ signed char #define __INT16_TYPE__ short int #define __INT32_TYPE__ int #define __INT64_TYPE__ long long int #define __UINT8_TYPE__ unsigned char #define __UINT16_TYPE__ short unsigned int #define __UINT32_TYPE__ unsigned int #define __UINT64_TYPE__ long long unsigned int #define __INT_LEAST8_TYPE__ signed char #define __INT_LEAST16_TYPE__ short int #define __INT_LEAST32_TYPE__ int #define __INT_LEAST64_TYPE__ long long int #define __UINT_LEAST8_TYPE__ unsigned char #define __UINT_LEAST16_TYPE__ short unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __UINT_LEAST64_TYPE__ long long unsigned int #define __INT_FAST8_TYPE__ signed char #define __INT_FAST16_TYPE__ int #define __INT_FAST32_TYPE__ int #define __INT_FAST64_TYPE__ long long int #define __UINT_FAST8_TYPE__ unsigned char #define __UINT_FAST16_TYPE__ unsigned int #define __UINT_FAST32_TYPE__ unsigned int #define __UINT_FAST64_TYPE__ long long unsigned int #define __INTPTR_TYPE__ int #define __UINTPTR_TYPE__ unsigned int #define __GXX_WEAK__ 1 #define __DEPRECATED 1 #define __EXCEPTIONS 1 #define __GXX_ABI_VERSION 1002 #define __SCHAR_MAX__ 127 #define __SHRT_MAX__ 32767 #define __INT_MAX__ 2147483647 #define __LONG_MAX__ 2147483647L #define __LONG_LONG_MAX__ 9223372036854775807LL #define __WCHAR_MAX__ 4294967295U #define __WCHAR_MIN__ 0U #define __WINT_MAX__ 4294967295U #define __WINT_MIN__ 0U #define __PTRDIFF_MAX__ 2147483647 #define __SIZE_MAX__ 4294967295U #define __CHAR_BIT__ 8 #define __INTMAX_MAX__ 9223372036854775807LL #define __INTMAX_C(c) c ## LL #define __UINTMAX_MAX__ 18446744073709551615ULL #define __UINTMAX_C(c) c ## ULL #define __SIG_ATOMIC_MAX__ 2147483647 #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) #define __INT8_MAX__ 127 #define __INT16_MAX__ 32767 #define __INT32_MAX__ 2147483647 #define __INT64_MAX__ 9223372036854775807LL #define __UINT8_MAX__ 255 #define __UINT16_MAX__ 65535 #define __UINT32_MAX__ 4294967295U #define __UINT64_MAX__ 18446744073709551615ULL #define __INT_LEAST8_MAX__ 127 #define __INT8_C(c) c #define __INT_LEAST16_MAX__ 32767 #define __INT16_C(c) c #define __INT_LEAST32_MAX__ 2147483647 #define __INT32_C(c) c #define __INT_LEAST64_MAX__ 9223372036854775807LL #define __INT64_C(c) c ## LL #define __UINT_LEAST8_MAX__ 255 #define __UINT8_C(c) c #define __UINT_LEAST16_MAX__ 65535 #define __UINT16_C(c) c #define __UINT_LEAST32_MAX__ 4294967295U #define __UINT32_C(c) c ## U #define __UINT_LEAST64_MAX__ 18446744073709551615ULL #define __UINT64_C(c) c ## ULL #define __INT_FAST8_MAX__ 127 #define __INT_FAST16_MAX__ 2147483647 #define __INT_FAST32_MAX__ 2147483647 #define __INT_FAST64_MAX__ 9223372036854775807LL #define __UINT_FAST8_MAX__ 255 #define __UINT_FAST16_MAX__ 4294967295U #define __UINT_FAST32_MAX__ 4294967295U #define __UINT_FAST64_MAX__ 18446744073709551615ULL #define __INTPTR_MAX__ 2147483647 #define __UINTPTR_MAX__ 4294967295U #define __FLT_EVAL_METHOD__ 0 #define __DEC_EVAL_METHOD__ 2 #define __FLT_RADIX__ 2 #define __FLT_MANT_DIG__ 24 #define __FLT_DIG__ 6 #define __FLT_MIN_EXP__ (-125) #define __FLT_MIN_10_EXP__ (-37) #define __FLT_MAX_EXP__ 128 #define __FLT_MAX_10_EXP__ 38 #define __FLT_MAX__ 3.4028234663852886e+38F #define __FLT_MIN__ 1.1754943508222875e-38F #define __FLT_EPSILON__ 1.1920928955078125e-7F #define __FLT_DENORM_MIN__ 1.4012984643248171e-45F #define __FLT_HAS_DENORM__ 1 #define __FLT_HAS_INFINITY__ 1 #define __FLT_HAS_QUIET_NAN__ 1 #define __DBL_MANT_DIG__ 53 #define __DBL_DIG__ 15 #define __DBL_MIN_EXP__ (-1021) #define __DBL_MIN_10_EXP__ (-307) #define __DBL_MAX_EXP__ 1024 #define __DBL_MAX_10_EXP__ 308 #define __DBL_MAX__ ((double)1.7976931348623157e+308L) #define __DBL_MIN__ ((double)2.2250738585072014e-308L) #define __DBL_EPSILON__ ((double)2.2204460492503131e-16L) #define __DBL_DENORM_MIN__ ((double)4.9406564584124654e-324L) #define __DBL_HAS_DENORM__ 1 #define __DBL_HAS_INFINITY__ 1 #define __DBL_HAS_QUIET_NAN__ 1 #define __LDBL_MANT_DIG__ 53 #define __LDBL_DIG__ 15 #define __LDBL_MIN_EXP__ (-1021) #define __LDBL_MIN_10_EXP__ (-307) #define __LDBL_MAX_EXP__ 1024 #define __LDBL_MAX_10_EXP__ 308 #define __DECIMAL_DIG__ 17 #define __LDBL_MAX__ 1.7976931348623157e+308L #define __LDBL_MIN__ 2.2250738585072014e-308L #define __LDBL_EPSILON__ 2.2204460492503131e-16L #define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L #define __LDBL_HAS_DENORM__ 1 #define __LDBL_HAS_INFINITY__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __DEC32_MANT_DIG__ 7 #define __DEC32_MIN_EXP__ (-94) #define __DEC32_MAX_EXP__ 97 #define __DEC32_MIN__ 1E-95DF #define __DEC32_MAX__ 9.999999E96DF #define __DEC32_EPSILON__ 1E-6DF #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF #define __DEC64_MANT_DIG__ 16 #define __DEC64_MIN_EXP__ (-382) #define __DEC64_MAX_EXP__ 385 #define __DEC64_MIN__ 1E-383DD #define __DEC64_MAX__ 9.999999999999999E384DD #define __DEC64_EPSILON__ 1E-15DD #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD #define __DEC128_MANT_DIG__ 34 #define __DEC128_MIN_EXP__ (-6142) #define __DEC128_MAX_EXP__ 6145 #define __DEC128_MIN__ 1E-6143DL #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL #define __DEC128_EPSILON__ 1E-33DL #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL #define __REGISTER_PREFIX__ #define __USER_LABEL_PREFIX__ #define __VERSION__ "4.5.4" #define __GNUC_GNU_INLINE__ 1 #define __OPTIMIZE__ 1 #define __FINITE_MATH_ONLY__ 0 #define __pic__ 2 #define __PIC__ 2 #define __CHAR_UNSIGNED__ 1 #define __WCHAR_UNSIGNED__ 1 #define __GCC_HAVE_DWARF2_CFI_ASM 1 #define __PRAGMA_REDEFINE_EXTNAME 1 #define __SIZEOF_INT__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_LONG_LONG__ 8 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_LONG_DOUBLE__ 8 #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WCHAR_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __SIZEOF_PTRDIFF_T__ 4 #define __SIZEOF_POINTER__ 4 #define __arm__ 1 #define __APCS_32__ 1 #define __ARMEL__ 1 #define __VFP_FP__ 1 #define __THUMB_INTERWORK__ 1 #define __ARM_ARCH_7A__ 1 #define __ARM_PCS_VFP 1 #define __ARM_EABI__ 1 #define __GXX_TYPEINFO_EQUALITY_INLINE 0 #define __gnu_linux__ 1 #define __linux 1 #define __linux__ 1 #define linux 1 #define __unix 1 #define __unix__ 1 #define unix 1 #define __ELF__ 1 #define __BIGGEST_ALIGNMENT__ 8 # 1 "" #define _GNU_SOURCE 1 #define _REENTRANT 1 #define MOZ_GLUE_IN_PROGRAM 1 #define EXPORT_JS_API 1 #define JS_HAS_CTYPES 1 #define DLL_PREFIX "lib" #define DLL_SUFFIX ".so" #define NO_NSPR_10_SUPPORT 1 #define NDEBUG 1 #define TRIMMED 1 #define USE_SYSTEM_MALLOC 1 #define ENABLE_ASSEMBLER 1 #define ENABLE_JIT 1 #define MOZILLA_CLIENT 1 #define _FORTIFY_SOURCE 2 # 1 "././js-confdefs.h" 1 #define _JS_CONFDEFS_H_ #define CPP_THROW_NEW throw() #define CROSS_COMPILE 1 #define D_INO d_ino #define EDITLINE 1 #define HAVE_ARM_NEON 1 #define HAVE_ARM_SIMD 1 #define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 #define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 #define HAVE_CPP_PARTIAL_SPECIALIZATION 1 #define HAVE_DIRENT_H 1 #define HAVE_DLADDR 1 #define HAVE_DLOPEN 1 #define HAVE_ENDIAN_H 1 #define HAVE_FCHMOD 1 #define HAVE_FLOCKFILE 1 #define HAVE_GETC_UNLOCKED 1 #define HAVE_GETOPT_H 1 #define HAVE_GETPAGESIZE 1 #define HAVE_GNU_GET_LIBC_VERSION 1 #define HAVE_GNU_LIBC_VERSION_H 1 #define HAVE_I18N_LC_MESSAGES 1 #define HAVE_ICONV 1 #define HAVE_LCHOWN 1 #define HAVE_LINUX_QUOTA_H 1 #define HAVE_LOCALECONV 1 #define HAVE_LOCALECONV 1 #define HAVE_LOCALTIME_R 1 #define HAVE_LSTAT64 1 #define HAVE_MALLOC_H 1 #define HAVE_MBRTOWC 1 #define HAVE_MEMALIGN 1 #define HAVE_MEMMOVE 1 #define HAVE_MEMORY_H 1 #define HAVE_MMINTRIN_H 1 #define HAVE_NL_TYPES_H 1 #define HAVE_POSIX_FALLOCATE 1 #define HAVE_POSIX_MEMALIGN 1 #define HAVE_RANDOM 1 #define HAVE_RES_NINIT 1 #define HAVE_SBRK 1 #define HAVE_SETLOCALE 1 #define HAVE_SIGINFO_T 1 #define HAVE_SNPRINTF 1 #define HAVE_SSIZE_T 1 #define HAVE_STAT64 1 #define HAVE_STATVFS 1 #define HAVE_STATVFS64 1 #define HAVE_STRERROR 1 #define HAVE_STRNDUP 1 #define HAVE_STRTOK_R 1 #define HAVE_ST_BLKSIZE 1 #define HAVE_SYS_BITYPES_H 1 #define HAVE_SYS_CDEFS_H 1 #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_QUOTA_H 1 #define HAVE_SYS_STATFS_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_VFS_H 1 #define HAVE_THREAD_TLS_KEYWORD 1 #define HAVE_TM_ZONE_TM_GMTOFF 1 #define HAVE_TRUNCATE64 1 #define HAVE_UINT 1 #define HAVE_UNAME_DOMAINNAME_FIELD 1 #define HAVE_UNISTD_H 1 #define HAVE_VALLOC 1 #define HAVE_VA_COPY 1 #define HAVE_VISIBILITY_ATTRIBUTE 1 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1 #define HAVE_WCRTOMB 1 #define HAVE_X11_XKBLIB_H 1 #define HAVE__UNWIND_BACKTRACE 1 #define HAVE___CXA_DEMANGLE 1 #define JSGC_INCREMENTAL 1 #define JS_ALIGN_OF_POINTER 4 #define JS_BITS_PER_WORD_LOG2 5 #define JS_BYTES_PER_DOUBLE 8 #define JS_BYTES_PER_WORD 4 #define JS_CPU_ARM 1 #define JS_DEFAULT_JITREPORT_GRANULARITY 3 #define JS_HAS_CTYPES 1 #define JS_HAS_XML_SUPPORT 1 #define JS_HAVE_ENDIAN_H 1 #define JS_METHODJIT 1 #define JS_MONOIC 1 #define JS_NUNBOX32 1 #define JS_POLYIC 1 #define JS_THREADSAFE 1 #define MALLOC_H #define MOZ_DEBUG_SYMBOLS 1 #define MOZ_DLL_SUFFIX ".so" #define MOZ_MEMORY 1 #define MOZ_MEMORY_LINUX 1 #define MOZ_MEMORY_SIZEOF_PTR_2POW 2 #define NEED_CPP_UNUSED_IMPLEMENTATIONS 1 #define NEW_H #define NS_ALWAYS_INLINE __attribute__((always_inline)) #define NS_ATTR_MALLOC __attribute__((malloc)) #define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define SIZEOF_INT_P 4 #define STATIC_EXPORTABLE_JS_API 1 #define STDC_HEADERS 1 #define UNIX_ASYNC_DNS 1 #define VA_COPY va_copy #define XP_UNIX 1 #define _REENTRANT 1 #define __STDC_LIMIT_MACROS # 1 "" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" # 1 "./../../dist/include/mozilla/Assertions.h" 1 # 11 "./../../dist/include/mozilla/Assertions.h" #define mozilla_Assertions_h_ # 1 "./../../dist/include/mozilla/Attributes.h" 1 # 11 "./../../dist/include/mozilla/Attributes.h" #define mozilla_Attributes_h_ # 25 "./../../dist/include/mozilla/Attributes.h" #define MOZ_INLINE inline # 46 "./../../dist/include/mozilla/Attributes.h" #define MOZ_ALWAYS_INLINE __attribute__((always_inline)) MOZ_INLINE # 106 "./../../dist/include/mozilla/Attributes.h" #define MOZ_HAVE_NEVER_INLINE __attribute__((noinline)) #define MOZ_HAVE_NORETURN __attribute__((noreturn)) # 125 "./../../dist/include/mozilla/Attributes.h" #define MOZ_NEVER_INLINE MOZ_HAVE_NEVER_INLINE # 145 "./../../dist/include/mozilla/Attributes.h" #define MOZ_NORETURN MOZ_HAVE_NORETURN # 159 "./../../dist/include/mozilla/Attributes.h" #define MOZ_ASAN_BLACKLIST # 190 "./../../dist/include/mozilla/Attributes.h" #define MOZ_DELETE # 231 "./../../dist/include/mozilla/Attributes.h" #define MOZ_OVERRIDE # 300 "./../../dist/include/mozilla/Attributes.h" #define MOZ_FINAL # 317 "./../../dist/include/mozilla/Attributes.h" #define MOZ_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) # 14 "./../../dist/include/mozilla/Assertions.h" 2 # 1 "./../../dist/include/mozilla/Types.h" 1 # 11 "./../../dist/include/mozilla/Types.h" #define mozilla_Types_h_ # 24 "./../../dist/include/mozilla/Types.h" # 1 "./../../dist/include/mozilla/StandardInteger.h" 1 # 11 "./../../dist/include/mozilla/StandardInteger.h" #define mozilla_StandardInteger_h_ # 42 "./../../dist/include/mozilla/StandardInteger.h" # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdint.h" 1 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 24 "/usr/include/stdint.h" 3 4 #define _STDINT_H 1 # 1 "/usr/include/features.h" 1 3 4 # 21 "/usr/include/features.h" 3 4 #define _FEATURES_H 1 # 98 "/usr/include/features.h" 3 4 #undef __USE_ISOC99 #undef __USE_ISOC95 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_XOPEN2KXSI #undef __USE_XOPEN2K8 #undef __USE_XOPEN2K8XSI #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_BSD #undef __USE_SVID #undef __USE_MISC #undef __USE_ATFILE #undef __USE_GNU #undef __USE_REENTRANT #undef __USE_FORTIFY_LEVEL #undef __FAVOR_BSD #undef __KERNEL_STRICT_NAMES #define __KERNEL_STRICT_NAMES #define __USE_ANSI 1 # 141 "/usr/include/features.h" 3 4 #define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # 157 "/usr/include/features.h" 3 4 #undef _ISOC95_SOURCE #define _ISOC95_SOURCE 1 #undef _ISOC99_SOURCE #define _ISOC99_SOURCE 1 #undef _POSIX_SOURCE #define _POSIX_SOURCE 1 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 700 #undef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED 1 #undef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE 1 #undef _BSD_SOURCE #define _BSD_SOURCE 1 #undef _SVID_SOURCE #define _SVID_SOURCE 1 #undef _ATFILE_SOURCE #define _ATFILE_SOURCE 1 # 194 "/usr/include/features.h" 3 4 #define __USE_ISOC99 1 #define __USE_ISOC95 1 # 221 "/usr/include/features.h" 3 4 #define __USE_POSIX 1 #define __USE_POSIX2 1 #define __USE_POSIX199309 1 #define __USE_POSIX199506 1 #define __USE_XOPEN2K 1 #undef __USE_ISOC95 #define __USE_ISOC95 1 #undef __USE_ISOC99 #define __USE_ISOC99 1 #define __USE_XOPEN2K8 1 #undef _ATFILE_SOURCE #define _ATFILE_SOURCE 1 #define __USE_XOPEN 1 #define __USE_XOPEN_EXTENDED 1 #define __USE_UNIX98 1 #undef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE 1 #define __USE_XOPEN2K8 1 #define __USE_XOPEN2K8XSI 1 #define __USE_XOPEN2K 1 #define __USE_XOPEN2KXSI 1 #undef __USE_ISOC95 #define __USE_ISOC95 1 #undef __USE_ISOC99 #define __USE_ISOC99 1 # 277 "/usr/include/features.h" 3 4 #define __USE_LARGEFILE 1 #define __USE_LARGEFILE64 1 #define __USE_MISC 1 #define __USE_BSD 1 #define __USE_SVID 1 #define __USE_ATFILE 1 #define __USE_GNU 1 #define __USE_REENTRANT 1 #define __USE_FORTIFY_LEVEL 2 # 324 "/usr/include/features.h" 3 4 #define __STDC_IEC_559__ 1 #define __STDC_IEC_559_COMPLEX__ 1 #define __STDC_ISO_10646__ 200009L #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 #define __GLIBC__ 2 #define __GLIBC_MINOR__ 15 #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define __GLIBC_HAVE_LONG_LONG 1 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 21 "/usr/include/sys/cdefs.h" 3 4 #define _SYS_CDEFS_H 1 # 36 "/usr/include/sys/cdefs.h" 3 4 #undef __P #undef __PMT # 47 "/usr/include/sys/cdefs.h" 3 4 #define __LEAF #define __LEAF_ATTR # 62 "/usr/include/sys/cdefs.h" 3 4 #define __THROW throw () #define __THROWNL throw () #define __NTH(fct) __LEAF_ATTR fct throw () # 88 "/usr/include/sys/cdefs.h" 3 4 #define __P(args) args #define __PMT(args) args #define __CONCAT(x,y) x ## y #define __STRING(x) #x #define __ptr_t void * #define __long_double_t long double #define __BEGIN_DECLS extern "C" { #define __END_DECLS } # 128 "/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_NAMESPACE_STD #define __END_NAMESPACE_STD #define __USING_NAMESPACE_STD(name) #define __BEGIN_NAMESPACE_C99 #define __END_NAMESPACE_C99 #define __USING_NAMESPACE_C99(name) #define __bounded #define __unbounded #define __ptrvalue #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) #define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) #define __warnattr(msg) __attribute__((__warning__ (msg))) #define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) # 164 "/usr/include/sys/cdefs.h" 3 4 #define __flexarr [] # 191 "/usr/include/sys/cdefs.h" 3 4 #define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) #define __REDIRECT_NTH(name,proto,alias) name proto __THROW __asm__ (__ASMNAME (#alias)) #define __REDIRECT_NTHNL(name,proto,alias) name proto __THROWNL __asm__ (__ASMNAME (#alias)) #define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) #define __ASMNAME2(prefix,cname) __STRING (prefix) cname # 225 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_malloc__ __attribute__ ((__malloc__)) # 234 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_pure__ __attribute__ ((__pure__)) #define __attribute_const__ __attribute__ ((__const__)) # 250 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_used__ __attribute__ ((__used__)) #define __attribute_noinline__ __attribute__ ((__noinline__)) #define __attribute_deprecated__ __attribute__ ((__deprecated__)) # 271 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) # 281 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) # 290 "/usr/include/sys/cdefs.h" 3 4 #define __nonnull(params) __attribute__ ((__nonnull__ params)) #define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) #define __wur __attribute_warn_unused_result__ # 312 "/usr/include/sys/cdefs.h" 3 4 #define __always_inline __inline __attribute__ ((__always_inline__)) # 321 "/usr/include/sys/cdefs.h" 3 4 #define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) #define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__, __artificial__)) # 343 "/usr/include/sys/cdefs.h" 3 4 #define __va_arg_pack() __builtin_va_arg_pack () #define __va_arg_pack_len() __builtin_va_arg_pack_len () # 367 "/usr/include/sys/cdefs.h" 3 4 #define __restrict_arr # 378 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 379 "/usr/include/sys/cdefs.h" 2 3 4 # 400 "/usr/include/sys/cdefs.h" 3 4 #define __LDBL_REDIR1(name,proto,alias) name proto #define __LDBL_REDIR(name,proto) name proto #define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW #define __LDBL_REDIR_NTH(name,proto) name proto __THROW #define __LDBL_REDIR_DECL(name) #define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) #define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) # 359 "/usr/include/features.h" 2 3 4 # 374 "/usr/include/features.h" 3 4 #define __USE_EXTERN_INLINES 1 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 10 "/usr/include/gnu/stubs.h" 3 4 #define __stub_chflags #define __stub_create_module #define __stub_fattach #define __stub_fchflags #define __stub_fdetach #define __stub_get_kernel_syms #define __stub_getcontext #define __stub_getmsg #define __stub_getpmsg #define __stub_gtty #define __stub_lchmod #define __stub_makecontext #define __stub_putmsg #define __stub_putpmsg #define __stub_query_module #define __stub_revoke #define __stub_setcontext #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk #define __stub_stty #define __stub_swapcontext # 383 "/usr/include/features.h" 2 3 4 # 27 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 21 "/usr/include/bits/wchar.h" 3 4 #define _BITS_WCHAR_H 1 #define __WCHAR_MIN (-2147483647 - 1) #define __WCHAR_MAX (2147483647) # 28 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 29 "/usr/include/stdint.h" 2 3 4 #define __int8_t_defined typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; __extension__ typedef long long int int64_t; typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; #define __uint32_t_defined __extension__ typedef unsigned long long int uint64_t; typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; __extension__ typedef long long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; __extension__ typedef unsigned long long int uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; # 126 "/usr/include/stdint.h" 3 4 typedef int intptr_t; #define __intptr_t_defined typedef unsigned int uintptr_t; # 138 "/usr/include/stdint.h" 3 4 __extension__ typedef long long int intmax_t; __extension__ typedef unsigned long long int uintmax_t; # 153 "/usr/include/stdint.h" 3 4 #define __INT64_C(c) c ## LL #define __UINT64_C(c) c ## ULL #define INT8_MIN (-128) #define INT16_MIN (-32767-1) #define INT32_MIN (-2147483647-1) #define INT64_MIN (-__INT64_C(9223372036854775807)-1) #define INT8_MAX (127) #define INT16_MAX (32767) #define INT32_MAX (2147483647) #define INT64_MAX (__INT64_C(9223372036854775807)) #define UINT8_MAX (255) #define UINT16_MAX (65535) #define UINT32_MAX (4294967295U) #define UINT64_MAX (__UINT64_C(18446744073709551615)) #define INT_LEAST8_MIN (-128) #define INT_LEAST16_MIN (-32767-1) #define INT_LEAST32_MIN (-2147483647-1) #define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) #define INT_LEAST8_MAX (127) #define INT_LEAST16_MAX (32767) #define INT_LEAST32_MAX (2147483647) #define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) #define UINT_LEAST8_MAX (255) #define UINT_LEAST16_MAX (65535) #define UINT_LEAST32_MAX (4294967295U) #define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) #define INT_FAST8_MIN (-128) #define INT_FAST16_MIN (-2147483647-1) #define INT_FAST32_MIN (-2147483647-1) #define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) #define INT_FAST8_MAX (127) #define INT_FAST16_MAX (2147483647) #define INT_FAST32_MAX (2147483647) #define INT_FAST64_MAX (__INT64_C(9223372036854775807)) #define UINT_FAST8_MAX (255) #define UINT_FAST16_MAX (4294967295U) #define UINT_FAST32_MAX (4294967295U) #define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) # 234 "/usr/include/stdint.h" 3 4 #define INTPTR_MIN (-2147483647-1) #define INTPTR_MAX (2147483647) #define UINTPTR_MAX (4294967295U) #define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) #define INTMAX_MAX (__INT64_C(9223372036854775807)) #define UINTMAX_MAX (__UINT64_C(18446744073709551615)) # 256 "/usr/include/stdint.h" 3 4 #define PTRDIFF_MIN (-2147483647-1) #define PTRDIFF_MAX (2147483647) #define SIG_ATOMIC_MIN (-2147483647-1) #define SIG_ATOMIC_MAX (2147483647) #define SIZE_MAX (4294967295U) #define WCHAR_MIN __WCHAR_MIN #define WCHAR_MAX __WCHAR_MAX #define WINT_MIN (0u) #define WINT_MAX (4294967295u) # 4 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdint.h" 2 3 4 #define _GCC_WRAP_STDINT_H # 43 "./../../dist/include/mozilla/StandardInteger.h" 2 # 25 "./../../dist/include/mozilla/Types.h" 2 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #define _STDDEF_H #define _STDDEF_H_ #define _ANSI_STDDEF_H #define __STDDEF_H__ # 138 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #define _PTRDIFF_T #define _T_PTRDIFF_ #define _T_PTRDIFF #define __PTRDIFF_T #define _PTRDIFF_T_ #define _BSD_PTRDIFF_T_ #define ___int_ptrdiff_t_h #define _GCC_PTRDIFF_T typedef int ptrdiff_t; # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 186 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #define __size_t__ #define __SIZE_T__ #define _SIZE_T #define _SYS_SIZE_T_H #define _T_SIZE_ #define _T_SIZE #define __SIZE_T #define _SIZE_T_ #define _BSD_SIZE_T_ #define _SIZE_T_DEFINED_ #define _SIZE_T_DEFINED #define _BSD_SIZE_T_DEFINED_ #define _SIZE_T_DECLARED #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ #define __size_t typedef unsigned int size_t; # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 262 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #define __wchar_t__ #define __WCHAR_T__ #define _WCHAR_T #define _T_WCHAR_ #define _T_WCHAR #define __WCHAR_T #define _WCHAR_T_ #define _BSD_WCHAR_T_ #define _WCHAR_T_DEFINED_ #define _WCHAR_T_DEFINED #define _WCHAR_T_H #define ___int_wchar_t_h #define __INT_WCHAR_T_H #define _GCC_WCHAR_T #define _WCHAR_T_DECLARED # 289 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef _BSD_WCHAR_T_ # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 28 "./../../dist/include/mozilla/Types.h" 2 # 54 "./../../dist/include/mozilla/Types.h" #define MOZ_EXTERNAL_VIS __attribute__((visibility("default"))) #define MOZ_EXPORT_API(type) MOZ_EXTERNAL_VIS type #define MOZ_EXPORT_DATA(type) MOZ_EXTERNAL_VIS type # 80 "./../../dist/include/mozilla/Types.h" #define MOZ_IMPORT_API(x) MOZ_EXPORT_API(x) #define MOZ_IMPORT_DATA(x) MOZ_EXPORT_DATA(x) # 105 "./../../dist/include/mozilla/Types.h" #define MFBT_API(type) __attribute__((weak)) MOZ_IMPORT_API(type) #define MFBT_DATA(type) __attribute__((weak)) MOZ_IMPORT_DATA(type) # 131 "./../../dist/include/mozilla/Types.h" #define MOZ_BEGIN_EXTERN_C extern "C" { #define MOZ_END_EXTERN_C } # 15 "./../../dist/include/mozilla/Assertions.h" 2 # 1 "/usr/include/stdio.h" 1 3 4 # 27 "/usr/include/stdio.h" 3 4 #define _STDIO_H 1 extern "C" { #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 35 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 25 "/usr/include/bits/types.h" 3 4 #define _BITS_TYPES_H 1 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 29 "/usr/include/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; # 99 "/usr/include/bits/types.h" 3 4 #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #define __SQUAD_TYPE __quad_t #define __UQUAD_TYPE __u_quad_t #define __SWORD_TYPE int #define __UWORD_TYPE unsigned int #define __SLONG32_TYPE long int #define __ULONG32_TYPE unsigned long int #define __S64_TYPE __quad_t #define __U64_TYPE __u_quad_t #define __STD_TYPE __extension__ typedef # 131 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 25 "/usr/include/bits/typesizes.h" 3 4 #define _BITS_TYPESIZES_H 1 #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __ULONGWORD_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __UWORD_TYPE #define __OFF_T_TYPE __SLONGWORD_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __ULONGWORD_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SLONGWORD_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __SWBLK_T_TYPE __SLONGWORD_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __FD_SETSIZE 1024 # 132 "/usr/include/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; #undef __STD_TYPE # 37 "/usr/include/stdio.h" 2 3 4 #define __need_FILE #define __need___FILE struct _IO_FILE; typedef struct _IO_FILE FILE; #define __FILE_defined 1 #undef __need_FILE typedef struct _IO_FILE __FILE; #define ____FILE_defined 1 #undef __need___FILE #define _STDIO_USES_IOSTREAM # 1 "/usr/include/libio.h" 1 3 4 # 30 "/usr/include/libio.h" 3 4 #define _IO_STDIO_H # 1 "/usr/include/_G_config.h" 1 3 4 #define _G_config_h 1 #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 16 "/usr/include/_G_config.h" 2 3 4 #define __need_mbstate_t # 1 "/usr/include/wchar.h" 1 3 4 # 81 "/usr/include/wchar.h" 3 4 #define __mbstate_t_defined 1 typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; #undef __need_mbstate_t # 896 "/usr/include/wchar.h" 3 4 #undef __need_mbstate_t #undef __need_wint_t # 21 "/usr/include/_G_config.h" 2 3 4 #define _G_size_t size_t typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; #define _G_ssize_t __ssize_t #define _G_off_t __off_t #define _G_off64_t __off64_t #define _G_pid_t __pid_t #define _G_uid_t __uid_t #define _G_wchar_t wchar_t #define _G_wint_t wint_t #define _G_stat64 stat64 # 53 "/usr/include/_G_config.h" 3 4 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); #define _G_HAVE_BOOL 1 #define _G_HAVE_ATEXIT 1 #define _G_HAVE_SYS_CDEFS 1 #define _G_HAVE_SYS_WAIT 1 #define _G_NEED_STDARG_H 1 #define _G_va_list __gnuc_va_list #define _G_HAVE_PRINTF_FP 1 #define _G_HAVE_MMAP 1 #define _G_HAVE_MREMAP 1 #define _G_HAVE_LONG_DOUBLE_IO 1 #define _G_HAVE_IO_FILE_OPEN 1 #define _G_HAVE_IO_GETLINE_INFO 1 #define _G_IO_IO_FILE_VERSION 0x20001 #define _G_OPEN64 __open64 #define _G_LSEEK64 __lseek64 #define _G_MMAP64 __mmap64 #define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) #define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) #define _G_BUFSIZ 8192 #define _G_NAMES_HAVE_UNDERSCORE 0 #define _G_VTABLE_LABEL_HAS_LENGTH 1 #define _G_USING_THUNKS 1 #define _G_VTABLE_LABEL_PREFIX "__vt_" #define _G_VTABLE_LABEL_PREFIX_ID __vt_ #define _G_ARGS(ARGLIST) ARGLIST # 33 "/usr/include/libio.h" 2 3 4 #define _IO_pos_t _G_fpos_t #define _IO_fpos_t _G_fpos_t #define _IO_fpos64_t _G_fpos64_t #define _IO_size_t _G_size_t #define _IO_ssize_t _G_ssize_t #define _IO_off_t _G_off_t #define _IO_off64_t _G_off64_t #define _IO_pid_t _G_pid_t #define _IO_uid_t _G_uid_t #define _IO_iconv_t _G_iconv_t #define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT #define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE #define _IO_BUFSIZ _G_BUFSIZ #define _IO_va_list _G_va_list #define _IO_wint_t _G_wint_t #define __need___va_list # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 1 3 4 # 34 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 #undef __need___va_list #define __GNUC_VA_LIST typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 #undef _IO_va_list #define _IO_va_list __gnuc_va_list # 76 "/usr/include/libio.h" 3 4 #define _PARAMS(protos) __P(protos) #define _IO_UNIFIED_JUMPTABLES 1 #define EOF (-1) # 105 "/usr/include/libio.h" 3 4 #define _IOS_INPUT 1 #define _IOS_OUTPUT 2 #define _IOS_ATEND 4 #define _IOS_APPEND 8 #define _IOS_TRUNC 16 #define _IOS_NOCREATE 32 #define _IOS_NOREPLACE 64 #define _IOS_BIN 128 #define _IO_MAGIC 0xFBAD0000 #define _OLD_STDIO_MAGIC 0xFABC0000 #define _IO_MAGIC_MASK 0xFFFF0000 #define _IO_USER_BUF 1 #define _IO_UNBUFFERED 2 #define _IO_NO_READS 4 #define _IO_NO_WRITES 8 #define _IO_EOF_SEEN 0x10 #define _IO_ERR_SEEN 0x20 #define _IO_DELETE_DONT_CLOSE 0x40 #define _IO_LINKED 0x80 #define _IO_IN_BACKUP 0x100 #define _IO_LINE_BUF 0x200 #define _IO_TIED_PUT_GET 0x400 #define _IO_CURRENTLY_PUTTING 0x800 #define _IO_IS_APPENDING 0x1000 #define _IO_IS_FILEBUF 0x2000 #define _IO_BAD_SEEN 0x4000 #define _IO_USER_LOCK 0x8000 #define _IO_FLAGS2_MMAP 1 #define _IO_FLAGS2_NOTCANCEL 2 #define _IO_FLAGS2_USER_WBUF 8 #define _IO_SKIPWS 01 #define _IO_LEFT 02 #define _IO_RIGHT 04 #define _IO_INTERNAL 010 #define _IO_DEC 020 #define _IO_OCT 040 #define _IO_HEX 0100 #define _IO_SHOWBASE 0200 #define _IO_SHOWPOINT 0400 #define _IO_UPPERCASE 01000 #define _IO_SHOWPOS 02000 #define _IO_SCIENTIFIC 04000 #define _IO_FIXED 010000 #define _IO_UNITBUF 020000 #define _IO_STDIO 040000 #define _IO_DONT_CLOSE 0100000 #define _IO_BOOLALPHA 0200000 struct _IO_jump_t; struct _IO_FILE; # 182 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 205 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 273 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; #define _IO_file_flags _flags char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; #define __HAVE_COLUMN unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 321 "/usr/include/libio.h" 3 4 __off64_t _offset; # 330 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; #define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) #define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) #define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) # 366 "/usr/include/libio.h" 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern "C" { extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); #define _IO_BE(expr,res) __builtin_expect ((expr), res) #define _IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define _IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr) #define _IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) # 459 "/usr/include/libio.h" 3 4 #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp); #define _IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); # 484 "/usr/include/libio.h" 3 4 #define _IO_peekc(_fp) _IO_peekc_unlocked (_fp) #define _IO_flockfile(_fp) #define _IO_funlockfile(_fp) #define _IO_ftrylockfile(_fp) #define _IO_cleanup_region_start(_fct,_fp) #define _IO_cleanup_region_end(_Doit) extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) throw (); # 554 "/usr/include/libio.h" 3 4 } # 76 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; #define _VA_LIST_DEFINED # 91 "/usr/include/stdio.h" 3 4 typedef __off_t off_t; #define __off_t_defined typedef __off64_t off64_t; #define __off64_t_defined typedef __ssize_t ssize_t; #define __ssize_t_defined typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_t; #define _IOFBF 0 #define _IOLBF 1 #define _IONBF 2 #define BUFSIZ _IO_BUFSIZ # 141 "/usr/include/stdio.h" 3 4 #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define SEEK_DATA 3 #define SEEK_HOLE 4 #define P_tmpdir "/tmp" # 165 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 24 "/usr/include/bits/stdio_lim.h" 3 4 #define L_tmpnam 20 #define TMP_MAX 238328 #define FILENAME_MAX 4096 #define L_ctermid 9 #define L_cuserid 9 #undef FOPEN_MAX #define FOPEN_MAX 16 # 166 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; #define stdin stdin #define stdout stdout #define stderr stderr extern int remove (__const char *__filename) throw (); extern int rename (__const char *__old, __const char *__new) throw (); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) throw (); extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); # 206 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); # 228 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 253 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 263 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); # 296 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); # 418 "/usr/include/stdio.h" 3 4 extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) throw (); # 469 "/usr/include/stdio.h" 3 4 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); # 528 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); #define getc(_fp) _IO_getc (_fp) extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 567 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); #define putc(_ch,_fp) _IO_putc (_ch, _fp) # 600 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); # 646 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); # 662 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); # 723 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 734 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); extern void rewind (FILE *__stream); # 770 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); # 789 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); # 812 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); extern void perror (__const char *__s); # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 # 27 "/usr/include/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern __const char *__const sys_errlist[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; # 851 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); # 870 "/usr/include/stdio.h" 3 4 extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); extern int pclose (FILE *__stream); extern char *ctermid (char *__s) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); extern void funlockfile (FILE *__stream) throw (); # 931 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 # 27 "/usr/include/bits/stdio.h" 3 4 #define __STDIO_INLINE __extern_inline # 44 "/usr/include/bits/stdio.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int getchar (void) { return _IO_getc (stdin); } extern __inline __attribute__ ((__gnu_inline__)) int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline __attribute__ ((__gnu_inline__)) int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline __attribute__ ((__gnu_inline__)) int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x10) != 0); } extern __inline __attribute__ ((__gnu_inline__)) int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x20) != 0); } # 191 "/usr/include/bits/stdio.h" 3 4 #undef __STDIO_INLINE # 932 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/bits/stdio2.h" 1 3 4 # 24 "/usr/include/bits/stdio2.h" 3 4 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, ...) throw (); extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) throw (); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () { return __builtin___sprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () { return __builtin___vsprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __ap); } extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, ...) throw (); extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) throw (); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () { return __builtin___snprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () { return __builtin___vsnprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __ap); } extern int __fprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, ...); extern int __printf_chk (int __flag, __const char *__restrict __format, ...); extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, __gnuc_va_list __ap); extern int __vprintf_chk (int __flag, __const char *__restrict __format, __gnuc_va_list __ap); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) { return __fprintf_chk (__stream, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int printf (__const char *__restrict __fmt, ...) { return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vfprintf (FILE *__restrict __stream, __const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); } extern int __asprintf_chk (char **__restrict __ptr, int __flag, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); extern int __vasprintf_chk (char **__restrict __ptr, int __flag, __const char *__restrict __fmt, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __vdprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 3, 0))); extern int __obstack_printf_chk (struct obstack *__restrict __obstack, int __flag, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, int __flag, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () { return __asprintf_chk (__ptr, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () { return __asprintf_chk (__ptr, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int dprintf (int __fd, __const char *__restrict __fmt, ...) { return __dprintf_chk (__fd, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () { return __obstack_printf_chk (__obstack, 2 - 1, __fmt, __builtin_va_arg_pack ()); } # 195 "/usr/include/bits/stdio2.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () { return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) { return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () { return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, __ap); } extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); extern char *__gets_warn (char *__str) __asm__ ("" "gets") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * gets (char *__str) { if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); return __gets_warn (__str); } extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__)); extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n) || __n <= 0) return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); } return __fgets_alias (__s, __n, __stream); } extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__)); extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { if (__builtin_object_size (__ptr, 0) != (size_t) -1) { if (!__builtin_constant_p (__size) || !__builtin_constant_p (__n) || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); if (__size * __n > __builtin_object_size (__ptr, 0)) return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); } return __fread_alias (__ptr, __size, __n, __stream); } extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") __attribute__ ((__warn_unused_result__)); extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n) || __n <= 0) return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); } return __fgets_unlocked_alias (__s, __n, __stream); } #undef fread_unlocked extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { if (__builtin_object_size (__ptr, 0) != (size_t) -1) { if (!__builtin_constant_p (__size) || !__builtin_constant_p (__n) || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); if (__size * __n > __builtin_object_size (__ptr, 0)) return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); } if (__builtin_constant_p (__size) && __builtin_constant_p (__n) && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) && __size * __n <= 8) { size_t __cnt = __size * __n; char *__cptr = (char *) __ptr; if (__cnt == 0) return 0; for (; __cnt > 0; --__cnt) { int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); if (__c == (-1)) break; *__cptr++ = __c; } return (__cptr - (char *) __ptr) / __size; } return __fread_unlocked_alias (__ptr, __size, __n, __stream); } # 935 "/usr/include/stdio.h" 2 3 4 } # 17 "./../../dist/include/mozilla/Assertions.h" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 28 "/usr/include/stdlib.h" 3 4 #define __need_size_t #define __need_wchar_t #define __need_NULL # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { #define _STDLIB_H 1 # 1 "/usr/include/bits/waitflags.h" 1 3 4 # 26 "/usr/include/bits/waitflags.h" 3 4 #define WNOHANG 1 #define WUNTRACED 2 #define WSTOPPED 2 #define WEXITED 4 #define WCONTINUED 8 #define WNOWAIT 0x01000000 #define __WNOTHREAD 0x20000000 #define __WALL 0x40000000 #define __WCLONE 0x80000000 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 # 29 "/usr/include/bits/waitstatus.h" 3 4 #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) #define __WTERMSIG(status) ((status) & 0x7f) #define __WSTOPSIG(status) __WEXITSTATUS(status) #define __WIFEXITED(status) (__WTERMSIG(status) == 0) #define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) #define __WIFCONTINUED(status) ((status) == __W_CONTINUED) #define __WCOREDUMP(status) ((status) & __WCOREFLAG) #define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 # 1 "/usr/include/endian.h" 1 3 4 # 20 "/usr/include/endian.h" 3 4 #define _ENDIAN_H 1 # 32 "/usr/include/endian.h" 3 4 #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 # 1 "/usr/include/bits/endian.h" 1 3 4 # 9 "/usr/include/bits/endian.h" 3 4 #define __BYTE_ORDER __LITTLE_ENDIAN #define __FLOAT_WORD_ORDER __BYTE_ORDER # 38 "/usr/include/endian.h" 2 3 4 # 46 "/usr/include/endian.h" 3 4 #define LITTLE_ENDIAN __LITTLE_ENDIAN #define BIG_ENDIAN __BIG_ENDIAN #define PDP_ENDIAN __PDP_ENDIAN #define BYTE_ORDER __BYTE_ORDER #define __LONG_LONG_PAIR(HI,LO) LO, HI # 1 "/usr/include/bits/byteswap.h" 1 3 4 # 26 "/usr/include/bits/byteswap.h" 3 4 #define _BITS_BYTESWAP_H 1 #define __bswap_constant_16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) #define __bswap_16(x) (__extension__ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); })) # 45 "/usr/include/bits/byteswap.h" 3 4 #define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) #define __bswap_32(x) (__extension__ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); })) # 63 "/usr/include/bits/byteswap.h" 3 4 #define __bswap_constant_64(x) (__extension__ ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))) # 73 "/usr/include/bits/byteswap.h" 3 4 #define __bswap_64(x) (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = __bswap_constant_64 (x); else { __w.__ll = (x); __r.__l[0] = __bswap_32 (__w.__l[1]); __r.__l[1] = __bswap_32 (__w.__l[0]); } __r.__ll; })) # 62 "/usr/include/endian.h" 2 3 4 #define htobe16(x) __bswap_16 (x) #define htole16(x) (x) #define be16toh(x) __bswap_16 (x) #define le16toh(x) (x) #define htobe32(x) __bswap_32 (x) #define htole32(x) (x) #define be32toh(x) __bswap_32 (x) #define le32toh(x) (x) #define htobe64(x) __bswap_64 (x) #define htole64(x) (x) #define be64toh(x) __bswap_64 (x) #define le64toh(x) (x) # 66 "/usr/include/bits/waitstatus.h" 2 3 4 union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; #define w_termsig __wait_terminated.__w_termsig #define w_coredump __wait_terminated.__w_coredump #define w_retcode __wait_terminated.__w_retcode #define w_stopsig __wait_stopped.__w_stopsig #define w_stopval __wait_stopped.__w_stopval # 44 "/usr/include/stdlib.h" 2 3 4 # 55 "/usr/include/stdlib.h" 3 4 #define __WAIT_INT(status) (*(int *) &(status)) # 64 "/usr/include/stdlib.h" 3 4 #define __WAIT_STATUS void * #define __WAIT_STATUS_DEFN void * # 85 "/usr/include/stdlib.h" 3 4 #define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status)) #define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status)) #define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status)) #define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) #define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status)) #define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status)) #define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status)) typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; #define __ldiv_t_defined 1 __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; #define __lldiv_t_defined 1 #define RAND_MAX 2147483647 #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 236 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/xlocale.h" 1 3 4 # 22 "/usr/include/xlocale.h" 3 4 #define _XLOCALE_H 1 typedef struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; typedef __locale_t locale_t; # 237 "/usr/include/stdlib.h" 2 3 4 extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__gnu_inline__)) double atof (__const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } extern __inline __attribute__ ((__gnu_inline__)) int atoi (__const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline __attribute__ ((__gnu_inline__)) long int atol (__const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int atoll (__const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } # 311 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1 "/usr/include/sys/types.h" 1 3 4 # 24 "/usr/include/sys/types.h" 3 4 #define _SYS_TYPES_H 1 extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; #define __u_char_defined typedef __loff_t loff_t; typedef __ino_t ino_t; #define __ino_t_defined typedef __ino64_t ino64_t; #define __ino64_t_defined typedef __dev_t dev_t; #define __dev_t_defined typedef __gid_t gid_t; #define __gid_t_defined typedef __mode_t mode_t; #define __mode_t_defined typedef __nlink_t nlink_t; #define __nlink_t_defined typedef __uid_t uid_t; #define __uid_t_defined # 99 "/usr/include/sys/types.h" 3 4 typedef __pid_t pid_t; #define __pid_t_defined typedef __id_t id_t; #define __id_t_defined # 116 "/usr/include/sys/types.h" 3 4 typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; #define __daddr_t_defined typedef __key_t key_t; #define __key_t_defined #define __need_clock_t #define __need_time_t #define __need_timer_t #define __need_clockid_t # 1 "/usr/include/time.h" 1 3 4 # 54 "/usr/include/time.h" 3 4 #define __clock_t_defined 1 typedef __clock_t clock_t; #undef __need_clock_t #define __time_t_defined 1 typedef __time_t time_t; #undef __need_time_t #define __clockid_t_defined 1 typedef __clockid_t clockid_t; #undef __clockid_time_t #define __timer_t_defined 1 typedef __timer_t timer_t; #undef __need_timer_t # 127 "/usr/include/time.h" 3 4 #undef __need_timespec # 134 "/usr/include/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; #define __useconds_t_defined typedef __suseconds_t suseconds_t; #define __suseconds_t_defined #define __need_size_t # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 188 "/usr/include/sys/types.h" 3 4 #define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE))) #define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE))) # 201 "/usr/include/sys/types.h" 3 4 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); #define __BIT_TYPES_DEFINED__ 1 # 1 "/usr/include/sys/select.h" 1 3 4 # 23 "/usr/include/sys/select.h" 3 4 #define _SYS_SELECT_H 1 # 1 "/usr/include/bits/select.h" 1 3 4 # 26 "/usr/include/bits/select.h" 3 4 #define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0) #define __FD_SET(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) #define __FD_CLR(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) #define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 22 "/usr/include/bits/sigset.h" 3 4 #define _SIGSET_H_types 1 typedef int __sig_atomic_t; #define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 #define __sigset_t_defined typedef __sigset_t sigset_t; #define __need_time_t #define __need_timespec # 1 "/usr/include/time.h" 1 3 4 # 67 "/usr/include/time.h" 3 4 #undef __need_clock_t # 83 "/usr/include/time.h" 3 4 #undef __need_time_t # 95 "/usr/include/time.h" 3 4 #undef __clockid_time_t # 107 "/usr/include/time.h" 3 4 #undef __need_timer_t #define __timespec_defined 1 struct timespec { __time_t tv_sec; long int tv_nsec; }; #undef __need_timespec # 45 "/usr/include/sys/select.h" 2 3 4 #define __need_timeval # 1 "/usr/include/bits/time.h" 1 3 4 # 26 "/usr/include/bits/time.h" 3 4 #define _STRUCT_TIMEVAL 1 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 99 "/usr/include/bits/time.h" 3 4 #undef __need_timeval # 47 "/usr/include/sys/select.h" 2 3 4 # 55 "/usr/include/sys/select.h" 3 4 typedef long int __fd_mask; #undef __NFDBITS #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) #define __FD_MASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; #define __FDS_BITS(set) ((set)->fds_bits) } fd_set; #define FD_SETSIZE __FD_SETSIZE typedef __fd_mask fd_mask; #define NFDBITS __NFDBITS #define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) extern "C" { # 107 "/usr/include/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 119 "/usr/include/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); # 1 "/usr/include/bits/select2.h" 1 3 4 # 25 "/usr/include/bits/select2.h" 3 4 extern long int __fdelt_chk (long int __d); extern long int __fdelt_warn (long int __d) __attribute__((__warning__ ("bit outside of fd_set selected"))); #undef __FD_ELT #define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); }) # 130 "/usr/include/sys/select.h" 2 3 4 } # 221 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 22 "/usr/include/sys/sysmacros.h" 3 4 #define _SYS_SYSMACROS_H 1 extern "C" { __extension__ extern unsigned int gnu_dev_major (unsigned long long int __dev) throw () __attribute__ ((__const__)); __extension__ extern unsigned int gnu_dev_minor (unsigned long long int __dev) throw () __attribute__ ((__const__)); __extension__ extern unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () __attribute__ ((__const__)); __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } } #define major(dev) gnu_dev_major (dev) #define minor(dev) gnu_dev_minor (dev) #define makedev(maj,min) gnu_dev_makedev (maj, min) # 224 "/usr/include/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; #define __blksize_t_defined typedef __blkcnt_t blkcnt_t; #define __blkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; #define __fsblkcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; #define __fsfilcnt_t_defined # 263 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 20 "/usr/include/bits/pthreadtypes.h" 3 4 #define _BITS_PTHREADTYPES_H 1 #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_MUTEX_T 24 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_COND_COMPAT_T 12 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCK_T 32 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIER_T 20 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; # 141 "/usr/include/bits/pthreadtypes.h" 3 4 unsigned char __flags; unsigned char __shared; unsigned char __pad1; unsigned char __pad2; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 272 "/usr/include/sys/types.h" 2 3 4 } # 321 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); #define __malloc_and_calloc_defined extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 20 "/usr/include/alloca.h" 3 4 #define _ALLOCA_H 1 #define __need_size_t # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { #undef alloca extern void *alloca (size_t __size) throw (); #define alloca(size) __builtin_alloca (size) } # 498 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern "C++" int at_quick_exit (void (*__func) (void)) throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int clearenv (void) throw (); # 606 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 620 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 630 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 642 "/usr/include/stdlib.h" 3 4 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 652 "/usr/include/stdlib.h" 3 4 extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 663 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 674 "/usr/include/stdlib.h" 3 4 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 684 "/usr/include/stdlib.h" 3 4 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 694 "/usr/include/stdlib.h" 3 4 extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 706 "/usr/include/stdlib.h" 3 4 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 734 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); #define __COMPAR_FN_T typedef int (*__compar_fn_t) (__const void *, __const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); # 808 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 896 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/bits/stdlib.h" 1 3 4 # 24 "/usr/include/bits/stdlib.h" 3 4 extern char *__realpath_chk (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") __attribute__ ((__warn_unused_result__)); extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * realpath (__const char *__restrict __name, char *__restrict __resolved) throw () { if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) { return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); } return __realpath_alias (__name, __resolved); } extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __ptsname_r_alias (__fd, __buf, __buflen); } extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int wctomb (char *__s, wchar_t __wchar) throw () { #define __STDLIB_MB_LEN_MAX 16 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); return __wctomb_alias (__s, __wchar); } extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw (); extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") ; extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __mbstowcs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) return __mbstowcs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); } return __mbstowcs_alias (__dst, __src, __len); } extern size_t __wcstombs_chk (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw (); extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") ; extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); if (__len > __builtin_object_size (__dst, 2 > 1)) return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); } return __wcstombs_alias (__dst, __src, __len); } # 956 "/usr/include/stdlib.h" 2 3 4 #undef __need_malloc_and_calloc } # 18 "./../../dist/include/mozilla/Assertions.h" 2 # 1 "/usr/include/signal.h" 1 3 4 # 26 "/usr/include/signal.h" 3 4 #define _SIGNAL_H extern "C" { # 1 "/usr/include/bits/sigset.h" 1 3 4 # 44 "/usr/include/bits/sigset.h" 3 4 #define _SIGSET_H_fns 1 #define _EXTERN_INLINE __extern_inline #define __sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) #define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) #define __sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; })) #define __sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; })) # 73 "/usr/include/bits/sigset.h" 3 4 #define __sigisemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; const sigset_t *__set = (set); int __ret = __set->__val[--__cnt]; while (!__ret && --__cnt >= 0) __ret = __set->__val[__cnt]; __ret == 0; })) #define __sigandset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] & __right->__val[__cnt]); 0; })) # 89 "/usr/include/bits/sigset.h" 3 4 #define __sigorset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] | __right->__val[__cnt]); 0; })) # 104 "/usr/include/bits/sigset.h" 3 4 extern int __sigismember (__const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); #define __SIGSETFN(NAME,BODY,CONST) _EXTERN_INLINE int NAME (CONST __sigset_t *__set, int __sig) { unsigned long int __mask = __sigmask (__sig); unsigned long int __word = __sigword (__sig); return BODY; } # 118 "/usr/include/bits/sigset.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } #undef __SIGSETFN # 34 "/usr/include/signal.h" 2 3 4 #define __sig_atomic_t_defined typedef __sig_atomic_t sig_atomic_t; #undef __need_sig_atomic_t #undef __need_sigset_t # 1 "/usr/include/bits/signum.h" 1 3 4 # 23 "/usr/include/bits/signum.h" 3 4 #define SIG_ERR ((__sighandler_t) -1) #define SIG_DFL ((__sighandler_t) 0) #define SIG_IGN ((__sighandler_t) 1) #define SIG_HOLD ((__sighandler_t) 2) #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 #define SIGILL 4 #define SIGTRAP 5 #define SIGABRT 6 #define SIGIOT 6 #define SIGBUS 7 #define SIGFPE 8 #define SIGKILL 9 #define SIGUSR1 10 #define SIGSEGV 11 #define SIGUSR2 12 #define SIGPIPE 13 #define SIGALRM 14 #define SIGTERM 15 #define SIGSTKFLT 16 #define SIGCLD SIGCHLD #define SIGCHLD 17 #define SIGCONT 18 #define SIGSTOP 19 #define SIGTSTP 20 #define SIGTTIN 21 #define SIGTTOU 22 #define SIGURG 23 #define SIGXCPU 24 #define SIGXFSZ 25 #define SIGVTALRM 26 #define SIGPROF 27 #define SIGWINCH 28 #define SIGPOLL SIGIO #define SIGIO 29 #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED 31 #define _NSIG 65 #define SIGRTMIN (__libc_current_sigrtmin ()) #define SIGRTMAX (__libc_current_sigrtmax ()) #define __SIGRTMIN 32 #define __SIGRTMAX (_NSIG - 1) # 59 "/usr/include/signal.h" 2 3 4 # 75 "/usr/include/signal.h" 3 4 #define __need_timespec # 1 "/usr/include/time.h" 1 3 4 # 67 "/usr/include/time.h" 3 4 #undef __need_clock_t # 83 "/usr/include/time.h" 3 4 #undef __need_time_t # 95 "/usr/include/time.h" 3 4 #undef __clockid_time_t # 107 "/usr/include/time.h" 3 4 #undef __need_timer_t # 127 "/usr/include/time.h" 3 4 #undef __need_timespec # 77 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/bits/siginfo.h" 1 3 4 # 25 "/usr/include/bits/siginfo.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 26 "/usr/include/bits/siginfo.h" 2 3 4 #define __have_sigval_t 1 typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; #define __have_siginfo_t 1 #define __SI_MAX_SIZE 128 #define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 3)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; } _sifields; } siginfo_t; #define si_pid _sifields._kill.si_pid #define si_uid _sifields._kill.si_uid #define si_timerid _sifields._timer.si_tid #define si_overrun _sifields._timer.si_overrun #define si_status _sifields._sigchld.si_status #define si_utime _sifields._sigchld.si_utime #define si_stime _sifields._sigchld.si_stime #define si_value _sifields._rt.si_sigval #define si_int _sifields._rt.si_sigval.sival_int #define si_ptr _sifields._rt.si_sigval.sival_ptr #define si_addr _sifields._sigfault.si_addr #define si_band _sifields._sigpoll.si_band #define si_fd _sifields._sigpoll.si_fd enum { SI_ASYNCNL = -60, #define SI_ASYNCNL SI_ASYNCNL SI_TKILL = -6, #define SI_TKILL SI_TKILL SI_SIGIO, #define SI_SIGIO SI_SIGIO SI_ASYNCIO, #define SI_ASYNCIO SI_ASYNCIO SI_MESGQ, #define SI_MESGQ SI_MESGQ SI_TIMER, #define SI_TIMER SI_TIMER SI_QUEUE, #define SI_QUEUE SI_QUEUE SI_USER, #define SI_USER SI_USER SI_KERNEL = 0x80 #define SI_KERNEL SI_KERNEL }; enum { ILL_ILLOPC = 1, #define ILL_ILLOPC ILL_ILLOPC ILL_ILLOPN, #define ILL_ILLOPN ILL_ILLOPN ILL_ILLADR, #define ILL_ILLADR ILL_ILLADR ILL_ILLTRP, #define ILL_ILLTRP ILL_ILLTRP ILL_PRVOPC, #define ILL_PRVOPC ILL_PRVOPC ILL_PRVREG, #define ILL_PRVREG ILL_PRVREG ILL_COPROC, #define ILL_COPROC ILL_COPROC ILL_BADSTK #define ILL_BADSTK ILL_BADSTK }; enum { FPE_INTDIV = 1, #define FPE_INTDIV FPE_INTDIV FPE_INTOVF, #define FPE_INTOVF FPE_INTOVF FPE_FLTDIV, #define FPE_FLTDIV FPE_FLTDIV FPE_FLTOVF, #define FPE_FLTOVF FPE_FLTOVF FPE_FLTUND, #define FPE_FLTUND FPE_FLTUND FPE_FLTRES, #define FPE_FLTRES FPE_FLTRES FPE_FLTINV, #define FPE_FLTINV FPE_FLTINV FPE_FLTSUB #define FPE_FLTSUB FPE_FLTSUB }; enum { SEGV_MAPERR = 1, #define SEGV_MAPERR SEGV_MAPERR SEGV_ACCERR #define SEGV_ACCERR SEGV_ACCERR }; enum { BUS_ADRALN = 1, #define BUS_ADRALN BUS_ADRALN BUS_ADRERR, #define BUS_ADRERR BUS_ADRERR BUS_OBJERR #define BUS_OBJERR BUS_OBJERR }; enum { TRAP_BRKPT = 1, #define TRAP_BRKPT TRAP_BRKPT TRAP_TRACE #define TRAP_TRACE TRAP_TRACE }; enum { CLD_EXITED = 1, #define CLD_EXITED CLD_EXITED CLD_KILLED, #define CLD_KILLED CLD_KILLED CLD_DUMPED, #define CLD_DUMPED CLD_DUMPED CLD_TRAPPED, #define CLD_TRAPPED CLD_TRAPPED CLD_STOPPED, #define CLD_STOPPED CLD_STOPPED CLD_CONTINUED #define CLD_CONTINUED CLD_CONTINUED }; enum { POLL_IN = 1, #define POLL_IN POLL_IN POLL_OUT, #define POLL_OUT POLL_OUT POLL_MSG, #define POLL_MSG POLL_MSG POLL_ERR, #define POLL_ERR POLL_ERR POLL_PRI, #define POLL_PRI POLL_PRI POLL_HUP #define POLL_HUP POLL_HUP }; #undef __need_siginfo_t #define __have_sigevent_t 1 #define __SIGEV_MAX_SIZE 64 #define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 3)]; __pid_t _tid; struct { void (*_function) (sigval_t); void *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute enum { SIGEV_SIGNAL = 0, #define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, #define SIGEV_NONE SIGEV_NONE SIGEV_THREAD, #define SIGEV_THREAD SIGEV_THREAD SIGEV_THREAD_ID = 4 #define SIGEV_THREAD_ID SIGEV_THREAD_ID }; # 80 "/usr/include/signal.h" 2 3 4 typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) throw (); extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) throw (); extern __sighandler_t signal (int __sig, __sighandler_t __handler) throw (); # 113 "/usr/include/signal.h" 3 4 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) throw (); extern int kill (__pid_t __pid, int __sig) throw (); extern int killpg (__pid_t __pgrp, int __sig) throw (); extern int raise (int __sig) throw (); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) throw (); extern int gsignal (int __sig) throw (); extern void psignal (int __sig, __const char *__s); extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); # 168 "/usr/include/signal.h" 3 4 extern int __sigpause (int __sig_or_mask, int __is_sig); # 177 "/usr/include/signal.h" 3 4 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # 193 "/usr/include/signal.h" 3 4 #define sigmask(sig) __sigmask(sig) extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); #define NSIG _NSIG typedef __sighandler_t sighandler_t; typedef __sighandler_t sig_t; extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); extern int sigismember (__const sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigandset (sigset_t *__set, __const sigset_t *__left, __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); extern int sigorset (sigset_t *__set, __const sigset_t *__left, __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); # 1 "/usr/include/bits/sigaction.h" 1 3 4 # 25 "/usr/include/bits/sigaction.h" 3 4 struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; #define sa_handler __sigaction_handler.sa_handler #define sa_sigaction __sigaction_handler.sa_sigaction __sigset_t sa_mask; int sa_flags; void (*sa_restorer) (void); }; #define SA_NOCLDSTOP 1 #define SA_NOCLDWAIT 2 #define SA_SIGINFO 4 #define SA_ONSTACK 0x08000000 #define SA_RESTART 0x10000000 #define SA_NODEFER 0x40000000 #define SA_RESETHAND 0x80000000 #define SA_INTERRUPT 0x20000000 #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND #define SA_STACK SA_ONSTACK #define SIG_BLOCK 0 #define SIG_UNBLOCK 1 #define SIG_SETMASK 2 # 253 "/usr/include/signal.h" 2 3 4 extern int sigprocmask (int __how, __const sigset_t *__restrict __set, sigset_t *__restrict __oset) throw (); extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) throw (); extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (__const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (__const sigset_t *__restrict __set, siginfo_t *__restrict __info, __const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) throw (); # 310 "/usr/include/signal.h" 3 4 extern __const char *__const _sys_siglist[65]; extern __const char *__const sys_siglist[65]; struct sigvec { __sighandler_t sv_handler; int sv_mask; int sv_flags; #define sv_onstack sv_flags }; #define SV_ONSTACK (1 << 0) #define SV_INTERRUPT (1 << 1) #define SV_RESETHAND (1 << 2) extern int sigvec (int __sig, __const struct sigvec *__vec, struct sigvec *__ovec) throw (); # 1 "/usr/include/bits/sigcontext.h" 1 3 4 # 26 "/usr/include/bits/sigcontext.h" 3 4 #define sigcontext_struct sigcontext # 1 "/usr/include/asm/sigcontext.h" 1 3 4 #define _ASMARM_SIGCONTEXT_H struct sigcontext { unsigned long trap_no; unsigned long error_code; unsigned long oldmask; unsigned long arm_r0; unsigned long arm_r1; unsigned long arm_r2; unsigned long arm_r3; unsigned long arm_r4; unsigned long arm_r5; unsigned long arm_r6; unsigned long arm_r7; unsigned long arm_r8; unsigned long arm_r9; unsigned long arm_r10; unsigned long arm_fp; unsigned long arm_ip; unsigned long arm_sp; unsigned long arm_lr; unsigned long arm_pc; unsigned long arm_cpsr; unsigned long fault_address; }; # 29 "/usr/include/bits/sigcontext.h" 2 3 4 #define __need_NULL # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 33 "/usr/include/bits/sigcontext.h" 2 3 4 # 340 "/usr/include/signal.h" 2 3 4 extern int sigreturn (struct sigcontext *__scp) throw (); #define __need_size_t # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 350 "/usr/include/signal.h" 2 3 4 extern int siginterrupt (int __sig, int __interrupt) throw (); # 1 "/usr/include/bits/sigstack.h" 1 3 4 # 26 "/usr/include/bits/sigstack.h" 3 4 struct sigstack { void *ss_sp; int ss_onstack; }; enum { SS_ONSTACK = 1, #define SS_ONSTACK SS_ONSTACK SS_DISABLE #define SS_DISABLE SS_DISABLE }; #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 357 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/sys/ucontext.h" 1 3 4 # 22 "/usr/include/sys/ucontext.h" 3 4 #define _SYS_UCONTEXT_H 1 # 1 "/usr/include/signal.h" 1 3 4 # 26 "/usr/include/sys/ucontext.h" 2 3 4 # 1 "/usr/include/bits/sigcontext.h" 1 3 4 # 30 "/usr/include/sys/ucontext.h" 2 3 4 typedef int greg_t; #define NGREG 18 typedef greg_t gregset_t[18]; enum { REG_R0 = 0, #define REG_R0 REG_R0 REG_R1 = 1, #define REG_R1 REG_R1 REG_R2 = 2, #define REG_R2 REG_R2 REG_R3 = 3, #define REG_R3 REG_R3 REG_R4 = 4, #define REG_R4 REG_R4 REG_R5 = 5, #define REG_R5 REG_R5 REG_R6 = 6, #define REG_R6 REG_R6 REG_R7 = 7, #define REG_R7 REG_R7 REG_R8 = 8, #define REG_R8 REG_R8 REG_R9 = 9, #define REG_R9 REG_R9 REG_R10 = 10, #define REG_R10 REG_R10 REG_R11 = 11, #define REG_R11 REG_R11 REG_R12 = 12, #define REG_R12 REG_R12 REG_R13 = 13, #define REG_R13 REG_R13 REG_R14 = 14, #define REG_R14 REG_R14 REG_R15 = 15 #define REG_R15 REG_R15 }; struct _libc_fpstate { struct { unsigned int sign1:1; unsigned int unused:15; unsigned int sign2:1; unsigned int exponent:14; unsigned int j:1; unsigned int mantissa1:31; unsigned int mantissa0:32; } fpregs[8]; unsigned int fpsr:32; unsigned int fpcr:32; unsigned char ftype[8]; unsigned int init_flag; }; typedef struct _libc_fpstate fpregset_t; typedef struct sigcontext mcontext_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; __sigset_t uc_sigmask; unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; # 360 "/usr/include/signal.h" 2 3 4 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) throw () __attribute__ ((__deprecated__)); extern int sigaltstack (__const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) throw (); extern int sighold (int __sig) throw (); extern int sigrelse (int __sig) throw (); extern int sigignore (int __sig) throw (); extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); # 1 "/usr/include/bits/sigthread.h" 1 3 4 # 21 "/usr/include/bits/sigthread.h" 3 4 #define _BITS_SIGTHREAD_H 1 # 31 "/usr/include/bits/sigthread.h" 3 4 extern int pthread_sigmask (int __how, __const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)throw (); extern int pthread_kill (pthread_t __threadid, int __signo) throw (); extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) throw (); # 396 "/usr/include/signal.h" 2 3 4 extern int __libc_current_sigrtmin (void) throw (); extern int __libc_current_sigrtmax (void) throw (); } # 20 "./../../dist/include/mozilla/Assertions.h" 2 # 65 "./../../dist/include/mozilla/Assertions.h" #define MOZ_STATIC_ASSERT_GLUE1(x,y) x ##y #define MOZ_STATIC_ASSERT_GLUE(x,y) MOZ_STATIC_ASSERT_GLUE1(x, y) # 96 "./../../dist/include/mozilla/Assertions.h" #define MOZ_STATIC_ASSERT(cond,reason) typedef int MOZ_STATIC_ASSERT_GLUE(moz_static_assert, __COUNTER__)[(cond) ? 1 : -1] #define MOZ_STATIC_ASSERT_IF(cond,expr,reason) MOZ_STATIC_ASSERT(!(cond) || (expr), reason) extern "C" { # 150 "./../../dist/include/mozilla/Assertions.h" #define MOZ_CRASH() do { raise(SIGABRT); } while (0) extern __attribute__((weak)) __attribute__((visibility("default"))) void MOZ_Assert(const char* s, const char* file, int ln); static __attribute__((always_inline)) inline void MOZ_OutputAssertMessage(const char* s, const char *file, int ln) { fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln); fflush(stderr); } } # 250 "./../../dist/include/mozilla/Assertions.h" #define MOZ_ASSERT(...) do { } while(0) # 269 "./../../dist/include/mozilla/Assertions.h" #define MOZ_ASSERT_IF(cond,expr) do { } while (0) # 281 "./../../dist/include/mozilla/Assertions.h" #define MOZ_NOT_REACHED_MARKER() __builtin_unreachable() # 311 "./../../dist/include/mozilla/Assertions.h" #define MOZ_NOT_REACHED(reason) MOZ_NOT_REACHED_MARKER() # 349 "./../../dist/include/mozilla/Assertions.h" #define MOZ_ALWAYS_TRUE(expr) ((void)(expr)) #define MOZ_ALWAYS_FALSE(expr) ((void)(expr)) # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" #define jsscope_h___ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 1 3 # 37 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 #define _NEW # 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 1 3 # 41 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 3 # 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 3 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 1 3 # 32 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_CXX_CONFIG_H 1 #define __GLIBCXX__ 20120702 #define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 #define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V))) # 54 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_DEPRECATED 1 #define _GLIBCXX_DEPRECATED_ATTR # 95 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 # 117 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_STD_D _GLIBCXX_STD #define _GLIBCXX_STD_P _GLIBCXX_STD #define _GLIBCXX_STD_PR _GLIBCXX_STD #define _GLIBCXX_STD std #define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X,Y) _GLIBCXX_BEGIN_NAMESPACE(X) #define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE #define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { #define _GLIBCXX_END_NAMESPACE } # 240 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #undef _GLIBCXX_LONG_DOUBLE_COMPAT # 252 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_LDBL_NAMESPACE #define _GLIBCXX_BEGIN_LDBL_NAMESPACE #define _GLIBCXX_END_LDBL_NAMESPACE #define _GLIBCXX_BEGIN_EXTERN_C extern "C" { #define _GLIBCXX_END_EXTERN_C } # 275 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/os_defines.h" 1 3 # 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/os_defines.h" 3 #define _GLIBCXX_OS_DEFINES 1 #define __NO_CTYPE 1 # 276 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 2 3 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/cpu_defines.h" 1 3 # 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/cpu_defines.h" 3 #define _GLIBCXX_CPU_DEFINES 1 # 279 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 2 3 #define _GLIBCXX_PSEUDO_VISIBILITY(V) # 301 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_EXTERN_TEMPLATE 1 #define _GLIBCXX_WEAK_DEFINITION #define __glibcxx_assert(_Condition) # 346 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_FAST_MATH 0 #define __N(msgid) (msgid) #undef min #undef max #define _GLIBCXX_PURE __attribute__ ((__pure__)) #define _GLIBCXX_CONST __attribute__ ((__const__)) #define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) #define _GLIBCXX_NOTHROW throw() # 384 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_HAVE_ACOSF 1 #define _GLIBCXX_HAVE_ACOSL 1 #define _GLIBCXX_HAVE_ASINF 1 #define _GLIBCXX_HAVE_ASINL 1 #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 #define _GLIBCXX_HAVE_ATAN2F 1 #define _GLIBCXX_HAVE_ATAN2L 1 #define _GLIBCXX_HAVE_ATANF 1 #define _GLIBCXX_HAVE_ATANL 1 #define _GLIBCXX_HAVE_CEILF 1 #define _GLIBCXX_HAVE_CEILL 1 #define _GLIBCXX_HAVE_COMPLEX_H 1 #define _GLIBCXX_HAVE_COSF 1 #define _GLIBCXX_HAVE_COSHF 1 #define _GLIBCXX_HAVE_COSHL 1 #define _GLIBCXX_HAVE_COSL 1 #define _GLIBCXX_HAVE_DLFCN_H 1 #define _GLIBCXX_HAVE_EBADMSG 1 #define _GLIBCXX_HAVE_ECANCELED 1 #define _GLIBCXX_HAVE_EIDRM 1 #define _GLIBCXX_HAVE_ENDIAN_H 1 #define _GLIBCXX_HAVE_ENODATA 1 #define _GLIBCXX_HAVE_ENOLINK 1 #define _GLIBCXX_HAVE_ENOSR 1 #define _GLIBCXX_HAVE_ENOSTR 1 #define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 #define _GLIBCXX_HAVE_ENOTSUP 1 #define _GLIBCXX_HAVE_EOVERFLOW 1 #define _GLIBCXX_HAVE_EOWNERDEAD 1 #define _GLIBCXX_HAVE_EPROTO 1 #define _GLIBCXX_HAVE_ETIME 1 #define _GLIBCXX_HAVE_ETXTBSY 1 #define _GLIBCXX_HAVE_EXECINFO_H 1 #define _GLIBCXX_HAVE_EXPF 1 #define _GLIBCXX_HAVE_EXPL 1 #define _GLIBCXX_HAVE_FABSF 1 #define _GLIBCXX_HAVE_FABSL 1 #define _GLIBCXX_HAVE_FENV_H 1 #define _GLIBCXX_HAVE_FINITE 1 #define _GLIBCXX_HAVE_FINITEF 1 #define _GLIBCXX_HAVE_FINITEL 1 #define _GLIBCXX_HAVE_FLOAT_H 1 #define _GLIBCXX_HAVE_FLOORF 1 #define _GLIBCXX_HAVE_FLOORL 1 #define _GLIBCXX_HAVE_FMODF 1 #define _GLIBCXX_HAVE_FMODL 1 # 531 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_HAVE_FREXPF 1 #define _GLIBCXX_HAVE_FREXPL 1 #define _GLIBCXX_HAVE_GETIPINFO 1 #define _GLIBCXX_HAVE_GTHR_DEFAULT 1 #define _GLIBCXX_HAVE_HYPOT 1 #define _GLIBCXX_HAVE_HYPOTF 1 #define _GLIBCXX_HAVE_HYPOTL 1 #define _GLIBCXX_HAVE_ICONV 1 #define _GLIBCXX_HAVE_INT64_T 1 #define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 #define _GLIBCXX_HAVE_INTTYPES_H 1 #define _GLIBCXX_HAVE_ISINF 1 #define _GLIBCXX_HAVE_ISINFF 1 #define _GLIBCXX_HAVE_ISINFL 1 #define _GLIBCXX_HAVE_ISNAN 1 #define _GLIBCXX_HAVE_ISNANF 1 #define _GLIBCXX_HAVE_ISNANL 1 #define _GLIBCXX_HAVE_ISWBLANK 1 #define _GLIBCXX_HAVE_LC_MESSAGES 1 #define _GLIBCXX_HAVE_LDEXPF 1 #define _GLIBCXX_HAVE_LDEXPL 1 #define _GLIBCXX_HAVE_LIBINTL_H 1 #define _GLIBCXX_HAVE_LIMIT_AS 1 #define _GLIBCXX_HAVE_LIMIT_DATA 1 #define _GLIBCXX_HAVE_LIMIT_FSIZE 1 #define _GLIBCXX_HAVE_LIMIT_RSS 1 #define _GLIBCXX_HAVE_LIMIT_VMEM 0 #define _GLIBCXX_HAVE_LINUX_FUTEX 1 #define _GLIBCXX_HAVE_LOCALE_H 1 #define _GLIBCXX_HAVE_LOG10F 1 #define _GLIBCXX_HAVE_LOG10L 1 #define _GLIBCXX_HAVE_LOGF 1 #define _GLIBCXX_HAVE_LOGL 1 # 643 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_HAVE_MBSTATE_T 1 #define _GLIBCXX_HAVE_MEMORY_H 1 #define _GLIBCXX_HAVE_MODF 1 #define _GLIBCXX_HAVE_MODFF 1 #define _GLIBCXX_HAVE_MODFL 1 #define _GLIBCXX_HAVE_POLL 1 #define _GLIBCXX_HAVE_POWF 1 #define _GLIBCXX_HAVE_POWL 1 #define _GLIBCXX_HAVE_SETENV 1 #define _GLIBCXX_HAVE_SINCOS 1 #define _GLIBCXX_HAVE_SINCOSF 1 #define _GLIBCXX_HAVE_SINCOSL 1 #define _GLIBCXX_HAVE_SINF 1 #define _GLIBCXX_HAVE_SINHF 1 #define _GLIBCXX_HAVE_SINHL 1 #define _GLIBCXX_HAVE_SINL 1 #define _GLIBCXX_HAVE_SQRTF 1 #define _GLIBCXX_HAVE_SQRTL 1 #define _GLIBCXX_HAVE_STDBOOL_H 1 #define _GLIBCXX_HAVE_STDINT_H 1 #define _GLIBCXX_HAVE_STDLIB_H 1 #define _GLIBCXX_HAVE_STRERROR_L 1 #define _GLIBCXX_HAVE_STRERROR_R 1 #define _GLIBCXX_HAVE_STRINGS_H 1 #define _GLIBCXX_HAVE_STRING_H 1 #define _GLIBCXX_HAVE_STRTOF 1 #define _GLIBCXX_HAVE_STRTOLD 1 #define _GLIBCXX_HAVE_STRXFRM_L 1 #define _GLIBCXX_HAVE_SYS_IOCTL_H 1 #define _GLIBCXX_HAVE_SYS_IPC_H 1 # 748 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_HAVE_SYS_PARAM_H 1 #define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 #define _GLIBCXX_HAVE_SYS_SEM_H 1 #define _GLIBCXX_HAVE_SYS_STAT_H 1 #define _GLIBCXX_HAVE_SYS_TIME_H 1 #define _GLIBCXX_HAVE_SYS_TYPES_H 1 #define _GLIBCXX_HAVE_SYS_UIO_H 1 #define _GLIBCXX_HAVE_S_ISREG 1 #define _GLIBCXX_HAVE_TANF 1 #define _GLIBCXX_HAVE_TANHF 1 #define _GLIBCXX_HAVE_TANHL 1 #define _GLIBCXX_HAVE_TANL 1 #define _GLIBCXX_HAVE_TGMATH_H 1 #define _GLIBCXX_HAVE_TLS 1 #define _GLIBCXX_HAVE_UNISTD_H 1 #define _GLIBCXX_HAVE_VFWSCANF 1 #define _GLIBCXX_HAVE_VSWSCANF 1 #define _GLIBCXX_HAVE_VWSCANF 1 #define _GLIBCXX_HAVE_WCHAR_H 1 #define _GLIBCXX_HAVE_WCSTOF 1 #define _GLIBCXX_HAVE_WCTYPE_H 1 #define _GLIBCXX_HAVE_WRITEV 1 # 1003 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_ICONV_CONST #define LT_OBJDIR ".libs/" #define _GLIBCXX_PACKAGE_BUGREPORT "" #define _GLIBCXX_PACKAGE_NAME "package-unused" #define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" #define _GLIBCXX_PACKAGE_TARNAME "libstdc++" #define _GLIBCXX_PACKAGE_URL "" #define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" # 1046 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define STDC_HEADERS 1 #define _GLIBCXX_ATOMIC_BUILTINS_1 1 #define _GLIBCXX_ATOMIC_BUILTINS_2 1 #define _GLIBCXX_ATOMIC_BUILTINS_4 1 # 1072 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_HAS_GTHREADS 1 #define _GLIBCXX_HOSTED 1 #define _GLIBCXX_PTRDIFF_T_IS_INT 1 #define _GLIBCXX_RES_LIMITS 1 #define _GLIBCXX_SIZE_T_IS_UINT 1 #define _GLIBCXX_STDIO_MACROS 1 #define _GLIBCXX_SYMVER 1 #define _GLIBCXX_SYMVER_GNU 1 #define _GLIBCXX_USE_C99 1 #define _GLIBCXX_USE_C99_COMPLEX 1 #define _GLIBCXX_USE_C99_COMPLEX_TR1 1 #define _GLIBCXX_USE_C99_CTYPE_TR1 1 #define _GLIBCXX_USE_C99_FENV_TR1 1 #define _GLIBCXX_USE_C99_INTTYPES_TR1 1 #define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 #define _GLIBCXX_USE_C99_MATH 1 #define _GLIBCXX_USE_C99_MATH_TR1 1 #define _GLIBCXX_USE_C99_STDINT_TR1 1 # 1159 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 #define _GLIBCXX_USE_GETTIMEOFDAY 1 #define _GLIBCXX_USE_LFS 1 #define _GLIBCXX_USE_LONG_LONG 1 #define _GLIBCXX_USE_NLS 1 #define _GLIBCXX_USE_RANDOM_TR1 1 #define _GLIBCXX_USE_WCHAR_T 1 # 44 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 2 3 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 45 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 2 3 #define _GLIBCXX_CSTDDEF 1 namespace std __attribute__ ((__visibility__ ("default"))) { using ::ptrdiff_t; using ::size_t; } # 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 2 3 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 1 3 # 33 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 #define __EXCEPTION__ # 36 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 #pragma GCC visibility push(default) extern "C++" { namespace std { # 61 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 class exception { public: exception() throw() { } virtual ~exception() throw(); virtual const char* what() const throw(); }; class bad_exception : public exception { public: bad_exception() throw() { } virtual ~bad_exception() throw(); virtual const char* what() const throw(); }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate(terminate_handler) throw(); void terminate() throw() __attribute__ ((__noreturn__)); unexpected_handler set_unexpected(unexpected_handler) throw(); void unexpected() __attribute__ ((__noreturn__)); # 118 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 bool uncaught_exception() throw() __attribute__ ((__pure__)); } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 141 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 void __verbose_terminate_handler(); } } #pragma GCC visibility pop # 43 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 2 3 #pragma GCC visibility push(default) extern "C++" { namespace std { class bad_alloc : public exception { public: bad_alloc() throw() { } virtual ~bad_alloc() throw(); virtual const char* what() const throw(); }; struct nothrow_t { }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); } # 93 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 void* operator new(std::size_t) throw (std::bad_alloc); void* operator new[](std::size_t) throw (std::bad_alloc); void operator delete(void*) throw(); void operator delete[](void*) throw(); void* operator new(std::size_t, const std::nothrow_t&) throw(); void* operator new[](std::size_t, const std::nothrow_t&) throw(); void operator delete(void*, const std::nothrow_t&) throw(); void operator delete[](void*, const std::nothrow_t&) throw(); inline void* operator new(std::size_t, void* __p) throw() { return __p; } inline void* operator new[](std::size_t, void* __p) throw() { return __p; } inline void operator delete (void*, void*) throw() { } inline void operator delete[](void*, void*) throw() { } } #pragma GCC visibility pop # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" #define jsobj_h___ # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define jsapi_h___ # 1 "./../../dist/include/mozilla/FloatingPoint.h" 1 # 9 "./../../dist/include/mozilla/FloatingPoint.h" #define mozilla_FloatingPoint_h_ # 40 "./../../dist/include/mozilla/FloatingPoint.h" typedef int moz_static_assert0[(sizeof(double) == sizeof(uint64_t)) ? 1 : -1]; #define MOZ_DOUBLE_SIGN_BIT 0x8000000000000000ULL #define MOZ_DOUBLE_EXPONENT_BITS 0x7ff0000000000000ULL #define MOZ_DOUBLE_SIGNIFICAND_BITS 0x000fffffffffffffULL #define MOZ_DOUBLE_EXPONENT_BIAS 1023 #define MOZ_DOUBLE_EXPONENT_SHIFT 52 typedef int moz_static_assert1 # 53 "./../../dist/include/mozilla/FloatingPoint.h" [((0x8000000000000000ULL & 0x7ff0000000000000ULL) == 0) ? 1 : -1] ; typedef int moz_static_assert2 # 55 "./../../dist/include/mozilla/FloatingPoint.h" [((0x8000000000000000ULL & 0x000fffffffffffffULL) == 0) ? 1 : -1] ; typedef int moz_static_assert3 # 57 "./../../dist/include/mozilla/FloatingPoint.h" [((0x7ff0000000000000ULL & 0x000fffffffffffffULL) == 0) ? 1 : -1] ; typedef int moz_static_assert4 # 60 "./../../dist/include/mozilla/FloatingPoint.h" [((0x8000000000000000ULL | 0x7ff0000000000000ULL | 0x000fffffffffffffULL) == ~(uint64_t)0) ? 1 : -1] ; extern "C" { union MozDoublePun { uint64_t u; double d; }; static __attribute__((always_inline)) inline int MOZ_DOUBLE_IS_NaN(double d) { union MozDoublePun pun; pun.d = d; return (pun.u & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL && (pun.u & 0x000fffffffffffffULL) != 0; } static __attribute__((always_inline)) inline int MOZ_DOUBLE_IS_INFINITE(double d) { union MozDoublePun pun; pun.d = d; return (pun.u & ~0x8000000000000000ULL) == 0x7ff0000000000000ULL; } static __attribute__((always_inline)) inline int MOZ_DOUBLE_IS_FINITE(double d) { union MozDoublePun pun; pun.d = d; return (pun.u & 0x7ff0000000000000ULL) != 0x7ff0000000000000ULL; } static __attribute__((always_inline)) inline int MOZ_DOUBLE_IS_NEGATIVE(double d) { union MozDoublePun pun; pun.d = d; do { } while(0); return (pun.u & 0x8000000000000000ULL) != 0; } static __attribute__((always_inline)) inline int MOZ_DOUBLE_IS_NEGATIVE_ZERO(double d) { union MozDoublePun pun; pun.d = d; return pun.u == 0x8000000000000000ULL; } static __attribute__((always_inline)) inline int_fast16_t MOZ_DOUBLE_EXPONENT(double d) { union MozDoublePun pun; pun.d = d; return (int_fast16_t)((pun.u & 0x7ff0000000000000ULL) >> 52) - 1023; } static __attribute__((always_inline)) inline double MOZ_DOUBLE_POSITIVE_INFINITY() { union MozDoublePun pun; pun.u = 0x7ff0000000000000ULL; return pun.d; } static __attribute__((always_inline)) inline double MOZ_DOUBLE_NEGATIVE_INFINITY() { union MozDoublePun pun; pun.u = 0x8000000000000000ULL | 0x7ff0000000000000ULL; return pun.d; } static __attribute__((always_inline)) inline double MOZ_DOUBLE_SPECIFIC_NaN(int signbit, uint64_t significand) { union MozDoublePun pun; do { } while(0); do { } while(0); do { } while(0); pun.u = (signbit ? 0x8000000000000000ULL : 0) | 0x7ff0000000000000ULL | significand; do { } while(0); return pun.d; } static __attribute__((always_inline)) inline double MOZ_DOUBLE_NaN() { return MOZ_DOUBLE_SPECIFIC_NaN(0, 0xfffffffffffffULL); } static __attribute__((always_inline)) inline double MOZ_DOUBLE_MIN_VALUE() { union MozDoublePun pun; pun.u = 1; return pun.d; } static __attribute__((always_inline)) inline uint32_t MOZ_HASH_DOUBLE(double d) { union MozDoublePun pun; pun.d = d; return ((uint32_t)(pun.u >> 32)) ^ ((uint32_t)(pun.u)); } static __attribute__((always_inline)) inline int MOZ_DOUBLE_IS_INT32(double d, int32_t* i) { return !MOZ_DOUBLE_IS_NEGATIVE_ZERO(d) && d == (*i = (int32_t)d); } } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "./js-config.h" 1 # 10 "./js-config.h" #define js_config_h___ #define JS_THREADSAFE 1 #define JS_HAS_CTYPES 1 #define JS_HAVE_ENDIAN_H 1 # 60 "./js-config.h" #define JS_BYTES_PER_WORD 4 #define JS_METHODJIT 1 #define JS_HAS_XML_SUPPORT 1 # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 1 #define jspubtd_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 1 # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define jstypes_h___ # 1 "./../../dist/include/mozilla/Util.h" 1 # 14 "./../../dist/include/mozilla/Util.h" #define mozilla_Util_h_ namespace mozilla { # 41 "./../../dist/include/mozilla/Util.h" template struct DebugOnly { # 69 "./../../dist/include/mozilla/Util.h" DebugOnly() {} DebugOnly(const T&) {} DebugOnly(const DebugOnly&) {} DebugOnly& operator=(const T&) { return *this; } void operator++(int) {} void operator--(int) {} ~DebugOnly() {} }; template struct AlignmentFinder { private: struct Aligner { char c; T t; }; public: static const int alignment = sizeof(Aligner) - sizeof(T); }; #define MOZ_ALIGNOF(T) mozilla::AlignmentFinder::alignment # 116 "./../../dist/include/mozilla/Util.h" #define MOZ_ALIGNED_DECL(_type,_align) _type __attribute__((aligned(_align))) # 131 "./../../dist/include/mozilla/Util.h" template struct AlignedElem; template<> struct AlignedElem<1> { uint8_t elem __attribute__((aligned(1))); }; template<> struct AlignedElem<2> { uint8_t elem __attribute__((aligned(2))); }; template<> struct AlignedElem<4> { uint8_t elem __attribute__((aligned(4))); }; template<> struct AlignedElem<8> { uint8_t elem __attribute__((aligned(8))); }; template<> struct AlignedElem<16> { uint8_t elem __attribute__((aligned(16))); }; # 179 "./../../dist/include/mozilla/Util.h" template struct AlignedStorage { union U { char bytes[nbytes]; uint64_t _; } u; const void *addr() const { return u.bytes; } void *addr() { return u.bytes; } }; template struct AlignedStorage2 { union U { char bytes[sizeof(T)]; uint64_t _; } u; const T *addr() const { return (const T *)u.bytes; } T *addr() { return (T *)(void *)u.bytes; } }; # 214 "./../../dist/include/mozilla/Util.h" template class Maybe { AlignedStorage2 storage; bool constructed; T &asT() { return *storage.addr(); } explicit Maybe(const Maybe &other); const Maybe &operator=(const Maybe &other); public: Maybe() { constructed = false; } ~Maybe() { if (constructed) asT().~T(); } bool empty() const { return !constructed; } void construct() { do { } while(0); new(storage.addr()) T(); constructed = true; } template void construct(const T1 &t1) { do { } while(0); new(storage.addr()) T(t1); constructed = true; } template void construct(const T1 &t1, const T2 &t2) { do { } while(0); new(storage.addr()) T(t1, t2); constructed = true; } template void construct(const T1 &t1, const T2 &t2, const T3 &t3) { do { } while(0); new(storage.addr()) T(t1, t2, t3); constructed = true; } template void construct(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) { do { } while(0); new(storage.addr()) T(t1, t2, t3, t4); constructed = true; } T *addr() { do { } while(0); return &asT(); } T &ref() { do { } while(0); return asT(); } const T &ref() const { do { } while(0); return const_cast(this)->asT(); } void destroy() { ref().~T(); constructed = false; } void destroyIfConstructed() { if (!empty()) destroy(); } }; template __attribute__((always_inline)) inline size_t PointerRangeSize(T* begin, T* end) { do { } while(0); return (size_t(end) - size_t(begin)) / sizeof(T); } template size_t ArrayLength(T (&arr)[N]) { return N; } template T* ArrayEnd(T (&arr)[N]) { return arr + ArrayLength(arr); } } # 25 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 2 # 49 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_EXTERN_API(type) extern MOZ_EXPORT_API(type) #define JS_EXPORT_API(type) MOZ_EXPORT_API(type) #define JS_EXPORT_DATA(type) MOZ_EXPORT_DATA(type) #define JS_IMPORT_API(type) MOZ_IMPORT_API(type) #define JS_IMPORT_DATA(type) MOZ_IMPORT_DATA(type) # 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_PUBLIC_API(t) MOZ_EXPORT_API(t) #define JS_PUBLIC_DATA(t) MOZ_EXPORT_DATA(t) #define JS_FRIEND_API(t) JS_PUBLIC_API(t) #define JS_FRIEND_DATA(t) JS_PUBLIC_DATA(t) #define JS_FASTCALL #define JS_NO_FASTCALL #define JS_INLINE MOZ_INLINE #define JS_ALWAYS_INLINE MOZ_ALWAYS_INLINE #define JS_NEVER_INLINE MOZ_NEVER_INLINE #define JS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) # 112 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_BEGIN_MACRO do { #define JS_END_MACRO } while (0) # 128 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_BEGIN_EXTERN_C MOZ_BEGIN_EXTERN_C #define JS_END_EXTERN_C MOZ_END_EXTERN_C #define JS_BIT(n) ((uint32_t)1 << (n)) #define JS_BITMASK(n) (JS_BIT(n) - 1) # 148 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_HOWMANY(x,y) (((x)+(y)-1)/(y)) #define JS_ROUNDUP(x,y) (JS_HOWMANY(x,y)*(y)) #define JS_MIN(x,y) ((x)<(y)?(x):(y)) #define JS_MAX(x,y) ((x)>(y)?(x):(y)) # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" 1 #define js_cpucfg___ #define JS_HAVE_LONG_LONG # 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN # 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" #define JS_STACK_GROWTH_DIRECTION (-1) # 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 2 # 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" extern "C" { # 196 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" typedef int JSBool; #define JS_TRUE (int)1 #define JS_FALSE (int)0 # 218 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_LIKELY(x) (__builtin_expect((x), 1)) #define JS_UNLIKELY(x) (__builtin_expect((x), 0)) # 245 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_ARRAY_LENGTH(array) (sizeof (array) / sizeof (array)[0]) #define JS_ARRAY_END(array) ((array) + JS_ARRAY_LENGTH(array)) #define JS_BITS_PER_BYTE 8 #define JS_BITS_PER_BYTE_LOG2 3 #define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD) #define JS_BITS_PER_DOUBLE (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE) # 271 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" #define JS_FUNC_TO_DATA_PTR(type,fun) (__extension__ (type) (size_t) (fun)) #define JS_DATA_TO_FUNC_PTR(type,ptr) (__extension__ (type) (size_t) (ptr)) #define JS_EXTENSION __extension__ #define JS_EXTENSION_(s) __extension__ ({ s; }) } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 2 namespace JS { class Value; } # 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" typedef ptrdiff_t jsid; #define JSID_BITS(id) (id) extern "C" { typedef uint16_t jschar; typedef enum JSVersion { JSVERSION_1_0 = 100, JSVERSION_1_1 = 110, JSVERSION_1_2 = 120, JSVERSION_1_3 = 130, JSVERSION_1_4 = 140, JSVERSION_ECMA_3 = 148, JSVERSION_1_5 = 150, JSVERSION_1_6 = 160, JSVERSION_1_7 = 170, JSVERSION_1_8 = 180, JSVERSION_ECMA_5 = 185, JSVERSION_DEFAULT = 0, JSVERSION_UNKNOWN = -1, JSVERSION_LATEST = JSVERSION_ECMA_5 } JSVersion; #define JSVERSION_IS_ECMA(version) ((version) == JSVERSION_DEFAULT || (version) >= JSVERSION_1_3) typedef enum JSType { JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, JSTYPE_BOOLEAN, JSTYPE_NULL, JSTYPE_XML, JSTYPE_LIMIT } JSType; typedef enum JSProtoKey { #define JS_PROTO(name,code,init) JSProto_ ##name = code, # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 1 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 # 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_VERSION 185 # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_VERSION_ECMA_3 148 #define JS_VERSION_ECMA_3_TEST 149 # 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_STR_HTML_HELPERS 1 #define JS_HAS_OBJ_PROTO_PROP 1 #define JS_HAS_OBJ_WATCHPOINT 1 #define JS_HAS_TOSOURCE 1 #define JS_HAS_CATCH_GUARD 1 #define JS_HAS_UNEVAL 1 #define JS_HAS_CONST 1 #define JS_HAS_FUN_EXPR_STMT 1 #define JS_HAS_NO_SUCH_METHOD 1 #define JS_HAS_GENERATORS 1 #define JS_HAS_BLOCK_SCOPE 1 #define JS_HAS_DESTRUCTURING 2 #define JS_HAS_GENERATOR_EXPRS 1 #define JS_HAS_EXPR_CLOSURES 1 # 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_NEW_GLOBAL_OBJECT 1 #define JS_HAS_MAKE_SYSTEM_OBJECT 1 #define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) #define OLD_GETTER_SETTER_METHODS 1 #define USE_NEW_OBJECT_REPRESENTATION 0 #define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 2 #define XML_INIT js_InitXMLClass #define NAMESPACE_INIT js_InitNamespaceClass #define QNAME_INIT js_InitQNameClass #define XMLFILTER_INIT js_InitXMLFilterClass # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" JSProto_Null = 0, JSProto_Object = 1, JSProto_Function = 2, JSProto_Array = 3, JSProto_Boolean = 4, JSProto_JSON = 5, JSProto_Date = 6, JSProto_Math = 7, JSProto_Number = 8, JSProto_String = 9, JSProto_RegExp = 10, JSProto_XML = 11, JSProto_Namespace = 12, JSProto_QName = 13, JSProto_Error = 14, JSProto_InternalError = 15, JSProto_EvalError = 16, JSProto_RangeError = 17, JSProto_ReferenceError = 18, JSProto_SyntaxError = 19, JSProto_TypeError = 20, JSProto_URIError = 21, JSProto_Iterator = 22, JSProto_StopIteration = 23, JSProto_ArrayBuffer = 24, JSProto_Int8Array = 25, JSProto_Uint8Array = 26, JSProto_Int16Array = 27, JSProto_Uint16Array = 28, JSProto_Int32Array = 29, JSProto_Uint32Array = 30, JSProto_Float32Array = 31, JSProto_Float64Array = 32, JSProto_Uint8ClampedArray = 33, JSProto_Proxy = 34, JSProto_AnyName = 35, JSProto_WeakMap = 36, JSProto_Map = 37, JSProto_Set = 38, JSProto_DataView = 39, #undef XML_INIT #undef NAMESPACE_INIT #undef QNAME_INIT # 111 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 2 #undef JS_PROTO JSProto_LIMIT } JSProtoKey; typedef enum JSAccessMode { JSACC_PROTO = 0, JSACC_PARENT = 1, JSACC_WATCH = 3, JSACC_READ = 4, JSACC_WRITE = 8, JSACC_LIMIT } JSAccessMode; #define JSACC_TYPEMASK (JSACC_WRITE - 1) typedef enum JSIterateOp { JSENUMERATE_INIT, JSENUMERATE_INIT_ALL, JSENUMERATE_NEXT, JSENUMERATE_DESTROY } JSIterateOp; typedef enum { JSTRACE_OBJECT, JSTRACE_STRING, JSTRACE_SCRIPT, JSTRACE_XML, JSTRACE_SHAPE, JSTRACE_BASE_SHAPE, JSTRACE_TYPE_OBJECT, JSTRACE_LAST = JSTRACE_TYPE_OBJECT } JSGCTraceKind; typedef struct JSClass JSClass; typedef struct JSCompartment JSCompartment; typedef struct JSConstDoubleSpec JSConstDoubleSpec; typedef struct JSContext JSContext; typedef struct JSCrossCompartmentCall JSCrossCompartmentCall; typedef struct JSErrorReport JSErrorReport; typedef struct JSExceptionState JSExceptionState; typedef struct JSFunction JSFunction; typedef struct JSFunctionSpec JSFunctionSpec; typedef struct JSIdArray JSIdArray; typedef struct JSLocaleCallbacks JSLocaleCallbacks; typedef struct JSObject JSObject; typedef struct JSObjectMap JSObjectMap; typedef struct JSPrincipals JSPrincipals; typedef struct JSPropertyDescriptor JSPropertyDescriptor; typedef struct JSPropertyName JSPropertyName; typedef struct JSPropertySpec JSPropertySpec; typedef struct JSRuntime JSRuntime; typedef struct JSSecurityCallbacks JSSecurityCallbacks; typedef struct JSStackFrame JSStackFrame; typedef struct JSScript JSScript; typedef struct JSStructuredCloneCallbacks JSStructuredCloneCallbacks; typedef struct JSStructuredCloneReader JSStructuredCloneReader; typedef struct JSStructuredCloneWriter JSStructuredCloneWriter; typedef struct JSTracer JSTracer; class JSFlatString; class JSString; typedef struct PRCallOnceType JSCallOnceType; typedef JSBool (*JSInitCallback)(void); } namespace JS { template class Rooted; class SkipRoot; enum ThingRootKind { THING_ROOT_OBJECT, THING_ROOT_SHAPE, THING_ROOT_BASE_SHAPE, THING_ROOT_TYPE_OBJECT, THING_ROOT_STRING, THING_ROOT_SCRIPT, THING_ROOT_XML, THING_ROOT_ID, THING_ROOT_VALUE, THING_ROOT_LIMIT }; struct ContextFriendFields { JSRuntime *const runtime; ContextFriendFields(JSRuntime *rt) : runtime(rt) { } static const ContextFriendFields *get(const JSContext *cx) { return reinterpret_cast(cx); } static ContextFriendFields *get(JSContext *cx) { return reinterpret_cast(cx); } # 272 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" }; } # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" #define jsutil_h___ # 1 "./../../dist/include/js/Utility.h" 1 # 9 "./../../dist/include/js/Utility.h" #define js_utility_h__ # 1 "/usr/include/string.h" 1 3 4 # 25 "/usr/include/string.h" 3 4 #define _STRING_H 1 extern "C" { #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 35 "/usr/include/string.h" 2 3 4 #define __CORRECT_ISO_CPP_STRING_H_PROTO extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const void *memchr (__const void *__s, int __c, size_t __n) throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memchr (void *__s, int __c, size_t __n) throw () { return __builtin_memchr (__s, __c, __n); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * memchr (__const void *__s, int __c, size_t __n) throw () { return __builtin_memchr (__s, __c, __n); } } extern "C++" void *rawmemchr (void *__s, int __c) throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const void *rawmemchr (__const void *__s, int __c) throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" void *memrchr (void *__s, int __c, size_t __n) throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); # 165 "/usr/include/string.h" 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); #define strdupa(s) (__extension__ ({ __const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); })) # 199 "/usr/include/string.h" 3 4 #define strndupa(s,n) (__extension__ ({ __const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); })) # 210 "/usr/include/string.h" 3 4 extern "C++" { extern char *strchr (char *__s, int __c) throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *strchr (__const char *__s, int __c) throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strchr (char *__s, int __c) throw () { return __builtin_strchr (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strchr (__const char *__s, int __c) throw () { return __builtin_strchr (__s, __c); } } extern "C++" { extern char *strrchr (char *__s, int __c) throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *strrchr (__const char *__s, int __c) throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strrchr (char *__s, int __c) throw () { return __builtin_strrchr (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strrchr (__const char *__s, int __c) throw () { return __builtin_strrchr (__s, __c); } } extern "C++" char *strchrnul (char *__s, int __c) throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const char *strchrnul (__const char *__s, int __c) throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern char *strpbrk (char *__s, __const char *__accept) throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __const char *strpbrk (__const char *__s, __const char *__accept) throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strpbrk (char *__s, __const char *__accept) throw () { return __builtin_strpbrk (__s, __accept); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strpbrk (__const char *__s, __const char *__accept) throw () { return __builtin_strpbrk (__s, __accept); } } extern "C++" { extern char *strstr (char *__haystack, __const char *__needle) throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __const char *strstr (__const char *__haystack, __const char *__needle) throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strstr (char *__haystack, __const char *__needle) throw () { return __builtin_strstr (__haystack, __needle); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strstr (__const char *__haystack, __const char *__needle) throw () { return __builtin_strstr (__haystack, __needle); } } extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern "C++" char *strcasestr (char *__haystack, __const char *__needle) throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" __const char *strcasestr (__const char *__haystack, __const char *__needle) throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 382 "/usr/include/string.h" 3 4 extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 438 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern char *strerror_l (int __errnum, __locale_t __l) throw (); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern char *index (char *__s, int __c) throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *index (__const char *__s, int __c) throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * index (char *__s, int __c) throw () { return __builtin_index (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * index (__const char *__s, int __c) throw () { return __builtin_index (__s, __c); } } extern "C++" { extern char *rindex (char *__s, int __c) throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *rindex (__const char *__s, int __c) throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * rindex (char *__s, int __c) throw () { return __builtin_rindex (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * rindex (__const char *__s, int __c) throw () { return __builtin_rindex (__s, __c); } } extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern "C++" char *basename (char *__filename) throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); extern "C++" __const char *basename (__const char *__filename) throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); # 642 "/usr/include/string.h" 3 4 # 1 "/usr/include/bits/string3.h" 1 3 4 # 23 "/usr/include/bits/string3.h" 3 4 extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) ; # 48 "/usr/include/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () { return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memmove (void *__dest, __const void *__src, size_t __len) throw () { return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () { return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } # 76 "/usr/include/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memset (void *__dest, int __ch, size_t __len) throw () { if (__builtin_constant_p (__len) && __len == 0 && (!__builtin_constant_p (__ch) || __ch != 0)) { __warn_memset_zero_len (); return __dest; } return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void bcopy (__const void *__src, void *__dest, size_t __len) throw () { (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void bzero (void *__dest, size_t __len) throw () { (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strcpy (char *__restrict __dest, __const char *__restrict __src) throw () { return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () { return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () { return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, size_t __destlen) throw (); extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * stpncpy (char *__dest, __const char *__src, size_t __n) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); return __stpncpy_alias (__dest, __src, __n); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strcat (char *__restrict __dest, __const char *__restrict __src) throw () { return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () { return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } # 643 "/usr/include/string.h" 2 3 4 } # 15 "./../../dist/include/js/Utility.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 1 # 22 "./../../dist/include/js/Utility.h" 2 namespace JS {} namespace mozilla {} namespace js { using namespace JS; using namespace mozilla; } extern "C" { #define JS_FREE_PATTERN 0xDA #define JS_ASSERT(expr) MOZ_ASSERT(expr) #define JS_ASSERT_IF(cond,expr) MOZ_ASSERT_IF(cond, expr) #define JS_NOT_REACHED(reason) MOZ_NOT_REACHED(reason) #define JS_ALWAYS_TRUE(expr) MOZ_ALWAYS_TRUE(expr) #define JS_ALWAYS_FALSE(expr) MOZ_ALWAYS_FALSE(expr) # 62 "./../../dist/include/js/Utility.h" #define JS_THREADSAFE_ASSERT(expr) ((void) 0) #define JS_STATIC_ASSERT(cond) MOZ_STATIC_ASSERT(cond, "JS_STATIC_ASSERT") #define JS_STATIC_ASSERT_IF(cond,expr) MOZ_STATIC_ASSERT_IF(cond, expr, "JS_STATIC_ASSERT_IF") extern __attribute__((visibility("default"))) void JS_Abort(void); # 140 "./../../dist/include/js/Utility.h" #define JS_OOM_POSSIBLY_FAIL() do {} while(0) #define JS_OOM_POSSIBLY_FAIL_REPORT(cx) do {} while(0) static inline void* js_malloc(size_t bytes) { do {} while(0); return malloc(bytes); } static inline void* js_calloc(size_t bytes) { do {} while(0); return calloc(bytes, 1); } static inline void* js_realloc(void* p, size_t bytes) { do {} while(0); return realloc(p, bytes); } static inline void js_free(void* p) { free(p); } # 234 "./../../dist/include/js/Utility.h" #define js_bitscan_ctz32(val) __builtin_ctz(val) #define js_bitscan_clz32(val) __builtin_clz(val) #define JS_HAS_BUILTIN_BITSCAN32 # 255 "./../../dist/include/js/Utility.h" #define JS_CEILING_LOG2(_log2,_n) JS_BEGIN_MACRO unsigned int j_ = (unsigned int)(_n); (_log2) = (j_ <= 1 ? 0 : 32 - js_bitscan_clz32(j_ - 1)); JS_END_MACRO # 292 "./../../dist/include/js/Utility.h" #define JS_FLOOR_LOG2(_log2,_n) JS_BEGIN_MACRO (_log2) = 31 - js_bitscan_clz32(((unsigned int)(_n)) | 1); JS_END_MACRO # 316 "./../../dist/include/js/Utility.h" #define js_FloorLog2wImpl(n) ((size_t)(JS_BITS_PER_WORD - 1 - js_bitscan_clz32(n))) # 338 "./../../dist/include/js/Utility.h" #define JS_CEILING_LOG2W(n) ((n) <= 1 ? 0 : 1 + JS_FLOOR_LOG2W((n) - 1)) static __attribute__((always_inline)) inline size_t JS_FLOOR_LOG2W(size_t n) { do { } while(0); return ((size_t)((8 * 4) - 1 - __builtin_clz(n))); } } # 437 "./../../dist/include/js/Utility.h" #define JS_NEW_BODY(allocator,t,parms) void *memory = allocator(sizeof(t)); return memory ? new(memory) t parms : NULL; # 450 "./../../dist/include/js/Utility.h" #define JS_DECLARE_NEW_METHODS(ALLOCATOR,QUALIFIERS) template QUALIFIERS T *new_() { JS_NEW_BODY(ALLOCATOR, T, ()) } template QUALIFIERS T *new_(P1 p1) { JS_NEW_BODY(ALLOCATOR, T, (p1)) } template QUALIFIERS T *new_(P1 p1, P2 p2) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)) } static const int JSMinAlignment = 8; template QUALIFIERS T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { JS_ASSERT(0); return NULL; } void *memory = ALLOCATOR(numBytes); if (!memory) return NULL; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } # 534 "./../../dist/include/js/Utility.h" #define JS_DECLARE_DELETE_METHODS(DEALLOCATOR,QUALIFIERS) template QUALIFIERS void delete_(T *p) { if (p) { p->~T(); DEALLOCATOR(p); } } template QUALIFIERS void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); DEALLOCATOR(p0); } } # 561 "./../../dist/include/js/Utility.h" namespace js { class OffTheBooks { public: template __attribute__((always_inline)) inline static T *new_() { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline static T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = ::js_malloc(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } static inline void* malloc_(size_t bytes) { return ::js_malloc(bytes); } static inline void* calloc_(size_t bytes) { return ::js_calloc(bytes); } static inline void* realloc_(void* p, size_t bytes) { return ::js_realloc(p, bytes); } }; class Foreground { public: static __attribute__((always_inline)) inline void free_(void* p) { ::js_free(p); } template __attribute__((always_inline)) inline static void delete_(T *p) { if (p) { p->~T(); ::js_free(p); } } template __attribute__((always_inline)) inline static void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); ::js_free(p0); } } }; class UnwantedForeground : public Foreground { }; } #define JS_DECLARE_ALLOCATION_FRIENDS_FOR_PRIVATE_CONSTRUCTOR friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime # 701 "./../../dist/include/js/Utility.h" #define JS_DECL_USE_GUARD_OBJECT_NOTIFIER #define JS_GUARD_OBJECT_NOTIFIER_PARAM #define JS_GUARD_OBJECT_NOTIFIER_PARAM_NO_INIT #define JS_GUARD_OBJECT_NOTIFIER_PARAM0 #define JS_GUARD_OBJECT_NOTIFIER_INIT JS_BEGIN_MACRO JS_END_MACRO namespace js { # 811 "./../../dist/include/js/Utility.h" template class MoveRef { public: typedef T Referent; explicit MoveRef(T &t) : pointer(&t) { } T &operator*() const { return *pointer; } T *operator->() const { return pointer; } # 830 "./../../dist/include/js/Utility.h" operator T& () const { return *pointer; } private: T *pointer; }; template MoveRef Move(T &t) { return MoveRef(t); } template MoveRef Move(const T &t) { return MoveRef(const_cast(t)); } class ReentrancyGuard { ReentrancyGuard(const ReentrancyGuard &); void operator=(const ReentrancyGuard &); public: template ReentrancyGuard(T & ) { } ~ReentrancyGuard() { } }; __attribute__((always_inline)) inline size_t RoundUpPow2(size_t x) { return size_t(1) << ((x) <= 1 ? 0 : 1 + JS_FLOOR_LOG2W((x) - 1)); } } namespace JS { # 899 "./../../dist/include/js/Utility.h" inline void PoisonPtr(uintptr_t *v) { } template inline bool IsPoisonedPtr(T *v) { return false; } } typedef size_t(*JSMallocSizeOfFun)(const void *p); #define HAVE_STATIC_ANNOTATIONS # 955 "./../../dist/include/js/Utility.h" #define STATIC_PRECONDITION(COND) #define STATIC_PRECONDITION_ASSUME(COND) #define STATIC_POSTCONDITION(COND) #define STATIC_POSTCONDITION_ASSUME(COND) #define STATIC_INVARIANT(COND) #define STATIC_INVARIANT_ASSUME(COND) #define STATIC_ASSERT(COND) JS_BEGIN_MACRO JS_END_MACRO #define STATIC_ASSUME(COND) JS_BEGIN_MACRO JS_END_MACRO #define STATIC_ASSERT_RUNTIME(COND) JS_BEGIN_MACRO JS_END_MACRO #define STATIC_SKIP_INFERENCE STATIC_INVARIANT(skip_inference()) # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 2 struct JSContext; static __attribute__((always_inline)) inline void * js_memcpy(void *dst_, const void *src_, size_t len) { char *dst = (char *) dst_; const char *src = (const char *) src_; do { } while (0); do { } while (0); return memcpy(dst, src, len); } namespace js { template struct AlignmentTestStruct { char c; T t; }; #define JS_ALIGNMENT_OF(t_) (sizeof(js::AlignmentTestStruct) - sizeof(t_)) template class AlignedPtrAndFlag { uintptr_t bits; public: AlignedPtrAndFlag(T *t, bool flag) { do { } while(0); bits = uintptr_t(t) | uintptr_t(flag); } T *ptr() const { return (T *)(bits & ~uintptr_t(1)); } bool flag() const { return (bits & 1) != 0; } void setPtr(T *t) { do { } while(0); bits = uintptr_t(t) | uintptr_t(flag()); } void setFlag() { bits |= 1; } void unsetFlag() { bits &= ~uintptr_t(1); } void set(T *t, bool flag) { do { } while(0); bits = uintptr_t(t) | flag; } }; template static inline void Reverse(T *beg, T *end) { while (beg != end) { if (--end == beg) return; T tmp = *beg; *beg = *end; *end = tmp; ++beg; } } template static inline T * Find(T *beg, T *end, const T &v) { for (T *p = beg; p != end; ++p) { if (*p == v) return p; } return end; } template static inline typename Container::ElementType * Find(Container &c, const typename Container::ElementType &v) { return Find(c.begin(), c.end(), v); } template void ForEach(InputIterT begin, InputIterT end, CallableT f) { for (; begin != end; ++begin) f(*begin); } template static inline T Min(T t1, T t2) { return t1 < t2 ? t1 : t2; } template static inline T Max(T t1, T t2) { return t1 > t2 ? t1 : t2; } template static T& InitConst(const T &t) { return const_cast(t); } template __attribute__((always_inline)) inline T & ImplicitCast(U &u) { T &t = u; return t; } template class AutoScopedAssign { private: T *addr; T old; public: AutoScopedAssign(T *addr, const T &value ) : addr(addr), old(*addr) { do { } while (0); *addr = value; } ~AutoScopedAssign() { *addr = old; } }; template __attribute__((always_inline)) inline static void PodZero(T *t) { memset(t, 0, sizeof(T)); } template __attribute__((always_inline)) inline static void PodZero(T *t, size_t nelem) { for (T *end = t + nelem; t != end; ++t) memset(t, 0, sizeof(T)); } # 201 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" template static void PodZero(T (&)[N]); template static void PodZero(T (&)[N], size_t); template __attribute__((always_inline)) inline static void PodArrayZero(T (&t)[N]) { memset(t, 0, N * sizeof(T)); } template __attribute__((always_inline)) inline static void PodAssign(T *dst, const T *src) { js_memcpy((char *) dst, (const char *) src, sizeof(T)); } template __attribute__((always_inline)) inline static void PodCopy(T *dst, const T *src, size_t nelem) { do { } while (0); do { } while (0); if (nelem < 128) { for (const T *srcend = src + nelem; src != srcend; ++src, ++dst) PodAssign(dst, src); } else { memcpy(dst, src, nelem * sizeof(T)); } } template __attribute__((always_inline)) inline static bool PodEqual(T *one, T *two, size_t len) { if (len < 128) { T *p1end = one + len; for (T *p1 = one, *p2 = two; p1 != p1end; ++p1, ++p2) { if (*p1 != *p2) return false; } return true; } return !memcmp(one, two, len * sizeof(T)); } template __attribute__((always_inline)) inline static void Swap(T &t, T &u) { T tmp(Move(t)); t = Move(u); u = Move(tmp); } __attribute__((always_inline)) inline static size_t UnsignedPtrDiff(const void *bigger, const void *smaller) { return size_t(bigger) - size_t(smaller); } # 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" enum MaybeReportError { REPORT_ERROR = true, DONT_REPORT_ERROR = false }; static inline unsigned NumWordsForBitArrayOfLength(size_t length) { return (length + ((8 * 4) - 1)) / (8 * 4); } static inline unsigned BitArrayIndexToWordIndex(size_t length, size_t bitIndex) { unsigned wordIndex = bitIndex / (8 * 4); do { } while(0); return wordIndex; } static inline size_t BitArrayIndexToWordMask(size_t i) { return size_t(1) << (i % (8 * 4)); } static inline bool IsBitArrayElementSet(size_t *array, size_t length, size_t i) { return array[BitArrayIndexToWordIndex(length, i)] & BitArrayIndexToWordMask(i); } static inline bool IsAnyBitArrayElementSet(size_t *array, size_t length) { unsigned numWords = NumWordsForBitArrayOfLength(length); for (unsigned i = 0; i < numWords; ++i) { if (array[i]) return true; } return false; } static inline void SetBitArrayElement(size_t *array, size_t length, size_t i) { array[BitArrayIndexToWordIndex(length, i)] |= BitArrayIndexToWordMask(i); } static inline void ClearBitArrayElement(size_t *array, size_t length, size_t i) { array[BitArrayIndexToWordIndex(length, i)] &= ~BitArrayIndexToWordMask(i); } static inline void ClearAllBitArrayElements(size_t *array, size_t length) { for (unsigned i = 0; i < length; ++i) array[i] = 0; } } # 358 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" #define JS_ROTATE_LEFT32(a,bits) (((a) << (bits)) | ((a) >> (32 - (bits)))) # 370 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" #define MUST_FLOW_THROUGH(label) ((void) 0) #define MUST_FLOW_LABEL(label) # 385 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" #define JS_POISON(p,val,size) ((void) 0) #define JS_OPT_ASSERT(expr) ((void) 0) #define JS_OPT_ASSERT_IF(cond,expr) ((void) 0) # 419 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" #define JS_BASIC_STATS_ACCUM(bs,val) typedef size_t jsbitmap; #define JS_TEST_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] & ((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) #define JS_SET_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] |= ((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) #define JS_CLEAR_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] &= ~((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) # 449 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" #define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) JS_BEGIN_MACRO expr; JS_END_MACRO # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" #define jsvalimpl_h__ # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" extern "C" { #define JSVAL_ALIGNMENT __attribute__((aligned (8))) # 54 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" #define JS_ENUM_HEADER(id,type) enum id #define JS_ENUM_FOOTER(id) __attribute__((packed)) enum JSValueType { JSVAL_TYPE_DOUBLE = 0x00, JSVAL_TYPE_INT32 = 0x01, JSVAL_TYPE_UNDEFINED = 0x02, JSVAL_TYPE_BOOLEAN = 0x03, JSVAL_TYPE_MAGIC = 0x04, JSVAL_TYPE_STRING = 0x05, JSVAL_TYPE_NULL = 0x06, JSVAL_TYPE_OBJECT = 0x07, JSVAL_TYPE_UNKNOWN = 0x20, JSVAL_TYPE_MISSING = 0x21 } __attribute__((packed)); typedef int moz_static_assert5[(sizeof(JSValueType) == 1) ? 1 : -1]; enum JSValueTag { JSVAL_TAG_CLEAR = 0xFFFFFF80, JSVAL_TAG_INT32 = JSVAL_TAG_CLEAR | JSVAL_TYPE_INT32, JSVAL_TAG_UNDEFINED = JSVAL_TAG_CLEAR | JSVAL_TYPE_UNDEFINED, JSVAL_TAG_STRING = JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING, JSVAL_TAG_BOOLEAN = JSVAL_TAG_CLEAR | JSVAL_TYPE_BOOLEAN, JSVAL_TAG_MAGIC = JSVAL_TAG_CLEAR | JSVAL_TYPE_MAGIC, JSVAL_TAG_NULL = JSVAL_TAG_CLEAR | JSVAL_TYPE_NULL, JSVAL_TAG_OBJECT = JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT } __attribute__((packed)); typedef int moz_static_assert6[(sizeof(JSValueTag) == 4) ? 1 : -1]; # 177 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" #define JSVAL_LOWER_INCL_TYPE_OF_OBJ_OR_NULL_SET JSVAL_TYPE_NULL #define JSVAL_UPPER_EXCL_TYPE_OF_PRIMITIVE_SET JSVAL_TYPE_OBJECT #define JSVAL_UPPER_INCL_TYPE_OF_NUMBER_SET JSVAL_TYPE_INT32 #define JSVAL_LOWER_INCL_TYPE_OF_PTR_PAYLOAD_SET JSVAL_TYPE_MAGIC #define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_CLEAR | (type))) #define JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET JSVAL_TAG_NULL #define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT #define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32 #define JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET JSVAL_TAG_STRING # 205 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" typedef enum JSWhyMagic { JS_ARRAY_HOLE, JS_NATIVE_ENUMERATE, JS_NO_ITER_VALUE, JS_GENERATOR_CLOSING, JS_NO_CONSTANT, JS_THIS_POISON, JS_ARG_POISON, JS_SERIALIZE_NO_NODE, JS_LAZY_ARGUMENTS, JS_UNASSIGNED_ARGUMENTS, JS_OPTIMIZED_ARGUMENTS, JS_IS_CONSTRUCTING, JS_OVERWRITTEN_CALLEE, JS_GENERIC_MAGIC } JSWhyMagic; typedef union jsval_layout { uint64_t asBits; struct { union { int32_t i32; uint32_t u32; JSBool boo; JSString *str; JSObject *obj; void *ptr; JSWhyMagic why; size_t word; uintptr_t uintptr; } payload; JSValueTag tag; } s; double asDouble; void *asPtr; } __attribute__((aligned (8))) jsval_layout; # 317 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" typedef int moz_static_assert7[(sizeof(jsval_layout) == 8) ? 1 : -1]; # 327 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" static __attribute__((always_inline)) inline jsval_layout BUILD_JSVAL(JSValueTag tag, uint32_t payload) { jsval_layout l; l.asBits = (((uint64_t)(uint32_t)tag) << 32) | payload; return l; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_DOUBLE_IMPL(jsval_layout l) { return (uint32_t)l.s.tag <= (uint32_t)JSVAL_TAG_CLEAR; } static __attribute__((always_inline)) inline jsval_layout DOUBLE_TO_JSVAL_IMPL(double d) { jsval_layout l; l.asDouble = d; do { } while(0); return l; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_INT32_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_INT32; } static __attribute__((always_inline)) inline int32_t JSVAL_TO_INT32_IMPL(jsval_layout l) { return l.s.payload.i32; } static __attribute__((always_inline)) inline jsval_layout INT32_TO_JSVAL_IMPL(int32_t i) { jsval_layout l; l.s.tag = JSVAL_TAG_INT32; l.s.payload.i32 = i; return l; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_NUMBER_IMPL(jsval_layout l) { JSValueTag tag = l.s.tag; do { } while(0); return (uint32_t)tag <= (uint32_t)JSVAL_TAG_INT32; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_UNDEFINED_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_UNDEFINED; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_STRING_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_STRING; } static __attribute__((always_inline)) inline jsval_layout STRING_TO_JSVAL_IMPL(JSString *str) { jsval_layout l; do { } while(0); l.s.tag = JSVAL_TAG_STRING; l.s.payload.str = str; return l; } static __attribute__((always_inline)) inline JSString * JSVAL_TO_STRING_IMPL(jsval_layout l) { return l.s.payload.str; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_BOOLEAN_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_BOOLEAN; } static __attribute__((always_inline)) inline JSBool JSVAL_TO_BOOLEAN_IMPL(jsval_layout l) { return l.s.payload.boo; } static __attribute__((always_inline)) inline jsval_layout BOOLEAN_TO_JSVAL_IMPL(JSBool b) { jsval_layout l; do { } while(0); l.s.tag = JSVAL_TAG_BOOLEAN; l.s.payload.boo = b; return l; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_MAGIC_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_MAGIC; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_OBJECT_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_OBJECT; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_PRIMITIVE_IMPL(jsval_layout l) { return (uint32_t)l.s.tag < (uint32_t)JSVAL_TAG_OBJECT; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_OBJECT_OR_NULL_IMPL(jsval_layout l) { do { } while(0); return (uint32_t)l.s.tag >= (uint32_t)JSVAL_TAG_NULL; } static __attribute__((always_inline)) inline JSObject * JSVAL_TO_OBJECT_IMPL(jsval_layout l) { return l.s.payload.obj; } static __attribute__((always_inline)) inline jsval_layout OBJECT_TO_JSVAL_IMPL(JSObject *obj) { jsval_layout l; do { } while(0); l.s.tag = JSVAL_TAG_OBJECT; l.s.payload.obj = obj; return l; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_NULL_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_NULL; } static __attribute__((always_inline)) inline jsval_layout PRIVATE_PTR_TO_JSVAL_IMPL(void *ptr) { jsval_layout l; do { } while(0); l.s.tag = (JSValueTag)0; l.s.payload.ptr = ptr; do { } while(0); return l; } static __attribute__((always_inline)) inline void * JSVAL_TO_PRIVATE_PTR_IMPL(jsval_layout l) { return l.s.payload.ptr; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_GCTHING_IMPL(jsval_layout l) { return (uint32_t)l.s.tag >= (uint32_t)JSVAL_TAG_STRING; } static __attribute__((always_inline)) inline void * JSVAL_TO_GCTHING_IMPL(jsval_layout l) { return l.s.payload.ptr; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_TRACEABLE_IMPL(jsval_layout l) { return l.s.tag == JSVAL_TAG_STRING || l.s.tag == JSVAL_TAG_OBJECT; } static __attribute__((always_inline)) inline uint32_t JSVAL_TRACE_KIND_IMPL(jsval_layout l) { return (uint32_t)(JSBool)JSVAL_IS_STRING_IMPL(l); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_SPECIFIC_INT32_IMPL(jsval_layout l, int32_t i32) { return l.s.tag == JSVAL_TAG_INT32 && l.s.payload.i32 == i32; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_SPECIFIC_BOOLEAN(jsval_layout l, JSBool b) { return (l.s.tag == JSVAL_TAG_BOOLEAN) && (l.s.payload.boo == b); } static __attribute__((always_inline)) inline jsval_layout MAGIC_TO_JSVAL_IMPL(JSWhyMagic why) { jsval_layout l; l.s.tag = JSVAL_TAG_MAGIC; l.s.payload.why = why; return l; } static __attribute__((always_inline)) inline JSBool JSVAL_SAME_TYPE_IMPL(jsval_layout lhs, jsval_layout rhs) { JSValueTag ltag = lhs.s.tag, rtag = rhs.s.tag; return ltag == rtag || (ltag < JSVAL_TAG_CLEAR && rtag < JSVAL_TAG_CLEAR); } static __attribute__((always_inline)) inline jsval_layout PRIVATE_UINT32_TO_JSVAL_IMPL(uint32_t ui) { jsval_layout l; l.s.tag = (JSValueTag)0; l.s.payload.u32 = ui; do { } while(0); return l; } static __attribute__((always_inline)) inline uint32_t JSVAL_TO_PRIVATE_UINT32_IMPL(jsval_layout l) { return l.s.payload.u32; } static __attribute__((always_inline)) inline JSValueType JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(jsval_layout l) { uint32_t type = l.s.tag & 0xF; do { } while(0); return (JSValueType)type; } # 820 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" static __attribute__((always_inline)) inline double JS_CANONICALIZE_NAN(double d) { if ((__builtin_expect((d != d), 0))) { jsval_layout l; l.asBits = 0x7FF8000000000000LL; return l.asDouble; } return d; } } static jsval_layout JSVAL_TO_IMPL(JS::Value); static JS::Value IMPL_TO_JSVAL(jsval_layout); # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" #define jsgc_root_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" 2 namespace JS { # 62 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" template class Rooted; template struct RootMethods { }; template class Handle { public: template Handle(Handle handle) { testAssign(); ptr = reinterpret_cast(handle.address()); } # 89 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" static Handle fromMarkedLocation(const T *p) { Handle h; h.ptr = p; return h; } template inline Handle(const Rooted &root); const T *address() const { return ptr; } T value() const { return *ptr; } operator T () const { return value(); } T operator ->() const { return value(); } private: Handle() {} const T *ptr; template void testAssign() { } }; typedef Handle HandleObject; typedef Handle HandleFunction; typedef Handle HandleString; typedef Handle HandleId; typedef Handle HandleValue; template struct RootMethods { static T *initial() { return __null; } static ThingRootKind kind() { return T::rootKind(); } static bool poisoned(T *v) { return IsPoisonedPtr(v); } }; template class Rooted { void init(JSContext *cx_, T initial) { # 158 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" ptr = initial; } public: Rooted(JSContext *cx) { init(cx, RootMethods::initial()); } Rooted(JSContext *cx, T initial) { init(cx, initial); } # 172 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" operator Handle () const { return Handle(*this); } ~Rooted() { } operator T () const { return ptr; } T operator ->() const { return ptr; } T * address() { return &ptr; } const T * address() const { return &ptr; } T & reference() { return ptr; } T raw() const { return ptr; } T & operator =(T value) { do { } while(0); ptr = value; return ptr; } T & operator =(const Rooted &value) { ptr = value; return ptr; } private: T ptr; Rooted() ; Rooted(const Rooted &) ; }; template template inline Handle::Handle(const Rooted &root) { testAssign(); ptr = reinterpret_cast(root.address()); } typedef Rooted RootedObject; typedef Rooted RootedFunction; typedef Rooted RootedString; typedef Rooted RootedId; typedef Rooted RootedValue; class SkipRoot { # 286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" public: template SkipRoot(JSContext *cx, const T *ptr ) { do { } while (0); } template SkipRoot(JSContext *cx, const T *ptr, size_t count ) { do { } while (0); } }; # 314 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" inline void MaybeCheckStackRoots(JSContext *cx) {} } # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 1 3 # 39 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 #define _GLIBCXX_NUMERIC_LIMITS 1 # 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 # 81 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 #define __glibcxx_integral_traps true # 90 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 #define __glibcxx_float_has_denorm_loss false #define __glibcxx_float_traps false #define __glibcxx_float_tinyness_before false #define __glibcxx_double_has_denorm_loss false #define __glibcxx_double_traps false #define __glibcxx_double_tinyness_before false #define __glibcxx_long_double_has_denorm_loss false #define __glibcxx_long_double_traps false #define __glibcxx_long_double_tinyness_before false #define __glibcxx_signed(T) ((T)(-1) < 0) #define __glibcxx_min(T) (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0) #define __glibcxx_max(T) (__glibcxx_signed (T) ? (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) #define __glibcxx_digits(T) (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) #define __glibcxx_digits10(T) (__glibcxx_digits (T) * 643 / 2136) #define __glibcxx_max_digits10(T) (2 + (T) * 643 / 2136) namespace std __attribute__ ((__visibility__ ("default"))) { enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; # 190 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 struct __numeric_limits_base { static const bool is_specialized = false; static const int digits = 0; static const int digits10 = 0; static const bool is_signed = false; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static const bool is_iec559 = false; static const bool is_bounded = false; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; # 283 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 template struct numeric_limits : public __numeric_limits_base { static _Tp min() throw() { return static_cast<_Tp>(0); } static _Tp max() throw() { return static_cast<_Tp>(0); } static _Tp epsilon() throw() { return static_cast<_Tp>(0); } static _Tp round_error() throw() { return static_cast<_Tp>(0); } static _Tp infinity() throw() { return static_cast<_Tp>(0); } static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } }; # 334 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 template<> struct numeric_limits { static const bool is_specialized = true; static bool min() throw() { return false; } static bool max() throw() { return true; } static const int digits = 1; static const int digits10 = 0; static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static bool epsilon() throw() { return false; } static bool round_error() throw() { return false; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static bool infinity() throw() { return false; } static bool quiet_NaN() throw() { return false; } static bool signaling_NaN() throw() { return false; } static bool denorm_min() throw() { return false; } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static char min() throw() { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } static char max() throw() { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); static const bool is_signed = ((char)(-1) < 0); static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static char epsilon() throw() { return 0; } static char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static char infinity() throw() { return char(); } static char quiet_NaN() throw() { return char(); } static char signaling_NaN() throw() { return char(); } static char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static signed char min() throw() { return -127 - 1; } static signed char max() throw() { return 127; } static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static signed char epsilon() throw() { return 0; } static signed char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static signed char infinity() throw() { return static_cast(0); } static signed char quiet_NaN() throw() { return static_cast(0); } static signed char signaling_NaN() throw() { return static_cast(0); } static signed char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned char min() throw() { return 0; } static unsigned char max() throw() { return 127 * 2U + 1; } static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned char epsilon() throw() { return 0; } static unsigned char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned char infinity() throw() { return static_cast(0); } static unsigned char quiet_NaN() throw() { return static_cast(0); } static unsigned char signaling_NaN() throw() { return static_cast(0); } static unsigned char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static wchar_t min() throw() { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } static wchar_t max() throw() { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); static const bool is_signed = ((wchar_t)(-1) < 0); static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static wchar_t epsilon() throw() { return 0; } static wchar_t round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static wchar_t infinity() throw() { return wchar_t(); } static wchar_t quiet_NaN() throw() { return wchar_t(); } static wchar_t signaling_NaN() throw() { return wchar_t(); } static wchar_t denorm_min() throw() { return wchar_t(); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; # 744 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 template<> struct numeric_limits { static const bool is_specialized = true; static short min() throw() { return -32767 - 1; } static short max() throw() { return 32767; } static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static short epsilon() throw() { return 0; } static short round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static short infinity() throw() { return short(); } static short quiet_NaN() throw() { return short(); } static short signaling_NaN() throw() { return short(); } static short denorm_min() throw() { return short(); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned short min() throw() { return 0; } static unsigned short max() throw() { return 32767 * 2U + 1; } static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned short epsilon() throw() { return 0; } static unsigned short round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned short infinity() throw() { return static_cast(0); } static unsigned short quiet_NaN() throw() { return static_cast(0); } static unsigned short signaling_NaN() throw() { return static_cast(0); } static unsigned short denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static int min() throw() { return -2147483647 - 1; } static int max() throw() { return 2147483647; } static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static int epsilon() throw() { return 0; } static int round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static int infinity() throw() { return static_cast(0); } static int quiet_NaN() throw() { return static_cast(0); } static int signaling_NaN() throw() { return static_cast(0); } static int denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned int min() throw() { return 0; } static unsigned int max() throw() { return 2147483647 * 2U + 1; } static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned int epsilon() throw() { return 0; } static unsigned int round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned int infinity() throw() { return static_cast(0); } static unsigned int quiet_NaN() throw() { return static_cast(0); } static unsigned int signaling_NaN() throw() { return static_cast(0); } static unsigned int denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static long min() throw() { return -2147483647L - 1; } static long max() throw() { return 2147483647L; } static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static long epsilon() throw() { return 0; } static long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long infinity() throw() { return static_cast(0); } static long quiet_NaN() throw() { return static_cast(0); } static long signaling_NaN() throw() { return static_cast(0); } static long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned long min() throw() { return 0; } static unsigned long max() throw() { return 2147483647L * 2UL + 1; } static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned long epsilon() throw() { return 0; } static unsigned long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long infinity() throw() { return static_cast(0); } static unsigned long quiet_NaN() throw() { return static_cast(0); } static unsigned long signaling_NaN() throw() { return static_cast(0); } static unsigned long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static long long min() throw() { return -9223372036854775807LL - 1; } static long long max() throw() { return 9223372036854775807LL; } static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static long long epsilon() throw() { return 0; } static long long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long long infinity() throw() { return static_cast(0); } static long long quiet_NaN() throw() { return static_cast(0); } static long long signaling_NaN() throw() { return static_cast(0); } static long long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned long long min() throw() { return 0; } static unsigned long long max() throw() { return 9223372036854775807LL * 2ULL + 1; } static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned long long epsilon() throw() { return 0; } static unsigned long long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long long infinity() throw() { return static_cast(0); } static unsigned long long quiet_NaN() throw() { return static_cast(0); } static unsigned long long signaling_NaN() throw() { return static_cast(0); } static unsigned long long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static float min() throw() { return 1.1754943508222875e-38F; } static float max() throw() { return 3.4028234663852886e+38F; } static const int digits = 24; static const int digits10 = 6; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static float epsilon() throw() { return 1.1920928955078125e-7F; } static float round_error() throw() { return 0.5F; } static const int min_exponent = (-125); static const int min_exponent10 = (-37); static const int max_exponent = 128; static const int max_exponent10 = 38; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static float infinity() throw() { return __builtin_huge_valf (); } static float quiet_NaN() throw() { return __builtin_nanf (""); } static float signaling_NaN() throw() { return __builtin_nansf (""); } static float denorm_min() throw() { return 1.4012984643248171e-45F; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; #undef __glibcxx_float_has_denorm_loss #undef __glibcxx_float_traps #undef __glibcxx_float_tinyness_before template<> struct numeric_limits { static const bool is_specialized = true; static double min() throw() { return ((double)2.2250738585072014e-308L); } static double max() throw() { return ((double)1.7976931348623157e+308L); } static const int digits = 53; static const int digits10 = 15; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static double epsilon() throw() { return ((double)2.2204460492503131e-16L); } static double round_error() throw() { return 0.5; } static const int min_exponent = (-1021); static const int min_exponent10 = (-307); static const int max_exponent = 1024; static const int max_exponent10 = 308; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static double infinity() throw() { return __builtin_huge_val(); } static double quiet_NaN() throw() { return __builtin_nan (""); } static double signaling_NaN() throw() { return __builtin_nans (""); } static double denorm_min() throw() { return ((double)4.9406564584124654e-324L); } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; #undef __glibcxx_double_has_denorm_loss #undef __glibcxx_double_traps #undef __glibcxx_double_tinyness_before template<> struct numeric_limits { static const bool is_specialized = true; static long double min() throw() { return 2.2250738585072014e-308L; } static long double max() throw() { return 1.7976931348623157e+308L; } static const int digits = 53; static const int digits10 = 15; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static long double epsilon() throw() { return 2.2204460492503131e-16L; } static long double round_error() throw() { return 0.5L; } static const int min_exponent = (-1021); static const int min_exponent10 = (-307); static const int max_exponent = 1024; static const int max_exponent10 = 308; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static long double infinity() throw() { return __builtin_huge_vall (); } static long double quiet_NaN() throw() { return __builtin_nanl (""); } static long double signaling_NaN() throw() { return __builtin_nansl (""); } static long double denorm_min() throw() { return 4.9406564584124654e-324L; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; #undef __glibcxx_long_double_has_denorm_loss #undef __glibcxx_long_double_traps #undef __glibcxx_long_double_tinyness_before } #undef __glibcxx_signed #undef __glibcxx_min #undef __glibcxx_max #undef __glibcxx_digits #undef __glibcxx_digits10 #undef __glibcxx_max_digits10 # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" #define jsalloc_h_ namespace js { # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" class SystemAllocPolicy { public: void *malloc_(size_t bytes) { return js_malloc(bytes); } void *realloc_(void *p, size_t oldBytes, size_t bytes) { return js_realloc(p, bytes); } void free_(void *p) { js_free(p); } void reportAllocOverflow() const {} }; # 50 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" class TempAllocPolicy { JSContext *const cx; __attribute__((visibility("default"))) void * onOutOfMemory(void *p, size_t nbytes); public: TempAllocPolicy(JSContext *cx) : cx(cx) {} JSContext *context() const { return cx; } void *malloc_(size_t bytes) { void *p = js_malloc(bytes); if ((__builtin_expect((!p), 0))) p = onOutOfMemory(__null, bytes); return p; } void *realloc_(void *p, size_t oldBytes, size_t bytes) { void *p2 = js_realloc(p, bytes); if ((__builtin_expect((!p2), 0))) p2 = onOutOfMemory(p2, bytes); return p2; } void free_(void *p) { js_free(p); } __attribute__((visibility("default"))) void reportAllocOverflow() const; }; } # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 # 1 "./../../dist/include/js/Vector.h" 1 # 9 "./../../dist/include/js/Vector.h" #define jsvector_h_ # 1 "./../../dist/include/js/TemplateLib.h" 1 # 9 "./../../dist/include/js/TemplateLib.h" #define js_template_lib_h__ # 20 "./../../dist/include/js/TemplateLib.h" namespace js { namespace tl { template struct Min { static const size_t result = i < j ? i : j; }; template struct Max { static const size_t result = i > j ? i : j; }; template struct Clamp { static const size_t result = i < min ? min : (i > max ? max : i); }; template struct Pow { static const size_t result = x * Pow::result; }; template struct Pow { static const size_t result = 1; }; template struct FloorLog2 { static const size_t result = 1 + FloorLog2::result; }; template <> struct FloorLog2<0> { }; template <> struct FloorLog2<1> { static const size_t result = 0; }; template struct CeilingLog2 { static const size_t result = FloorLog2<2 * i - 1>::result; }; template struct RoundUpPow2 { static const size_t result = size_t(1) << CeilingLog2::result; }; template <> struct RoundUpPow2<0> { static const size_t result = 1; }; template struct BitSize { static const size_t result = sizeof(T) * 8; }; template struct StaticAssert {}; template <> struct StaticAssert { typedef int result; }; template struct IsSameType { static const bool result = false; }; template struct IsSameType { static const bool result = true; }; template struct NBitMask { typedef typename StaticAssert::result>::result _; static const size_t result = (size_t(1) << N) - 1; }; template <> struct NBitMask::result> { static const size_t result = size_t(-1); }; template struct MulOverflowMask { static const size_t result = ~NBitMask::result - CeilingLog2::result>::result; }; template <> struct MulOverflowMask<0> { }; template <> struct MulOverflowMask<1> { static const size_t result = 0; }; template struct UnsafeRangeSizeMask { static const size_t result = MulOverflowMask<2 * sizeof(T)>::result; }; template struct StripConst { typedef T result; }; template struct StripConst { typedef T result; }; template struct IsPodType { static const bool result = false; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template struct IsPodType { static const bool result = true; }; template struct If { static const T result = v1; }; template struct If { static const T result = v2; }; template struct IsRelocatableHeapType { static const bool result = true; }; } } # 14 "./../../dist/include/js/Vector.h" 2 # 1 "./../../dist/include/js/Utility.h" 1 # 15 "./../../dist/include/js/Vector.h" 2 namespace js { class TempAllocPolicy; template class Vector; template struct VectorImpl { static inline void destroy(T *begin, T *end) { for (T *p = begin; p != end; ++p) p->~T(); } static inline void initialize(T *begin, T *end) { for (T *p = begin; p != end; ++p) new(p) T(); } template static inline void copyConstruct(T *dst, const U *srcbeg, const U *srcend) { for (const U *p = srcbeg; p != srcend; ++p, ++dst) new(dst) T(*p); } template static inline void moveConstruct(T *dst, const U *srcbeg, const U *srcend) { for (const U *p = srcbeg; p != srcend; ++p, ++dst) new(dst) T(Move(*p)); } template static inline void copyConstructN(T *dst, size_t n, const U &u) { for (T *end = dst + n; dst != end; ++dst) new(dst) T(u); } static inline bool growTo(Vector &v, size_t newcap) { do { } while(0); T *newbuf = reinterpret_cast(v.malloc_(newcap * sizeof(T))); if (!newbuf) return false; for (T *dst = newbuf, *src = v.beginNoCheck(); src != v.endNoCheck(); ++dst, ++src) new(dst) T(Move(*src)); VectorImpl::destroy(v.beginNoCheck(), v.endNoCheck()); v.free_(v.mBegin); v.mBegin = newbuf; v.mCapacity = newcap; return true; } }; template struct VectorImpl { static inline void destroy(T *, T *) {} static inline void initialize(T *begin, T *end) { # 121 "./../../dist/include/js/Vector.h" for (T *p = begin; p != end; ++p) new(p) T(); } template static inline void copyConstruct(T *dst, const U *srcbeg, const U *srcend) { for (const U *p = srcbeg; p != srcend; ++p, ++dst) *dst = *p; } template static inline void moveConstruct(T *dst, const U *srcbeg, const U *srcend) { copyConstruct(dst, srcbeg, srcend); } static inline void copyConstructN(T *dst, size_t n, const T &t) { for (T *p = dst, *end = dst + n; p != end; ++p) *p = t; } static inline bool growTo(Vector &v, size_t newcap) { do { } while(0); size_t bytes = sizeof(T) * newcap; size_t oldBytes = sizeof(T) * v.mCapacity; T *newbuf = reinterpret_cast(v.realloc_(v.mBegin, oldBytes, bytes)); if (!newbuf) return false; v.mBegin = newbuf; v.mCapacity = newcap; return true; } }; # 180 "./../../dist/include/js/Vector.h" template class Vector : private AllocPolicy { typedef typename tl::StaticAssert::result>::result _; static const bool sElemIsPod = tl::IsPodType::result; typedef VectorImpl Impl; friend struct VectorImpl; bool calculateNewCapacity(size_t curLength, size_t lengthInc, size_t &newCap); bool growStorageBy(size_t lengthInc); bool growHeapStorageBy(size_t lengthInc); bool convertToHeapStorage(size_t lengthInc); template inline bool growByImpl(size_t inc); static const int sMaxInlineBytes = 1024; # 213 "./../../dist/include/js/Vector.h" template struct ElemSize { static const size_t result = sizeof(T); }; template struct ElemSize<0, Dummy> { static const size_t result = 1; }; static const size_t sInlineCapacity = tl::Min::result>::result; static const size_t sInlineBytes = tl::Max<1, sInlineCapacity * ElemSize::result>::result; # 238 "./../../dist/include/js/Vector.h" T *mBegin; size_t mLength; size_t mCapacity; AlignedStorage storage; Vector(const Vector &) ; Vector &operator=(const Vector &) ; bool usingInlineStorage() const { return mBegin == (T *)storage.addr(); } T *beginNoCheck() const { return mBegin; } T *endNoCheck() { return mBegin + mLength; } const T *endNoCheck() const { return mBegin + mLength; } # 282 "./../../dist/include/js/Vector.h" template void internalAppend(U t); void internalAppendN(const T &t, size_t n); template void internalAppend(const U *begin, size_t length); template void internalAppend(const Vector &other); public: static const size_t sMaxInlineStorage = N; typedef T ElementType; Vector(AllocPolicy = AllocPolicy()); Vector(MoveRef); Vector &operator=(MoveRef); ~Vector(); const AllocPolicy &allocPolicy() const { return *this; } AllocPolicy &allocPolicy() { return *this; } enum { InlineLength = N }; size_t length() const { return mLength; } bool empty() const { return mLength == 0; } size_t capacity() const { return mCapacity; } T *begin() { do { } while(0); return mBegin; } const T *begin() const { do { } while(0); return mBegin; } T *end() { do { } while(0); return mBegin + mLength; } const T *end() const { do { } while(0); return mBegin + mLength; } T &operator[](size_t i) { do { } while(0); return begin()[i]; } const T &operator[](size_t i) const { do { } while(0); return begin()[i]; } T &back() { do { } while(0); return *(end() - 1); } const T &back() const { do { } while(0); return *(end() - 1); } class Range { friend class Vector; T *cur, *end; Range(T *cur, T *end) : cur(cur), end(end) {} public: Range() {} bool empty() const { return cur == end; } size_t remain() const { return end - cur; } T &front() const { return *cur; } void popFront() { do { } while(0); ++cur; } T popCopyFront() { do { } while(0); return *cur++; } }; Range all() { return Range(begin(), end()); } bool reserve(size_t capacity); void shrinkBy(size_t incr); bool growBy(size_t incr); bool resize(size_t newLength); bool growByUninitialized(size_t incr); bool resizeUninitialized(size_t newLength); void clear(); void clearAndFree(); # 413 "./../../dist/include/js/Vector.h" template bool append(U t); bool appendN(const T &t, size_t n); template bool append(const U *begin, const U *end); template bool append(const U *begin, size_t length); template bool append(const Vector &other); void infallibleAppend(const T &t) { internalAppend(t); } void infallibleAppendN(const T &t, size_t n) { internalAppendN(t, n); } template void infallibleAppend(const U *begin, const U *end) { internalAppend(begin, PointerRangeSize(begin, end)); } template void infallibleAppend(const U *begin, size_t length) { internalAppend(begin, length); } template void infallibleAppend(const Vector &other) { internalAppend(other); } void popBack(); T popCopy(); # 451 "./../../dist/include/js/Vector.h" T *extractRawBuffer(); void replaceRawBuffer(T *p, size_t length); bool insert(T *p, const T &val); void erase(T *t); size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const; size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const; }; #define REENTRANCY_GUARD_ET_AL ReentrancyGuard g(*this); JS_ASSERT_IF(usingInlineStorage(), mCapacity == sInlineCapacity); JS_ASSERT(reserved() <= mCapacity); JS_ASSERT(mLength <= reserved()); JS_ASSERT(mLength <= mCapacity) # 494 "./../../dist/include/js/Vector.h" template __attribute__((always_inline)) inline Vector::Vector(AllocPolicy ap) : AllocPolicy(ap), mBegin((T *)storage.addr()), mLength(0), mCapacity(sInlineCapacity) {} template __attribute__((always_inline)) inline Vector::Vector(MoveRef rhs) : AllocPolicy(rhs) { mLength = rhs->mLength; mCapacity = rhs->mCapacity; if (rhs->usingInlineStorage()) { mBegin = (T *)storage.addr(); Impl::moveConstruct(mBegin, rhs->beginNoCheck(), rhs->endNoCheck()); } else { mBegin = rhs->mBegin; rhs->mBegin = (T *) rhs->storage.addr(); rhs->mCapacity = sInlineCapacity; rhs->mLength = 0; } } template __attribute__((always_inline)) inline Vector & Vector::operator=(MoveRef rhs) { this->~Vector(); new(this) Vector(rhs); return *this; } template __attribute__((always_inline)) inline Vector::~Vector() { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); Impl::destroy(beginNoCheck(), endNoCheck()); if (!usingInlineStorage()) this->free_(beginNoCheck()); } template inline bool Vector::calculateNewCapacity(size_t curLength, size_t lengthInc, size_t &newCap) { size_t newMinCap = curLength + lengthInc; if (newMinCap < curLength || newMinCap & tl::MulOverflowMask<2 * sizeof(T)>::result) { this->reportAllocOverflow(); return false; } newCap = RoundUpPow2(newMinCap); if (newCap & tl::UnsafeRangeSizeMask::result) { this->reportAllocOverflow(); return false; } return true; } template __attribute__((always_inline)) inline bool Vector::growHeapStorageBy(size_t lengthInc) { do { } while(0); size_t newCap; return calculateNewCapacity(mLength, lengthInc, newCap) && Impl::growTo(*this, newCap); } template inline bool Vector::convertToHeapStorage(size_t lengthInc) { do { } while(0); size_t newCap; if (!calculateNewCapacity(mLength, lengthInc, newCap)) return false; T *newBuf = reinterpret_cast(this->malloc_(newCap * sizeof(T))); if (!newBuf) return false; Impl::moveConstruct(newBuf, beginNoCheck(), endNoCheck()); Impl::destroy(beginNoCheck(), endNoCheck()); mBegin = newBuf; mCapacity = newCap; return true; } template __attribute__((noinline)) bool Vector::growStorageBy(size_t incr) { do { } while(0); return usingInlineStorage() ? convertToHeapStorage(incr) : growHeapStorageBy(incr); } template inline bool Vector::reserve(size_t request) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); if (request > mCapacity && !growStorageBy(request - mLength)) return false; return true; } template inline void Vector::shrinkBy(size_t incr) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); do { } while(0); Impl::destroy(endNoCheck() - incr, endNoCheck()); mLength -= incr; } template template __attribute__((always_inline)) inline bool Vector::growByImpl(size_t incr) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); if (incr > mCapacity - mLength && !growStorageBy(incr)) return false; do { } while(0); T *newend = endNoCheck() + incr; if (InitNewElems) Impl::initialize(endNoCheck(), newend); mLength += incr; return true; } template __attribute__((always_inline)) inline bool Vector::growBy(size_t incr) { return growByImpl(incr); } template __attribute__((always_inline)) inline bool Vector::growByUninitialized(size_t incr) { return growByImpl(incr); } template inline bool Vector::resize(size_t newLength) { size_t curLength = mLength; if (newLength > curLength) return growBy(newLength - curLength); shrinkBy(curLength - newLength); return true; } template __attribute__((always_inline)) inline bool Vector::resizeUninitialized(size_t newLength) { size_t curLength = mLength; if (newLength > curLength) return growByUninitialized(newLength - curLength); shrinkBy(curLength - newLength); return true; } template inline void Vector::clear() { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); Impl::destroy(beginNoCheck(), endNoCheck()); mLength = 0; } template inline void Vector::clearAndFree() { clear(); if (usingInlineStorage()) return; this->free_(beginNoCheck()); mBegin = (T *)storage.addr(); mCapacity = sInlineCapacity; } template template __attribute__((always_inline)) inline bool Vector::append(U t) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); if (mLength == mCapacity && !growStorageBy(1)) return false; internalAppend(t); return true; } template template __attribute__((always_inline)) inline void Vector::internalAppend(U t) { do { } while(0); do { } while(0); new(endNoCheck()) T(t); ++mLength; } template __attribute__((always_inline)) inline bool Vector::appendN(const T &t, size_t needed) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); if (mLength + needed > mCapacity && !growStorageBy(needed)) return false; internalAppendN(t, needed); return true; } template __attribute__((always_inline)) inline void Vector::internalAppendN(const T &t, size_t needed) { do { } while(0); do { } while(0); Impl::copyConstructN(endNoCheck(), needed, t); mLength += needed; } template inline bool Vector::insert(T *p, const T &val) { do { } while(0); size_t pos = p - begin(); do { } while(0); size_t oldLength = mLength; if (pos == oldLength) return append(val); { T oldBack = back(); if (!append(oldBack)) return false; } for (size_t i = oldLength; i > pos; --i) (*this)[i] = (*this)[i - 1]; (*this)[pos] = val; return true; } template inline void Vector::erase(T *it) { do { } while(0); while (it + 1 != end()) { *it = *(it + 1); ++it; } popBack(); } template template __attribute__((always_inline)) inline bool Vector::append(const U *insBegin, const U *insEnd) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); size_t needed = PointerRangeSize(insBegin, insEnd); if (mLength + needed > mCapacity && !growStorageBy(needed)) return false; internalAppend(insBegin, needed); return true; } template template __attribute__((always_inline)) inline void Vector::internalAppend(const U *insBegin, size_t length) { do { } while(0); do { } while(0); Impl::copyConstruct(endNoCheck(), insBegin, insBegin + length); mLength += length; } template template inline bool Vector::append(const Vector &other) { return append(other.begin(), other.end()); } template template inline void Vector::internalAppend(const Vector &other) { internalAppend(other.begin(), other.length()); } template template __attribute__((always_inline)) inline bool Vector::append(const U *insBegin, size_t length) { return this->append(insBegin, insBegin + length); } template __attribute__((always_inline)) inline void Vector::popBack() { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); do { } while(0); --mLength; endNoCheck()->~T(); } template __attribute__((always_inline)) inline T Vector::popCopy() { T ret = back(); popBack(); return ret; } template inline T * Vector::extractRawBuffer() { T *ret; if (usingInlineStorage()) { ret = reinterpret_cast(this->malloc_(mLength * sizeof(T))); if (!ret) return __null; Impl::copyConstruct(ret, beginNoCheck(), endNoCheck()); Impl::destroy(beginNoCheck(), endNoCheck()); mLength = 0; } else { ret = mBegin; mBegin = (T *)storage.addr(); mLength = 0; mCapacity = sInlineCapacity; } return ret; } template inline void Vector::replaceRawBuffer(T *p, size_t length) { ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); Impl::destroy(beginNoCheck(), endNoCheck()); if (!usingInlineStorage()) this->free_(beginNoCheck()); if (length <= sInlineCapacity) { mBegin = (T *)storage.addr(); mLength = length; mCapacity = sInlineCapacity; Impl::moveConstruct(mBegin, p, p + length); Impl::destroy(p, p + length); this->free_(p); } else { mBegin = p; mLength = length; mCapacity = length; } } template inline size_t Vector::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { return usingInlineStorage() ? 0 : mallocSizeOf(beginNoCheck()); } template inline size_t Vector::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); } } # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 #define JSVAL_INT_BITS 32 #define JSVAL_INT_MIN ((int32_t)0x80000000) #define JSVAL_INT_MAX ((int32_t)0x7fffffff) #define JS_Assert MOZ_Assert namespace JS { # 109 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" template class AnchorPermitted; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; template class Anchor: AnchorPermitted { public: Anchor() { } explicit Anchor(T t) { hold = t; } inline ~Anchor(); T &get() { return hold; } const T &get() const { return hold; } void set(const T &t) { hold = t; } void operator=(const T &t) { hold = t; } void clear() { hold = 0; } private: T hold; Anchor(const Anchor &) ; const Anchor &operator=(const Anchor &) ; }; template inline Anchor::~Anchor() { # 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" asm volatile("":: "g" (hold) : "memory"); } # 222 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" class Value { public: __attribute__((always_inline)) inline void setNull() { data.asBits = BUILD_JSVAL(JSVAL_TAG_NULL, 0).asBits; } __attribute__((always_inline)) inline void setUndefined() { data.asBits = BUILD_JSVAL(JSVAL_TAG_UNDEFINED, 0).asBits; } __attribute__((always_inline)) inline void setInt32(int32_t i) { data = INT32_TO_JSVAL_IMPL(i); } __attribute__((always_inline)) inline int32_t &getInt32Ref() { do { } while(0); return data.s.payload.i32; } __attribute__((always_inline)) inline void setDouble(double d) { data = DOUBLE_TO_JSVAL_IMPL(d); } __attribute__((always_inline)) inline double &getDoubleRef() { do { } while(0); return data.asDouble; } __attribute__((always_inline)) inline void setString(JSString *str) { do { } while(0); data = STRING_TO_JSVAL_IMPL(str); } __attribute__((always_inline)) inline void setString(const JS::Anchor &str) { setString(str.get()); } __attribute__((always_inline)) inline void setObject(JSObject &obj) { do { } while(0); data = OBJECT_TO_JSVAL_IMPL(&obj); } __attribute__((always_inline)) inline void setBoolean(bool b) { data = BOOLEAN_TO_JSVAL_IMPL(b); } __attribute__((always_inline)) inline void setMagic(JSWhyMagic why) { data = MAGIC_TO_JSVAL_IMPL(why); } __attribute__((always_inline)) inline bool setNumber(uint32_t ui) { if (ui > ((int32_t)0x7fffffff)) { setDouble((double)ui); return false; } else { setInt32((int32_t)ui); return true; } } __attribute__((always_inline)) inline bool setNumber(double d) { int32_t i; if (MOZ_DOUBLE_IS_INT32(d, &i)) { setInt32(i); return true; } else { setDouble(d); return false; } } __attribute__((always_inline)) inline void setObjectOrNull(JSObject *arg) { if (arg) setObject(*arg); else setNull(); } __attribute__((always_inline)) inline void swap(Value &rhs) { uint64_t tmp = rhs.data.asBits; rhs.data.asBits = data.asBits; data.asBits = tmp; } __attribute__((always_inline)) inline bool isUndefined() const { return JSVAL_IS_UNDEFINED_IMPL(data); } __attribute__((always_inline)) inline bool isNull() const { return JSVAL_IS_NULL_IMPL(data); } __attribute__((always_inline)) inline bool isNullOrUndefined() const { return isNull() || isUndefined(); } __attribute__((always_inline)) inline bool isInt32() const { return JSVAL_IS_INT32_IMPL(data); } __attribute__((always_inline)) inline bool isInt32(int32_t i32) const { return JSVAL_IS_SPECIFIC_INT32_IMPL(data, i32); } __attribute__((always_inline)) inline bool isDouble() const { return JSVAL_IS_DOUBLE_IMPL(data); } __attribute__((always_inline)) inline bool isNumber() const { return JSVAL_IS_NUMBER_IMPL(data); } __attribute__((always_inline)) inline bool isString() const { return JSVAL_IS_STRING_IMPL(data); } __attribute__((always_inline)) inline bool isObject() const { return JSVAL_IS_OBJECT_IMPL(data); } __attribute__((always_inline)) inline bool isPrimitive() const { return JSVAL_IS_PRIMITIVE_IMPL(data); } __attribute__((always_inline)) inline bool isObjectOrNull() const { return JSVAL_IS_OBJECT_OR_NULL_IMPL(data); } __attribute__((always_inline)) inline bool isGCThing() const { return JSVAL_IS_GCTHING_IMPL(data); } __attribute__((always_inline)) inline bool isBoolean() const { return JSVAL_IS_BOOLEAN_IMPL(data); } __attribute__((always_inline)) inline bool isTrue() const { return JSVAL_IS_SPECIFIC_BOOLEAN(data, true); } __attribute__((always_inline)) inline bool isFalse() const { return JSVAL_IS_SPECIFIC_BOOLEAN(data, false); } __attribute__((always_inline)) inline bool isMagic() const { return JSVAL_IS_MAGIC_IMPL(data); } __attribute__((always_inline)) inline bool isMagic(JSWhyMagic why) const { do { } while (0); return JSVAL_IS_MAGIC_IMPL(data); } __attribute__((always_inline)) inline bool isMarkable() const { return JSVAL_IS_TRACEABLE_IMPL(data); } __attribute__((always_inline)) inline JSGCTraceKind gcKind() const { do { } while(0); return JSGCTraceKind(JSVAL_TRACE_KIND_IMPL(data)); } __attribute__((always_inline)) inline JSWhyMagic whyMagic() const { do { } while(0); return data.s.payload.why; } __attribute__((always_inline)) inline bool operator==(const Value &rhs) const { return data.asBits == rhs.data.asBits; } __attribute__((always_inline)) inline bool operator!=(const Value &rhs) const { return data.asBits != rhs.data.asBits; } friend inline bool SameType(const Value &lhs, const Value &rhs); __attribute__((always_inline)) inline int32_t toInt32() const { do { } while(0); return JSVAL_TO_INT32_IMPL(data); } __attribute__((always_inline)) inline double toDouble() const { do { } while(0); return data.asDouble; } __attribute__((always_inline)) inline double toNumber() const { do { } while(0); return isDouble() ? toDouble() : double(toInt32()); } __attribute__((always_inline)) inline JSString *toString() const { do { } while(0); return JSVAL_TO_STRING_IMPL(data); } __attribute__((always_inline)) inline JSObject &toObject() const { do { } while(0); return *JSVAL_TO_OBJECT_IMPL(data); } __attribute__((always_inline)) inline JSObject *toObjectOrNull() const { do { } while(0); return JSVAL_TO_OBJECT_IMPL(data); } __attribute__((always_inline)) inline void *toGCThing() const { do { } while(0); return JSVAL_TO_GCTHING_IMPL(data); } __attribute__((always_inline)) inline bool toBoolean() const { do { } while(0); return JSVAL_TO_BOOLEAN_IMPL(data); } __attribute__((always_inline)) inline uint32_t payloadAsRawUint32() const { do { } while(0); return data.s.payload.u32; } __attribute__((always_inline)) inline uint64_t asRawBits() const { return data.asBits; } __attribute__((always_inline)) inline JSValueType extractNonDoubleType() const { return JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(data); } # 523 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" __attribute__((always_inline)) inline void setPrivate(void *ptr) { data = PRIVATE_PTR_TO_JSVAL_IMPL(ptr); } __attribute__((always_inline)) inline void *toPrivate() const { do { } while(0); return JSVAL_TO_PRIVATE_PTR_IMPL(data); } __attribute__((always_inline)) inline void setPrivateUint32(uint32_t ui) { data = PRIVATE_UINT32_TO_JSVAL_IMPL(ui); } __attribute__((always_inline)) inline uint32_t toPrivateUint32() const { do { } while(0); return JSVAL_TO_PRIVATE_UINT32_IMPL(data); } __attribute__((always_inline)) inline uint32_t &getPrivateUint32Ref() { do { } while(0); return data.s.payload.u32; } __attribute__((always_inline)) inline void setUnmarkedPtr(void *ptr) { data.asPtr = ptr; } __attribute__((always_inline)) inline void *toUnmarkedPtr() const { return data.asPtr; } const size_t *payloadWord() const { return &data.s.payload.word; } const uintptr_t *payloadUIntPtr() const { return &data.s.payload.uintptr; } private: jsval_layout data; private: void staticAssertions() { typedef int moz_static_assert8[(sizeof(JSValueType) == 1) ? 1 : -1]; typedef int moz_static_assert9[(sizeof(JSValueTag) == 4) ? 1 : -1]; typedef int moz_static_assert10[(sizeof(JSBool) == 4) ? 1 : -1]; typedef int moz_static_assert11[(sizeof(JSWhyMagic) <= 4) ? 1 : -1]; typedef int moz_static_assert12[(sizeof(Value) == 8) ? 1 : -1]; } friend jsval_layout (::JSVAL_TO_IMPL)(Value); friend Value (::IMPL_TO_JSVAL)(jsval_layout l); }; inline bool IsPoisonedValue(const Value &v) { if (v.isString()) return IsPoisonedPtr(v.toString()); if (v.isObject()) return IsPoisonedPtr(&v.toObject()); return false; } static __attribute__((always_inline)) inline Value NullValue() { Value v; v.setNull(); return v; } static __attribute__((always_inline)) inline Value UndefinedValue() { Value v; v.setUndefined(); return v; } static __attribute__((always_inline)) inline Value Int32Value(int32_t i32) { Value v; v.setInt32(i32); return v; } static __attribute__((always_inline)) inline Value DoubleValue(double dbl) { Value v; v.setDouble(dbl); return v; } static __attribute__((always_inline)) inline Value StringValue(JSString *str) { Value v; v.setString(str); return v; } static __attribute__((always_inline)) inline Value BooleanValue(bool boo) { Value v; v.setBoolean(boo); return v; } static __attribute__((always_inline)) inline Value ObjectValue(JSObject &obj) { Value v; v.setObject(obj); return v; } static __attribute__((always_inline)) inline Value MagicValue(JSWhyMagic why) { Value v; v.setMagic(why); return v; } static __attribute__((always_inline)) inline Value NumberValue(float f) { Value v; v.setNumber(f); return v; } static __attribute__((always_inline)) inline Value NumberValue(double dbl) { Value v; v.setNumber(dbl); return v; } static __attribute__((always_inline)) inline Value NumberValue(int8_t i) { return Int32Value(i); } static __attribute__((always_inline)) inline Value NumberValue(uint8_t i) { return Int32Value(i); } static __attribute__((always_inline)) inline Value NumberValue(int16_t i) { return Int32Value(i); } static __attribute__((always_inline)) inline Value NumberValue(uint16_t i) { return Int32Value(i); } static __attribute__((always_inline)) inline Value NumberValue(int32_t i) { return Int32Value(i); } static __attribute__((always_inline)) inline Value NumberValue(uint32_t i) { Value v; v.setNumber(i); return v; } namespace detail { template class MakeNumberValue { public: template static inline Value create(const T t) { Value v; if (((int32_t)0x80000000) <= t && t <= ((int32_t)0x7fffffff)) v.setInt32(int32_t(t)); else v.setDouble(double(t)); return v; } }; template <> class MakeNumberValue { public: template static inline Value create(const T t) { Value v; if (t <= ((int32_t)0x7fffffff)) v.setInt32(int32_t(t)); else v.setDouble(double(t)); return v; } }; } template static __attribute__((always_inline)) inline Value NumberValue(const T t) { do { } while(0); return detail::MakeNumberValue::is_signed>::create(t); } static __attribute__((always_inline)) inline Value ObjectOrNullValue(JSObject *obj) { Value v; v.setObjectOrNull(obj); return v; } static __attribute__((always_inline)) inline Value PrivateValue(void *ptr) { Value v; v.setPrivate(ptr); return v; } static __attribute__((always_inline)) inline Value PrivateUint32Value(uint32_t ui) { Value v; v.setPrivateUint32(ui); return v; } __attribute__((always_inline)) inline bool SameType(const Value &lhs, const Value &rhs) { return JSVAL_SAME_TYPE_IMPL(lhs.data, rhs.data); } template <> struct RootMethods { static Value initial() { return UndefinedValue(); } static ThingRootKind kind() { return THING_ROOT_VALUE; } static bool poisoned(const Value &v) { return IsPoisonedValue(v); } }; template <> struct RootMethods { static Value initial() { return UndefinedValue(); } static ThingRootKind kind() { return THING_ROOT_VALUE; } static bool poisoned(const Value &v) { return IsPoisonedValue(v); } }; # 864 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define CHECK_REQUEST(cx) ((void) 0) # 875 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" inline void AssertArgumentsAreSane(JSContext *cx, const Value &v) { } class __attribute__((visibility("default"))) AutoGCRooter { public: AutoGCRooter(JSContext *cx, ptrdiff_t tag); ~AutoGCRooter() { do { } while(0); *stackTop = down; } inline void trace(JSTracer *trc); static void traceAll(JSTracer *trc); protected: AutoGCRooter * const down; # 903 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" ptrdiff_t tag; enum { JSVAL = -1, VALARRAY = -2, PARSER = -3, SHAPEVECTOR = -4, ENUMERATOR = -5, IDARRAY = -6, DESCRIPTORS = -7, NAMESPACES = -8, XML = -9, OBJECT = -10, ID = -11, VALVECTOR = -12, DESCRIPTOR = -13, STRING = -14, IDVECTOR = -15, OBJVECTOR = -16, SCRIPTVECTOR =-17, PROPDESC = -18, SHAPERANGE = -19, STACKSHAPE = -20, STACKBASESHAPE=-21, BINDINGS = -22, GETTERSETTER =-23, REGEXPSTATICS=-24, HASHABLEVALUE=-25 }; private: AutoGCRooter ** const stackTop; AutoGCRooter(AutoGCRooter &ida) ; void operator=(AutoGCRooter &ida) ; }; class AutoValueRooter : private AutoGCRooter { public: explicit AutoValueRooter(JSContext *cx ) : AutoGCRooter(cx, JSVAL), val(NullValue()) { do { } while (0); } AutoValueRooter(JSContext *cx, const Value &v ) : AutoGCRooter(cx, JSVAL), val(v) { do { } while (0); } void set(Value v) { do { } while(0); val = v; } const Value &value() const { do { } while(0); return val; } Value *addr() { do { } while(0); return &val; } const Value &jsval_value() const { do { } while(0); return val; } Value *jsval_addr() { do { } while(0); return &val; } friend void AutoGCRooter::trace(JSTracer *trc); private: Value val; }; class AutoObjectRooter : private AutoGCRooter { public: AutoObjectRooter(JSContext *cx, JSObject *obj = __null ) : AutoGCRooter(cx, OBJECT), obj(obj) { do { } while (0); } void setObject(JSObject *obj) { this->obj = obj; } JSObject * object() const { return obj; } JSObject ** addr() { return &obj; } friend void AutoGCRooter::trace(JSTracer *trc); private: JSObject *obj; }; class AutoStringRooter : private AutoGCRooter { public: AutoStringRooter(JSContext *cx, JSString *str = __null ) : AutoGCRooter(cx, STRING), str(str) { do { } while (0); } void setString(JSString *str) { this->str = str; } JSString * string() const { return str; } JSString ** addr() { return &str; } friend void AutoGCRooter::trace(JSTracer *trc); private: JSString *str; }; class AutoArrayRooter : private AutoGCRooter { public: AutoArrayRooter(JSContext *cx, size_t len, Value *vec ) : AutoGCRooter(cx, len), array(vec), skip(cx, array, len) { do { } while (0); do { } while(0); } void changeLength(size_t newLength) { tag = ptrdiff_t(newLength); do { } while(0); } void changeArray(Value *newArray, size_t newLength) { changeLength(newLength); array = newArray; } Value *array; friend void AutoGCRooter::trace(JSTracer *trc); private: SkipRoot skip; }; class AutoEnumStateRooter : private AutoGCRooter { public: AutoEnumStateRooter(JSContext *cx, JSObject *obj ) : AutoGCRooter(cx, ENUMERATOR), obj(obj), stateValue(), context(cx) { do { } while (0); do { } while(0); } ~AutoEnumStateRooter(); friend void AutoGCRooter::trace(JSTracer *trc); const Value &state() const { return stateValue; } Value *addr() { return &stateValue; } protected: void trace(JSTracer *trc); JSObject *obj; private: Value stateValue; JSContext *context; }; template class AutoVectorRooter : protected AutoGCRooter { public: explicit AutoVectorRooter(JSContext *cx, ptrdiff_t tag ) : AutoGCRooter(cx, tag), vector(cx), vectorRoot(cx, &vector) { do { } while (0); } size_t length() const { return vector.length(); } bool append(const T &v) { return vector.append(v); } void infallibleAppend(const T &v) { vector.infallibleAppend(v); } void popBack() { vector.popBack(); } T popCopy() { return vector.popCopy(); } bool growBy(size_t inc) { size_t oldLength = vector.length(); if (!vector.growByUninitialized(inc)) return false; makeRangeGCSafe(oldLength); return true; } bool resize(size_t newLength) { size_t oldLength = vector.length(); if (newLength <= oldLength) { vector.shrinkBy(oldLength - newLength); return true; } if (!vector.growByUninitialized(newLength - oldLength)) return false; makeRangeGCSafe(oldLength); return true; } void clear() { vector.clear(); } bool reserve(size_t newLength) { return vector.reserve(newLength); } T &operator[](size_t i) { return vector[i]; } const T &operator[](size_t i) const { return vector[i]; } const T *begin() const { return vector.begin(); } T *begin() { return vector.begin(); } const T *end() const { return vector.end(); } T *end() { return vector.end(); } const T &back() const { return vector.back(); } friend void AutoGCRooter::trace(JSTracer *trc); private: void makeRangeGCSafe(size_t oldLength) { T *t = vector.begin() + oldLength; for (size_t i = oldLength; i < vector.length(); ++i, ++t) memset(t, 0, sizeof(T)); } typedef js::Vector VectorImpl; VectorImpl vector; SkipRoot vectorRoot; }; class AutoValueVector : public AutoVectorRooter { public: explicit AutoValueVector(JSContext *cx ) : AutoVectorRooter(cx, VALVECTOR) { do { } while (0); } }; class AutoIdVector : public AutoVectorRooter { public: explicit AutoIdVector(JSContext *cx ) : AutoVectorRooter(cx, IDVECTOR) { do { } while (0); } }; class AutoScriptVector : public AutoVectorRooter { public: explicit AutoScriptVector(JSContext *cx ) : AutoVectorRooter(cx, SCRIPTVECTOR) { do { } while (0); } }; } # 1236 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JS::Value jsval; static __attribute__((always_inline)) inline jsval_layout JSVAL_TO_IMPL(jsval v) { return v.data; } static __attribute__((always_inline)) inline jsval IMPL_TO_JSVAL(jsval_layout l) { JS::Value v; v.data = l; return v; } # 1286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef int moz_static_assert13[(sizeof(jsval_layout) == sizeof(jsval)) ? 1 : -1]; typedef JS::Handle JSHandleObject; typedef JS::Handle JSHandleId; # 1322 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSPropertyOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, jsval *vp); # 1332 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSStrictPropertyOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); # 1367 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSNewEnumerateOp)(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, jsval *statep, jsid *idp); typedef JSBool (* JSEnumerateOp)(JSContext *cx, JSHandleObject obj); # 1390 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id); # 1421 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSNewResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, unsigned flags, JSObject **objp); typedef JSBool (* JSConvertOp)(JSContext *cx, JSHandleObject obj, JSType type, jsval *vp); typedef JSType (* JSTypeOfOp)(JSContext *cx, JSObject *obj); typedef struct JSFreeOp JSFreeOp; struct JSFreeOp { private: JSRuntime *runtime_; protected: JSFreeOp(JSRuntime *rt) : runtime_(rt) { } public: JSRuntime *runtime() const { return runtime_; } }; typedef void (* JSFinalizeOp)(JSFreeOp *fop, JSObject *obj); typedef struct JSStringFinalizer JSStringFinalizer; struct JSStringFinalizer { void (*finalize)(const JSStringFinalizer *fin, jschar *chars); }; typedef JSBool (* JSCheckAccessOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, JSAccessMode mode, jsval *vp); typedef JSBool (* JSHasInstanceOp)(JSContext *cx, JSHandleObject obj, const jsval *v, JSBool *bp); # 1510 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef void (* JSTraceOp)(JSTracer *trc, JSObject *obj); typedef void (* JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize); typedef JSBool (* JSEqualityOp)(JSContext *cx, JSHandleObject obj, const jsval *v, JSBool *bp); typedef JSBool (* JSNative)(JSContext *cx, unsigned argc, jsval *vp); typedef enum JSContextOp { JSCONTEXT_NEW, JSCONTEXT_DESTROY } JSContextOp; # 1552 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSContextCallback)(JSContext *cx, unsigned contextOp); typedef enum JSGCStatus { JSGC_BEGIN, JSGC_END } JSGCStatus; typedef void (* JSGCCallback)(JSRuntime *rt, JSGCStatus status); typedef enum JSFinalizeStatus { JSFINALIZE_START, JSFINALIZE_END } JSFinalizeStatus; typedef void (* JSFinalizeCallback)(JSFreeOp *fop, JSFinalizeStatus status, JSBool isCompartment); typedef void (* JSTraceDataOp)(JSTracer *trc, void *data); typedef JSBool (* JSOperationCallback)(JSContext *cx); typedef void (* JSErrorReporter)(JSContext *cx, const char *message, JSErrorReport *report); # 1597 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef enum JSExnType { JSEXN_NONE = -1, JSEXN_ERR, JSEXN_INTERNALERR, JSEXN_EVALERR, JSEXN_RANGEERR, JSEXN_REFERENCEERR, JSEXN_SYNTAXERR, JSEXN_TYPEERR, JSEXN_URIERR, JSEXN_LIMIT } JSExnType; typedef struct JSErrorFormatString { const char *format; uint16_t argCount; int16_t exnType; } JSErrorFormatString; typedef const JSErrorFormatString * (* JSErrorCallback)(void *userRef, const char *locale, const unsigned errorNumber); # 1633 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (* JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval); typedef JSBool (* JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval); typedef JSBool (* JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2, jsval *rval); typedef JSBool (* JSLocaleToUnicode)(JSContext *cx, const char *src, jsval *rval); typedef void (* JSDestroyPrincipalsOp)(JSPrincipals *principals); typedef JSBool (* JSSubsumePrincipalsOp)(JSPrincipals *principals1, JSPrincipals *principals2); # 1664 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSPrincipals * (* JSObjectPrincipalsFinder)(JSObject *obj); typedef JSBool (* JSCSPEvalChecker)(JSContext *cx); typedef JSBool (* JSPushContextPrincipalOp)(JSContext *cx, JSPrincipals *principals); typedef JSBool (* JSPopContextPrincipalOp)(JSContext *cx); typedef JSObject * (* JSWrapObjectCallback)(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent, unsigned flags); typedef JSObject * (* JSPreWrapCallback)(JSContext *cx, JSObject *scope, JSObject *obj, unsigned flags); # 1711 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSObject * (* JSSameCompartmentWrapObjectCallback)(JSContext *cx, JSObject *obj); typedef void (* JSDestroyCompartmentCallback)(JSFreeOp *fop, JSCompartment *compartment); # 1726 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSObject *(*ReadStructuredCloneOp)(JSContext *cx, JSStructuredCloneReader *r, uint32_t tag, uint32_t data, void *closure); # 1740 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef JSBool (*WriteStructuredCloneOp)(JSContext *cx, JSStructuredCloneWriter *w, JSObject *obj, void *closure); typedef void (*StructuredCloneErrorOp)(JSContext *cx, uint32_t errorid); extern "C" { # 1769 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) const jsval JSVAL_NULL; extern __attribute__((visibility("default"))) const jsval JSVAL_ZERO; extern __attribute__((visibility("default"))) const jsval JSVAL_ONE; extern __attribute__((visibility("default"))) const jsval JSVAL_FALSE; extern __attribute__((visibility("default"))) const jsval JSVAL_TRUE; extern __attribute__((visibility("default"))) const jsval JSVAL_VOID; static __attribute__((always_inline)) inline JSBool JSVAL_IS_NULL(jsval v) { return JSVAL_IS_NULL_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_VOID(jsval v) { return JSVAL_IS_UNDEFINED_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_INT(jsval v) { return JSVAL_IS_INT32_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline int32_t JSVAL_TO_INT(jsval v) { do { } while(0); return JSVAL_TO_INT32_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline jsval INT_TO_JSVAL(int32_t i) { return IMPL_TO_JSVAL(INT32_TO_JSVAL_IMPL(i)); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_DOUBLE(jsval v) { return JSVAL_IS_DOUBLE_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline double JSVAL_TO_DOUBLE(jsval v) { jsval_layout l; do { } while(0); l = JSVAL_TO_IMPL(v); return l.asDouble; } static __attribute__((always_inline)) inline jsval DOUBLE_TO_JSVAL(double d) { jsval_layout l; if ((__builtin_expect((d != d), 0))) { l.asBits = 0x7FF8000000000000LL; } else { l.asDouble = d; } return IMPL_TO_JSVAL(l); } static __attribute__((always_inline)) inline jsval UINT_TO_JSVAL(uint32_t i) { if (i <= ((int32_t)0x7fffffff)) return INT_TO_JSVAL((int32_t)i); return DOUBLE_TO_JSVAL((double)i); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_NUMBER(jsval v) { return JSVAL_IS_NUMBER_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_STRING(jsval v) { return JSVAL_IS_STRING_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline JSString * JSVAL_TO_STRING(jsval v) { do { } while(0); return JSVAL_TO_STRING_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline jsval STRING_TO_JSVAL(JSString *str) { return IMPL_TO_JSVAL(STRING_TO_JSVAL_IMPL(str)); } static __attribute__((always_inline)) inline JSObject * JSVAL_TO_OBJECT(jsval v) { do { } while(0); return JSVAL_TO_OBJECT_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline jsval OBJECT_TO_JSVAL(JSObject *obj) { if (obj) return IMPL_TO_JSVAL(OBJECT_TO_JSVAL_IMPL(obj)); return JSVAL_NULL; } static __attribute__((always_inline)) inline JSBool JSVAL_IS_BOOLEAN(jsval v) { return JSVAL_IS_BOOLEAN_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline JSBool JSVAL_TO_BOOLEAN(jsval v) { do { } while(0); return JSVAL_TO_BOOLEAN_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline jsval BOOLEAN_TO_JSVAL(JSBool b) { return IMPL_TO_JSVAL(BOOLEAN_TO_JSVAL_IMPL(b)); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_PRIMITIVE(jsval v) { return JSVAL_IS_PRIMITIVE_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline JSBool JSVAL_IS_GCTHING(jsval v) { return JSVAL_IS_GCTHING_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline void * JSVAL_TO_GCTHING(jsval v) { do { } while(0); return JSVAL_TO_GCTHING_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline jsval PRIVATE_TO_JSVAL(void *ptr) { return IMPL_TO_JSVAL(PRIVATE_PTR_TO_JSVAL_IMPL(ptr)); } static __attribute__((always_inline)) inline void * JSVAL_TO_PRIVATE(jsval v) { do { } while(0); return JSVAL_TO_PRIVATE_PTR_IMPL(JSVAL_TO_IMPL(v)); } # 1955 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSID_TYPE_STRING 0x0 #define JSID_TYPE_INT 0x1 #define JSID_TYPE_VOID 0x2 #define JSID_TYPE_OBJECT 0x4 #define JSID_TYPE_DEFAULT_XML_NAMESPACE 0x6 #define JSID_TYPE_MASK 0x7 #define id iden static __attribute__((always_inline)) inline JSBool JSID_IS_STRING(jsid iden) { return ((iden) & 0x7) == 0; } static __attribute__((always_inline)) inline JSString * JSID_TO_STRING(jsid iden) { do { } while(0); return (JSString *)(iden); } static __attribute__((always_inline)) inline JSBool JSID_IS_ZERO(jsid iden) { return (iden) == 0; } __attribute__((visibility("default"))) JSBool JS_StringHasBeenInterned(JSContext *cx, JSString *str); # 1997 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" __attribute__((visibility("default"))) jsid INTERNED_STRING_TO_JSID(JSContext *cx, JSString *str); static __attribute__((always_inline)) inline JSBool JSID_IS_INT(jsid iden) { return !!((iden) & 0x1); } static __attribute__((always_inline)) inline int32_t JSID_TO_INT(jsid iden) { do { } while(0); return ((uint32_t)(iden)) >> 1; } #define JSID_INT_MIN 0 #define JSID_INT_MAX INT32_MAX static __attribute__((always_inline)) inline JSBool INT_FITS_IN_JSID(int32_t i) { return i >= 0; } static __attribute__((always_inline)) inline jsid INT_TO_JSID(int32_t i) { jsid iden; do { } while(0); (iden) = ((i << 1) | 0x1); return iden; } static __attribute__((always_inline)) inline JSBool JSID_IS_OBJECT(jsid iden) { return ((iden) & 0x7) == 0x4 && (size_t)(iden) != 0x4; } static __attribute__((always_inline)) inline JSObject * JSID_TO_OBJECT(jsid iden) { do { } while(0); return (JSObject *)((iden) & ~(size_t)0x7); } static __attribute__((always_inline)) inline jsid OBJECT_TO_JSID(JSObject *obj) { jsid iden; do { } while(0); do { } while(0); (iden) = ((size_t)obj | 0x4); return iden; } static __attribute__((always_inline)) inline JSBool JSID_IS_GCTHING(jsid iden) { return JSID_IS_STRING(iden) || JSID_IS_OBJECT(iden); } static __attribute__((always_inline)) inline void * JSID_TO_GCTHING(jsid iden) { return (void *)((iden) & ~(size_t)0x7); } static __attribute__((always_inline)) inline JSBool JSID_IS_DEFAULT_XML_NAMESPACE(jsid iden) { do { } while (0) ; return ((size_t)(iden) == 0x6); } #define JS_DEFAULT_XML_NAMESPACE_ID ((jsid)JSID_TYPE_DEFAULT_XML_NAMESPACE) # 2093 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" static __attribute__((always_inline)) inline JSBool JSID_IS_VOID(jsid iden) { do { } while (0) ; return ((size_t)(iden) == 0x2); } static __attribute__((always_inline)) inline JSBool JSID_IS_EMPTY(jsid iden) { return ((size_t)(iden) == 0x4); } #undef id #define JSID_VOID ((jsid)JSID_TYPE_VOID) #define JSID_EMPTY ((jsid)JSID_TYPE_OBJECT) static __attribute__((always_inline)) inline JSBool JSVAL_IS_UNIVERSAL(jsval v) { return !JSVAL_IS_GCTHING(v); } namespace JS { class AutoIdRooter : private AutoGCRooter { public: explicit AutoIdRooter(JSContext *cx, jsid id = INT_TO_JSID(0) ) : AutoGCRooter(cx, ID), id_(id) { do { } while (0); } jsid id() { return id_; } jsid * addr() { return &id_; } friend void AutoGCRooter::trace(JSTracer *trc); private: jsid id_; }; } #define JSVAL_LOCK(cx,v) (JSVAL_IS_GCTHING(v) ? JS_LockGCThing(cx, JSVAL_TO_GCTHING(v)) : JS_TRUE) #define JSVAL_UNLOCK(cx,v) (JSVAL_IS_GCTHING(v) ? JS_UnlockGCThing(cx, JSVAL_TO_GCTHING(v)) : JS_TRUE) #define JSPROP_ENUMERATE 0x01 #define JSPROP_READONLY 0x02 #define JSPROP_PERMANENT 0x04 #define JSPROP_GETTER 0x10 #define JSPROP_SETTER 0x20 #define JSPROP_SHARED 0x40 #define JSPROP_INDEX 0x80 #define JSPROP_SHORTID 0x100 #define JSPROP_NATIVE_ACCESSORS 0x08 #define JSFUN_LAMBDA 0x08 #define JSFUN_HEAVYWEIGHT 0x80 #define JSFUN_HEAVYWEIGHT_TEST(f) ((f) & JSFUN_HEAVYWEIGHT) #define JSFUN_HAS_REST 0x0100 #define JSFUN_CONSTRUCTOR 0x0200 #define JSFUN_HAS_DEFAULTS 0x0400 #define JSFUN_FLAGS_MASK 0x07f8 #define JSFUN_STUB_GSOPS 0x1000 # 2221 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSFUN_GENERIC_NATIVE JSFUN_LAMBDA # 2231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_CallOnce(JSCallOnceType *once, JSInitCallback func); extern __attribute__((visibility("default"))) int64_t JS_Now(void); extern __attribute__((visibility("default"))) jsval JS_GetNaNValue(JSContext *cx); extern __attribute__((visibility("default"))) jsval JS_GetNegativeInfinityValue(JSContext *cx); extern __attribute__((visibility("default"))) jsval JS_GetPositiveInfinityValue(JSContext *cx); extern __attribute__((visibility("default"))) jsval JS_GetEmptyStringValue(JSContext *cx); extern __attribute__((visibility("default"))) JSString * JS_GetEmptyString(JSRuntime *rt); # 2286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_ConvertArguments(JSContext *cx, unsigned argc, jsval *argv, const char *format, ...); # 2346 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_ConvertValue(JSContext *cx, jsval v, JSType type, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_ValueToObject(JSContext *cx, jsval v, JSObject **objp); extern __attribute__((visibility("default"))) JSFunction * JS_ValueToFunction(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) JSFunction * JS_ValueToConstructor(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) JSString * JS_ValueToString(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) JSString * JS_ValueToSource(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) JSBool JS_ValueToNumber(JSContext *cx, jsval v, double *dp); namespace js { extern __attribute__((visibility("default"))) bool ToNumberSlow(JSContext *cx, JS::Value v, double *dp); } namespace JS { __attribute__((always_inline)) inline bool ToNumber(JSContext *cx, const Value &v, double *out) { AssertArgumentsAreSane(cx, v); if (v.isNumber()) { *out = v.toNumber(); MaybeCheckStackRoots(cx); return true; } return js::ToNumberSlow(cx, v, out); } } extern __attribute__((visibility("default"))) JSBool JS_DoubleIsInt32(double d, int32_t *ip); extern __attribute__((visibility("default"))) int32_t JS_DoubleToInt32(double d); extern __attribute__((visibility("default"))) uint32_t JS_DoubleToUint32(double d); extern __attribute__((visibility("default"))) JSBool JS_ValueToECMAInt32(JSContext *cx, jsval v, int32_t *ip); namespace js { extern __attribute__((visibility("default"))) bool ToInt32Slow(JSContext *cx, const JS::Value &v, int32_t *out); } namespace JS { __attribute__((always_inline)) inline bool ToInt32(JSContext *cx, const js::Value &v, int32_t *out) { AssertArgumentsAreSane(cx, v); if (v.isInt32()) { *out = v.toInt32(); return true; } return js::ToInt32Slow(cx, v, out); } } extern __attribute__((visibility("default"))) JSBool JS_ValueToECMAUint32(JSContext *cx, jsval v, uint32_t *ip); extern __attribute__((visibility("default"))) JSBool JS_ValueToInt32(JSContext *cx, jsval v, int32_t *ip); extern __attribute__((visibility("default"))) JSBool JS_ValueToUint16(JSContext *cx, jsval v, uint16_t *ip); extern __attribute__((visibility("default"))) JSBool JS_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp); extern __attribute__((visibility("default"))) JSType JS_TypeOfValue(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) const char * JS_GetTypeName(JSContext *cx, JSType type); extern __attribute__((visibility("default"))) JSBool JS_StrictlyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal); extern __attribute__((visibility("default"))) JSBool JS_LooselyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal); extern __attribute__((visibility("default"))) JSBool JS_SameValue(JSContext *cx, jsval v1, jsval v2, JSBool *same); extern __attribute__((visibility("default"))) JSBool JS_IsBuiltinEvalFunction(JSFunction *fun); extern __attribute__((visibility("default"))) JSBool JS_IsBuiltinFunctionConstructor(JSFunction *fun); # 2492 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_NewRuntime JS_Init #define JS_DestroyRuntime JS_Finish #define JS_LockRuntime JS_Lock #define JS_UnlockRuntime JS_Unlock extern __attribute__((visibility("default"))) JSRuntime * JS_Init(uint32_t maxbytes); #define JS_CommenceRuntimeShutDown(rt) ((void) 0) extern __attribute__((visibility("default"))) void JS_Finish(JSRuntime *rt); extern __attribute__((visibility("default"))) void JS_ShutDown(void); __attribute__((visibility("default"))) void * JS_GetRuntimePrivate(JSRuntime *rt); extern __attribute__((visibility("default"))) JSRuntime * JS_GetRuntime(JSContext *cx); __attribute__((visibility("default"))) void JS_SetRuntimePrivate(JSRuntime *rt, void *data); extern __attribute__((visibility("default"))) void JS_BeginRequest(JSContext *cx); extern __attribute__((visibility("default"))) void JS_EndRequest(JSContext *cx); extern __attribute__((visibility("default"))) void JS_YieldRequest(JSContext *cx); extern __attribute__((visibility("default"))) unsigned JS_SuspendRequest(JSContext *cx); extern __attribute__((visibility("default"))) void JS_ResumeRequest(JSContext *cx, unsigned saveDepth); extern __attribute__((visibility("default"))) JSBool JS_IsInRequest(JSRuntime *rt); extern __attribute__((visibility("default"))) JSBool JS_IsInSuspendedRequest(JSRuntime *rt); } namespace JS { inline bool IsPoisonedId(jsid iden) { if (JSID_IS_STRING(iden)) return JS::IsPoisonedPtr(JSID_TO_STRING(iden)); if (JSID_IS_OBJECT(iden)) return JS::IsPoisonedPtr(JSID_TO_OBJECT(iden)); return false; } template <> struct RootMethods { static jsid initial() { return ((jsid)0x2); } static ThingRootKind kind() { return THING_ROOT_ID; } static bool poisoned(jsid id) { return IsPoisonedId(id); } }; template <> struct RootMethods { static jsid initial() { return ((jsid)0x2); } static ThingRootKind kind() { return THING_ROOT_ID; } static bool poisoned(jsid id) { return IsPoisonedId(id); } }; } class JSAutoRequest { public: JSAutoRequest(JSContext *cx ) : mContext(cx), mSaveDepth(0) { do { } while (0); JS_BeginRequest(mContext); } ~JSAutoRequest() { JS_EndRequest(mContext); } void suspend() { mSaveDepth = JS_SuspendRequest(mContext); } void resume() { JS_ResumeRequest(mContext, mSaveDepth); } protected: JSContext *mContext; unsigned mSaveDepth; }; class JSAutoSuspendRequest { public: JSAutoSuspendRequest(JSContext *cx ) : mContext(cx), mSaveDepth(0) { do { } while (0); if (mContext) { mSaveDepth = JS_SuspendRequest(mContext); } } ~JSAutoSuspendRequest() { resume(); } void resume() { if (mContext) { JS_ResumeRequest(mContext, mSaveDepth); mContext = 0; } } protected: JSContext *mContext; unsigned mSaveDepth; }; class JSAutoCheckRequest { public: JSAutoCheckRequest(JSContext *cx ) { do { } while (0); } ~JSAutoCheckRequest() { } private: }; extern "C" { extern __attribute__((visibility("default"))) JSContextCallback JS_SetContextCallback(JSRuntime *rt, JSContextCallback cxCallback); extern __attribute__((visibility("default"))) JSContext * JS_NewContext(JSRuntime *rt, size_t stackChunkSize); extern __attribute__((visibility("default"))) void JS_DestroyContext(JSContext *cx); extern __attribute__((visibility("default"))) void JS_DestroyContextNoGC(JSContext *cx); extern __attribute__((visibility("default"))) void * JS_GetContextPrivate(JSContext *cx); extern __attribute__((visibility("default"))) void JS_SetContextPrivate(JSContext *cx, void *data); extern __attribute__((visibility("default"))) void * JS_GetSecondContextPrivate(JSContext *cx); extern __attribute__((visibility("default"))) void JS_SetSecondContextPrivate(JSContext *cx, void *data); extern __attribute__((visibility("default"))) JSRuntime * JS_GetRuntime(JSContext *cx); extern __attribute__((visibility("default"))) JSContext * JS_ContextIterator(JSRuntime *rt, JSContext **iterp); extern __attribute__((visibility("default"))) JSVersion JS_GetVersion(JSContext *cx); extern __attribute__((visibility("default"))) JSVersion JS_SetVersion(JSContext *cx, JSVersion version); extern __attribute__((visibility("default"))) const char * JS_VersionToString(JSVersion version); extern __attribute__((visibility("default"))) JSVersion JS_StringToVersion(const char *string); # 2709 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSOPTION_STRICT JS_BIT(0) #define JSOPTION_WERROR JS_BIT(1) #define JSOPTION_VAROBJFIX JS_BIT(2) #define JSOPTION_PRIVATE_IS_NSISUPPORTS JS_BIT(3) #define JSOPTION_COMPILE_N_GO JS_BIT(4) #define JSOPTION_ATLINE JS_BIT(5) #define JSOPTION_ALLOW_XML JS_BIT(6) #define JSOPTION_MOAR_XML JS_BIT(7) #define JSOPTION_DONT_REPORT_UNCAUGHT JS_BIT(8) #define JSOPTION_RELIMIT JS_BIT(9) # 2753 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSOPTION_NO_SCRIPT_RVAL JS_BIT(12) #define JSOPTION_UNROOTED_GLOBAL JS_BIT(13) #define JSOPTION_METHODJIT JS_BIT(14) #define JSOPTION_METHODJIT_ALWAYS JS_BIT(16) #define JSOPTION_PCCOUNT JS_BIT(17) #define JSOPTION_TYPE_INFERENCE JS_BIT(18) #define JSOPTION_STRICT_MODE JS_BIT(19) #define JSCOMPILEOPTION_MASK (JSOPTION_ALLOW_XML | JSOPTION_MOAR_XML) #define JSRUNOPTION_MASK (JS_BITMASK(20) & ~JSCOMPILEOPTION_MASK) #define JSALLOPTION_MASK (JSCOMPILEOPTION_MASK | JSRUNOPTION_MASK) extern __attribute__((visibility("default"))) uint32_t JS_GetOptions(JSContext *cx); extern __attribute__((visibility("default"))) uint32_t JS_SetOptions(JSContext *cx, uint32_t options); extern __attribute__((visibility("default"))) uint32_t JS_ToggleOptions(JSContext *cx, uint32_t options); extern __attribute__((visibility("default"))) void JS_SetJitHardening(JSRuntime *rt, JSBool enabled); extern __attribute__((visibility("default"))) const char * JS_GetImplementationVersion(void); extern __attribute__((visibility("default"))) void JS_SetDestroyCompartmentCallback(JSRuntime *rt, JSDestroyCompartmentCallback callback); extern __attribute__((visibility("default"))) JSWrapObjectCallback JS_SetWrapObjectCallbacks(JSRuntime *rt, JSWrapObjectCallback callback, JSSameCompartmentWrapObjectCallback sccallback, JSPreWrapCallback precallback); extern __attribute__((visibility("default"))) JSCrossCompartmentCall * JS_EnterCrossCompartmentCall(JSContext *cx, JSObject *target); extern __attribute__((visibility("default"))) void JS_LeaveCrossCompartmentCall(JSCrossCompartmentCall *call); extern __attribute__((visibility("default"))) void JS_SetCompartmentPrivate(JSCompartment *compartment, void *data); extern __attribute__((visibility("default"))) void * JS_GetCompartmentPrivate(JSCompartment *compartment); extern __attribute__((visibility("default"))) JSBool JS_WrapObject(JSContext *cx, JSObject **objp); extern __attribute__((visibility("default"))) JSBool JS_WrapValue(JSContext *cx, jsval *vp); extern __attribute__((visibility("default"))) JSObject * JS_TransplantObject(JSContext *cx, JSObject *origobj, JSObject *target); extern __attribute__((visibility("default"))) JSObject * js_TransplantObjectWithWrapper(JSContext *cx, JSObject *origobj, JSObject *origwrapper, JSObject *targetobj, JSObject *targetwrapper); extern __attribute__((visibility("default"))) JSBool JS_RefreshCrossCompartmentWrappers(JSContext *cx, JSObject *ob); } namespace js { class AutoCompartment; } class __attribute__((visibility("default"))) JSAutoEnterCompartment { # 2856 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" void* bytes[sizeof(void*) == 4 && mozilla::AlignmentFinder::alignment == 8 ? 16 : 13]; protected: js::AutoCompartment *getAutoCompartment() { do { } while(0); return reinterpret_cast(bytes); } # 2872 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" enum State { STATE_UNENTERED, STATE_SAME_COMPARTMENT, STATE_OTHER_COMPARTMENT } state; public: JSAutoEnterCompartment() : state(STATE_UNENTERED) {} bool enter(JSContext *cx, JSObject *target); void enterAndIgnoreErrors(JSContext *cx, JSObject *target); bool entered() const { return state != STATE_UNENTERED; } ~JSAutoEnterCompartment(); }; extern "C" { typedef void (*JSIterateCompartmentCallback)(JSRuntime *rt, void *data, JSCompartment *compartment); extern __attribute__((visibility("default"))) void JS_IterateCompartments(JSRuntime *rt, void *data, JSIterateCompartmentCallback compartmentCallback); extern __attribute__((visibility("default"))) JSObject * JS_GetGlobalObject(JSContext *cx); extern __attribute__((visibility("default"))) void JS_SetGlobalObject(JSContext *cx, JSObject *obj); # 2917 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_InitStandardClasses(JSContext *cx, JSObject *obj); # 2933 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_ResolveStandardClass(JSContext *cx, JSObject *obj, jsid id, JSBool *resolved); extern __attribute__((visibility("default"))) JSBool JS_EnumerateStandardClasses(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSIdArray * JS_EnumerateResolvedStandardClasses(JSContext *cx, JSObject *obj, JSIdArray *ida); extern __attribute__((visibility("default"))) JSBool JS_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key, JSObject **objp); extern __attribute__((visibility("default"))) JSBool JS_GetClassPrototype(JSContext *cx, JSProtoKey key, JSObject **objp); extern __attribute__((visibility("default"))) JSProtoKey JS_IdentifyClassPrototype(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_GetFunctionPrototype(JSContext *cx, JSObject *forObj); extern __attribute__((visibility("default"))) JSObject * JS_GetObjectPrototype(JSContext *cx, JSObject *forObj); extern __attribute__((visibility("default"))) JSObject * JS_GetGlobalForObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_GetGlobalForScopeChain(JSContext *cx); extern __attribute__((visibility("default"))) JSObject * JS_GetScriptedGlobal(JSContext *cx); extern __attribute__((visibility("default"))) JSObject * JS_InitReflect(JSContext *cx, JSObject *global); extern __attribute__((visibility("default"))) JSBool JS_InitCTypesClass(JSContext *cx, JSObject *global); typedef char * (* JSCTypesUnicodeToNativeFun)(JSContext *cx, const jschar *source, size_t slen); struct JSCTypesCallbacks { JSCTypesUnicodeToNativeFun unicodeToNative; }; typedef struct JSCTypesCallbacks JSCTypesCallbacks; extern __attribute__((visibility("default"))) void JS_SetCTypesCallbacks(JSObject *ctypesObj, JSCTypesCallbacks *callbacks); typedef JSBool (* JSEnumerateDiagnosticMemoryCallback)(void *ptr, size_t length); extern __attribute__((visibility("default"))) void JS_EnumerateDiagnosticMemoryRegions(JSEnumerateDiagnosticMemoryCallback callback); # 3063 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_CALLEE(cx,vp) ((vp)[0]) #define JS_THIS(cx,vp) JS_ComputeThis(cx, vp) #define JS_THIS_OBJECT(cx,vp) (JSVAL_TO_OBJECT(JS_THIS(cx,vp))) #define JS_ARGV(cx,vp) ((vp) + 2) #define JS_RVAL(cx,vp) (*(vp)) #define JS_SET_RVAL(cx,vp,v) (*(vp) = (v)) extern __attribute__((visibility("default"))) jsval JS_ComputeThis(JSContext *cx, jsval *vp); #undef JS_THIS static inline jsval JS_THIS(JSContext *cx, jsval *vp) { return JSVAL_IS_PRIMITIVE(vp[1]) ? JS_ComputeThis(cx, vp) : vp[1]; } # 3094 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_THIS_VALUE(cx,vp) ((vp)[1]) extern __attribute__((visibility("default"))) void JS_MallocInCompartment(JSCompartment *comp, size_t nbytes); extern __attribute__((visibility("default"))) void JS_FreeInCompartment(JSCompartment *comp, size_t nbytes); extern __attribute__((visibility("default"))) void * JS_malloc(JSContext *cx, size_t nbytes); extern __attribute__((visibility("default"))) void * JS_realloc(JSContext *cx, void *p, size_t nbytes); extern __attribute__((visibility("default"))) void JS_free(JSContext *cx, void *p); extern __attribute__((visibility("default"))) void JS_freeop(JSFreeOp *fop, void *p); extern __attribute__((visibility("default"))) JSFreeOp * JS_GetDefaultFreeOp(JSRuntime *rt); extern __attribute__((visibility("default"))) void JS_updateMallocCounter(JSContext *cx, size_t nbytes); extern __attribute__((visibility("default"))) char * JS_strdup(JSContext *cx, const char *s); extern __attribute__((visibility("default"))) JSBool JS_NewNumberValue(JSContext *cx, double d, jsval *rval); # 3159 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_AddValueRoot(JSContext *cx, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_AddStringRoot(JSContext *cx, JSString **rp); extern __attribute__((visibility("default"))) JSBool JS_AddObjectRoot(JSContext *cx, JSObject **rp); extern __attribute__((visibility("default"))) JSBool JS_AddGCThingRoot(JSContext *cx, void **rp); # 3180 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_AddNamedValueRoot(JSContext *cx, jsval *vp, const char *name); extern __attribute__((visibility("default"))) JSBool JS_AddNamedStringRoot(JSContext *cx, JSString **rp, const char *name); extern __attribute__((visibility("default"))) JSBool JS_AddNamedObjectRoot(JSContext *cx, JSObject **rp, const char *name); extern __attribute__((visibility("default"))) JSBool JS_AddNamedScriptRoot(JSContext *cx, JSScript **rp, const char *name); extern __attribute__((visibility("default"))) JSBool JS_AddNamedGCThingRoot(JSContext *cx, void **rp, const char *name); extern __attribute__((visibility("default"))) void JS_RemoveValueRoot(JSContext *cx, jsval *vp); extern __attribute__((visibility("default"))) void JS_RemoveStringRoot(JSContext *cx, JSString **rp); extern __attribute__((visibility("default"))) void JS_RemoveObjectRoot(JSContext *cx, JSObject **rp); extern __attribute__((visibility("default"))) void JS_RemoveScriptRoot(JSContext *cx, JSScript **rp); extern __attribute__((visibility("default"))) void JS_RemoveGCThingRoot(JSContext *cx, void **rp); extern __attribute__((visibility("default"))) void JS_RemoveValueRootRT(JSRuntime *rt, jsval *vp); extern __attribute__((visibility("default"))) void JS_RemoveStringRootRT(JSRuntime *rt, JSString **rp); extern __attribute__((visibility("default"))) void JS_RemoveObjectRootRT(JSRuntime *rt, JSObject **rp); extern __attribute__((visibility("default"))) void JS_RemoveScriptRootRT(JSRuntime *rt, JSScript **rp); extern __attribute__((visibility("default"))) JSBool js_AddRootRT(JSRuntime *rt, jsval *vp, const char *name); extern __attribute__((visibility("default"))) JSBool js_AddGCThingRootRT(JSRuntime *rt, void **rp, const char *name); extern __attribute__((visibility("default"))) void js_RemoveRoot(JSRuntime *rt, void *rp); extern __attribute__((noinline)) __attribute__((visibility("default"))) void JS_AnchorPtr(void *p); #define JS_TYPED_ROOTING_API #define JS_EnterLocalRootScope(cx) (JS_TRUE) #define JS_LeaveLocalRootScope(cx) ((void) 0) #define JS_LeaveLocalRootScopeWithResult(cx,rval) ((void) 0) #define JS_ForgetLocalRoot(cx,thing) ((void) 0) typedef enum JSGCRootType { JS_GC_ROOT_VALUE_PTR, JS_GC_ROOT_GCTHING_PTR } JSGCRootType; # 3280 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_MAP_GCROOT_NEXT 0 #define JS_MAP_GCROOT_STOP 1 #define JS_MAP_GCROOT_REMOVE 2 typedef int (* JSGCRootMapFun)(void *rp, JSGCRootType type, const char *name, void *data); extern __attribute__((visibility("default"))) uint32_t JS_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data); extern __attribute__((visibility("default"))) JSBool JS_LockGCThing(JSContext *cx, void *thing); extern __attribute__((visibility("default"))) JSBool JS_LockGCThingRT(JSRuntime *rt, void *thing); extern __attribute__((visibility("default"))) JSBool JS_UnlockGCThing(JSContext *cx, void *thing); extern __attribute__((visibility("default"))) JSBool JS_UnlockGCThingRT(JSRuntime *rt, void *thing); # 3309 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) void JS_SetExtraGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data); # 3325 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" static __attribute__((always_inline)) inline JSBool JSVAL_IS_TRACEABLE(jsval v) { return JSVAL_IS_TRACEABLE_IMPL(JSVAL_TO_IMPL(v)); } static __attribute__((always_inline)) inline void * JSVAL_TO_TRACEABLE(jsval v) { return JSVAL_TO_GCTHING(v); } static __attribute__((always_inline)) inline JSGCTraceKind JSVAL_TRACE_KIND(jsval v) { do { } while(0); return (JSGCTraceKind) JSVAL_TRACE_KIND_IMPL(JSVAL_TO_IMPL(v)); } # 3360 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" typedef void (* JSTraceCallback)(JSTracer *trc, void **thingp, JSGCTraceKind kind); struct JSTracer { JSRuntime *runtime; JSTraceCallback callback; JSTraceNamePrinter debugPrinter; const void *debugPrintArg; size_t debugPrintIndex; JSBool eagerlyTraceWeakMaps; }; extern __attribute__((visibility("default"))) void JS_CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind); # 3400 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_SET_TRACING_DETAILS(trc,printer,arg,index) JS_BEGIN_MACRO (trc)->debugPrinter = (printer); (trc)->debugPrintArg = (arg); (trc)->debugPrintIndex = (index); JS_END_MACRO # 3417 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_SET_TRACING_LOCATION(trc,location) JS_BEGIN_MACRO JS_END_MACRO # 3427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_SET_TRACING_INDEX(trc,name,index) JS_SET_TRACING_DETAILS(trc, NULL, name, index) #define JS_SET_TRACING_NAME(trc,name) JS_SET_TRACING_DETAILS(trc, NULL, name, (size_t)-1) #define JS_CALL_TRACER(trc,thing,kind,name) JS_BEGIN_MACRO JS_SET_TRACING_NAME(trc, name); JS_CallTracer((trc), (thing), (kind)); JS_END_MACRO # 3450 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JS_CALL_VALUE_TRACER(trc,val,name) JS_BEGIN_MACRO if (JSVAL_IS_TRACEABLE(val)) { JS_CALL_TRACER((trc), JSVAL_TO_GCTHING(val), JSVAL_TRACE_KIND(val), name); } JS_END_MACRO #define JS_CALL_OBJECT_TRACER(trc,object,name) JS_BEGIN_MACRO JSObject *obj_ = (object); JS_ASSERT(obj_); JS_CALL_TRACER((trc), obj_, JSTRACE_OBJECT, name); JS_END_MACRO #define JS_CALL_STRING_TRACER(trc,string,name) JS_BEGIN_MACRO JSString *str_ = (string); JS_ASSERT(str_); JS_CALL_TRACER((trc), str_, JSTRACE_STRING, name); JS_END_MACRO # 3475 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) void JS_TracerInit(JSTracer *trc, JSRuntime *rt, JSTraceCallback callback); extern __attribute__((visibility("default"))) void JS_TraceChildren(JSTracer *trc, void *thing, JSGCTraceKind kind); extern __attribute__((visibility("default"))) void JS_TraceRuntime(JSTracer *trc); # 3517 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) void JS_GC(JSRuntime *rt); extern __attribute__((visibility("default"))) void JS_MaybeGC(JSContext *cx); extern __attribute__((visibility("default"))) void JS_SetGCCallback(JSRuntime *rt, JSGCCallback cb); extern __attribute__((visibility("default"))) void JS_SetFinalizeCallback(JSRuntime *rt, JSFinalizeCallback cb); extern __attribute__((visibility("default"))) JSBool JS_IsGCMarkingTracer(JSTracer *trc); extern __attribute__((visibility("default"))) JSBool JS_IsAboutToBeFinalized(void *thing); typedef enum JSGCParamKey { JSGC_MAX_BYTES = 0, JSGC_MAX_MALLOC_BYTES = 1, JSGC_BYTES = 3, JSGC_NUMBER = 4, JSGC_MAX_CODE_CACHE_BYTES = 5, JSGC_MODE = 6, JSGC_UNUSED_CHUNKS = 7, JSGC_TOTAL_CHUNKS = 8, JSGC_SLICE_TIME_BUDGET = 9, JSGC_MARK_STACK_LIMIT = 10 } JSGCParamKey; typedef enum JSGCMode { JSGC_MODE_GLOBAL = 0, JSGC_MODE_COMPARTMENT = 1, JSGC_MODE_INCREMENTAL = 2 } JSGCMode; extern __attribute__((visibility("default"))) void JS_SetGCParameter(JSRuntime *rt, JSGCParamKey key, uint32_t value); extern __attribute__((visibility("default"))) uint32_t JS_GetGCParameter(JSRuntime *rt, JSGCParamKey key); extern __attribute__((visibility("default"))) void JS_SetGCParameterForThread(JSContext *cx, JSGCParamKey key, uint32_t value); extern __attribute__((visibility("default"))) uint32_t JS_GetGCParameterForThread(JSContext *cx, JSGCParamKey key); extern __attribute__((visibility("default"))) JSString * JS_NewExternalString(JSContext *cx, const jschar *chars, size_t length, const JSStringFinalizer *fin); extern __attribute__((visibility("default"))) JSBool JS_IsExternalString(JSString *str); extern __attribute__((visibility("default"))) const JSStringFinalizer * JS_GetExternalStringFinalizer(JSString *str); extern __attribute__((visibility("default"))) void JS_SetNativeStackQuota(JSRuntime *cx, size_t stackSize); typedef void (*JSClassInternal)(); struct JSClass { const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; JSFinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; void *reserved[40]; }; #define JSCLASS_HAS_PRIVATE (1<<0) #define JSCLASS_NEW_ENUMERATE (1<<1) #define JSCLASS_NEW_RESOLVE (1<<2) #define JSCLASS_PRIVATE_IS_NSISUPPORTS (1<<3) #define JSCLASS_NEW_RESOLVE_GETS_START (1<<4) #define JSCLASS_IMPLEMENTS_BARRIERS (1<<5) #define JSCLASS_DOCUMENT_OBSERVER (1<<6) #define JSCLASS_USERBIT1 (1<<7) #define JSCLASS_RESERVED_SLOTS_SHIFT 8 #define JSCLASS_RESERVED_SLOTS_WIDTH 8 #define JSCLASS_RESERVED_SLOTS_MASK JS_BITMASK(JSCLASS_RESERVED_SLOTS_WIDTH) #define JSCLASS_HAS_RESERVED_SLOTS(n) (((n) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT) #define JSCLASS_RESERVED_SLOTS(clasp) (((clasp)->flags >> JSCLASS_RESERVED_SLOTS_SHIFT) & JSCLASS_RESERVED_SLOTS_MASK) #define JSCLASS_HIGH_FLAGS_SHIFT (JSCLASS_RESERVED_SLOTS_SHIFT + JSCLASS_RESERVED_SLOTS_WIDTH) #define JSCLASS_FOR_OF_ITERATION (1<<(JSCLASS_HIGH_FLAGS_SHIFT+0)) #define JSCLASS_IS_ANONYMOUS (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1)) #define JSCLASS_IS_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2)) #define JSCLASS_INTERNAL_FLAG2 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3)) #define JSCLASS_INTERNAL_FLAG3 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+4)) #define JSCLASS_FREEZE_PROTO (1<<(JSCLASS_HIGH_FLAGS_SHIFT+5)) #define JSCLASS_FREEZE_CTOR (1<<(JSCLASS_HIGH_FLAGS_SHIFT+6)) #define JSCLASS_XPCONNECT_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+7)) #define JSCLASS_USERBIT2 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+8)) #define JSCLASS_USERBIT3 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+9)) #define JSGLOBAL_FLAGS_CLEARED 0x1 # 3723 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSCLASS_GLOBAL_SLOT_COUNT (JSProto_LIMIT * 3 + 8) #define JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(n) (JSCLASS_IS_GLOBAL | JSCLASS_HAS_RESERVED_SLOTS(JSCLASS_GLOBAL_SLOT_COUNT + (n))) #define JSCLASS_GLOBAL_FLAGS JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(0) #define JSCLASS_HAS_GLOBAL_FLAG_AND_SLOTS(clasp) (((clasp)->flags & JSCLASS_IS_GLOBAL) && JSCLASS_RESERVED_SLOTS(clasp) >= JSCLASS_GLOBAL_SLOT_COUNT) #define JSCLASS_CACHED_PROTO_SHIFT (JSCLASS_HIGH_FLAGS_SHIFT + 10) #define JSCLASS_CACHED_PROTO_WIDTH 6 #define JSCLASS_CACHED_PROTO_MASK JS_BITMASK(JSCLASS_CACHED_PROTO_WIDTH) #define JSCLASS_HAS_CACHED_PROTO(key) (uint32_t(key) << JSCLASS_CACHED_PROTO_SHIFT) #define JSCLASS_CACHED_PROTO_KEY(clasp) ((JSProtoKey) (((clasp)->flags >> JSCLASS_CACHED_PROTO_SHIFT) & JSCLASS_CACHED_PROTO_MASK)) #define JSCLASS_NO_INTERNAL_MEMBERS {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} #define JSCLASS_NO_OPTIONAL_MEMBERS 0,0,0,0,0,JSCLASS_NO_INTERNAL_MEMBERS extern __attribute__((visibility("default"))) int JS_IdArrayLength(JSContext *cx, JSIdArray *ida); extern __attribute__((visibility("default"))) jsid JS_IdArrayGet(JSContext *cx, JSIdArray *ida, int index); extern __attribute__((visibility("default"))) void JS_DestroyIdArray(JSContext *cx, JSIdArray *ida); namespace JS { class AutoIdArray : private AutoGCRooter { public: AutoIdArray(JSContext *cx, JSIdArray *ida ) : AutoGCRooter(cx, IDARRAY), context(cx), idArray(ida) { do { } while (0); } ~AutoIdArray() { if (idArray) JS_DestroyIdArray(context, idArray); } bool operator!() { return !idArray; } jsid operator[](size_t i) const { do { } while(0); do { } while(0); return JS_IdArrayGet(context, idArray, i); } size_t length() const { return JS_IdArrayLength(context, idArray); } friend void AutoGCRooter::trace(JSTracer *trc); JSIdArray *steal() { JSIdArray *copy = idArray; idArray = __null; return copy; } protected: inline void trace(JSTracer *trc); private: JSContext *context; JSIdArray *idArray; AutoIdArray(AutoIdArray &ida) ; void operator=(AutoIdArray &ida) ; }; } extern __attribute__((visibility("default"))) JSBool JS_ValueToId(JSContext *cx, jsval v, jsid *idp); extern __attribute__((visibility("default"))) JSBool JS_IdToValue(JSContext *cx, jsid id, jsval *vp); #define JSRESOLVE_QUALIFIED 0x01 #define JSRESOLVE_ASSIGNING 0x02 #define JSRESOLVE_DETECTING 0x04 #define JSRESOLVE_DECLARING 0x08 #define JSRESOLVE_WITH 0x10 extern __attribute__((visibility("default"))) JSBool JS_DefaultValue(JSContext *cx, JSObject *obj, JSType hint, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_PropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_StrictPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_EnumerateStub(JSContext *cx, JSHandleObject obj); extern __attribute__((visibility("default"))) JSBool JS_ResolveStub(JSContext *cx, JSHandleObject obj, JSHandleId id); extern __attribute__((visibility("default"))) JSBool JS_ConvertStub(JSContext *cx, JSHandleObject obj, JSType type, jsval *vp); struct JSConstDoubleSpec { double dval; const char *name; uint8_t flags; uint8_t spare[3]; }; struct JSPropertySpec { const char *name; int8_t tinyid; uint8_t flags; JSPropertyOp getter; JSStrictPropertyOp setter; }; struct JSFunctionSpec { const char *name; JSNative call; uint16_t nargs; uint16_t flags; }; #define JS_FS_END JS_FS(NULL,NULL,0,0) #define JS_FS(name,call,nargs,flags) {name, call, nargs, flags} #define JS_FN(name,call,nargs,flags) {name, call, nargs, (flags) | JSFUN_STUB_GSOPS} extern __attribute__((visibility("default"))) JSObject * JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto, JSClass *clasp, JSNative constructor, unsigned nargs, JSPropertySpec *ps, JSFunctionSpec *fs, JSPropertySpec *static_ps, JSFunctionSpec *static_fs); extern __attribute__((visibility("default"))) JSBool JS_LinkConstructorAndPrototype(JSContext *cx, JSObject *ctor, JSObject *proto); extern __attribute__((visibility("default"))) JSClass * JS_GetClass(JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_InstanceOf(JSContext *cx, JSObject *obj, JSClass *clasp, jsval *argv); extern __attribute__((visibility("default"))) JSBool JS_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp); extern __attribute__((visibility("default"))) void * JS_GetPrivate(JSObject *obj); extern __attribute__((visibility("default"))) void JS_SetPrivate(JSObject *obj, void *data); extern __attribute__((visibility("default"))) void * JS_GetInstancePrivate(JSContext *cx, JSObject *obj, JSClass *clasp, jsval *argv); extern __attribute__((visibility("default"))) JSObject * JS_GetPrototype(JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_SetPrototype(JSContext *cx, JSObject *obj, JSObject *proto); extern __attribute__((visibility("default"))) JSObject * JS_GetParent(JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent); extern __attribute__((visibility("default"))) JSObject * JS_GetConstructor(JSContext *cx, JSObject *proto); extern __attribute__((visibility("default"))) JSBool JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp); extern __attribute__((visibility("default"))) JSObject * JS_NewGlobalObject(JSContext *cx, JSClass *clasp); extern __attribute__((visibility("default"))) JSObject * JS_NewCompartmentAndGlobalObject(JSContext *cx, JSClass *clasp, JSPrincipals *principals); extern __attribute__((visibility("default"))) JSObject * JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); extern __attribute__((visibility("default"))) JSBool JS_IsExtensible(JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_IsNative(JSObject *obj); extern __attribute__((visibility("default"))) JSRuntime * JS_GetObjectRuntime(JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_NewObjectWithGivenProto(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); extern __attribute__((visibility("default"))) JSBool JS_DeepFreezeObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_FreezeObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *parent); extern __attribute__((visibility("default"))) JSObject * JS_ConstructObjectWithArguments(JSContext *cx, JSClass *clasp, JSObject *parent, unsigned argc, jsval *argv); extern __attribute__((visibility("default"))) JSObject * JS_New(JSContext *cx, JSObject *ctor, unsigned argc, jsval *argv); extern __attribute__((visibility("default"))) JSObject * JS_DefineObject(JSContext *cx, JSObject *obj, const char *name, JSClass *clasp, JSObject *proto, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds); extern __attribute__((visibility("default"))) JSBool JS_DefineProperties(JSContext *cx, JSObject *obj, JSPropertySpec *ps); extern __attribute__((visibility("default"))) JSBool JS_DefineProperty(JSContext *cx, JSObject *obj, const char *name, jsval value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_DefinePropertyById(JSContext *cx, JSObject *obj, jsid id, jsval value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_DefineOwnProperty(JSContext *cx, JSObject *obj, jsid id, jsval descriptor, JSBool *bp); extern __attribute__((visibility("default"))) JSBool JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name, unsigned *attrsp, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_GetPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj, const char *name, unsigned *attrsp, JSBool *foundp, JSPropertyOp *getterp, JSStrictPropertyOp *setterp); extern __attribute__((visibility("default"))) JSBool JS_GetPropertyAttrsGetterAndSetterById(JSContext *cx, JSObject *obj, jsid id, unsigned *attrsp, JSBool *foundp, JSPropertyOp *getterp, JSStrictPropertyOp *setterp); extern __attribute__((visibility("default"))) JSBool JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name, unsigned attrs, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_DefinePropertyWithTinyId(JSContext *cx, JSObject *obj, const char *name, int8_t tinyid, jsval value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_AlreadyHasOwnProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_AlreadyHasOwnPropertyById(JSContext *cx, JSObject *obj, jsid id, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_HasProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_HasPropertyById(JSContext *cx, JSObject *obj, jsid id, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_LookupPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_LookupPropertyWithFlags(JSContext *cx, JSObject *obj, const char *name, unsigned flags, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_LookupPropertyWithFlagsById(JSContext *cx, JSObject *obj, jsid id, unsigned flags, JSObject **objp, jsval *vp); struct JSPropertyDescriptor { JSObject *obj; unsigned attrs; unsigned shortid; JSPropertyOp getter; JSStrictPropertyOp setter; jsval value; }; extern __attribute__((visibility("default"))) JSBool JS_GetPropertyDescriptorById(JSContext *cx, JSObject *obj, jsid id, unsigned flags, JSPropertyDescriptor *desc); extern __attribute__((visibility("default"))) JSBool JS_GetOwnPropertyDescriptor(JSContext *cx, JSObject *obj, jsid id, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetPropertyDefault(JSContext *cx, JSObject *obj, const char *name, jsval def, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetPropertyByIdDefault(JSContext *cx, JSObject *obj, jsid id, jsval def, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_ForwardGetPropertyTo(JSContext *cx, JSObject *obj, jsid id, JSObject *onBehalfOf, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetMethodById(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetMethod(JSContext *cx, JSObject *obj, const char *name, JSObject **objp, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_SetPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_DeleteProperty(JSContext *cx, JSObject *obj, const char *name); extern __attribute__((visibility("default"))) JSBool JS_DeleteProperty2(JSContext *cx, JSObject *obj, const char *name, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_DeletePropertyById(JSContext *cx, JSObject *obj, jsid id); extern __attribute__((visibility("default"))) JSBool JS_DeletePropertyById2(JSContext *cx, JSObject *obj, jsid id, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_DefineUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, jsval value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_GetUCPropertyAttributes(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, unsigned *attrsp, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_GetUCPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, unsigned *attrsp, JSBool *foundp, JSPropertyOp *getterp, JSStrictPropertyOp *setterp); extern __attribute__((visibility("default"))) JSBool JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, unsigned attrs, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, int8_t tinyid, jsval value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_AlreadyHasOwnUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_HasUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, JSBool *vp); extern __attribute__((visibility("default"))) JSBool JS_LookupUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_SetUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_DeleteUCProperty2(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, jsval *rval); extern __attribute__((visibility("default"))) JSObject * JS_NewArrayObject(JSContext *cx, int length, jsval *vector); extern __attribute__((visibility("default"))) JSBool JS_IsArrayObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_GetArrayLength(JSContext *cx, JSObject *obj, uint32_t *lengthp); extern __attribute__((visibility("default"))) JSBool JS_SetArrayLength(JSContext *cx, JSObject *obj, uint32_t length); extern __attribute__((visibility("default"))) JSBool JS_DefineElement(JSContext *cx, JSObject *obj, uint32_t index, jsval value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern __attribute__((visibility("default"))) JSBool JS_AlreadyHasOwnElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_HasElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *foundp); extern __attribute__((visibility("default"))) JSBool JS_LookupElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_ForwardGetElementTo(JSContext *cx, JSObject *obj, uint32_t index, JSObject *onBehalfOf, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_GetElementIfPresent(JSContext *cx, JSObject *obj, uint32_t index, JSObject *onBehalfOf, jsval *vp, JSBool* present); extern __attribute__((visibility("default"))) JSBool JS_SetElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); extern __attribute__((visibility("default"))) JSBool JS_DeleteElement(JSContext *cx, JSObject *obj, uint32_t index); extern __attribute__((visibility("default"))) JSBool JS_DeleteElement2(JSContext *cx, JSObject *obj, uint32_t index, jsval *rval); extern __attribute__((visibility("default"))) void JS_ClearScope(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSIdArray * JS_Enumerate(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_NewPropertyIterator(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_NextProperty(JSContext *cx, JSObject *iterobj, jsid *idp); extern __attribute__((visibility("default"))) JSObject * JS_NewElementIterator(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_ElementIteratorStub(JSContext *cx, JSHandleObject obj, JSBool keysonly); extern __attribute__((visibility("default"))) JSBool JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode, jsval *vp, unsigned *attrsp); extern __attribute__((visibility("default"))) jsval JS_GetReservedSlot(JSObject *obj, uint32_t index); extern __attribute__((visibility("default"))) void JS_SetReservedSlot(JSObject *obj, uint32_t index, jsval v); struct JSPrincipals { int refcount; void setDebugToken(uint32_t token) { } __attribute__((visibility("default"))) void dump(); }; extern __attribute__((visibility("default"))) void JS_HoldPrincipals(JSPrincipals *principals); extern __attribute__((visibility("default"))) void JS_DropPrincipals(JSRuntime *rt, JSPrincipals *principals); struct JSSecurityCallbacks { JSCheckAccessOp checkObjectAccess; JSSubsumePrincipalsOp subsumePrincipals; JSObjectPrincipalsFinder findObjectPrincipals; JSCSPEvalChecker contentSecurityPolicyAllows; JSPushContextPrincipalOp pushContextPrincipal; JSPopContextPrincipalOp popContextPrincipal; }; extern __attribute__((visibility("default"))) void JS_SetSecurityCallbacks(JSRuntime *rt, const JSSecurityCallbacks *callbacks); extern __attribute__((visibility("default"))) const JSSecurityCallbacks * JS_GetSecurityCallbacks(JSRuntime *rt); # 4388 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) void JS_SetTrustedPrincipals(JSRuntime *rt, JSPrincipals *prin); extern __attribute__((visibility("default"))) void JS_InitDestroyPrincipalsCallback(JSRuntime *rt, JSDestroyPrincipalsOp destroyPrincipals); extern __attribute__((visibility("default"))) JSFunction * JS_NewFunction(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, JSObject *parent, const char *name); extern __attribute__((visibility("default"))) JSFunction * JS_NewFunctionById(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, JSObject *parent, jsid id); extern __attribute__((visibility("default"))) JSObject * JS_GetFunctionObject(JSFunction *fun); extern __attribute__((visibility("default"))) JSString * JS_GetFunctionId(JSFunction *fun); extern __attribute__((visibility("default"))) unsigned JS_GetFunctionFlags(JSFunction *fun); extern __attribute__((visibility("default"))) uint16_t JS_GetFunctionArity(JSFunction *fun); extern __attribute__((visibility("default"))) JSBool JS_ObjectIsFunction(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_ObjectIsCallable(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_IsNativeFunction(JSObject *funobj, JSNative call); extern __attribute__((visibility("default"))) JSObject* JS_BindCallable(JSContext *cx, JSObject *callable, JSObject *newThis); extern __attribute__((visibility("default"))) JSBool JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs); extern __attribute__((visibility("default"))) JSFunction * JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call, unsigned nargs, unsigned attrs); extern __attribute__((visibility("default"))) JSFunction * JS_DefineUCFunction(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, JSNative call, unsigned nargs, unsigned attrs); extern __attribute__((visibility("default"))) JSFunction * JS_DefineFunctionById(JSContext *cx, JSObject *obj, jsid id, JSNative call, unsigned nargs, unsigned attrs); extern __attribute__((visibility("default"))) JSObject * JS_CloneFunctionObject(JSContext *cx, JSObject *funobj, JSObject *parent); # 4489 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_BufferIsCompilableUnit(JSContext *cx, JSBool bytes_are_utf8, JSObject *obj, const char *bytes, size_t length); extern __attribute__((visibility("default"))) JSScript * JS_CompileScript(JSContext *cx, JSObject *obj, const char *bytes, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSScript * JS_CompileScriptForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *bytes, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSScript * JS_CompileScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *bytes, size_t length, const char *filename, unsigned lineno, JSVersion version); extern __attribute__((visibility("default"))) JSScript * JS_CompileUCScript(JSContext *cx, JSObject *obj, const jschar *chars, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSScript * JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const jschar *chars, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSScript * JS_CompileUCScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, JSPrincipals *principals, const jschar *chars, size_t length, const char *filename, unsigned lineno, JSVersion version); extern __attribute__((visibility("default"))) JSScript * JS_CompileUCScriptForPrincipalsVersionOrigin(JSContext *cx, JSObject *obj, JSPrincipals *principals, JSPrincipals *originPrincipals, const jschar *chars, size_t length, const char *filename, unsigned lineno, JSVersion version); extern __attribute__((visibility("default"))) JSScript * JS_CompileUTF8File(JSContext *cx, JSObject *obj, const char *filename); extern __attribute__((visibility("default"))) JSScript * JS_CompileUTF8FileHandle(JSContext *cx, JSObject *obj, const char *filename, FILE *fh); extern __attribute__((visibility("default"))) JSScript * JS_CompileUTF8FileHandleForPrincipals(JSContext *cx, JSObject *obj, const char *filename, FILE *fh, JSPrincipals *principals); extern __attribute__((visibility("default"))) JSScript * JS_CompileUTF8FileHandleForPrincipalsVersion(JSContext *cx, JSObject *obj, const char *filename, FILE *fh, JSPrincipals *principals, JSVersion version); extern __attribute__((visibility("default"))) JSObject * JS_GetGlobalFromScript(JSScript *script); extern __attribute__((visibility("default"))) JSFunction * JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name, unsigned nargs, const char **argnames, const char *bytes, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSFunction * JS_CompileFunctionForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *name, unsigned nargs, const char **argnames, const char *bytes, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSFunction * JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name, unsigned nargs, const char **argnames, const jschar *chars, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSFunction * JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *name, unsigned nargs, const char **argnames, const jschar *chars, size_t length, const char *filename, unsigned lineno); extern __attribute__((visibility("default"))) JSFunction * JS_CompileUCFunctionForPrincipalsVersion(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *name, unsigned nargs, const char **argnames, const jschar *chars, size_t length, const char *filename, unsigned lineno, JSVersion version); extern __attribute__((visibility("default"))) JSString * JS_DecompileScript(JSContext *cx, JSScript *script, const char *name, unsigned indent); #define JS_DONT_PRETTY_PRINT ((unsigned)0x8000) extern __attribute__((visibility("default"))) JSString * JS_DecompileFunction(JSContext *cx, JSFunction *fun, unsigned indent); extern __attribute__((visibility("default"))) JSString * JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, unsigned indent); # 4645 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_ExecuteScript(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_ExecuteScriptVersion(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval, JSVersion version); typedef enum JSExecPart { JSEXEC_PROLOG, JSEXEC_MAIN } JSExecPart; extern __attribute__((visibility("default"))) JSBool JS_EvaluateScript(JSContext *cx, JSObject *obj, const char *bytes, unsigned length, const char *filename, unsigned lineno, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *bytes, unsigned length, const char *filename, unsigned lineno, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_EvaluateScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, JSPrincipals *principals, const char *bytes, unsigned length, const char *filename, unsigned lineno, jsval *rval, JSVersion version); extern __attribute__((visibility("default"))) JSBool JS_EvaluateUCScript(JSContext *cx, JSObject *obj, const jschar *chars, unsigned length, const char *filename, unsigned lineno, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const jschar *chars, unsigned length, const char *filename, unsigned lineno, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_EvaluateUCScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, JSPrincipals *principals, const jschar *chars, unsigned length, const char *filename, unsigned lineno, jsval *rval, JSVersion version); # 4706 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_EvaluateUCScriptForPrincipalsVersionOrigin(JSContext *cx, JSObject *obj, JSPrincipals *principals, JSPrincipals *originPrincipals, const jschar *chars, unsigned length, const char *filename, unsigned lineno, jsval *rval, JSVersion version); extern __attribute__((visibility("default"))) JSBool JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, unsigned argc, jsval *argv, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, unsigned argc, jsval *argv, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_CallFunctionValue(JSContext *cx, JSObject *obj, jsval fval, unsigned argc, jsval *argv, jsval *rval); } namespace JS { static inline bool Call(JSContext *cx, JSObject *thisObj, JSFunction *fun, unsigned argc, jsval *argv, jsval *rval) { return !!JS_CallFunction(cx, thisObj, fun, argc, argv, rval); } static inline bool Call(JSContext *cx, JSObject *thisObj, const char *name, unsigned argc, jsval *argv, jsval *rval) { return !!JS_CallFunctionName(cx, thisObj, name, argc, argv, rval); } static inline bool Call(JSContext *cx, JSObject *thisObj, jsval fun, unsigned argc, jsval *argv, jsval *rval) { return !!JS_CallFunctionValue(cx, thisObj, fun, argc, argv, rval); } extern __attribute__((visibility("default"))) bool Call(JSContext *cx, jsval thisv, jsval fun, unsigned argc, jsval *argv, jsval *rval); static inline bool Call(JSContext *cx, jsval thisv, JSObject *funObj, unsigned argc, jsval *argv, jsval *rval) { return Call(cx, thisv, OBJECT_TO_JSVAL(funObj), argc, argv, rval); } } extern "C" { # 4772 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSOperationCallback JS_SetOperationCallback(JSContext *cx, JSOperationCallback callback); extern __attribute__((visibility("default"))) JSOperationCallback JS_GetOperationCallback(JSContext *cx); extern __attribute__((visibility("default"))) void JS_TriggerOperationCallback(JSRuntime *rt); extern __attribute__((visibility("default"))) JSBool JS_IsRunning(JSContext *cx); # 4795 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_SaveFrameChain(JSContext *cx); extern __attribute__((visibility("default"))) void JS_RestoreFrameChain(JSContext *cx); # 4829 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSString * JS_NewStringCopyN(JSContext *cx, const char *s, size_t n); extern __attribute__((visibility("default"))) JSString * JS_NewStringCopyZ(JSContext *cx, const char *s); extern __attribute__((visibility("default"))) JSString * JS_InternJSString(JSContext *cx, JSString *str); extern __attribute__((visibility("default"))) JSString * JS_InternString(JSContext *cx, const char *s); extern __attribute__((visibility("default"))) JSString * JS_NewUCString(JSContext *cx, jschar *chars, size_t length); extern __attribute__((visibility("default"))) JSString * JS_NewUCStringCopyN(JSContext *cx, const jschar *s, size_t n); extern __attribute__((visibility("default"))) JSString * JS_NewUCStringCopyZ(JSContext *cx, const jschar *s); extern __attribute__((visibility("default"))) JSString * JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length); extern __attribute__((visibility("default"))) JSString * JS_InternUCString(JSContext *cx, const jschar *s); extern __attribute__((visibility("default"))) JSBool JS_CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32_t *result); extern __attribute__((visibility("default"))) JSBool JS_StringEqualsAscii(JSContext *cx, JSString *str, const char *asciiBytes, JSBool *match); extern __attribute__((visibility("default"))) size_t JS_PutEscapedString(JSContext *cx, char *buffer, size_t size, JSString *str, char quote); extern __attribute__((visibility("default"))) JSBool JS_FileEscapedString(FILE *fp, JSString *str, char quote); # 4903 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) size_t JS_GetStringLength(JSString *str); extern __attribute__((visibility("default"))) const jschar * JS_GetStringCharsAndLength(JSContext *cx, JSString *str, size_t *length); extern __attribute__((visibility("default"))) const jschar * JS_GetInternedStringChars(JSString *str); extern __attribute__((visibility("default"))) const jschar * JS_GetInternedStringCharsAndLength(JSString *str, size_t *length); extern __attribute__((visibility("default"))) const jschar * JS_GetStringCharsZ(JSContext *cx, JSString *str); extern __attribute__((visibility("default"))) const jschar * JS_GetStringCharsZAndLength(JSContext *cx, JSString *str, size_t *length); extern __attribute__((visibility("default"))) JSFlatString * JS_FlattenString(JSContext *cx, JSString *str); extern __attribute__((visibility("default"))) const jschar * JS_GetFlatStringChars(JSFlatString *str); static __attribute__((always_inline)) inline JSFlatString * JSID_TO_FLAT_STRING(jsid id) { do { } while(0); return (JSFlatString *)((id)); } static __attribute__((always_inline)) inline JSFlatString * JS_ASSERT_STRING_IS_FLAT(JSString *str) { do { } while(0); return (JSFlatString *)str; } static __attribute__((always_inline)) inline JSString * JS_FORGET_STRING_FLATNESS(JSFlatString *fstr) { return (JSString *)fstr; } extern __attribute__((visibility("default"))) JSBool JS_FlatStringEqualsAscii(JSFlatString *str, const char *asciiBytes); extern __attribute__((visibility("default"))) size_t JS_PutEscapedFlatString(char *buffer, size_t size, JSFlatString *str, char quote); extern __attribute__((visibility("default"))) JSString * JS_NewGrowableString(JSContext *cx, jschar *chars, size_t length); # 4990 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSString * JS_NewDependentString(JSContext *cx, JSString *str, size_t start, size_t length); extern __attribute__((visibility("default"))) JSString * JS_ConcatStrings(JSContext *cx, JSString *left, JSString *right); extern __attribute__((visibility("default"))) const jschar * JS_UndependString(JSContext *cx, JSString *str); extern __attribute__((visibility("default"))) JSBool JS_MakeStringImmutable(JSContext *cx, JSString *str); __attribute__((visibility("default"))) JSBool JS_CStringsAreUTF8(void); __attribute__((visibility("default"))) void JS_SetCStringsAreUTF8(void); # 5053 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" __attribute__((visibility("default"))) JSBool JS_EncodeCharacters(JSContext *cx, const jschar *src, size_t srclen, char *dst, size_t *dstlenp); __attribute__((visibility("default"))) JSBool JS_DecodeBytes(JSContext *cx, const char *src, size_t srclen, jschar *dst, size_t *dstlenp); __attribute__((visibility("default"))) JSBool JS_DecodeUTF8(JSContext *cx, const char *src, size_t srclen, jschar *dst, size_t *dstlenp); __attribute__((visibility("default"))) char * JS_EncodeString(JSContext *cx, JSString *str); __attribute__((visibility("default"))) size_t JS_GetStringEncodingLength(JSContext *cx, JSString *str); # 5093 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" __attribute__((visibility("default"))) size_t JS_EncodeStringToBuffer(JSString *str, char *buffer, size_t length); class JSAutoByteString { public: JSAutoByteString(JSContext *cx, JSString *str ) : mBytes(JS_EncodeString(cx, str)) { do { } while(0); do { } while (0); } JSAutoByteString() : mBytes(__null) { do { } while (0); } ~JSAutoByteString() { js::UnwantedForeground::free_(mBytes); } void initBytes(char *bytes) { do { } while(0); mBytes = bytes; } char *encode(JSContext *cx, JSString *str) { do { } while(0); do { } while(0); mBytes = JS_EncodeString(cx, str); return mBytes; } void clear() { js::UnwantedForeground::free_(mBytes); mBytes = __null; } char *ptr() const { return mBytes; } bool operator!() const { return !mBytes; } private: char *mBytes; JSAutoByteString(const JSAutoByteString &another); JSAutoByteString &operator=(const JSAutoByteString &another); }; typedef JSBool (* JSONWriteCallback)(const jschar *buf, uint32_t len, void *data); __attribute__((visibility("default"))) JSBool JS_Stringify(JSContext *cx, jsval *vp, JSObject *replacer, jsval space, JSONWriteCallback callback, void *data); __attribute__((visibility("default"))) JSBool JS_ParseJSON(JSContext *cx, const jschar *chars, uint32_t len, jsval *vp); __attribute__((visibility("default"))) JSBool JS_ParseJSONWithReviver(JSContext *cx, const jschar *chars, uint32_t len, jsval reviver, jsval *vp); #define JS_STRUCTURED_CLONE_VERSION 1 struct JSStructuredCloneCallbacks { ReadStructuredCloneOp read; WriteStructuredCloneOp write; StructuredCloneErrorOp reportError; }; __attribute__((visibility("default"))) JSBool JS_ReadStructuredClone(JSContext *cx, const uint64_t *data, size_t nbytes, uint32_t version, jsval *vp, const JSStructuredCloneCallbacks *optionalCallbacks, void *closure); __attribute__((visibility("default"))) JSBool JS_WriteStructuredClone(JSContext *cx, jsval v, uint64_t **datap, size_t *nbytesp, const JSStructuredCloneCallbacks *optionalCallbacks, void *closure); __attribute__((visibility("default"))) JSBool JS_StructuredClone(JSContext *cx, jsval v, jsval *vp, const JSStructuredCloneCallbacks *optionalCallbacks, void *closure); } class __attribute__((visibility("default"))) JSAutoStructuredCloneBuffer { uint64_t *data_; size_t nbytes_; uint32_t version_; public: JSAutoStructuredCloneBuffer() : data_(__null), nbytes_(0), version_(1) {} ~JSAutoStructuredCloneBuffer() { clear(); } uint64_t *data() const { return data_; } size_t nbytes() const { return nbytes_; } void clear(); bool copy(const uint64_t *data, size_t nbytes, uint32_t version=1); void adopt(uint64_t *data, size_t nbytes, uint32_t version=1); void steal(uint64_t **datap, size_t *nbytesp, uint32_t *versionp=__null); bool read(JSContext *cx, jsval *vp, const JSStructuredCloneCallbacks *optionalCallbacks=__null, void *closure=__null) const; bool write(JSContext *cx, jsval v, const JSStructuredCloneCallbacks *optionalCallbacks=__null, void *closure=__null); void swap(JSAutoStructuredCloneBuffer &other); private: JSAutoStructuredCloneBuffer(const JSAutoStructuredCloneBuffer &other); JSAutoStructuredCloneBuffer &operator=(const JSAutoStructuredCloneBuffer &other); }; extern "C" { #define JS_SCTAG_USER_MIN ((uint32_t) 0xFFFF8000) #define JS_SCTAG_USER_MAX ((uint32_t) 0xFFFFFFFF) #define JS_SCERR_RECURSION 0 __attribute__((visibility("default"))) void JS_SetStructuredCloneCallbacks(JSRuntime *rt, const JSStructuredCloneCallbacks *callbacks); __attribute__((visibility("default"))) JSBool JS_ReadUint32Pair(JSStructuredCloneReader *r, uint32_t *p1, uint32_t *p2); __attribute__((visibility("default"))) JSBool JS_ReadBytes(JSStructuredCloneReader *r, void *p, size_t len); __attribute__((visibility("default"))) JSBool JS_ReadTypedArray(JSStructuredCloneReader *r, jsval *vp); __attribute__((visibility("default"))) JSBool JS_WriteUint32Pair(JSStructuredCloneWriter *w, uint32_t tag, uint32_t data); __attribute__((visibility("default"))) JSBool JS_WriteBytes(JSStructuredCloneWriter *w, const void *p, size_t len); __attribute__((visibility("default"))) JSBool JS_WriteTypedArray(JSStructuredCloneWriter *w, jsval v); struct JSLocaleCallbacks { JSLocaleToUpperCase localeToUpperCase; JSLocaleToLowerCase localeToLowerCase; JSLocaleCompare localeCompare; JSLocaleToUnicode localeToUnicode; JSErrorCallback localeGetErrorMessage; }; extern __attribute__((visibility("default"))) void JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks); extern __attribute__((visibility("default"))) JSLocaleCallbacks * JS_GetLocaleCallbacks(JSContext *cx); # 5331 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) void JS_ReportError(JSContext *cx, const char *format, ...); extern __attribute__((visibility("default"))) void JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback, void *userRef, const unsigned errorNumber, ...); extern __attribute__((visibility("default"))) void JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback, void *userRef, const unsigned errorNumber, ...); extern __attribute__((visibility("default"))) JSBool JS_ReportWarning(JSContext *cx, const char *format, ...); extern __attribute__((visibility("default"))) JSBool JS_ReportErrorFlagsAndNumber(JSContext *cx, unsigned flags, JSErrorCallback errorCallback, void *userRef, const unsigned errorNumber, ...); extern __attribute__((visibility("default"))) JSBool JS_ReportErrorFlagsAndNumberUC(JSContext *cx, unsigned flags, JSErrorCallback errorCallback, void *userRef, const unsigned errorNumber, ...); extern __attribute__((visibility("default"))) void JS_ReportOutOfMemory(JSContext *cx); extern __attribute__((visibility("default"))) void JS_ReportAllocationOverflow(JSContext *cx); struct JSErrorReport { const char *filename; JSPrincipals *originPrincipals; unsigned lineno; const char *linebuf; const char *tokenptr; const jschar *uclinebuf; const jschar *uctokenptr; unsigned flags; unsigned errorNumber; const jschar *ucmessage; const jschar **messageArgs; }; #define JSREPORT_ERROR 0x0 #define JSREPORT_WARNING 0x1 #define JSREPORT_EXCEPTION 0x2 #define JSREPORT_STRICT 0x4 # 5408 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSREPORT_STRICT_MODE_ERROR 0x8 # 5417 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" #define JSREPORT_IS_WARNING(flags) (((flags) & JSREPORT_WARNING) != 0) #define JSREPORT_IS_EXCEPTION(flags) (((flags) & JSREPORT_EXCEPTION) != 0) #define JSREPORT_IS_STRICT(flags) (((flags) & JSREPORT_STRICT) != 0) #define JSREPORT_IS_STRICT_MODE_ERROR(flags) (((flags) & JSREPORT_STRICT_MODE_ERROR) != 0) extern __attribute__((visibility("default"))) JSErrorReporter JS_GetErrorReporter(JSContext *cx); extern __attribute__((visibility("default"))) JSErrorReporter JS_SetErrorReporter(JSContext *cx, JSErrorReporter er); extern __attribute__((visibility("default"))) JSObject * JS_NewDateObject(JSContext *cx, int year, int mon, int mday, int hour, int min, int sec); extern __attribute__((visibility("default"))) JSObject * JS_NewDateObjectMsec(JSContext *cx, double msec); extern __attribute__((visibility("default"))) JSBool JS_ObjectIsDate(JSContext *cx, JSObject *obj); #define JSREG_FOLD 0x01 #define JSREG_GLOB 0x02 #define JSREG_MULTILINE 0x04 #define JSREG_STICKY 0x08 extern __attribute__((visibility("default"))) JSObject * JS_NewRegExpObject(JSContext *cx, JSObject *obj, char *bytes, size_t length, unsigned flags); extern __attribute__((visibility("default"))) JSObject * JS_NewUCRegExpObject(JSContext *cx, JSObject *obj, jschar *chars, size_t length, unsigned flags); extern __attribute__((visibility("default"))) void JS_SetRegExpInput(JSContext *cx, JSObject *obj, JSString *input, JSBool multiline); extern __attribute__((visibility("default"))) void JS_ClearRegExpStatics(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_ExecuteRegExp(JSContext *cx, JSObject *obj, JSObject *reobj, jschar *chars, size_t length, size_t *indexp, JSBool test, jsval *rval); extern __attribute__((visibility("default"))) JSObject * JS_NewRegExpObjectNoStatics(JSContext *cx, char *bytes, size_t length, unsigned flags); extern __attribute__((visibility("default"))) JSObject * JS_NewUCRegExpObjectNoStatics(JSContext *cx, jschar *chars, size_t length, unsigned flags); extern __attribute__((visibility("default"))) JSBool JS_ExecuteRegExpNoStatics(JSContext *cx, JSObject *reobj, jschar *chars, size_t length, size_t *indexp, JSBool test, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_ObjectIsRegExp(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) unsigned JS_GetRegExpFlags(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSString * JS_GetRegExpSource(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_IsExceptionPending(JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_GetPendingException(JSContext *cx, jsval *vp); extern __attribute__((visibility("default"))) void JS_SetPendingException(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) void JS_ClearPendingException(JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_ReportPendingException(JSContext *cx); # 5521 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSExceptionState * JS_SaveExceptionState(JSContext *cx); extern __attribute__((visibility("default"))) void JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state); extern __attribute__((visibility("default"))) void JS_DropExceptionState(JSContext *cx, JSExceptionState *state); # 5537 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSErrorReport * JS_ErrorFromException(JSContext *cx, jsval v); extern __attribute__((visibility("default"))) JSBool JS_ThrowReportedError(JSContext *cx, const char *message, JSErrorReport *reportp); extern __attribute__((visibility("default"))) JSBool JS_ThrowStopIteration(JSContext *cx); extern __attribute__((visibility("default"))) intptr_t JS_GetCurrentThread(); # 5573 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) void JS_AbortIfWrongThread(JSRuntime *rt); extern __attribute__((visibility("default"))) void JS_ClearRuntimeThread(JSRuntime *rt); extern __attribute__((visibility("default"))) void JS_SetRuntimeThread(JSRuntime *rt); } class JSAutoSetRuntimeThread { JSRuntime *runtime; public: JSAutoSetRuntimeThread(JSRuntime *runtime) : runtime(runtime) { JS_SetRuntimeThread(runtime); } ~JSAutoSetRuntimeThread() { JS_ClearRuntimeThread(runtime); } }; extern "C" { # 5611 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" static __attribute__((always_inline)) inline JSBool JS_IsConstructing(JSContext *cx, const jsval *vp) { # 5623 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" (void)cx; return JSVAL_IS_MAGIC_IMPL(JSVAL_TO_IMPL(vp[1])); } extern __attribute__((visibility("default"))) JSObject * JS_NewObjectForConstructor(JSContext *cx, JSClass *clasp, const jsval *vp); # 5656 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" extern __attribute__((visibility("default"))) JSBool JS_IndexToId(JSContext *cx, uint32_t index, jsid *id); extern __attribute__((visibility("default"))) JSBool JS_IsIdentifier(JSContext *cx, JSString *str, JSBool *isIdentifier); extern __attribute__((visibility("default"))) JSBool JS_DescribeScriptedCaller(JSContext *cx, JSScript **script, unsigned *lineno); extern __attribute__((visibility("default"))) void * JS_EncodeScript(JSContext *cx, JSScript *script, uint32_t *lengthp); extern __attribute__((visibility("default"))) void * JS_EncodeInterpretedFunction(JSContext *cx, JSObject *funobj, uint32_t *lengthp); extern __attribute__((visibility("default"))) JSScript * JS_DecodeScript(JSContext *cx, const void *data, uint32_t length, JSPrincipals *principals, JSPrincipals *originPrincipals); extern __attribute__((visibility("default"))) JSObject * JS_DecodeInterpretedFunction(JSContext *cx, const void *data, uint32_t length, JSPrincipals *principals, JSPrincipals *originPrincipals); } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 1 #define jsatom_h___ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_VERSION_ECMA_3 148 #define JS_VERSION_ECMA_3_TEST 149 # 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_STR_HTML_HELPERS 1 #define JS_HAS_OBJ_PROTO_PROP 1 #define JS_HAS_OBJ_WATCHPOINT 1 #define JS_HAS_TOSOURCE 1 #define JS_HAS_CATCH_GUARD 1 #define JS_HAS_UNEVAL 1 #define JS_HAS_CONST 1 #define JS_HAS_FUN_EXPR_STMT 1 #define JS_HAS_NO_SUCH_METHOD 1 #define JS_HAS_GENERATORS 1 #define JS_HAS_BLOCK_SCOPE 1 #define JS_HAS_DESTRUCTURING 2 #define JS_HAS_GENERATOR_EXPRS 1 #define JS_HAS_EXPR_CLOSURES 1 # 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_NEW_GLOBAL_OBJECT 1 #define JS_HAS_MAKE_SYSTEM_OBJECT 1 #define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) #define OLD_GETTER_SETTER_METHODS 1 #define USE_NEW_OBJECT_REPRESENTATION 0 #define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 1 #define jsprvtd_h___ # 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" # 1 "./../../dist/include/js/HashTable.h" 1 # 9 "./../../dist/include/js/HashTable.h" #define jshashtable_h_ namespace js { class TempAllocPolicy; typedef uint32_t HashNumber; namespace detail { template class HashTable; template class HashTableEntry { HashNumber keyHash; typedef typename tl::StripConst::result NonConstT; static const HashNumber sFreeKey = 0; static const HashNumber sRemovedKey = 1; static const HashNumber sCollisionBit = 1; template friend class HashTable; static bool isLiveHash(HashNumber hash) { return hash > sRemovedKey; } public: HashTableEntry() : keyHash(0), t() {} HashTableEntry(MoveRef rhs) : keyHash(rhs->keyHash), t(Move(rhs->t)) { } void operator=(const HashTableEntry &rhs) { keyHash = rhs.keyHash; t = rhs.t; } void operator=(MoveRef rhs) { keyHash = rhs->keyHash; t = Move(rhs->t); } NonConstT t; bool isFree() const { return keyHash == sFreeKey; } void setFree() { keyHash = sFreeKey; t = T(); } bool isRemoved() const { return keyHash == sRemovedKey; } void setRemoved() { keyHash = sRemovedKey; t = T(); } bool isLive() const { return isLiveHash(keyHash); } void setLive(HashNumber hn) { do { } while(0); keyHash = hn; } void setCollision() { do { } while(0); keyHash |= sCollisionBit; } void setCollision(HashNumber collisionBit) { do { } while(0); keyHash |= collisionBit; } void unsetCollision() { keyHash &= ~sCollisionBit; } bool hasCollision() const { do { } while(0); return keyHash & sCollisionBit; } bool matchHash(HashNumber hn) { return (keyHash & ~sCollisionBit) == hn; } HashNumber getKeyHash() const { do { } while(0); return keyHash; } }; # 77 "./../../dist/include/js/HashTable.h" template class HashTable : private AllocPolicy { typedef typename tl::StripConst::result NonConstT; typedef typename HashPolicy::KeyType Key; typedef typename HashPolicy::Lookup Lookup; public: typedef HashTableEntry Entry; class Ptr { friend class HashTable; typedef void (Ptr::* ConvertibleToBool)(); void nonNull() {} Entry *entry; protected: Ptr(Entry &entry) : entry(&entry) {} public: Ptr() { } bool found() const { return entry->isLive(); } operator ConvertibleToBool() const { return found() ? &Ptr::nonNull : 0; } bool operator==(const Ptr &rhs) const { do { } while(0); return entry == rhs.entry; } bool operator!=(const Ptr &rhs) const { return !(*this == rhs); } T &operator*() const { return entry->t; } T *operator->() const { return &entry->t; } }; class AddPtr : public Ptr { friend class HashTable; HashNumber keyHash; DebugOnly mutationCount; AddPtr(Entry &entry, HashNumber hn) : Ptr(entry), keyHash(hn) {} public: AddPtr() {} }; class Range { protected: friend class HashTable; Range(Entry *c, Entry *e) : cur(c), end(e), validEntry(true) { while (cur < end && !cur->isLive()) ++cur; } Entry *cur, *end; DebugOnly validEntry; public: Range() : cur(__null), end(__null), validEntry(false) {} bool empty() const { return cur == end; } T &front() const { do { } while(0); do { } while(0); return cur->t; } void popFront() { do { } while(0); while (++cur < end && !cur->isLive()) continue; validEntry = true; } }; # 183 "./../../dist/include/js/HashTable.h" class Enum : public Range { friend class HashTable; HashTable &table; bool added; bool removed; Enum(const Enum &); void operator=(const Enum &); public: template explicit Enum(Map &map) : Range(map.all()), table(map.impl), added(false), removed(false) {} # 208 "./../../dist/include/js/HashTable.h" void removeFront() { table.remove(*this->cur); removed = true; this->validEntry = false; } void rekeyFront(const Lookup &l, const Key &k) { do { } while(0); if (match(*this->cur, l)) return; Entry e = *this->cur; HashPolicy::setKey(e.t, const_cast(k)); table.remove(*this->cur); table.add(l, e); added = true; this->validEntry = false; } void rekeyFront(const Key &k) { rekeyFront(k, k); } ~Enum() { if (added) table.checkOverloaded(); if (removed) table.checkUnderloaded(); } void endEnumeration() { if (added) { table.checkOverloaded(); added = false; } if (removed) { table.checkUnderloaded(); removed = false; } } }; private: uint32_t hashShift; uint32_t entryCount; uint32_t gen; uint32_t removedCount; Entry *table; void setTableSizeLog2(unsigned sizeLog2) { hashShift = sHashBits - sizeLog2; } # 282 "./../../dist/include/js/HashTable.h" #define METER(x) friend class js::ReentrancyGuard; mutable DebugOnly entered; DebugOnly mutationCount; static const unsigned sMinSizeLog2 = 2; static const unsigned sMinSize = 1 << sMinSizeLog2; static const unsigned sDefaultInitSizeLog2 = 4; public: static const unsigned sDefaultInitSize = 1 << sDefaultInitSizeLog2; private: static const unsigned sMaxInit = ((uint32_t)1 << (23)); static const unsigned sMaxCapacity = ((uint32_t)1 << (24)); static const unsigned sHashBits = tl::BitSize::result; static const uint8_t sMinAlphaFrac = 64; static const uint8_t sMaxAlphaFrac = 192; static const uint8_t sInvMaxAlpha = 171; static const HashNumber sGoldenRatio = 0x9E3779B9U; static const HashNumber sFreeKey = Entry::sFreeKey; static const HashNumber sRemovedKey = Entry::sRemovedKey; static const HashNumber sCollisionBit = Entry::sCollisionBit; static void staticAsserts() { typedef int moz_static_assert14[(((sMaxInit * sInvMaxAlpha) >> 7) < sMaxCapacity) ? 1 : -1]; typedef int moz_static_assert15[((sMaxCapacity * sInvMaxAlpha) <= (4294967295U)) ? 1 : -1]; typedef int moz_static_assert16[((sMaxCapacity * sizeof(Entry)) <= (4294967295U)) ? 1 : -1]; } static bool isLiveHash(HashNumber hash) { return Entry::isLiveHash(hash); } static HashNumber prepareHash(const Lookup& l) { HashNumber keyHash = HashPolicy::hash(l); keyHash *= sGoldenRatio; if (!isLiveHash(keyHash)) keyHash -= (sRemovedKey + 1); return keyHash & ~sCollisionBit; } static Entry *createTable(AllocPolicy &alloc, uint32_t capacity) { Entry *newTable = (Entry *)alloc.malloc_(capacity * sizeof(Entry)); if (!newTable) return __null; for (Entry *e = newTable, *end = e + capacity; e < end; ++e) new(e) Entry(); return newTable; } static void destroyTable(AllocPolicy &alloc, Entry *oldTable, uint32_t capacity) { for (Entry *e = oldTable, *end = e + capacity; e < end; ++e) e->~Entry(); alloc.free_(oldTable); } public: HashTable(AllocPolicy ap) : AllocPolicy(ap), hashShift(sHashBits), entryCount(0), gen(0), removedCount(0), table(__null), entered(false), mutationCount(0) {} __attribute__ ((warn_unused_result)) bool init(uint32_t length) { do { } while(0); if (length > sMaxInit) { this->reportAllocOverflow(); return false; } uint32_t capacity = (length * sInvMaxAlpha) >> 7; if (capacity < sMinSize) capacity = sMinSize; uint32_t roundUp = sMinSize, roundUpLog2 = sMinSizeLog2; while (roundUp < capacity) { roundUp <<= 1; ++roundUpLog2; } capacity = roundUp; do { } while(0); table = createTable(*this, capacity); if (!table) return false; setTableSizeLog2(roundUpLog2); ; return true; } bool initialized() const { return !!table; } ~HashTable() { if (table) destroyTable(*this, table, capacity()); } private: static HashNumber hash1(HashNumber hash0, uint32_t shift) { return hash0 >> shift; } struct DoubleHash { HashNumber h2; HashNumber sizeMask; }; DoubleHash hash2(HashNumber curKeyHash, uint32_t hashShift) const { unsigned sizeLog2 = sHashBits - hashShift; DoubleHash dh = { ((curKeyHash << sizeLog2) >> hashShift) | 1, (HashNumber(1) << sizeLog2) - 1 }; return dh; } static HashNumber applyDoubleHash(HashNumber h1, const DoubleHash &dh) { return (h1 - dh.h2) & dh.sizeMask; } bool overloaded() { return entryCount + removedCount >= ((sMaxAlphaFrac * capacity()) >> 8); } bool underloaded() { uint32_t tableCapacity = capacity(); return tableCapacity > sMinSize && entryCount <= ((sMinAlphaFrac * tableCapacity) >> 8); } static bool match(Entry &e, const Lookup &l) { return HashPolicy::match(HashPolicy::getKey(e.t), l); } Entry &lookup(const Lookup &l, HashNumber keyHash, unsigned collisionBit) const { do { } while(0); do { } while(0); do { } while(0); do { } while(0); ; HashNumber h1 = hash1(keyHash, hashShift); Entry *entry = &table[h1]; if (entry->isFree()) { ; return *entry; } if (entry->matchHash(keyHash) && match(*entry, l)) { ; return *entry; } DoubleHash dh = hash2(keyHash, hashShift); Entry *firstRemoved = __null; while(true) { if ((__builtin_expect((entry->isRemoved()), 0))) { if (!firstRemoved) firstRemoved = entry; } else { entry->setCollision(collisionBit); } ; h1 = applyDoubleHash(h1, dh); entry = &table[h1]; if (entry->isFree()) { ; return firstRemoved ? *firstRemoved : *entry; } if (entry->matchHash(keyHash) && match(*entry, l)) { ; return *entry; } } } # 509 "./../../dist/include/js/HashTable.h" Entry &findFreeEntry(HashNumber keyHash) { ; do { } while(0); HashNumber h1 = hash1(keyHash, hashShift); Entry *entry = &table[h1]; if (entry->isFree()) { ; return *entry; } DoubleHash dh = hash2(keyHash, hashShift); while(true) { do { } while(0); entry->setCollision(); ; h1 = applyDoubleHash(h1, dh); entry = &table[h1]; if (entry->isFree()) { ; return *entry; } } } bool changeTableSize(int deltaLog2) { Entry *oldTable = table; uint32_t oldCap = capacity(); uint32_t newLog2 = sHashBits - hashShift + deltaLog2; uint32_t newCapacity = ((uint32_t)1 << (newLog2)); if (newCapacity > sMaxCapacity) { this->reportAllocOverflow(); return false; } Entry *newTable = createTable(*this, newCapacity); if (!newTable) return false; setTableSizeLog2(newLog2); removedCount = 0; gen++; table = newTable; for (Entry *src = oldTable, *end = src + oldCap; src < end; ++src) { if (src->isLive()) { src->unsetCollision(); findFreeEntry(src->getKeyHash()) = Move(*src); } } destroyTable(*this, oldTable, oldCap); return true; } void add(const Lookup &l, const Entry &e) { HashNumber keyHash = prepareHash(l); Entry &entry = lookup(l, keyHash, sCollisionBit); if (entry.isRemoved()) { ; removedCount--; keyHash |= sCollisionBit; } entry.t = e.t; entry.setLive(keyHash); entryCount++; mutationCount++; } bool checkOverloaded() { if (!overloaded()) return false; int deltaLog2; if (removedCount >= (capacity() >> 2)) { ; deltaLog2 = 0; } else { ; deltaLog2 = 1; } return changeTableSize(deltaLog2); } void remove(Entry &e) { ; if (e.hasCollision()) { e.setRemoved(); removedCount++; } else { ; e.setFree(); } entryCount--; mutationCount++; } void checkUnderloaded() { if (underloaded()) { ; (void) changeTableSize(-1); } } public: void clear() { if (tl::IsPodType::result) { memset(table, 0, sizeof(*table) * capacity()); } else { uint32_t tableCapacity = capacity(); for (Entry *e = table, *end = table + tableCapacity; e < end; ++e) *e = Move(Entry()); } removedCount = 0; entryCount = 0; mutationCount++; } void finish() { do { } while(0); if (!table) return; destroyTable(*this, table, capacity()); table = __null; gen++; entryCount = 0; removedCount = 0; mutationCount++; } Range all() const { return Range(table, table + capacity()); } bool empty() const { return !entryCount; } uint32_t count() const { return entryCount; } uint32_t capacity() const { return ((uint32_t)1 << (sHashBits - hashShift)); } uint32_t generation() const { return gen; } size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(table); } size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); } Ptr lookup(const Lookup &l) const { ReentrancyGuard g(*this); HashNumber keyHash = prepareHash(l); return Ptr(lookup(l, keyHash, 0)); } AddPtr lookupForAdd(const Lookup &l) const { ReentrancyGuard g(*this); HashNumber keyHash = prepareHash(l); Entry &entry = lookup(l, keyHash, sCollisionBit); AddPtr p(entry, keyHash); p.mutationCount = mutationCount; return p; } bool add(AddPtr &p) { ReentrancyGuard g(*this); do { } while(0); do { } while(0); do { } while(0); do { } while(0); if (p.entry->isRemoved()) { ; removedCount--; p.keyHash |= sCollisionBit; } else { if (checkOverloaded()) p.entry = &findFreeEntry(p.keyHash); } p.entry->setLive(p.keyHash); entryCount++; mutationCount++; return true; } bool add(AddPtr &p, T** pentry) { if (!add(p)) return false; *pentry = &p.entry->t; return true; } bool add(AddPtr &p, const T &t) { if (!add(p)) return false; p.entry->t = t; return true; } bool relookupOrAdd(AddPtr& p, const Lookup &l, const T& t) { p.mutationCount = mutationCount; { ReentrancyGuard g(*this); p.entry = &lookup(l, p.keyHash, sCollisionBit); } return p.found() || add(p, t); } void remove(Ptr p) { ReentrancyGuard g(*this); do { } while(0); remove(*p.entry); checkUnderloaded(); } #undef METER }; } # 810 "./../../dist/include/js/HashTable.h" template struct DefaultHasher { typedef Key Lookup; static HashNumber hash(const Lookup &l) { return l; } static bool match(const Key &k, const Lookup &l) { return k == l; } }; template struct PointerHasher { typedef Key Lookup; static HashNumber hash(const Lookup &l) { size_t word = reinterpret_cast(l) >> zeroBits; typedef int moz_static_assert17[(sizeof(HashNumber) == 4) ? 1 : -1]; return HashNumber(word); } static bool match(const Key &k, const Lookup &l) { return k == l; } }; template struct TaggedPointerHasher { typedef Key Lookup; static HashNumber hash(const Lookup &l) { return PointerHasher::hash(l); } static const uintptr_t COMPARE_MASK = uintptr_t(-1) - 1; static bool match(const Key &k, const Lookup &l) { return (uintptr_t(k) & COMPARE_MASK) == uintptr_t(l); } }; template struct DefaultHasher: PointerHasher::result> { }; template class HashMapEntry { template friend class detail::HashTable; template friend class detail::HashTableEntry; void operator=(const HashMapEntry &rhs) { const_cast(key) = rhs.key; value = rhs.value; } public: HashMapEntry() : key(), value() {} template HashMapEntry(const KeyInput &k, const ValueInput &v) : key(k), value(v) {} HashMapEntry(MoveRef rhs) : key(Move(rhs->key)), value(Move(rhs->value)) { } void operator=(MoveRef rhs) { const_cast(key) = Move(rhs->key); value = Move(rhs->value); } const Key key; Value value; }; namespace tl { template struct IsPodType > { static const bool result = IsPodType::result; }; template struct IsPodType > { static const bool result = IsPodType::result && IsPodType::result; }; } # 930 "./../../dist/include/js/HashTable.h" template , class AllocPolicy = TempAllocPolicy> class HashMap { public: typedef typename HashPolicy::Lookup Lookup; typedef HashMapEntry Entry; private: struct MapHashPolicy : HashPolicy { typedef Key KeyType; static const Key &getKey(Entry &e) { return e.key; } static void setKey(Entry &e, Key &k) { const_cast(e.key) = k; } }; typedef detail::HashTable Impl; friend class Impl::Enum; HashMap(const HashMap &); HashMap &operator=(const HashMap &); Impl impl; public: const static unsigned sDefaultInitSize = Impl::sDefaultInitSize; HashMap(AllocPolicy a = AllocPolicy()) : impl(a) {} bool init(uint32_t len = sDefaultInitSize) { return impl.init(len); } bool initialized() const { return impl.initialized(); } # 983 "./../../dist/include/js/HashTable.h" typedef typename Impl::Ptr Ptr; Ptr lookup(const Lookup &l) const { return impl.lookup(l); } void remove(Ptr p) { impl.remove(p); } # 1024 "./../../dist/include/js/HashTable.h" typedef typename Impl::AddPtr AddPtr; AddPtr lookupForAdd(const Lookup &l) const { return impl.lookupForAdd(l); } template bool add(AddPtr &p, const KeyInput &k, const ValueInput &v) { Entry *pentry; if (!impl.add(p, &pentry)) return false; const_cast(pentry->key) = k; pentry->value = v; return true; } bool add(AddPtr &p, const Key &k, MoveRef v) { Entry *pentry; if (!impl.add(p, &pentry)) return false; const_cast(pentry->key) = k; pentry->value = v; return true; } bool add(AddPtr &p, const Key &k) { Entry *pentry; if (!impl.add(p, &pentry)) return false; const_cast(pentry->key) = k; return true; } template bool relookupOrAdd(AddPtr &p, const KeyInput &k, const ValueInput &v) { return impl.relookupOrAdd(p, k, Entry(k, v)); } # 1071 "./../../dist/include/js/HashTable.h" typedef typename Impl::Range Range; Range all() const { return impl.all(); } uint32_t count() const { return impl.count(); } size_t capacity() const { return impl.capacity(); } size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { return impl.sizeOfExcludingThis(mallocSizeOf); } size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); } # 1099 "./../../dist/include/js/HashTable.h" typedef typename Impl::Enum Enum; void clear() { impl.clear(); } void finish() { impl.finish(); } bool empty() const { return impl.empty(); } unsigned generation() const { return impl.generation(); } bool has(const Lookup &l) const { return impl.lookup(l) != __null; } template bool put(const KeyInput &k, const ValueInput &v) { AddPtr p = lookupForAdd(k); if (p) { p->value = v; return true; } return add(p, k, v); } bool putNew(const Key &k, const Value &v) { AddPtr p = lookupForAdd(k); do { } while(0); return add(p, k, v); } Ptr lookupWithDefault(const Key &k, const Value &defaultValue) { AddPtr p = lookupForAdd(k); if (p) return p; (void)add(p, k, defaultValue); return p; } void remove(const Lookup &l) { if (Ptr p = lookup(l)) remove(p); } }; # 1178 "./../../dist/include/js/HashTable.h" template , class AllocPolicy = TempAllocPolicy> class HashSet { typedef typename HashPolicy::Lookup Lookup; struct SetOps : HashPolicy { typedef T KeyType; static const KeyType &getKey(const T &t) { return t; } static void setKey(T &t, KeyType &k) { t = k; } }; typedef detail::HashTable Impl; friend class Impl::Enum; HashSet(const HashSet &); HashSet &operator=(const HashSet &); Impl impl; public: const static unsigned sDefaultInitSize = Impl::sDefaultInitSize; HashSet(AllocPolicy a = AllocPolicy()) : impl(a) {} bool init(uint32_t len = sDefaultInitSize) { return impl.init(len); } bool initialized() const { return impl.initialized(); } # 1221 "./../../dist/include/js/HashTable.h" typedef typename Impl::Ptr Ptr; Ptr lookup(const Lookup &l) const { return impl.lookup(l); } void remove(Ptr p) { impl.remove(p); } # 1261 "./../../dist/include/js/HashTable.h" typedef typename Impl::AddPtr AddPtr; AddPtr lookupForAdd(const Lookup &l) const { return impl.lookupForAdd(l); } bool add(AddPtr &p, const T &t) { return impl.add(p, t); } bool relookupOrAdd(AddPtr &p, const Lookup &l, const T &t) { return impl.relookupOrAdd(p, l, t); } # 1284 "./../../dist/include/js/HashTable.h" typedef typename Impl::Range Range; Range all() const { return impl.all(); } uint32_t count() const { return impl.count(); } size_t capacity() const { return impl.capacity(); } size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { return impl.sizeOfExcludingThis(mallocSizeOf); } size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); } # 1312 "./../../dist/include/js/HashTable.h" typedef typename Impl::Enum Enum; void clear() { impl.clear(); } void finish() { impl.finish(); } bool empty() const { return impl.empty(); } unsigned generation() const { return impl.generation(); } bool has(const Lookup &l) const { return impl.lookup(l) != __null; } bool put(const T &t) { AddPtr p = lookupForAdd(t); return p ? true : add(p, t); } bool putNew(const T &t) { AddPtr p = lookupForAdd(t); do { } while(0); return add(p, t); } bool putNew(const Lookup &l, const T &t) { AddPtr p = lookupForAdd(l); do { } while(0); return add(p, t); } void remove(const Lookup &l) { if (Ptr p = lookup(l)) remove(p); } }; } # 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 2 extern "C" { #define JS_BITS_PER_UINT32_LOG2 5 #define JS_BITS_PER_UINT32 32 static const unsigned JS_GCTHING_ALIGN = 8; static const unsigned JS_GCTHING_ZEROBITS = 3; typedef uint8_t jsbytecode; typedef uint8_t jssrcnote; typedef uintptr_t jsatomid; typedef struct JSArgumentFormatMap JSArgumentFormatMap; typedef struct JSGCThing JSGCThing; typedef struct JSGenerator JSGenerator; typedef struct JSNativeEnumerator JSNativeEnumerator; typedef struct JSProperty JSProperty; typedef struct JSSharpObjectMap JSSharpObjectMap; typedef struct JSTryNote JSTryNote; typedef struct JSAtomState JSAtomState; typedef struct JSCodeSpec JSCodeSpec; typedef struct JSPrinter JSPrinter; typedef struct JSStackHeader JSStackHeader; typedef struct JSSubString JSSubString; typedef struct JSSpecializedNative JSSpecializedNative; typedef struct JSXML JSXML; # 79 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" extern "C++" { class JSDependentString; class JSExtensibleString; class JSExternalString; class JSLinearString; class JSFixedString; class JSStaticAtom; class JSRope; class JSAtom; class JSWrapper; namespace js { struct ArgumentsData; struct Class; class RegExpGuard; class RegExpObject; class RegExpObjectBuilder; class RegExpShared; class RegExpStatics; class MatchPairs; class PropertyName; namespace detail { class RegExpCode; } enum RegExpFlag { IgnoreCaseFlag = 0x01, GlobalFlag = 0x02, MultilineFlag = 0x04, StickyFlag = 0x08, NoFlags = 0x00, AllFlags = 0x0f }; enum RegExpExecType { RegExpExec, RegExpTest }; class ExecuteArgsGuard; class InvokeFrameGuard; class InvokeArgsGuard; class StringBuffer; class FrameRegs; class StackFrame; class StackSegment; class StackSpace; class ContextStack; class ScriptFrameIter; class CallReceiver; class CallArgs; struct BytecodeEmitter; struct Definition; struct FunctionBox; struct ObjectBox; struct ParseNode; struct Parser; struct SharedContext; class TokenStream; struct Token; struct TokenPos; struct TokenPtr; struct TreeContext; class UpvarCookie; class Proxy; class BaseProxyHandler; class DirectWrapper; class CrossCompartmentWrapper; class TempAllocPolicy; class RuntimeAllocPolicy; class GlobalObject; template class InlineMap; class LifoAlloc; class BaseShape; class UnownedBaseShape; struct Shape; struct EmptyShape; class ShapeKindArray; class Bindings; struct StackBaseShape; struct StackShape; class MultiDeclRange; class ParseMapPool; class DefnOrHeader; typedef InlineMap AtomDefnMap; typedef InlineMap AtomIndexMap; typedef InlineMap AtomDOHMap; typedef Vector UpvarCookies; class Breakpoint; class BreakpointSite; class Debugger; class WatchpointMap; typedef JSObject Env; typedef JSNative Native; typedef JSPropertyOp PropertyOp; typedef JSStrictPropertyOp StrictPropertyOp; typedef JSPropertyDescriptor PropertyDescriptor; namespace analyze { struct LifetimeVariable; class LoopAnalysis; class ScriptAnalysis; class SlotValue; class SSAValue; class SSAUseChain; } namespace types { class TypeSet; struct TypeCallsite; struct TypeObject; struct TypeCompartment; } typedef JS::Handle HandleShape; typedef JS::Handle HandleBaseShape; typedef JS::Handle HandleTypeObject; typedef JS::Handle HandleAtom; typedef JS::Handle HandlePropertyName; typedef JS::Rooted RootedShape; typedef JS::Rooted RootedBaseShape; typedef JS::Rooted RootedTypeObject; typedef JS::Rooted RootedAtom; typedef JS::Rooted RootedPropertyName; enum XDRMode { XDR_ENCODE, XDR_DECODE }; template class XDRState; class FreeOp; } namespace JSC { class ExecutableAllocator; } namespace WTF { class BumpPointerAllocator; } } # 269 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" typedef enum JSTrapStatus { JSTRAP_ERROR, JSTRAP_CONTINUE, JSTRAP_RETURN, JSTRAP_THROW, JSTRAP_LIMIT } JSTrapStatus; typedef JSTrapStatus (* JSTrapHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, jsval closure); typedef JSTrapStatus (* JSInterruptHook)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure); typedef JSTrapStatus (* JSDebuggerHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure); typedef JSTrapStatus (* JSThrowHook)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, void *closure); typedef JSBool (* JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsid id, jsval old, jsval *newp, void *closure); typedef void (* JSNewScriptHook)(JSContext *cx, const char *filename, unsigned lineno, JSScript *script, JSFunction *fun, void *callerdata); typedef void (* JSDestroyScriptHook)(JSFreeOp *fop, JSScript *script, void *callerdata); typedef void (* JSSourceHandler)(const char *filename, unsigned lineno, const jschar *str, size_t length, void **listenerTSData, void *closure); # 341 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" typedef void * (* JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before, JSBool *ok, void *closure); typedef JSBool (* JSDebugErrorHook)(JSContext *cx, const char *message, JSErrorReport *report, void *closure); typedef struct JSDebugHooks { JSInterruptHook interruptHook; void *interruptHookData; JSNewScriptHook newScriptHook; void *newScriptHookData; JSDestroyScriptHook destroyScriptHook; void *destroyScriptHookData; JSDebuggerHandler debuggerHandler; void *debuggerHandlerData; JSSourceHandler sourceHandler; void *sourceHandlerData; JSInterpreterHook executeHook; void *executeHookData; JSInterpreterHook callHook; void *callHookData; JSThrowHook throwHook; void *throwHookData; JSDebugErrorHook debugErrorHook; void *debugErrorHookData; } JSDebugHooks; typedef JSObject * (* JSObjectOp)(JSContext *cx, JSHandleObject obj); typedef JSObject * (* JSClassInitializerOp)(JSContext *cx, JSObject *obj); typedef JSObject * (* JSIteratorOp)(JSContext *cx, JSHandleObject obj, JSBool keysonly); # 397 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" extern JSBool js_CStringsAreUTF8; } # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jshash.h" 1 #define jshash_h___ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jshash.h" 2 extern "C" { typedef uint32_t JSHashNumber; typedef struct JSHashEntry JSHashEntry; typedef struct JSHashTable JSHashTable; #define JS_HASH_BITS 32 #define JS_GOLDEN_RATIO 0x9E3779B9U typedef JSHashNumber (* JSHashFunction)(const void *key); typedef int (* JSHashComparator)(const void *v1, const void *v2); typedef int (* JSHashEnumerator)(JSHashEntry *he, int i, void *arg); #define HT_ENUMERATE_NEXT 0 #define HT_ENUMERATE_STOP 1 #define HT_ENUMERATE_REMOVE 2 typedef struct JSHashAllocOps { void * (*allocTable)(void *pool, size_t size); void (*freeTable)(void *pool, void *item, size_t size); JSHashEntry * (*allocEntry)(void *pool, const void *key); void (*freeEntry)(void *pool, JSHashEntry *he, unsigned flag); } JSHashAllocOps; #define HT_FREE_VALUE 0 #define HT_FREE_ENTRY 1 struct JSHashEntry { JSHashEntry *next; JSHashNumber keyHash; const void *key; void *value; }; struct JSHashTable { JSHashEntry **buckets; uint32_t nentries; uint32_t shift; JSHashFunction keyHash; JSHashComparator keyCompare; JSHashComparator valueCompare; JSHashAllocOps *allocOps; void *allocPriv; }; extern __attribute__((visibility("default"))) JSHashTable * JS_NewHashTable(uint32_t n, JSHashFunction keyHash, JSHashComparator keyCompare, JSHashComparator valueCompare, JSHashAllocOps *allocOps, void *allocPriv); extern __attribute__((visibility("default"))) void JS_HashTableDestroy(JSHashTable *ht); extern __attribute__((visibility("default"))) JSHashEntry ** JS_HashTableRawLookup(JSHashTable *ht, JSHashNumber keyHash, const void *key); extern __attribute__((visibility("default"))) JSHashEntry * JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **&hep, JSHashNumber keyHash, const void *key, void *value); extern __attribute__((visibility("default"))) void JS_HashTableRawRemove(JSHashTable *ht, JSHashEntry **hep, JSHashEntry *he); extern __attribute__((visibility("default"))) JSHashEntry * JS_HashTableAdd(JSHashTable *ht, const void *key, void *value); extern __attribute__((visibility("default"))) JSBool JS_HashTableRemove(JSHashTable *ht, const void *key); extern __attribute__((visibility("default"))) int JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg); extern __attribute__((visibility("default"))) void * JS_HashTableLookup(JSHashTable *ht, const void *key); extern __attribute__((visibility("default"))) int JS_HashTableDump(JSHashTable *ht, JSHashEnumerator dump, FILE *fp); extern __attribute__((visibility("default"))) JSHashNumber JS_HashString(const void *key); extern __attribute__((visibility("default"))) int JS_CompareValues(const void *v1, const void *v2); } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 1 #define jslock_h__ # 1 "/usr/include/nspr/pratom.h" 1 # 12 "/usr/include/nspr/pratom.h" #define pratom_h___ # 1 "/usr/include/nspr/prtypes.h" 1 # 21 "/usr/include/nspr/prtypes.h" #define prtypes_h___ # 1 "/usr/include/nspr/prcpucfg.h" 1 # 12 "/usr/include/nspr/prcpucfg.h" #define nspr_cpucfg___ #define LINUX #define PR_AF_INET6 10 # 547 "/usr/include/nspr/prcpucfg.h" #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 4 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 # 871 "/usr/include/nspr/prcpucfg.h" #define HAVE_LONG_LONG # 27 "/usr/include/nspr/prtypes.h" 2 # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 30 "/usr/include/nspr/prtypes.h" 2 # 125 "/usr/include/nspr/prtypes.h" #define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type #define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #define NSPR_API(__type) PR_IMPORT(__type) #define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) # 160 "/usr/include/nspr/prtypes.h" #define PR_BEGIN_MACRO do { #define PR_END_MACRO } while (0) # 170 "/usr/include/nspr/prtypes.h" #define PR_BEGIN_EXTERN_C extern "C" { #define PR_END_EXTERN_C } # 183 "/usr/include/nspr/prtypes.h" #define PR_BIT(n) ((PRUint32)1 << (n)) #define PR_BITMASK(n) (PR_BIT(n) - 1) # 194 "/usr/include/nspr/prtypes.h" #define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) #define PR_MIN(x,y) ((x)<(y)?(x):(y)) #define PR_MAX(x,y) ((x)>(y)?(x):(y)) #define PR_ABS(x) ((x)<0?-(x):(x)) #define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) extern "C" { # 216 "/usr/include/nspr/prtypes.h" typedef unsigned char PRUint8; # 230 "/usr/include/nspr/prtypes.h" typedef signed char PRInt8; # 244 "/usr/include/nspr/prtypes.h" #define PR_INT8_MAX 127 #define PR_INT8_MIN (-128) #define PR_UINT8_MAX 255U # 255 "/usr/include/nspr/prtypes.h" typedef unsigned short PRUint16; typedef short PRInt16; # 269 "/usr/include/nspr/prtypes.h" #define PR_INT16_MAX 32767 #define PR_INT16_MIN (-32768) #define PR_UINT16_MAX 65535U # 280 "/usr/include/nspr/prtypes.h" typedef unsigned int PRUint32; typedef int PRInt32; #define PR_INT32(x) x #define PR_UINT32(x) x ## U # 301 "/usr/include/nspr/prtypes.h" #define PR_INT32_MAX PR_INT32(2147483647) #define PR_INT32_MIN (-PR_INT32_MAX - 1) #define PR_UINT32_MAX PR_UINT32(4294967295) # 350 "/usr/include/nspr/prtypes.h" typedef long long PRInt64; typedef unsigned long long PRUint64; #define PR_INT64(x) x ## LL #define PR_UINT64(x) x ## ULL #define PR_INT64_MAX PR_INT64(0x7fffffffffffffff) #define PR_INT64_MIN (-PR_INT64_MAX - 1) #define PR_UINT64_MAX PR_UINT64(-1) # 385 "/usr/include/nspr/prtypes.h" typedef int PRIntn; typedef unsigned int PRUintn; # 396 "/usr/include/nspr/prtypes.h" typedef double PRFloat64; typedef size_t PRSize; typedef PRInt32 PROffset32; typedef PRInt64 PROffset64; typedef ptrdiff_t PRPtrdiff; # 431 "/usr/include/nspr/prtypes.h" typedef unsigned long PRUptrdiff; # 442 "/usr/include/nspr/prtypes.h" typedef PRIntn PRBool; #define PR_TRUE 1 #define PR_FALSE 0 typedef PRUint8 PRPackedBool; typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; #define __PRUNICHAR__ typedef PRUint16 PRUnichar; # 484 "/usr/include/nspr/prtypes.h" typedef long PRWord; typedef unsigned long PRUword; # 534 "/usr/include/nspr/prtypes.h" #define PR_STATIC_ASSERT(condition) extern void pr_static_assert(int arg[(condition) ? 1 : -1]) } # 15 "/usr/include/nspr/pratom.h" 2 # 1 "/usr/include/nspr/prlock.h" 1 # 17 "/usr/include/nspr/prlock.h" #define prlock_h___ extern "C" { # 34 "/usr/include/nspr/prlock.h" typedef struct PRLock PRLock; # 51 "/usr/include/nspr/prlock.h" extern __attribute__((visibility("default"))) PRLock* PR_NewLock(void); # 62 "/usr/include/nspr/prlock.h" extern __attribute__((visibility("default"))) void PR_DestroyLock(PRLock *lock); # 73 "/usr/include/nspr/prlock.h" extern __attribute__((visibility("default"))) void PR_Lock(PRLock *lock); # 85 "/usr/include/nspr/prlock.h" extern __attribute__((visibility("default"))) PRStatus PR_Unlock(PRLock *lock); # 101 "/usr/include/nspr/prlock.h" #define PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(lock) extern __attribute__((visibility("default"))) void PR_AssertCurrentThreadOwnsLock(PRLock *lock); } # 16 "/usr/include/nspr/pratom.h" 2 extern "C" { # 28 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRInt32 PR_AtomicIncrement(PRInt32 *val); # 39 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRInt32 PR_AtomicDecrement(PRInt32 *val); # 51 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRInt32 PR_AtomicSet(PRInt32 *val, PRInt32 newval); # 63 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRInt32 PR_AtomicAdd(PRInt32 *ptr, PRInt32 val); # 128 "/usr/include/nspr/pratom.h" #define PR_ATOMIC_INCREMENT(val) PR_AtomicIncrement(val) #define PR_ATOMIC_DECREMENT(val) PR_AtomicDecrement(val) #define PR_ATOMIC_SET(val,newval) PR_AtomicSet(val, newval) #define PR_ATOMIC_ADD(ptr,val) PR_AtomicAdd(ptr, val) typedef struct PRStackElemStr PRStackElem; struct PRStackElemStr { PRStackElem *prstk_elem_next; }; typedef struct PRStackStr PRStack; # 156 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRStack * PR_CreateStack(const char *stack_name); # 168 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) void PR_StackPush(PRStack *stack, PRStackElem *stack_elem); # 181 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRStackElem * PR_StackPop(PRStack *stack); # 195 "/usr/include/nspr/pratom.h" extern __attribute__((visibility("default"))) PRStatus PR_DestroyStack(PRStack *stack); } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 # 1 "/usr/include/nspr/prlock.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 # 1 "/usr/include/nspr/prcvar.h" 1 #define prcvar_h___ # 1 "/usr/include/nspr/prinrval.h" 1 # 19 "/usr/include/nspr/prinrval.h" #define prinrval_h extern "C" { typedef PRUint32 PRIntervalTime; # 39 "/usr/include/nspr/prinrval.h" #define PR_INTERVAL_MIN 1000UL #define PR_INTERVAL_MAX 100000UL # 53 "/usr/include/nspr/prinrval.h" #define PR_INTERVAL_NO_WAIT 0UL #define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL # 79 "/usr/include/nspr/prinrval.h" extern __attribute__((visibility("default"))) PRIntervalTime PR_IntervalNow(void); # 97 "/usr/include/nspr/prinrval.h" extern __attribute__((visibility("default"))) PRUint32 PR_TicksPerSecond(void); # 116 "/usr/include/nspr/prinrval.h" extern __attribute__((visibility("default"))) PRIntervalTime PR_SecondsToInterval(PRUint32 seconds); extern __attribute__((visibility("default"))) PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli); extern __attribute__((visibility("default"))) PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro); # 137 "/usr/include/nspr/prinrval.h" extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks); extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks); extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks); } # 11 "/usr/include/nspr/prcvar.h" 2 extern "C" { typedef struct PRCondVar PRCondVar; # 27 "/usr/include/nspr/prcvar.h" extern __attribute__((visibility("default"))) PRCondVar* PR_NewCondVar(PRLock *lock); extern __attribute__((visibility("default"))) void PR_DestroyCondVar(PRCondVar *cvar); # 65 "/usr/include/nspr/prcvar.h" extern __attribute__((visibility("default"))) PRStatus PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout); # 80 "/usr/include/nspr/prcvar.h" extern __attribute__((visibility("default"))) PRStatus PR_NotifyCondVar(PRCondVar *cvar); # 90 "/usr/include/nspr/prcvar.h" extern __attribute__((visibility("default"))) PRStatus PR_NotifyAllCondVar(PRCondVar *cvar); } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 # 1 "/usr/include/nspr/prthread.h" 1 #define prthread_h___ # 49 "/usr/include/nspr/prthread.h" extern "C" { typedef struct PRThread PRThread; typedef struct PRThreadStack PRThreadStack; typedef enum PRThreadType { PR_USER_THREAD, PR_SYSTEM_THREAD } PRThreadType; typedef enum PRThreadScope { PR_LOCAL_THREAD, PR_GLOBAL_THREAD, PR_GLOBAL_BOUND_THREAD } PRThreadScope; typedef enum PRThreadState { PR_JOINABLE_THREAD, PR_UNJOINABLE_THREAD } PRThreadState; typedef enum PRThreadPriority { PR_PRIORITY_FIRST = 0, PR_PRIORITY_LOW = 0, PR_PRIORITY_NORMAL = 1, PR_PRIORITY_HIGH = 2, PR_PRIORITY_URGENT = 3, PR_PRIORITY_LAST = 3 } PRThreadPriority; # 105 "/usr/include/nspr/prthread.h" extern __attribute__((visibility("default"))) PRThread* PR_CreateThread(PRThreadType type, void ( *start)(void *arg), void *arg, PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize); # 126 "/usr/include/nspr/prthread.h" extern __attribute__((visibility("default"))) PRStatus PR_JoinThread(PRThread *thread); extern __attribute__((visibility("default"))) PRThread* PR_GetCurrentThread(void); extern __attribute__((visibility("default"))) PRThreadPriority PR_GetThreadPriority(const PRThread *thread); extern __attribute__((visibility("default"))) void PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority); extern __attribute__((visibility("default"))) PRStatus PR_SetCurrentThreadName(const char *name); extern __attribute__((visibility("default"))) const char * PR_GetThreadName(const PRThread *thread); # 182 "/usr/include/nspr/prthread.h" typedef void ( *PRThreadPrivateDTOR)(void *priv); extern __attribute__((visibility("default"))) PRStatus PR_NewThreadPrivateIndex( PRUintn *newIndex, PRThreadPrivateDTOR destructor); # 198 "/usr/include/nspr/prthread.h" extern __attribute__((visibility("default"))) PRStatus PR_SetThreadPrivate(PRUintn tpdIndex, void *priv); # 209 "/usr/include/nspr/prthread.h" extern __attribute__((visibility("default"))) void* PR_GetThreadPrivate(PRUintn tpdIndex); # 221 "/usr/include/nspr/prthread.h" extern __attribute__((visibility("default"))) PRStatus PR_Interrupt(PRThread *thread); extern __attribute__((visibility("default"))) void PR_ClearInterrupt(void); extern __attribute__((visibility("default"))) void PR_BlockInterrupt(void); extern __attribute__((visibility("default"))) void PR_UnblockInterrupt(void); # 246 "/usr/include/nspr/prthread.h" extern __attribute__((visibility("default"))) PRStatus PR_Sleep(PRIntervalTime ticks); extern __attribute__((visibility("default"))) PRThreadScope PR_GetThreadScope(const PRThread *thread); extern __attribute__((visibility("default"))) PRThreadType PR_GetThreadType(const PRThread *thread); extern __attribute__((visibility("default"))) PRThreadState PR_GetThreadState(const PRThread *thread); } # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 # 1 "/usr/include/nspr/prinit.h" 1 #define prinit_h___ # 1 "/usr/include/nspr/prthread.h" 1 # 10 "/usr/include/nspr/prinit.h" 2 # 1 "/usr/include/nspr/prwin16.h" 1 #define prwin16_h___ # 153 "/usr/include/nspr/prwin16.h" #define PR_STDIO_INIT() # 12 "/usr/include/nspr/prinit.h" 2 extern "C" { # 24 "/usr/include/nspr/prinit.h" #define PR_NAME "NSPR" # 34 "/usr/include/nspr/prinit.h" #define PR_VERSION "4.9.2" #define PR_VMAJOR 4 #define PR_VMINOR 9 #define PR_VPATCH 2 #define PR_BETA PR_FALSE # 56 "/usr/include/nspr/prinit.h" typedef PRBool (*PRVersionCheck)(const char*); # 66 "/usr/include/nspr/prinit.h" extern __attribute__((visibility("default"))) PRBool PR_VersionCheck(const char *importedVersion); extern __attribute__((visibility("default"))) const char* PR_GetVersion(void); # 84 "/usr/include/nspr/prinit.h" extern __attribute__((visibility("default"))) void PR_Init( PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs); # 105 "/usr/include/nspr/prinit.h" typedef PRIntn ( *PRPrimordialFn)(PRIntn argc, char **argv); extern __attribute__((visibility("default"))) PRIntn PR_Initialize( PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs); extern __attribute__((visibility("default"))) PRBool PR_Initialized(void); # 131 "/usr/include/nspr/prinit.h" extern __attribute__((visibility("default"))) PRStatus PR_Cleanup(void); extern __attribute__((visibility("default"))) void PR_DisableClockInterrupts(void); extern __attribute__((visibility("default"))) void PR_EnableClockInterrupts(void); extern __attribute__((visibility("default"))) void PR_BlockClockInterrupts(void); extern __attribute__((visibility("default"))) void PR_UnblockClockInterrupts(void); extern __attribute__((visibility("default"))) void PR_SetConcurrency(PRUintn numCPUs); extern __attribute__((visibility("default"))) PRStatus PR_SetFDCacheSize(PRIntn low, PRIntn high); extern __attribute__((visibility("default"))) void PR_ProcessExit(PRIntn status); extern __attribute__((visibility("default"))) void PR_Abort(void); # 191 "/usr/include/nspr/prinit.h" typedef struct PRCallOnceType { PRIntn initialized; PRInt32 inProgress; PRStatus status; } PRCallOnceType; typedef PRStatus ( *PRCallOnceFN)(void); typedef PRStatus ( *PRCallOnceWithArgFN)(void *arg); extern __attribute__((visibility("default"))) PRStatus PR_CallOnce( PRCallOnceType *once, PRCallOnceFN func ); extern __attribute__((visibility("default"))) PRStatus PR_CallOnceWithArg( PRCallOnceType *once, PRCallOnceWithArgFN func, void *arg ); } # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 #define JS_ATOMIC_INCREMENT(p) PR_ATOMIC_INCREMENT((PRInt32 *)(p)) #define JS_ATOMIC_DECREMENT(p) PR_ATOMIC_DECREMENT((PRInt32 *)(p)) #define JS_ATOMIC_ADD(p,v) PR_ATOMIC_ADD((PRInt32 *)(p), (PRInt32)(v)) #define JS_ATOMIC_SET(p,v) PR_ATOMIC_SET((PRInt32 *)(p), (PRInt32)(v)) # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" namespace js { class AutoAtomicIncrement { int32_t *p; public: AutoAtomicIncrement(int32_t *p ) : p(p) { do { } while (0); PR_AtomicIncrement((PRInt32 *)(p)); } ~AutoAtomicIncrement() { PR_AtomicDecrement((PRInt32 *)(p)); } }; } # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" #define jsgc_barrier_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 1 #define gc_heap_h___ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 1 # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" #define BitArray_h__ # 1 "./../../dist/include/js/TemplateLib.h" 1 # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 2 namespace js { template class BitArray { private: uintptr_t map[nbits / (8 * 4) + (nbits % (8 * 4) == 0 ? 0 : 1)]; public: void clear(bool value) { if (value) memset(map, 0xFF, sizeof(map)); else memset(map, 0, sizeof(map)); } inline bool get(size_t offset) const { uintptr_t index, mask; getMarkWordAndMask(offset, &index, &mask); return map[index] & mask; } inline void set(size_t offset) { uintptr_t index, mask; getMarkWordAndMask(offset, &index, &mask); map[index] |= mask; } inline void unset(size_t offset) { uintptr_t index, mask; getMarkWordAndMask(offset, &index, &mask); map[index] &= ~mask; } private: inline void getMarkWordAndMask(size_t offset, uintptr_t *indexp, uintptr_t *maskp) const { *indexp = offset >> tl::FloorLog2<(8 * 4)>::result; *maskp = uintptr_t(1) << (offset & ((8 * 4) - 1)); } }; } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 struct JSCompartment; extern "C" { struct JSRuntime; } namespace js { class FreeOp; namespace gc { struct Arena; struct ArenaHeader; struct Chunk; static const uint32_t BLACK = 0; static const uint32_t GRAY = 1; enum AllocKind { FINALIZE_OBJECT0, FINALIZE_OBJECT0_BACKGROUND, FINALIZE_OBJECT2, FINALIZE_OBJECT2_BACKGROUND, FINALIZE_OBJECT4, FINALIZE_OBJECT4_BACKGROUND, FINALIZE_OBJECT8, FINALIZE_OBJECT8_BACKGROUND, FINALIZE_OBJECT12, FINALIZE_OBJECT12_BACKGROUND, FINALIZE_OBJECT16, FINALIZE_OBJECT16_BACKGROUND, FINALIZE_OBJECT_LAST = FINALIZE_OBJECT16_BACKGROUND, FINALIZE_SCRIPT, FINALIZE_SHAPE, FINALIZE_BASE_SHAPE, FINALIZE_TYPE_OBJECT, FINALIZE_XML, FINALIZE_SHORT_STRING, FINALIZE_STRING, FINALIZE_EXTERNAL_STRING, FINALIZE_LAST = FINALIZE_EXTERNAL_STRING }; static const unsigned FINALIZE_LIMIT = FINALIZE_LAST + 1; static const unsigned FINALIZE_OBJECT_LIMIT = FINALIZE_OBJECT_LAST + 1; static const size_t MAX_BACKGROUND_FINALIZE_KINDS = FINALIZE_LIMIT - FINALIZE_OBJECT_LIMIT / 2; struct Cell { static const size_t CellShift = 3; static const size_t CellSize = size_t(1) << CellShift; static const size_t CellMask = CellSize - 1; inline uintptr_t address() const; inline ArenaHeader *arenaHeader() const; inline Chunk *chunk() const; inline AllocKind getAllocKind() const; __attribute__((always_inline)) inline bool isMarked(uint32_t color = BLACK) const; __attribute__((always_inline)) inline bool markIfUnmarked(uint32_t color = BLACK) const; __attribute__((always_inline)) inline void unmark(uint32_t color) const; inline JSCompartment *compartment() const; }; # 114 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" const size_t PageShift = 12; const size_t PageSize = size_t(1) << PageShift; const size_t ChunkShift = 20; const size_t ChunkSize = size_t(1) << ChunkShift; const size_t ChunkMask = ChunkSize - 1; const size_t ArenaShift = PageShift; const size_t ArenaSize = PageSize; const size_t ArenaMask = ArenaSize - 1; const static uint32_t FreeCommittedArenasThreshold = (32 << 20) / ArenaSize; const size_t ArenaCellCount = size_t(1) << (ArenaShift - Cell::CellShift); const size_t ArenaBitmapBits = ArenaCellCount; const size_t ArenaBitmapBytes = ArenaBitmapBits / 8; const size_t ArenaBitmapWords = ArenaBitmapBits / (8 * 4); # 169 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" struct FreeSpan { uintptr_t first; uintptr_t last; public: FreeSpan() {} FreeSpan(uintptr_t first, uintptr_t last) : first(first), last(last) { checkSpan(); } static size_t encodeOffsets(size_t firstOffset, size_t lastOffset) { typedef int moz_static_assert18[(ArenaShift < 16) ? 1 : -1]; do { } while(0); do { } while(0); do { } while(0); return firstOffset | (lastOffset << 16); } static const size_t FullArenaOffsets = ArenaSize | ((ArenaSize - 1) << 16); static FreeSpan decodeOffsets(uintptr_t arenaAddr, size_t offsets) { do { } while(0); size_t firstOffset = offsets & 0xFFFF; size_t lastOffset = offsets >> 16; do { } while(0); do { } while(0); return FreeSpan(arenaAddr + firstOffset, arenaAddr | lastOffset); } void initAsEmpty(uintptr_t arenaAddr = 0) { do { } while(0); first = arenaAddr + ArenaSize; last = arenaAddr | (ArenaSize - 1); do { } while(0); } bool isEmpty() const { checkSpan(); return first > last; } bool hasNext() const { checkSpan(); return !(last & uintptr_t(1)); } const FreeSpan *nextSpan() const { do { } while(0); return reinterpret_cast(last); } FreeSpan *nextSpanUnchecked(size_t thingSize) const { return reinterpret_cast(last); } uintptr_t arenaAddressUnchecked() const { return last & ~ArenaMask; } uintptr_t arenaAddress() const { checkSpan(); return arenaAddressUnchecked(); } ArenaHeader *arenaHeader() const { return reinterpret_cast(arenaAddress()); } bool isSameNonEmptySpan(const FreeSpan *another) const { do { } while(0); do { } while(0); return first == another->first && last == another->last; } bool isWithinArena(uintptr_t arenaAddr) const { do { } while(0); return arenaAddress() == arenaAddr; } size_t encodeAsOffsets() const { uintptr_t arenaAddr = arenaAddress(); return encodeOffsets(first - arenaAddr, last & ArenaMask); } __attribute__((always_inline)) inline void *allocate(size_t thingSize) { do { } while(0); checkSpan(); uintptr_t thing = first; if (thing < last) { first = thing + thingSize; } else if ((__builtin_expect((thing == last), 1))) { *this = *reinterpret_cast(thing); } else { return __null; } checkSpan(); return reinterpret_cast(thing); } __attribute__((always_inline)) inline void *infallibleAllocate(size_t thingSize) { do { } while(0); checkSpan(); uintptr_t thing = first; if (thing < last) { first = thing + thingSize; } else { do { } while(0); *this = *reinterpret_cast(thing); } checkSpan(); return reinterpret_cast(thing); } __attribute__((always_inline)) inline void *allocateFromNewArena(uintptr_t arenaAddr, size_t firstThingOffset, size_t thingSize) { do { } while(0); uintptr_t thing = arenaAddr | firstThingOffset; first = thing + thingSize; last = arenaAddr | ArenaMask; checkSpan(); return reinterpret_cast(thing); } void checkSpan() const { # 394 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" } }; struct ArenaHeader { friend struct FreeLists; JSCompartment *compartment; ArenaHeader *next; private: size_t firstFreeSpanOffsets; # 427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" size_t allocKind : 8; # 446 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" public: size_t hasDelayedMarking : 1; size_t allocatedDuringIncremental : 1; size_t markOverflow : 1; size_t nextDelayedMarking : (8 * 4) - 8 - 1 - 1 - 1; static void staticAsserts() { typedef int moz_static_assert19[(FINALIZE_LIMIT <= 255) ? 1 : -1]; typedef int moz_static_assert20[(ArenaShift >= 8 + 1 + 1 + 1) ? 1 : -1]; } inline uintptr_t address() const; inline Chunk *chunk() const; bool allocated() const { do { } while(0); return allocKind < size_t(FINALIZE_LIMIT); } void init(JSCompartment *comp, AllocKind kind) { do { } while(0); do { } while(0); do { } while(0); do { } while(0); compartment = comp; typedef int moz_static_assert21[(FINALIZE_LIMIT <= 255) ? 1 : -1]; allocKind = size_t(kind); firstFreeSpanOffsets = FreeSpan::FullArenaOffsets; } void setAsNotAllocated() { allocKind = size_t(FINALIZE_LIMIT); markOverflow = 0; allocatedDuringIncremental = 0; hasDelayedMarking = 0; nextDelayedMarking = 0; } inline uintptr_t arenaAddress() const; inline Arena *getArena(); AllocKind getAllocKind() const { do { } while(0); return AllocKind(allocKind); } inline size_t getThingSize() const; bool hasFreeThings() const { return firstFreeSpanOffsets != FreeSpan::FullArenaOffsets; } inline bool isEmpty() const; void setAsFullyUsed() { firstFreeSpanOffsets = FreeSpan::FullArenaOffsets; } inline FreeSpan getFirstFreeSpan() const; inline void setFirstFreeSpan(const FreeSpan *span); inline ArenaHeader *getNextDelayedMarking() const; inline void setNextDelayedMarking(ArenaHeader *aheader); }; struct Arena { # 540 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" ArenaHeader aheader; uint8_t data[ArenaSize - sizeof(ArenaHeader)]; private: static __attribute__((visibility("default"))) const uint32_t ThingSizes[]; static __attribute__((visibility("default"))) const uint32_t FirstThingOffsets[]; public: static void staticAsserts(); static size_t thingSize(AllocKind kind) { return ThingSizes[kind]; } static size_t firstThingOffset(AllocKind kind) { return FirstThingOffsets[kind]; } static size_t thingsPerArena(size_t thingSize) { do { } while(0); do { } while(0); return (ArenaSize - sizeof(ArenaHeader)) / thingSize; } static size_t thingsSpan(size_t thingSize) { return thingsPerArena(thingSize) * thingSize; } static bool isAligned(uintptr_t thing, size_t thingSize) { uintptr_t tailOffset = (ArenaSize - thing) & ArenaMask; return tailOffset % thingSize == 0; } uintptr_t address() const { return aheader.address(); } uintptr_t thingsStart(AllocKind thingKind) { return address() | firstThingOffset(thingKind); } uintptr_t thingsEnd() { return address() + ArenaSize; } template bool finalize(FreeOp *fop, AllocKind thingKind, size_t thingSize); }; inline size_t ArenaHeader::getThingSize() const { do { } while(0); return Arena::thingSize(getAllocKind()); } struct ChunkInfo { Chunk *next; Chunk **prevp; ArenaHeader *freeArenasHead; uint32_t lastDecommittedArenaOffset; uint32_t numArenasFree; uint32_t numArenasFreeCommitted; uint32_t age; }; # 655 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" const size_t BytesPerArenaWithHeader = ArenaSize + ArenaBitmapBytes; const size_t ChunkDecommitBitmapBytes = ChunkSize / ArenaSize / 8; const size_t ChunkBytesAvailable = ChunkSize - sizeof(ChunkInfo) - ChunkDecommitBitmapBytes; const size_t ArenasPerChunk = ChunkBytesAvailable / BytesPerArenaWithHeader; struct ChunkBitmap { uintptr_t bitmap[ArenaBitmapWords * ArenasPerChunk]; __attribute__((always_inline)) inline void getMarkWordAndMask(const Cell *cell, uint32_t color, uintptr_t **wordp, uintptr_t *maskp); __attribute__((always_inline)) inline bool isMarked(const Cell *cell, uint32_t color) { uintptr_t *word, mask; getMarkWordAndMask(cell, color, &word, &mask); return *word & mask; } __attribute__((always_inline)) inline bool markIfUnmarked(const Cell *cell, uint32_t color) { uintptr_t *word, mask; getMarkWordAndMask(cell, BLACK, &word, &mask); if (*word & mask) return false; *word |= mask; if (color != BLACK) { getMarkWordAndMask(cell, color, &word, &mask); if (*word & mask) return false; *word |= mask; } return true; } __attribute__((always_inline)) inline void unmark(const Cell *cell, uint32_t color) { uintptr_t *word, mask; getMarkWordAndMask(cell, color, &word, &mask); *word &= ~mask; } void clear() { PodArrayZero(bitmap); } # 721 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" }; typedef int moz_static_assert22[(ArenaBitmapBytes * ArenasPerChunk == sizeof(ChunkBitmap)) ? 1 : -1]; typedef BitArray PerArenaBitmap; const size_t ChunkPadSize = ChunkSize - (sizeof(Arena) * ArenasPerChunk) - sizeof(ChunkBitmap) - sizeof(PerArenaBitmap) - sizeof(ChunkInfo); typedef int moz_static_assert23[(ChunkPadSize < BytesPerArenaWithHeader) ? 1 : -1]; struct Chunk { Arena arenas[ArenasPerChunk]; uint8_t padding[ChunkPadSize]; ChunkBitmap bitmap; PerArenaBitmap decommittedArenas; ChunkInfo info; static Chunk *fromAddress(uintptr_t addr) { addr &= ~ChunkMask; return reinterpret_cast(addr); } static bool withinArenasRange(uintptr_t addr) { uintptr_t offset = addr & ChunkMask; return offset < ArenasPerChunk * ArenaSize; } static size_t arenaIndex(uintptr_t addr) { do { } while(0); return (addr & ChunkMask) >> ArenaShift; } uintptr_t address() const { uintptr_t addr = reinterpret_cast(this); do { } while(0); return addr; } bool unused() const { return info.numArenasFree == ArenasPerChunk; } bool hasAvailableArenas() const { return info.numArenasFree != 0; } inline void addToAvailableList(JSCompartment *compartment); inline void insertToAvailableList(Chunk **insertPoint); inline void removeFromAvailableList(); ArenaHeader *allocateArena(JSCompartment *comp, AllocKind kind); void releaseArena(ArenaHeader *aheader); static Chunk *allocate(JSRuntime *rt); static inline void release(JSRuntime *rt, Chunk *chunk); static inline void releaseList(JSRuntime *rt, Chunk *chunkListHead); inline void prepareToBeFreed(JSRuntime *rt); Chunk *getPrevious() { do { } while(0); return fromPointerToNext(info.prevp); } static Chunk *fromPointerToNext(Chunk **nextFieldPtr) { uintptr_t addr = reinterpret_cast(nextFieldPtr); do { } while(0); return reinterpret_cast(addr - __builtin_offsetof (Chunk, info.next)); } private: inline void init(); unsigned findDecommittedArenaOffset(); ArenaHeader* fetchNextDecommittedArena(); public: inline ArenaHeader* fetchNextFreeArena(JSRuntime *rt); inline void addArenaToFreeList(JSRuntime *rt, ArenaHeader *aheader); }; typedef int moz_static_assert24[(sizeof(Chunk) == ChunkSize) ? 1 : -1]; inline uintptr_t Cell::address() const { uintptr_t addr = uintptr_t(this); do { } while(0); do { } while(0); return addr; } inline uintptr_t ArenaHeader::address() const { uintptr_t addr = reinterpret_cast(this); do { } while(0); do { } while(0); return addr; } inline Chunk * ArenaHeader::chunk() const { return Chunk::fromAddress(address()); } inline uintptr_t ArenaHeader::arenaAddress() const { return address(); } inline Arena * ArenaHeader::getArena() { return reinterpret_cast(arenaAddress()); } inline bool ArenaHeader::isEmpty() const { do { } while(0); size_t firstThingOffset = Arena::firstThingOffset(getAllocKind()); return firstFreeSpanOffsets == FreeSpan::encodeOffsets(firstThingOffset, ArenaMask); } FreeSpan ArenaHeader::getFirstFreeSpan() const { return FreeSpan::decodeOffsets(arenaAddress(), firstFreeSpanOffsets); } void ArenaHeader::setFirstFreeSpan(const FreeSpan *span) { do { } while(0); firstFreeSpanOffsets = span->encodeAsOffsets(); } inline ArenaHeader * ArenaHeader::getNextDelayedMarking() const { return &reinterpret_cast(nextDelayedMarking << ArenaShift)->aheader; } inline void ArenaHeader::setNextDelayedMarking(ArenaHeader *aheader) { do { } while(0); hasDelayedMarking = 1; nextDelayedMarking = aheader->arenaAddress() >> ArenaShift; } __attribute__((always_inline)) inline void ChunkBitmap::getMarkWordAndMask(const Cell *cell, uint32_t color, uintptr_t **wordp, uintptr_t *maskp) { size_t bit = (cell->address() & ChunkMask) / Cell::CellSize + color; do { } while(0); *maskp = uintptr_t(1) << (bit % (8 * 4)); *wordp = &bitmap[bit / (8 * 4)]; } static void AssertValidColor(const void *thing, uint32_t color) { } inline ArenaHeader * Cell::arenaHeader() const { uintptr_t addr = address(); addr &= ~ArenaMask; return reinterpret_cast(addr); } Chunk * Cell::chunk() const { uintptr_t addr = uintptr_t(this); do { } while(0); addr &= ~(ChunkSize - 1); return reinterpret_cast(addr); } AllocKind Cell::getAllocKind() const { return arenaHeader()->getAllocKind(); } bool Cell::isMarked(uint32_t color ) const { AssertValidColor(this, color); return chunk()->bitmap.isMarked(this, color); } bool Cell::markIfUnmarked(uint32_t color ) const { AssertValidColor(this, color); return chunk()->bitmap.markIfUnmarked(this, color); } void Cell::unmark(uint32_t color) const { do { } while(0); AssertValidColor(this, color); chunk()->bitmap.unmark(this, color); } JSCompartment * Cell::compartment() const { return arenaHeader()->compartment; } # 980 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" } } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 2 # 117 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" struct JSXML; namespace js { template class EncapsulatedPtr { protected: union { T *value; Unioned other; }; public: EncapsulatedPtr() : value(__null) {} explicit EncapsulatedPtr(T *v) : value(v) {} explicit EncapsulatedPtr(const EncapsulatedPtr &v) : value(v.value) {} ~EncapsulatedPtr() { pre(); } void clear() { pre(); value = __null; } EncapsulatedPtr &operator=(T *v) { pre(); do { } while(0); value = v; return *this; } EncapsulatedPtr &operator=(const EncapsulatedPtr &v) { pre(); do { } while(0); value = v.value; return *this; } T *get() const { return value; } T **unsafeGet() { return &value; } void unsafeSet(T *v) { value = v; } Unioned *unsafeGetUnioned() { return &other; } T &operator*() const { return *value; } T *operator->() const { return value; } operator T*() const { return value; } protected: void pre() { T::writeBarrierPre(value); } }; template class HeapPtr : public EncapsulatedPtr { public: HeapPtr() : EncapsulatedPtr(__null) {} explicit HeapPtr(T *v) : EncapsulatedPtr(v) { post(); } explicit HeapPtr(const HeapPtr &v) : EncapsulatedPtr(v) { post(); } void init(T *v) { do { } while(0); this->value = v; post(); } HeapPtr &operator=(T *v) { this->pre(); do { } while(0); this->value = v; post(); return *this; } HeapPtr &operator=(const HeapPtr &v) { this->pre(); do { } while(0); this->value = v.value; post(); return *this; } protected: void post() { T::writeBarrierPost(this->value, (void *)&this->value); } template friend inline void BarrieredSetPair(JSCompartment *comp, HeapPtr &v1, T1 *val1, HeapPtr &v2, T2 *val2); }; template class RelocatablePtr : public EncapsulatedPtr { public: RelocatablePtr() : EncapsulatedPtr(__null) {} explicit RelocatablePtr(T *v) : EncapsulatedPtr(v) { post(); } explicit RelocatablePtr(const RelocatablePtr &v) : EncapsulatedPtr(v) { post(); } ~RelocatablePtr() { this->pre(); relocate(); } RelocatablePtr &operator=(T *v) { this->pre(); do { } while(0); this->value = v; post(); return *this; } RelocatablePtr &operator=(const RelocatablePtr &v) { this->pre(); do { } while(0); this->value = v.value; post(); return *this; } protected: void post() { T::writeBarrierRelocPost(this->value, (void *)&this->value); } void relocate() { T::writeBarrierRelocated(this->value, (void *)&this->value); } }; template static inline void BarrieredSetPair(JSCompartment *comp, HeapPtr &v1, T1 *val1, HeapPtr &v2, T2 *val2) { if (T1::needWriteBarrierPre(comp)) { v1.pre(); v2.pre(); } v1.unsafeSet(val1); v2.unsafeSet(val2); v1.post(); v2.post(); } struct Shape; class BaseShape; namespace types { struct TypeObject; } typedef RelocatablePtr RelocatablePtrObject; typedef RelocatablePtr RelocatablePtrScript; typedef HeapPtr HeapPtrObject; typedef HeapPtr HeapPtrFunction; typedef HeapPtr HeapPtrString; typedef HeapPtr HeapPtrScript; typedef HeapPtr HeapPtrShape; typedef HeapPtr HeapPtrBaseShape; typedef HeapPtr HeapPtrTypeObject; typedef HeapPtr HeapPtrXML; template struct HeapPtrHasher { typedef HeapPtr Key; typedef T *Lookup; static HashNumber hash(Lookup obj) { return DefaultHasher::hash(obj); } static bool match(const Key &k, Lookup l) { return k.get() == l; } }; template struct DefaultHasher< HeapPtr > : HeapPtrHasher { }; class EncapsulatedValue { protected: Value value; EncapsulatedValue() ; EncapsulatedValue(const EncapsulatedValue &v) ; EncapsulatedValue &operator=(const Value &v) ; EncapsulatedValue &operator=(const EncapsulatedValue &v) ; EncapsulatedValue(const Value &v) : value(v) {} ~EncapsulatedValue() {} public: inline bool operator==(const EncapsulatedValue &v) const { return value == v.value; } inline bool operator!=(const EncapsulatedValue &v) const { return value != v.value; } const Value &get() const { return value; } Value *unsafeGet() { return &value; } operator const Value &() const { return value; } bool isUndefined() const { return value.isUndefined(); } bool isNull() const { return value.isNull(); } bool isBoolean() const { return value.isBoolean(); } bool isTrue() const { return value.isTrue(); } bool isFalse() const { return value.isFalse(); } bool isNumber() const { return value.isNumber(); } bool isInt32() const { return value.isInt32(); } bool isDouble() const { return value.isDouble(); } bool isString() const { return value.isString(); } bool isObject() const { return value.isObject(); } bool isMagic(JSWhyMagic why) const { return value.isMagic(why); } bool isGCThing() const { return value.isGCThing(); } bool isMarkable() const { return value.isMarkable(); } bool toBoolean() const { return value.toBoolean(); } double toNumber() const { return value.toNumber(); } int32_t toInt32() const { return value.toInt32(); } double toDouble() const { return value.toDouble(); } JSString *toString() const { return value.toString(); } JSObject &toObject() const { return value.toObject(); } JSObject *toObjectOrNull() const { return value.toObjectOrNull(); } void *toGCThing() const { return value.toGCThing(); } JSGCTraceKind gcKind() const { return value.gcKind(); } uint64_t asRawBits() const { return value.asRawBits(); } static inline void writeBarrierPre(const Value &v); static inline void writeBarrierPre(JSCompartment *comp, const Value &v); protected: inline void pre(); inline void pre(JSCompartment *comp); }; class HeapValue : public EncapsulatedValue { public: explicit inline HeapValue(); explicit inline HeapValue(const Value &v); explicit inline HeapValue(const HeapValue &v); inline ~HeapValue(); inline void init(const Value &v); inline void init(JSCompartment *comp, const Value &v); inline HeapValue &operator=(const Value &v); inline HeapValue &operator=(const HeapValue &v); inline void set(JSCompartment *comp, const Value &v); static inline void writeBarrierPost(const Value &v, Value *addr); static inline void writeBarrierPost(JSCompartment *comp, const Value &v, Value *addr); private: inline void post(); inline void post(JSCompartment *comp); }; class RelocatableValue : public EncapsulatedValue { public: explicit inline RelocatableValue(); explicit inline RelocatableValue(const Value &v); explicit inline RelocatableValue(const RelocatableValue &v); inline ~RelocatableValue(); inline RelocatableValue &operator=(const Value &v); inline RelocatableValue &operator=(const RelocatableValue &v); private: inline void post(); inline void post(JSCompartment *comp); inline void relocate(); }; class HeapSlot : public EncapsulatedValue { inline HeapSlot &operator=(const Value &v) ; inline HeapSlot &operator=(const HeapValue &v) ; inline HeapSlot &operator=(const HeapSlot &v) ; public: explicit inline HeapSlot() ; explicit inline HeapSlot(JSObject *obj, uint32_t slot, const Value &v); explicit inline HeapSlot(JSObject *obj, uint32_t slot, const HeapSlot &v); inline ~HeapSlot(); inline void init(JSObject *owner, uint32_t slot, const Value &v); inline void init(JSCompartment *comp, JSObject *owner, uint32_t slot, const Value &v); inline void set(JSObject *owner, uint32_t slot, const Value &v); inline void set(JSCompartment *comp, JSObject *owner, uint32_t slot, const Value &v); static inline void writeBarrierPost(JSObject *obj, uint32_t slot); static inline void writeBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t slotno); private: inline void post(JSObject *owner, uint32_t slot); inline void post(JSCompartment *comp, JSObject *owner, uint32_t slot); }; inline void SlotRangeWriteBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t start, uint32_t count) { } static inline const Value * Valueify(const EncapsulatedValue *array) { typedef int moz_static_assert25[(sizeof(HeapValue) == sizeof(Value)) ? 1 : -1]; typedef int moz_static_assert26[(sizeof(HeapSlot) == sizeof(Value)) ? 1 : -1]; return (const Value *)array; } class HeapSlotArray { HeapSlot *array; public: HeapSlotArray(HeapSlot *array) : array(array) {} operator const Value *() const { return Valueify(array); } operator HeapSlot *() const { return array; } HeapSlotArray operator +(int offset) const { return HeapSlotArray(array + offset); } HeapSlotArray operator +(uint32_t offset) const { return HeapSlotArray(array + offset); } }; class EncapsulatedId { protected: jsid value; explicit EncapsulatedId() : value(((jsid)0x2)) {} explicit inline EncapsulatedId(jsid id) : value(id) {} ~EncapsulatedId() {} private: EncapsulatedId(const EncapsulatedId &v) ; EncapsulatedId &operator=(const EncapsulatedId &v) ; public: bool operator==(jsid id) const { return value == id; } bool operator!=(jsid id) const { return value != id; } jsid get() const { return value; } jsid *unsafeGet() { return &value; } operator jsid() const { return value; } protected: inline void pre(); }; class RelocatableId : public EncapsulatedId { public: explicit RelocatableId() : EncapsulatedId() {} explicit inline RelocatableId(jsid id) : EncapsulatedId(id) {} inline ~RelocatableId(); inline RelocatableId &operator=(jsid id); inline RelocatableId &operator=(const RelocatableId &v); }; class HeapId : public EncapsulatedId { public: explicit HeapId() : EncapsulatedId() {} explicit inline HeapId(jsid id); inline ~HeapId(); inline void init(jsid id); inline HeapId &operator=(jsid id); inline HeapId &operator=(const HeapId &v); private: inline void post(); HeapId(const HeapId &v) ; }; # 544 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" template class ReadBarriered { T *value; public: ReadBarriered() : value(__null) {} ReadBarriered(T *value) : value(value) {} T *get() const { if (!value) return __null; T::readBarrier(value); return value; } operator T*() const { return get(); } T &operator*() const { return *get(); } T *operator->() const { return get(); } T **unsafeGet() { return &value; } void set(T *v) { value = v; } operator bool() { return !!value; } }; class ReadBarrieredValue { Value value; public: ReadBarrieredValue() : value(UndefinedValue()) {} ReadBarrieredValue(const Value &value) : value(value) {} inline const Value &get() const; Value *unsafeGet() { return &value; } inline operator const Value &() const; inline JSObject &toObject() const; }; namespace tl { template struct IsRelocatableHeapType > { static const bool result = false; }; template <> struct IsRelocatableHeapType { static const bool result = false; }; template <> struct IsRelocatableHeapType { static const bool result = false; }; template <> struct IsRelocatableHeapType { static const bool result = false; }; } } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 struct JSIdArray { int length; js::HeapId vector[1]; }; static __attribute__((always_inline)) inline jsid JSID_FROM_BITS(size_t bits) { jsid id; (id) = bits; return id; } # 58 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" static __attribute__((always_inline)) inline jsid NON_INTEGER_ATOM_TO_JSID(JSAtom *atom) { do { } while(0); jsid id = JSID_FROM_BITS((size_t)atom); do { } while(0); return id; } static __attribute__((always_inline)) inline JSBool JSID_IS_ATOM(jsid id) { return JSID_IS_STRING(id); } static __attribute__((always_inline)) inline JSBool JSID_IS_ATOM(jsid id, JSAtom *atom) { return id == JSID_FROM_BITS((size_t)atom); } static __attribute__((always_inline)) inline JSAtom * JSID_TO_ATOM(jsid id) { return (JSAtom *)JSID_TO_STRING(id); } typedef int moz_static_assert27[(sizeof(JSHashNumber) == 4) ? 1 : -1]; typedef int moz_static_assert28[(sizeof(jsid) == 4) ? 1 : -1]; namespace js { static __attribute__((always_inline)) inline JSHashNumber HashId(jsid id) { JSHashNumber n = JSHashNumber((id)); return n * 0x9E3779B9U; } static __attribute__((always_inline)) inline Value IdToValue(jsid id) { if (JSID_IS_STRING(id)) return StringValue(JSID_TO_STRING(id)); if ((__builtin_expect((JSID_IS_INT(id)), 1))) return Int32Value(JSID_TO_INT(id)); if ((__builtin_expect((JSID_IS_OBJECT(id)), 1))) return ObjectValue(*JSID_TO_OBJECT(id)); do { } while(0); return UndefinedValue(); } static __attribute__((always_inline)) inline jsval IdToJsval(jsid id) { return IdToValue(id); } template<> struct DefaultHasher { typedef jsid Lookup; static HashNumber hash(const Lookup &l) { return HashNumber((l)); } static bool match(const jsid &id, const Lookup &l) { return id == l; } }; } #define ATOM_HASH(atom) ((JSHashNumber)(atom) >> 2) # 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" extern const char * js_AtomToPrintableString(JSContext *cx, JSAtom *atom, JSAutoByteString *bytes); namespace js { inline uint32_t HashChars(const jschar *chars, size_t length) { uint32_t h = 0; for (; length; chars++, length--) h = (((h) << (4)) | ((h) >> (32 - (4)))) ^ *chars; return h; } class AtomStateEntry { uintptr_t bits; static const uintptr_t NO_TAG_MASK = uintptr_t(-1) - 1; public: AtomStateEntry() : bits(0) {} AtomStateEntry(const AtomStateEntry &other) : bits(other.bits) {} AtomStateEntry(JSAtom *ptr, bool tagged) : bits(uintptr_t(ptr) | uintptr_t(tagged)) { do { } while(0); } bool isTagged() const { return bits & 0x1; } void setTagged(bool enabled) const { const_cast(this)->bits |= uintptr_t(enabled); } JSAtom *asPtr() const; }; struct AtomHasher { struct Lookup { const jschar *chars; size_t length; const JSAtom *atom; Lookup(const jschar *chars, size_t length) : chars(chars), length(length), atom(__null) {} inline Lookup(const JSAtom *atom); }; static HashNumber hash(const Lookup &l) { return HashChars(l.chars, l.length); } static inline bool match(const AtomStateEntry &entry, const Lookup &lookup); }; typedef HashSet AtomSet; # 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" enum FlationCoding { NormalEncoding, CESU8Encoding }; class PropertyName; } struct JSAtomState { js::AtomSet atoms; # 256 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" js::PropertyName *emptyAtom; js::PropertyName *booleanAtoms[2]; js::PropertyName *typeAtoms[JSTYPE_LIMIT]; js::PropertyName *nullAtom; js::PropertyName *classAtoms[JSProto_LIMIT]; #define DEFINE_ATOM(id,text) js::PropertyName *id ##Atom; #define DEFINE_PROTOTYPE_ATOM(id) js::PropertyName *id ##Atom; #define DEFINE_KEYWORD_ATOM(id) js::PropertyName *id ##Atom; # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" 1 # 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" js::PropertyName *anonymousAtom; js::PropertyName *applyAtom; js::PropertyName *argumentsAtom; js::PropertyName *arityAtom; js::PropertyName *BYTES_PER_ELEMENTAtom; js::PropertyName *callAtom; js::PropertyName *calleeAtom; js::PropertyName *callerAtom; js::PropertyName *classPrototypeAtom; js::PropertyName *constructorAtom; js::PropertyName *eachAtom; js::PropertyName *evalAtom; js::PropertyName *fileNameAtom; js::PropertyName *getAtom; js::PropertyName *globalAtom; js::PropertyName *ignoreCaseAtom; js::PropertyName *indexAtom; js::PropertyName *inputAtom; js::PropertyName *toISOStringAtom; js::PropertyName *iteratorAtom; js::PropertyName *joinAtom; js::PropertyName *lastIndexAtom; js::PropertyName *lengthAtom; js::PropertyName *lineNumberAtom; js::PropertyName *messageAtom; js::PropertyName *multilineAtom; js::PropertyName *nameAtom; js::PropertyName *nextAtom; js::PropertyName *noSuchMethodAtom; js::PropertyName *objectNullAtom; js::PropertyName *objectUndefinedAtom; js::PropertyName *ofAtom; js::PropertyName *protoAtom; js::PropertyName *setAtom; js::PropertyName *sourceAtom; js::PropertyName *stackAtom; js::PropertyName *stickyAtom; js::PropertyName *toGMTStringAtom; js::PropertyName *toLocaleStringAtom; js::PropertyName *toSourceAtom; js::PropertyName *toStringAtom; js::PropertyName *toUTCStringAtom; js::PropertyName *valueOfAtom; js::PropertyName *toJSONAtom; js::PropertyName *void0Atom; js::PropertyName *enumerableAtom; js::PropertyName *configurableAtom; js::PropertyName *writableAtom; js::PropertyName *valueAtom; js::PropertyName *testAtom; js::PropertyName *useStrictAtom; js::PropertyName *locAtom; js::PropertyName *lineAtom; js::PropertyName *InfinityAtom; js::PropertyName *NaNAtom; js::PropertyName *builderAtom; js::PropertyName *etagoAtom; js::PropertyName *namespaceAtom; js::PropertyName *ptagcAtom; js::PropertyName *qualifierAtom; js::PropertyName *spaceAtom; js::PropertyName *stagoAtom; js::PropertyName *starAtom; js::PropertyName *starQualifierAtom; js::PropertyName *tagcAtom; js::PropertyName *xmlAtom; js::PropertyName *functionNamespaceURIAtom; js::PropertyName *ProxyAtom; js::PropertyName *getOwnPropertyDescriptorAtom; js::PropertyName *getPropertyDescriptorAtom; js::PropertyName *definePropertyAtom; js::PropertyName *deleteAtom; js::PropertyName *getOwnPropertyNamesAtom; js::PropertyName *enumerateAtom; js::PropertyName *fixAtom; js::PropertyName *hasAtom; js::PropertyName *hasOwnAtom; js::PropertyName *keysAtom; js::PropertyName *iterateAtom; js::PropertyName *WeakMapAtom; js::PropertyName *byteLengthAtom; js::PropertyName *returnAtom; js::PropertyName *throwAtom; js::PropertyName *urlAtom; js::PropertyName *innermostAtom; js::PropertyName *XMLListAtom; js::PropertyName *decodeURIAtom; js::PropertyName *decodeURIComponentAtom; js::PropertyName *defineGetterAtom; js::PropertyName *defineSetterAtom; js::PropertyName *encodeURIAtom; js::PropertyName *encodeURIComponentAtom; js::PropertyName *escapeAtom; js::PropertyName *hasOwnPropertyAtom; js::PropertyName *isFiniteAtom; js::PropertyName *isNaNAtom; js::PropertyName *isPrototypeOfAtom; js::PropertyName *isXMLNameAtom; js::PropertyName *lookupGetterAtom; js::PropertyName *lookupSetterAtom; js::PropertyName *parseFloatAtom; js::PropertyName *parseIntAtom; js::PropertyName *propertyIsEnumerableAtom; js::PropertyName *unescapeAtom; js::PropertyName *unevalAtom; js::PropertyName *unwatchAtom; js::PropertyName *watchAtom; # 274 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 #undef DEFINE_ATOM #undef DEFINE_PROTOTYPE_ATOM #undef DEFINE_KEYWORD_ATOM static const size_t commonAtomsOffset; void junkAtoms() { } JSAtom **commonAtomsStart() { return reinterpret_cast(&emptyAtom); } void checkStaticInvariants(); }; extern bool AtomIsInterned(JSContext *cx, JSAtom *atom); #define ATOM(name) cx->runtime->atomState.name ##Atom #define COMMON_ATOM_INDEX(name) ((offsetof(JSAtomState, name ##Atom) - JSAtomState::commonAtomsOffset) / sizeof(JSAtom*)) #define COMMON_TYPE_ATOM_INDEX(type) ((offsetof(JSAtomState, typeAtoms[type]) - JSAtomState::commonAtomsOffset) / sizeof(JSAtom*)) #define NAME_OFFSET(name) offsetof(JSAtomState, name ##Atom) #define OFFSET_TO_NAME(rt,off) (*(js::PropertyName **)((char*)&(rt)->atomState + (off))) #define CLASS_NAME_OFFSET(name) offsetof(JSAtomState, classAtoms[JSProto_ ##name]) #define CLASS_NAME(cx,name) ((cx)->runtime->atomState.classAtoms[JSProto_ ##name]) extern const char *const js_common_atom_names[]; extern const size_t js_common_atom_count; #define JS_BOOLEAN_STR(type) (js_common_atom_names[1 + (type)]) #define JS_TYPE_STR(type) (js_common_atom_names[1 + 2 + (type)]) extern const char js_object_str[]; extern const char js_undefined_str[]; #define JS_PROTO(name,code,init) extern const char js_ ##name ##_str[]; # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 1 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_VERSION_ECMA_3 148 #define JS_VERSION_ECMA_3_TEST 149 # 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_STR_HTML_HELPERS 1 #define JS_HAS_OBJ_PROTO_PROP 1 #define JS_HAS_OBJ_WATCHPOINT 1 #define JS_HAS_TOSOURCE 1 #define JS_HAS_CATCH_GUARD 1 #define JS_HAS_UNEVAL 1 #define JS_HAS_CONST 1 #define JS_HAS_FUN_EXPR_STMT 1 #define JS_HAS_NO_SUCH_METHOD 1 #define JS_HAS_GENERATORS 1 #define JS_HAS_BLOCK_SCOPE 1 #define JS_HAS_DESTRUCTURING 2 #define JS_HAS_GENERATOR_EXPRS 1 #define JS_HAS_EXPR_CLOSURES 1 # 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_NEW_GLOBAL_OBJECT 1 #define JS_HAS_MAKE_SYSTEM_OBJECT 1 #define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) #define OLD_GETTER_SETTER_METHODS 1 #define USE_NEW_OBJECT_REPRESENTATION 0 #define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 2 #define XML_INIT js_InitXMLClass #define NAMESPACE_INIT js_InitNamespaceClass #define QNAME_INIT js_InitQNameClass #define XMLFILTER_INIT js_InitXMLFilterClass # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" extern const char js_Null_str[]; extern const char js_Object_str[]; extern const char js_Function_str[]; extern const char js_Array_str[]; extern const char js_Boolean_str[]; extern const char js_JSON_str[]; extern const char js_Date_str[]; extern const char js_Math_str[]; extern const char js_Number_str[]; extern const char js_String_str[]; extern const char js_RegExp_str[]; extern const char js_XML_str[]; extern const char js_Namespace_str[]; extern const char js_QName_str[]; extern const char js_Error_str[]; extern const char js_InternalError_str[]; extern const char js_EvalError_str[]; extern const char js_RangeError_str[]; extern const char js_ReferenceError_str[]; extern const char js_SyntaxError_str[]; extern const char js_TypeError_str[]; extern const char js_URIError_str[]; extern const char js_Iterator_str[]; extern const char js_StopIteration_str[]; extern const char js_ArrayBuffer_str[]; extern const char js_Int8Array_str[]; extern const char js_Uint8Array_str[]; extern const char js_Int16Array_str[]; extern const char js_Uint16Array_str[]; extern const char js_Int32Array_str[]; extern const char js_Uint32Array_str[]; extern const char js_Float32Array_str[]; extern const char js_Float64Array_str[]; extern const char js_Uint8ClampedArray_str[]; extern const char js_Proxy_str[]; extern const char js_AnyName_str[]; extern const char js_WeakMap_str[]; extern const char js_Map_str[]; extern const char js_Set_str[]; extern const char js_DataView_str[]; #undef XML_INIT #undef NAMESPACE_INIT #undef QNAME_INIT # 326 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 #undef JS_PROTO #define DEFINE_ATOM(id,text) extern const char js_ ##id ##_str[]; #define DEFINE_PROTOTYPE_ATOM(id) #define DEFINE_KEYWORD_ATOM(id) # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" 1 # 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" extern const char js_anonymous_str[]; extern const char js_apply_str[]; extern const char js_arguments_str[]; extern const char js_arity_str[]; extern const char js_BYTES_PER_ELEMENT_str[]; extern const char js_call_str[]; extern const char js_callee_str[]; extern const char js_caller_str[]; extern const char js_classPrototype_str[]; extern const char js_constructor_str[]; extern const char js_each_str[]; extern const char js_eval_str[]; extern const char js_fileName_str[]; extern const char js_get_str[]; extern const char js_global_str[]; extern const char js_ignoreCase_str[]; extern const char js_index_str[]; extern const char js_input_str[]; extern const char js_toISOString_str[]; extern const char js_iterator_str[]; extern const char js_join_str[]; extern const char js_lastIndex_str[]; extern const char js_length_str[]; extern const char js_lineNumber_str[]; extern const char js_message_str[]; extern const char js_multiline_str[]; extern const char js_name_str[]; extern const char js_next_str[]; extern const char js_noSuchMethod_str[]; extern const char js_objectNull_str[]; extern const char js_objectUndefined_str[]; extern const char js_of_str[]; extern const char js_proto_str[]; extern const char js_set_str[]; extern const char js_source_str[]; extern const char js_stack_str[]; extern const char js_sticky_str[]; extern const char js_toGMTString_str[]; extern const char js_toLocaleString_str[]; extern const char js_toSource_str[]; extern const char js_toString_str[]; extern const char js_toUTCString_str[]; extern const char js_valueOf_str[]; extern const char js_toJSON_str[]; extern const char js_void0_str[]; extern const char js_enumerable_str[]; extern const char js_configurable_str[]; extern const char js_writable_str[]; extern const char js_value_str[]; extern const char js_test_str[]; extern const char js_useStrict_str[]; extern const char js_loc_str[]; extern const char js_line_str[]; extern const char js_Infinity_str[]; extern const char js_NaN_str[]; extern const char js_builder_str[]; extern const char js_etago_str[]; extern const char js_namespace_str[]; extern const char js_ptagc_str[]; extern const char js_qualifier_str[]; extern const char js_space_str[]; extern const char js_stago_str[]; extern const char js_star_str[]; extern const char js_starQualifier_str[]; extern const char js_tagc_str[]; extern const char js_xml_str[]; extern const char js_functionNamespaceURI_str[]; extern const char js_getOwnPropertyDescriptor_str[]; extern const char js_getPropertyDescriptor_str[]; extern const char js_defineProperty_str[]; extern const char js_getOwnPropertyNames_str[]; extern const char js_enumerate_str[]; extern const char js_fix_str[]; extern const char js_has_str[]; extern const char js_hasOwn_str[]; extern const char js_keys_str[]; extern const char js_iterate_str[]; extern const char js_byteLength_str[]; extern const char js_url_str[]; extern const char js_innermost_str[]; extern const char js_XMLList_str[]; extern const char js_decodeURI_str[]; extern const char js_decodeURIComponent_str[]; extern const char js_defineGetter_str[]; extern const char js_defineSetter_str[]; extern const char js_encodeURI_str[]; extern const char js_encodeURIComponent_str[]; extern const char js_escape_str[]; extern const char js_hasOwnProperty_str[]; extern const char js_isFinite_str[]; extern const char js_isNaN_str[]; extern const char js_isPrototypeOf_str[]; extern const char js_isXMLName_str[]; extern const char js_lookupGetter_str[]; extern const char js_lookupSetter_str[]; extern const char js_parseFloat_str[]; extern const char js_parseInt_str[]; extern const char js_propertyIsEnumerable_str[]; extern const char js_unescape_str[]; extern const char js_uneval_str[]; extern const char js_unwatch_str[]; extern const char js_watch_str[]; # 332 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 #undef DEFINE_ATOM #undef DEFINE_PROTOTYPE_ATOM #undef DEFINE_KEYWORD_ATOM extern const char js_close_str[]; extern const char js_send_str[]; extern const char js_getter_str[]; extern const char js_setter_str[]; extern JSBool js_InitAtomState(JSRuntime *rt); extern void js_FinishAtomState(JSRuntime *rt); namespace js { extern void MarkAtomState(JSTracer *trc, bool markAll); extern void SweepAtomState(JSRuntime *rt); extern bool InitCommonAtoms(JSContext *cx); extern void FinishCommonAtoms(JSRuntime *rt); enum InternBehavior { DoNotInternAtom = false, InternAtom = true }; } extern JSAtom * js_Atomize(JSContext *cx, const char *bytes, size_t length, js::InternBehavior ib = js::DoNotInternAtom, js::FlationCoding fc = js::NormalEncoding); extern JSAtom * js_AtomizeChars(JSContext *cx, const jschar *chars, size_t length, js::InternBehavior ib = js::DoNotInternAtom); extern JSAtom * js_AtomizeString(JSContext *cx, JSString *str, js::InternBehavior ib = js::DoNotInternAtom); extern JSAtom * js_GetExistingStringAtom(JSContext *cx, const jschar *chars, size_t length); # 413 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" inline bool js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp); namespace js { bool InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval, jsid *idp, Value *vp); inline bool InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval, jsid *idp) { Value dummy; return InternNonIntElementId(cx, obj, idval, idp, &dummy); } extern void InitAtomMap(JSContext *cx, AtomIndexMap *indices, HeapPtr *atoms); template bool XDRAtom(XDRState *xdr, JSAtom **atomp); } # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" #define jsclass_h__ # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" namespace js { class PropertyName; class SpecialId; static __attribute__((always_inline)) inline jsid SPECIALID_TO_JSID(const SpecialId &sid); # 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" class SpecialId { uintptr_t bits; friend __attribute__((always_inline)) inline jsid SPECIALID_TO_JSID(const SpecialId &sid); static const uintptr_t TYPE_VOID = 0x2; static const uintptr_t TYPE_OBJECT = 0x4; static const uintptr_t TYPE_DEFAULT_XML_NAMESPACE = 0x6; static const uintptr_t TYPE_MASK = 0x7; SpecialId(uintptr_t bits) : bits(bits) { } public: SpecialId() : bits(TYPE_VOID) { } SpecialId(JSObject &obj) : bits(uintptr_t(&obj) | TYPE_OBJECT) { do { } while(0); do { } while(0); } bool isObject() const { return (bits & TYPE_MASK) == TYPE_OBJECT && bits != TYPE_OBJECT; } JSObject *toObject() const { do { } while(0); return reinterpret_cast(bits & ~TYPE_MASK); } static SpecialId empty() { SpecialId sid(TYPE_OBJECT); do { } while(0); return sid; } bool isEmpty() const { return bits == TYPE_OBJECT; } static SpecialId voidId() { SpecialId sid(TYPE_VOID); do { } while(0); return sid; } bool isVoid() const { return bits == TYPE_VOID; } static SpecialId defaultXMLNamespace() { SpecialId sid(TYPE_DEFAULT_XML_NAMESPACE); do { } while(0); return sid; } bool isDefaultXMLNamespace() const { return bits == TYPE_DEFAULT_XML_NAMESPACE; } }; static __attribute__((always_inline)) inline jsid SPECIALID_TO_JSID(const SpecialId &sid) { jsid id; (id) = sid.bits; do { } while (0); do { } while (0); do { } while (0); do { } while (0); return id; } static __attribute__((always_inline)) inline bool JSID_IS_SPECIAL(jsid id) { return JSID_IS_OBJECT(id) || JSID_IS_EMPTY(id) || JSID_IS_VOID(id) || JSID_IS_DEFAULT_XML_NAMESPACE(id); } static __attribute__((always_inline)) inline SpecialId JSID_TO_SPECIALID(jsid id) { do { } while(0); if (JSID_IS_OBJECT(id)) return SpecialId(*JSID_TO_OBJECT(id)); if (JSID_IS_EMPTY(id)) return SpecialId::empty(); if (JSID_IS_VOID(id)) return SpecialId::voidId(); do { } while(0); return SpecialId::defaultXMLNamespace(); } typedef JS::Handle HandleSpecialId; typedef JSBool (* LookupGenericOp)(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, JSProperty **propp); typedef JSBool (* LookupPropOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, JSObject **objp, JSProperty **propp); typedef JSBool (* LookupElementOp)(JSContext *cx, HandleObject obj, uint32_t index, JSObject **objp, JSProperty **propp); typedef JSBool (* LookupSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, JSProperty **propp); typedef JSBool (* DefineGenericOp)(JSContext *cx, HandleObject obj, HandleId id, const Value *value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); typedef JSBool (* DefinePropOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, const Value *value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); typedef JSBool (* DefineElementOp)(JSContext *cx, HandleObject obj, uint32_t index, const Value *value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); typedef JSBool (* DefineSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, const Value *value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); typedef JSBool (* GenericIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, Value *vp); typedef JSBool (* PropertyIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name, Value *vp); typedef JSBool (* ElementIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp); typedef JSBool (* ElementIfPresentOp)(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp, bool* present); typedef JSBool (* SpecialIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandleSpecialId sid, Value *vp); typedef JSBool (* StrictGenericIdOp)(JSContext *cx, HandleObject obj, HandleId id, Value *vp, JSBool strict); typedef JSBool (* StrictPropertyIdOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); typedef JSBool (* StrictElementIdOp)(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); typedef JSBool (* StrictSpecialIdOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); typedef JSBool (* GenericAttributesOp)(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); typedef JSBool (* PropertyAttributesOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); typedef JSBool (* ElementAttributesOp)(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); typedef JSBool (* SpecialAttributesOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); typedef JSBool (* DeletePropertyOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); typedef JSBool (* DeleteElementOp)(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); typedef JSBool (* DeleteSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); typedef JSType (* TypeOfOp)(JSContext *cx, HandleObject obj); typedef JSObject * (* ObjectOp)(JSContext *cx, HandleObject obj); typedef void (* ClearOp)(JSContext *cx, HandleObject obj); typedef void (* FinalizeOp)(FreeOp *fop, JSObject *obj); #define JS_CLASS_MEMBERS const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace # 240 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" struct ClassSizeMeasurement { const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; }; struct ClassExtension { JSEqualityOp equality; JSObjectOp outerObject; JSObjectOp innerObject; JSIteratorOp iteratorObject; void *unused; bool isWrappedNative; }; #define JS_NULL_CLASS_EXT {NULL,NULL,NULL,NULL,NULL,false} struct ObjectOps { LookupGenericOp lookupGeneric; LookupPropOp lookupProperty; LookupElementOp lookupElement; LookupSpecialOp lookupSpecial; DefineGenericOp defineGeneric; DefinePropOp defineProperty; DefineElementOp defineElement; DefineSpecialOp defineSpecial; GenericIdOp getGeneric; PropertyIdOp getProperty; ElementIdOp getElement; ElementIfPresentOp getElementIfPresent; SpecialIdOp getSpecial; StrictGenericIdOp setGeneric; StrictPropertyIdOp setProperty; StrictElementIdOp setElement; StrictSpecialIdOp setSpecial; GenericAttributesOp getGenericAttributes; PropertyAttributesOp getPropertyAttributes; ElementAttributesOp getElementAttributes; SpecialAttributesOp getSpecialAttributes; GenericAttributesOp setGenericAttributes; PropertyAttributesOp setPropertyAttributes; ElementAttributesOp setElementAttributes; SpecialAttributesOp setSpecialAttributes; DeletePropertyOp deleteProperty; DeleteElementOp deleteElement; DeleteSpecialOp deleteSpecial; JSNewEnumerateOp enumerate; TypeOfOp typeOf; ObjectOp thisObject; ClearOp clear; }; #define JS_NULL_OBJECT_OPS {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL} struct Class { const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; ClassExtension ext; ObjectOps ops; uint8_t pad[sizeof(JSClass) - sizeof(ClassSizeMeasurement) - sizeof(ClassExtension) - sizeof(ObjectOps)]; static const uint32_t NON_NATIVE = (1<<((8 + 8)+3)); bool isNative() const { return !(flags & NON_NATIVE); } bool hasPrivate() const { return !!(flags & (1<<0)); } }; typedef int moz_static_assert29[(__builtin_offsetof (JSClass, name) == __builtin_offsetof (Class, name)) ? 1 : -1]; typedef int moz_static_assert30[(__builtin_offsetof (JSClass, flags) == __builtin_offsetof (Class, flags)) ? 1 : -1]; typedef int moz_static_assert31[(__builtin_offsetof (JSClass, addProperty) == __builtin_offsetof (Class, addProperty)) ? 1 : -1]; typedef int moz_static_assert32[(__builtin_offsetof (JSClass, delProperty) == __builtin_offsetof (Class, delProperty)) ? 1 : -1]; typedef int moz_static_assert33[(__builtin_offsetof (JSClass, getProperty) == __builtin_offsetof (Class, getProperty)) ? 1 : -1]; typedef int moz_static_assert34[(__builtin_offsetof (JSClass, setProperty) == __builtin_offsetof (Class, setProperty)) ? 1 : -1]; typedef int moz_static_assert35[(__builtin_offsetof (JSClass, enumerate) == __builtin_offsetof (Class, enumerate)) ? 1 : -1]; typedef int moz_static_assert36[(__builtin_offsetof (JSClass, resolve) == __builtin_offsetof (Class, resolve)) ? 1 : -1]; typedef int moz_static_assert37[(__builtin_offsetof (JSClass, convert) == __builtin_offsetof (Class, convert)) ? 1 : -1]; typedef int moz_static_assert38[(__builtin_offsetof (JSClass, finalize) == __builtin_offsetof (Class, finalize)) ? 1 : -1]; typedef int moz_static_assert39[(__builtin_offsetof (JSClass, checkAccess) == __builtin_offsetof (Class, checkAccess)) ? 1 : -1]; typedef int moz_static_assert40[(__builtin_offsetof (JSClass, call) == __builtin_offsetof (Class, call)) ? 1 : -1]; typedef int moz_static_assert41[(__builtin_offsetof (JSClass, construct) == __builtin_offsetof (Class, construct)) ? 1 : -1]; typedef int moz_static_assert42[(__builtin_offsetof (JSClass, hasInstance) == __builtin_offsetof (Class, hasInstance)) ? 1 : -1]; typedef int moz_static_assert43[(__builtin_offsetof (JSClass, trace) == __builtin_offsetof (Class, trace)) ? 1 : -1]; typedef int moz_static_assert44[(sizeof(JSClass) == sizeof(Class)) ? 1 : -1]; static __attribute__((always_inline)) inline JSClass * Jsvalify(Class *c) { return (JSClass *)c; } static __attribute__((always_inline)) inline const JSClass * Jsvalify(const Class *c) { return (const JSClass *)c; } static __attribute__((always_inline)) inline Class * Valueify(JSClass *c) { return (Class *)c; } static __attribute__((always_inline)) inline const Class * Valueify(const JSClass *c) { return (const Class *)c; } enum ESClassValue { ESClass_Array, ESClass_Number, ESClass_String, ESClass_Boolean, ESClass_RegExp, ESClass_ArrayBuffer }; inline bool ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx); inline bool IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx); } namespace JS { inline bool IsPoisonedSpecialId(js::SpecialId iden) { if (iden.isObject()) return IsPoisonedPtr(iden.toObject()); return false; } template <> struct RootMethods { static js::SpecialId initial() { return js::SpecialId(); } static ThingRootKind kind() { return THING_ROOT_ID; } static bool poisoned(js::SpecialId id) { return IsPoisonedSpecialId(id); } }; } # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 1 #define jsfriendapi_h___ # 1 "./../../dist/include/mozilla/GuardObjects.h" 1 # 10 "./../../dist/include/mozilla/GuardObjects.h" #define mozilla_GuardObjects_h # 137 "./../../dist/include/mozilla/GuardObjects.h" #define MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM #define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL #define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT #define MOZ_GUARD_OBJECT_NOTIFIER_INIT do { } while (0) # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 2 extern "C" { extern __attribute__((visibility("default"))) void JS_SetGrayGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data); extern __attribute__((visibility("default"))) JSString * JS_GetAnonymousString(JSRuntime *rt); extern __attribute__((visibility("default"))) JSObject * JS_FindCompilationScope(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSFunction * JS_GetObjectFunction(JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_GetGlobalForFrame(JSStackFrame *fp); extern __attribute__((visibility("default"))) JSBool JS_SplicePrototype(JSContext *cx, JSObject *obj, JSObject *proto); extern __attribute__((visibility("default"))) JSObject * JS_NewObjectWithUniqueType(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); extern __attribute__((visibility("default"))) uint32_t JS_ObjectCountDynamicSlots(JSObject *obj); extern __attribute__((visibility("default"))) void JS_ShrinkGCBuffers(JSRuntime *rt); extern __attribute__((visibility("default"))) size_t JS_GetE4XObjectsCreated(JSContext *cx); extern __attribute__((visibility("default"))) size_t JS_SetProtoCalled(JSContext *cx); extern __attribute__((visibility("default"))) size_t JS_GetCustomIteratorCount(JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_NondeterministicGetWeakMapKeys(JSContext *cx, JSObject *obj, JSObject **ret); extern __attribute__((visibility("default"))) JSBool JS_IsDeadWrapper(JSObject *obj); extern __attribute__((visibility("default"))) void JS_TraceShapeCycleCollectorChildren(JSTracer *trc, void *shape); enum { JS_TELEMETRY_GC_REASON, JS_TELEMETRY_GC_IS_COMPARTMENTAL, JS_TELEMETRY_GC_MS, JS_TELEMETRY_GC_MARK_MS, JS_TELEMETRY_GC_SWEEP_MS, JS_TELEMETRY_GC_SLICE_MS, JS_TELEMETRY_GC_MMU_50, JS_TELEMETRY_GC_RESET, JS_TELEMETRY_GC_INCREMENTAL_DISABLED, JS_TELEMETRY_GC_NON_INCREMENTAL }; typedef void (* JSAccumulateTelemetryDataCallback)(int id, uint32_t sample); extern __attribute__((visibility("default"))) void JS_SetAccumulateTelemetryCallback(JSRuntime *rt, JSAccumulateTelemetryDataCallback callback); extern __attribute__((visibility("default"))) JSPrincipals * JS_GetCompartmentPrincipals(JSCompartment *compartment); extern __attribute__((visibility("default"))) void JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals); extern __attribute__((visibility("default"))) JSObject * JS_ObjectToInnerObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_ObjectToOuterObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_CloneObject(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent); extern __attribute__((visibility("default"))) JSBool js_GetterOnlyPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); __attribute__((visibility("default"))) void js_ReportOverRecursed(JSContext *maybecx); # 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) bool JS_CopyPropertiesFrom(JSContext *cx, JSObject *target, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_WrapPropertyDescriptor(JSContext *cx, js::PropertyDescriptor *desc); extern __attribute__((visibility("default"))) JSBool JS_WrapAutoIdVector(JSContext *cx, JS::AutoIdVector &props); extern __attribute__((visibility("default"))) JSBool JS_EnumerateState(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, js::Value *statep, jsid *idp); struct JSFunctionSpecWithHelp { const char *name; JSNative call; uint16_t nargs; uint16_t flags; const char *usage; const char *help; }; #define JS_FN_HELP(name,call,nargs,flags,usage,help) {name, call, nargs, (flags) | JSPROP_ENUMERATE | JSFUN_STUB_GSOPS, usage, help} extern __attribute__((visibility("default"))) bool JS_DefineFunctionsWithHelp(JSContext *cx, JSObject *obj, const JSFunctionSpecWithHelp *fs); } namespace js { struct RuntimeFriendFields { volatile int32_t interrupt; uintptr_t nativeStackLimit; RuntimeFriendFields() : interrupt(0), nativeStackLimit(0) { } static const RuntimeFriendFields *get(const JSRuntime *rt) { return reinterpret_cast(rt); } }; inline JSRuntime * GetRuntime(const JSContext *cx) { return ContextFriendFields::get(cx)->runtime; } typedef bool (* PreserveWrapperCallback)(JSContext *cx, JSObject *obj); # 212 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" class __attribute__((visibility("default"))) AutoSwitchCompartment { private: JSContext *cx; JSCompartment *oldCompartment; public: AutoSwitchCompartment(JSContext *cx, JSCompartment *newCompartment ); AutoSwitchCompartment(JSContext *cx, JSObject *target ); ~AutoSwitchCompartment(); }; __attribute__((visibility("default"))) JSBool obj_defineGetter(JSContext *cx, unsigned argc, js::Value *vp); __attribute__((visibility("default"))) JSBool obj_defineSetter(JSContext *cx, unsigned argc, js::Value *vp); extern __attribute__((visibility("default"))) bool IsSystemCompartment(const JSCompartment *compartment); extern __attribute__((visibility("default"))) bool IsAtomsCompartment(const JSCompartment *c); extern __attribute__((visibility("default"))) bool CheckUndeclaredVarAssignment(JSContext *cx, JSString *propname); struct WeakMapTracer; typedef void (* WeakMapTraceCallback)(WeakMapTracer *trc, JSObject *m, void *k, JSGCTraceKind kkind, void *v, JSGCTraceKind vkind); struct WeakMapTracer { JSRuntime *runtime; WeakMapTraceCallback callback; WeakMapTracer(JSRuntime *rt, WeakMapTraceCallback cb) : runtime(rt), callback(cb) {} }; extern __attribute__((visibility("default"))) void TraceWeakMaps(WeakMapTracer *trc); extern __attribute__((visibility("default"))) bool GCThingIsMarkedGray(void *thing); namespace shadow { struct TypeObject { JSObject *proto; }; struct BaseShape { js::Class *clasp; JSObject *parent; }; struct Shape { BaseShape *base; jsid _1; uint32_t slotInfo; static const uint32_t FIXED_SLOTS_SHIFT = 27; }; struct Object { Shape *shape; TypeObject *type; js::Value *slots; js::Value *_1; size_t numFixedSlots() const { return shape->slotInfo >> Shape::FIXED_SLOTS_SHIFT; } Value *fixedSlots() const { return (Value *)(uintptr_t(this) + sizeof(shadow::Object)); } js::Value &slotRef(size_t slot) const { size_t nfixed = numFixedSlots(); if (slot < nfixed) return fixedSlots()[slot]; return slots[slot - nfixed]; } }; struct Atom { size_t _; const jschar *chars; }; } extern __attribute__((visibility("default"))) js::Class AnyNameClass; extern __attribute__((visibility("default"))) js::Class AttributeNameClass; extern __attribute__((visibility("default"))) js::Class CallClass; extern __attribute__((visibility("default"))) js::Class DeclEnvClass; extern __attribute__((visibility("default"))) js::Class FunctionClass; extern __attribute__((visibility("default"))) js::Class FunctionProxyClass; extern __attribute__((visibility("default"))) js::Class NamespaceClass; extern __attribute__((visibility("default"))) js::Class OuterWindowProxyClass; extern __attribute__((visibility("default"))) js::Class ObjectProxyClass; extern __attribute__((visibility("default"))) js::Class QNameClass; extern __attribute__((visibility("default"))) js::Class XMLClass; extern __attribute__((visibility("default"))) js::Class ObjectClass; inline js::Class * GetObjectClass(const JSObject *obj) { return reinterpret_cast(obj)->shape->base->clasp; } inline JSClass * GetObjectJSClass(const JSObject *obj) { return js::Jsvalify(GetObjectClass(obj)); } __attribute__((visibility("default"))) bool IsScopeObject(JSObject *obj); inline JSObject * GetObjectParent(JSObject *obj) { do { } while(0); return reinterpret_cast(obj)->shape->base->parent; } __attribute__((visibility("default"))) JSObject * GetObjectParentMaybeScope(JSObject *obj); __attribute__((visibility("default"))) JSObject * GetGlobalForObjectCrossCompartment(JSObject *obj); __attribute__((visibility("default"))) void NotifyAnimationActivity(JSObject *obj); __attribute__((visibility("default"))) bool IsOriginalScriptFunction(JSFunction *fun); __attribute__((visibility("default"))) JSFunction * DefineFunctionWithReserved(JSContext *cx, JSObject *obj, const char *name, JSNative call, unsigned nargs, unsigned attrs); __attribute__((visibility("default"))) JSFunction * NewFunctionWithReserved(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, JSObject *parent, const char *name); __attribute__((visibility("default"))) JSFunction * NewFunctionByIdWithReserved(JSContext *cx, JSNative native, unsigned nargs, unsigned flags, JSObject *parent, jsid id); __attribute__((visibility("default"))) JSObject * InitClassWithReserved(JSContext *cx, JSObject *obj, JSObject *parent_proto, JSClass *clasp, JSNative constructor, unsigned nargs, JSPropertySpec *ps, JSFunctionSpec *fs, JSPropertySpec *static_ps, JSFunctionSpec *static_fs); __attribute__((visibility("default"))) const Value & GetFunctionNativeReserved(JSObject *fun, size_t which); __attribute__((visibility("default"))) void SetFunctionNativeReserved(JSObject *fun, size_t which, const Value &val); inline JSObject * GetObjectProto(JSObject *obj) { return reinterpret_cast(obj)->type->proto; } inline void * GetObjectPrivate(JSObject *obj) { const shadow::Object *nobj = reinterpret_cast(obj); void **addr = reinterpret_cast(&nobj->fixedSlots()[nobj->numFixedSlots()]); return *addr; } inline const Value & GetReservedSlot(const JSObject *obj, size_t slot) { do { } while(0); return reinterpret_cast(obj)->slotRef(slot); } __attribute__((visibility("default"))) void SetReservedSlotWithBarrier(JSObject *obj, size_t slot, const Value &value); inline void SetReservedSlot(JSObject *obj, size_t slot, const Value &value) { do { } while(0); shadow::Object *sobj = reinterpret_cast(obj); if (sobj->slotRef(slot).isMarkable()) SetReservedSlotWithBarrier(obj, slot, value); else sobj->slotRef(slot) = value; } __attribute__((visibility("default"))) uint32_t GetObjectSlotSpan(JSObject *obj); inline const Value & GetObjectSlot(JSObject *obj, size_t slot) { do { } while(0); return reinterpret_cast(obj)->slotRef(slot); } inline Shape * GetObjectShape(JSObject *obj) { shadow::Shape *shape = reinterpret_cast(obj)->shape; return reinterpret_cast(shape); } inline const jschar * GetAtomChars(JSAtom *atom) { return reinterpret_cast(atom)->chars; } inline JSLinearString * AtomToLinearString(JSAtom *atom) { return reinterpret_cast(atom); } static inline js::PropertyOp CastAsJSPropertyOp(JSObject *object) { return (__extension__ (js::PropertyOp) (size_t) (object)); } static inline js::StrictPropertyOp CastAsJSStrictPropertyOp(JSObject *object) { return (__extension__ (js::StrictPropertyOp) (size_t) (object)); } __attribute__((visibility("default"))) bool GetPropertyNames(JSContext *cx, JSObject *obj, unsigned flags, js::AutoIdVector *props); __attribute__((visibility("default"))) bool GetGeneric(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp); __attribute__((visibility("default"))) bool StringIsArrayIndex(JSLinearString *str, uint32_t *indexp); __attribute__((visibility("default"))) void SetPreserveWrapperCallback(JSRuntime *rt, PreserveWrapperCallback callback); __attribute__((visibility("default"))) bool IsObjectInContextCompartment(const JSObject *obj, const JSContext *cx); #define JSITER_ENUMERATE 0x1 #define JSITER_FOREACH 0x2 #define JSITER_KEYVALUE 0x4 #define JSITER_OWNONLY 0x8 #define JSITER_HIDDEN 0x10 #define JSITER_FOR_OF 0x20 inline uintptr_t GetNativeStackLimit(const JSRuntime *rt) { return RuntimeFriendFields::get(rt)->nativeStackLimit; } #define JS_CHECK_RECURSION(cx,onerror) JS_BEGIN_MACRO int stackDummy_; if (!JS_CHECK_STACK_SIZE(js::GetNativeStackLimit(js::GetRuntime(cx)), &stackDummy_)) { js_ReportOverRecursed(cx); onerror; } JS_END_MACRO # 515 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" __attribute__((visibility("default"))) void StartPCCountProfiling(JSContext *cx); __attribute__((visibility("default"))) void StopPCCountProfiling(JSContext *cx); __attribute__((visibility("default"))) void PurgePCCounts(JSContext *cx); __attribute__((visibility("default"))) size_t GetPCCountScriptCount(JSContext *cx); __attribute__((visibility("default"))) JSString * GetPCCountScriptSummary(JSContext *cx, size_t script); __attribute__((visibility("default"))) JSString * GetPCCountScriptContents(JSContext *cx, size_t script); __attribute__((visibility("default"))) void * GetOwnerThread(const JSContext *cx); __attribute__((visibility("default"))) unsigned GetContextOutstandingRequests(const JSContext *cx); __attribute__((visibility("default"))) JSCompartment * GetContextCompartment(const JSContext *cx); __attribute__((visibility("default"))) bool HasUnrootedGlobal(const JSContext *cx); typedef void (* ActivityCallback)(void *arg, JSBool active); __attribute__((visibility("default"))) void SetActivityCallback(JSRuntime *rt, ActivityCallback cb, void *arg); extern __attribute__((visibility("default"))) const JSStructuredCloneCallbacks * GetContextStructuredCloneCallbacks(JSContext *cx); extern __attribute__((visibility("default"))) JSVersion VersionSetMoarXML(JSVersion version, bool enable); extern __attribute__((visibility("default"))) bool CanCallContextDebugHandler(JSContext *cx); extern __attribute__((visibility("default"))) JSTrapStatus CallContextDebugHandler(JSContext *cx, JSScript *script, jsbytecode *bc, Value *rval); extern __attribute__((visibility("default"))) bool IsContextRunningJS(JSContext *cx); class SystemAllocPolicy; typedef Vector CompartmentVector; extern __attribute__((visibility("default"))) const CompartmentVector& GetRuntimeCompartments(JSRuntime *rt); extern __attribute__((visibility("default"))) size_t SizeOfJSContext(); #define GCREASONS(D) D(API) D(MAYBEGC) D(LAST_CONTEXT) D(DESTROY_CONTEXT) D(LAST_DITCH) D(TOO_MUCH_MALLOC) D(ALLOC_TRIGGER) D(DEBUG_GC) D(DEBUG_MODE_GC) D(UNUSED3) D(DOM_WINDOW_UTILS) D(COMPONENT_UTILS) D(MEM_PRESSURE) D(CC_WAITING) D(CC_FORCED) D(LOAD_END) D(POST_COMPARTMENT) D(PAGE_HIDE) D(NSJSCONTEXT_DESTROY) D(SET_NEW_DOCUMENT) D(SET_DOC_SHELL) D(DOM_UTILS) D(DOM_IPC) D(DOM_WORKER) D(INTER_SLICE_GC) D(REFRESH_FRAME) D(FULL_GC_TIMER) # 613 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" namespace gcreason { enum Reason { #define MAKE_REASON(name) name, API, MAYBEGC, LAST_CONTEXT, DESTROY_CONTEXT, LAST_DITCH, TOO_MUCH_MALLOC, ALLOC_TRIGGER, DEBUG_GC, DEBUG_MODE_GC, UNUSED3, DOM_WINDOW_UTILS, COMPONENT_UTILS, MEM_PRESSURE, CC_WAITING, CC_FORCED, LOAD_END, POST_COMPARTMENT, PAGE_HIDE, NSJSCONTEXT_DESTROY, SET_NEW_DOCUMENT, SET_DOC_SHELL, DOM_UTILS, DOM_IPC, DOM_WORKER, INTER_SLICE_GC, REFRESH_FRAME, FULL_GC_TIMER, #undef MAKE_REASON NO_REASON, NUM_REASONS }; } extern __attribute__((visibility("default"))) void PrepareCompartmentForGC(JSCompartment *comp); extern __attribute__((visibility("default"))) void PrepareForFullGC(JSRuntime *rt); extern __attribute__((visibility("default"))) bool IsGCScheduled(JSRuntime *rt); extern __attribute__((visibility("default"))) void SkipCompartmentForGC(JSCompartment *comp); # 645 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) void GCForReason(JSRuntime *rt, gcreason::Reason reason); extern __attribute__((visibility("default"))) void ShrinkingGC(JSRuntime *rt, gcreason::Reason reason); extern __attribute__((visibility("default"))) void IncrementalGC(JSRuntime *rt, gcreason::Reason reason); extern __attribute__((visibility("default"))) void SetGCSliceTimeBudget(JSContext *cx, int64_t millis); enum GCProgress { # 668 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" GC_CYCLE_BEGIN, GC_SLICE_BEGIN, GC_SLICE_END, GC_CYCLE_END }; struct __attribute__((visibility("default"))) GCDescription { bool isCompartment; GCDescription(bool isCompartment) : isCompartment(isCompartment) {} jschar *formatMessage(JSRuntime *rt) const; jschar *formatJSON(JSRuntime *rt, uint64_t timestamp) const; }; typedef void (* GCSliceCallback)(JSRuntime *rt, GCProgress progress, const GCDescription &desc); extern __attribute__((visibility("default"))) GCSliceCallback SetGCSliceCallback(JSRuntime *rt, GCSliceCallback callback); extern __attribute__((visibility("default"))) void NotifyDidPaint(JSRuntime *rt); extern __attribute__((visibility("default"))) bool IsIncrementalGCEnabled(JSRuntime *rt); extern __attribute__((visibility("default"))) void DisableIncrementalGC(JSRuntime *rt); extern __attribute__((visibility("default"))) bool IsIncrementalBarrierNeeded(JSRuntime *rt); extern __attribute__((visibility("default"))) bool IsIncrementalBarrierNeeded(JSContext *cx); extern __attribute__((visibility("default"))) bool IsIncrementalBarrierNeededOnObject(JSObject *obj); extern __attribute__((visibility("default"))) bool IsIncrementalBarrierNeededOnScript(JSScript *obj); extern __attribute__((visibility("default"))) void IncrementalReferenceBarrier(void *ptr); extern __attribute__((visibility("default"))) void IncrementalValueBarrier(const Value &v); extern __attribute__((visibility("default"))) void PokeGC(JSRuntime *rt); class ObjectPtr { JSObject *value; public: ObjectPtr() : value(__null) {} ObjectPtr(JSObject *obj) : value(obj) {} ~ObjectPtr() { do { } while(0); } void finalize(JSRuntime *rt) { if (IsIncrementalBarrierNeeded(rt)) IncrementalReferenceBarrier(value); value = __null; } void init(JSObject *obj) { value = obj; } JSObject *get() const { return value; } void writeBarrierPre(JSRuntime *rt) { IncrementalReferenceBarrier(value); } ObjectPtr &operator=(JSObject *obj) { IncrementalReferenceBarrier(value); value = obj; return *this; } JSObject &operator*() const { return *value; } JSObject *operator->() const { return value; } operator JSObject *() const { return value; } }; extern __attribute__((visibility("default"))) JSObject * GetTestingFunctions(JSContext *cx); inline JSFreeOp * CastToJSFreeOp(FreeOp *fop) { return reinterpret_cast(fop); } extern __attribute__((visibility("default"))) const jschar* GetErrorTypeNameFromNumber(JSContext* cx, const unsigned errorNumber); typedef enum NukedGlobalHandling { NukeForGlobalObject, DontNukeForGlobalObject } NukedGlobalHandling; extern __attribute__((visibility("default"))) JSBool NukeChromeCrossCompartmentWrappersForGlobal(JSContext *cx, JSObject *obj, NukedGlobalHandling nukeGlobal); } # 804 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) JSBool js_DateIsValid(JSContext *cx, JSObject* obj); extern __attribute__((visibility("default"))) double js_DateGetMsecSinceEpoch(JSContext *cx, JSObject *obj); typedef enum JSErrNum { #define MSG_DEF(name,number,count,exception,format) name = number, # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/js.msg" 1 # 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/js.msg" JSMSG_NOT_AN_ERROR = 0, JSMSG_NOT_DEFINED = 1, JSMSG_INACTIVE = 2, JSMSG_MORE_ARGS_NEEDED = 3, JSMSG_BAD_CHAR = 4, JSMSG_BAD_TYPE = 5, JSMSG_ALLOC_OVERFLOW = 6, JSMSG_MISSING_HEXDIGITS = 7, JSMSG_INCOMPATIBLE_PROTO = 8, JSMSG_NO_CONSTRUCTOR = 9, JSMSG_CANT_ALIAS = 10, JSMSG_NOT_SCRIPTED_FUNCTION = 11, JSMSG_BAD_SORT_ARG = 12, JSMSG_BAD_ATOMIC_NUMBER = 13, JSMSG_TOO_MANY_LITERALS = 14, JSMSG_CANT_WATCH = 15, JSMSG_STACK_UNDERFLOW = 16, JSMSG_NEED_DIET = 17, JSMSG_TOO_MANY_LOCAL_ROOTS = 18, JSMSG_READ_ONLY = 19, JSMSG_BAD_FORMAL = 20, JSMSG_CANT_DELETE = 21, JSMSG_NOT_FUNCTION = 22, JSMSG_NOT_CONSTRUCTOR = 23, JSMSG_INVALID_DATE = 24, JSMSG_TOO_DEEP = 25, JSMSG_OVER_RECURSED = 26, JSMSG_IN_NOT_OBJECT = 27, JSMSG_BAD_NEW_RESULT = 28, JSMSG_BAD_SHARP_DEF = 29, JSMSG_BAD_SHARP_USE = 30, JSMSG_BAD_INSTANCEOF_RHS = 31, JSMSG_BAD_BYTECODE = 32, JSMSG_BAD_RADIX = 33, JSMSG_PAREN_BEFORE_LET = 34, JSMSG_CANT_CONVERT = 35, JSMSG_CYCLIC_VALUE = 36, JSMSG_COMPILE_EXECED_SCRIPT = 37, JSMSG_CANT_CONVERT_TO = 38, JSMSG_NO_PROPERTIES = 39, JSMSG_CANT_FIND_CLASS = 40, JSMSG_DEAD_OBJECT = 41, JSMSG_BYTECODE_TOO_BIG = 42, JSMSG_UNKNOWN_FORMAT = 43, JSMSG_TOO_MANY_CON_ARGS = 44, JSMSG_TOO_MANY_FUN_ARGS = 45, JSMSG_BAD_QUANTIFIER = 46, JSMSG_MIN_TOO_BIG = 47, JSMSG_MAX_TOO_BIG = 48, JSMSG_OUT_OF_ORDER = 49, JSMSG_BAD_DESTRUCT_DECL = 50, JSMSG_BAD_DESTRUCT_ASS = 51, JSMSG_PAREN_AFTER_LET = 52, JSMSG_CURLY_AFTER_LET = 53, JSMSG_MISSING_PAREN = 54, JSMSG_UNTERM_CLASS = 55, JSMSG_TRAILING_SLASH = 56, JSMSG_BAD_CLASS_RANGE = 57, JSMSG_BAD_REGEXP_FLAG = 58, JSMSG_NO_INPUT = 59, JSMSG_CANT_OPEN = 60, JSMSG_TOO_MANY_FUN_APPLY_ARGS = 61, JSMSG_UNMATCHED_RIGHT_PAREN = 62, JSMSG_TOO_BIG_TO_ENCODE = 63, JSMSG_ARG_INDEX_OUT_OF_RANGE = 64, JSMSG_UNUSED65 = 65, JSMSG_UNUSED66 = 66, JSMSG_UNUSED67 = 67, JSMSG_BAD_SCRIPT_MAGIC = 68, JSMSG_PAREN_BEFORE_FORMAL = 69, JSMSG_MISSING_FORMAL = 70, JSMSG_PAREN_AFTER_FORMAL = 71, JSMSG_CURLY_BEFORE_BODY = 72, JSMSG_CURLY_AFTER_BODY = 73, JSMSG_PAREN_BEFORE_COND = 74, JSMSG_PAREN_AFTER_COND = 75, JSMSG_DESTRUCT_DUP_ARG = 76, JSMSG_NAME_AFTER_DOT = 77, JSMSG_BRACKET_IN_INDEX = 78, JSMSG_XML_WHOLE_PROGRAM = 79, JSMSG_PAREN_BEFORE_SWITCH = 80, JSMSG_PAREN_AFTER_SWITCH = 81, JSMSG_CURLY_BEFORE_SWITCH = 82, JSMSG_COLON_AFTER_CASE = 83, JSMSG_WHILE_AFTER_DO = 84, JSMSG_PAREN_AFTER_FOR = 85, JSMSG_SEMI_AFTER_FOR_INIT = 86, JSMSG_SEMI_AFTER_FOR_COND = 87, JSMSG_PAREN_AFTER_FOR_CTRL = 88, JSMSG_CURLY_BEFORE_TRY = 89, JSMSG_CURLY_AFTER_TRY = 90, JSMSG_PAREN_BEFORE_CATCH = 91, JSMSG_CATCH_IDENTIFIER = 92, JSMSG_PAREN_AFTER_CATCH = 93, JSMSG_CURLY_BEFORE_CATCH = 94, JSMSG_CURLY_AFTER_CATCH = 95, JSMSG_CURLY_BEFORE_FINALLY = 96, JSMSG_CURLY_AFTER_FINALLY = 97, JSMSG_CATCH_OR_FINALLY = 98, JSMSG_PAREN_BEFORE_WITH = 99, JSMSG_PAREN_AFTER_WITH = 100, JSMSG_CURLY_IN_COMPOUND = 101, JSMSG_NO_VARIABLE_NAME = 102, JSMSG_COLON_IN_COND = 103, JSMSG_PAREN_AFTER_ARGS = 104, JSMSG_BRACKET_AFTER_LIST = 105, JSMSG_COLON_AFTER_ID = 106, JSMSG_CURLY_AFTER_LIST = 107, JSMSG_PAREN_IN_PAREN = 108, JSMSG_SEMI_BEFORE_STMNT = 109, JSMSG_NO_RETURN_VALUE = 110, JSMSG_DUPLICATE_FORMAL = 111, JSMSG_EQUAL_AS_ASSIGN = 112, JSMSG_OPTIMIZED_CLOSURE_LEAK = 113, JSMSG_TOO_MANY_DEFAULTS = 114, JSMSG_TOO_MANY_CASES = 115, JSMSG_BAD_SWITCH = 116, JSMSG_BAD_FOR_LEFTSIDE = 117, JSMSG_CATCH_AFTER_GENERAL = 118, JSMSG_CATCH_WITHOUT_TRY = 119, JSMSG_FINALLY_WITHOUT_TRY = 120, JSMSG_LABEL_NOT_FOUND = 121, JSMSG_TOUGH_BREAK = 122, JSMSG_BAD_CONTINUE = 123, JSMSG_BAD_RETURN_OR_YIELD = 124, JSMSG_BAD_LABEL = 125, JSMSG_DUPLICATE_LABEL = 126, JSMSG_VAR_HIDES_ARG = 127, JSMSG_BAD_VAR_INIT = 128, JSMSG_BAD_LEFTSIDE_OF_ASS = 129, JSMSG_BAD_OPERAND = 130, JSMSG_BAD_PROP_ID = 131, JSMSG_RESERVED_ID = 132, JSMSG_SYNTAX_ERROR = 133, JSMSG_BAD_SHARP_VAR_DEF = 134, JSMSG_BAD_PROTOTYPE = 135, JSMSG_MISSING_EXPONENT = 136, JSMSG_OUT_OF_MEMORY = 137, JSMSG_UNTERMINATED_STRING = 138, JSMSG_TOO_MANY_PARENS = 139, JSMSG_UNTERMINATED_COMMENT = 140, JSMSG_UNTERMINATED_REGEXP = 141, JSMSG_BAD_CLONE_FUNOBJ_SCOPE = 142, JSMSG_SHARPVAR_TOO_BIG = 143, JSMSG_ILLEGAL_CHARACTER = 144, JSMSG_BAD_OCTAL = 145, JSMSG_BAD_INDIRECT_CALL = 146, JSMSG_UNCAUGHT_EXCEPTION = 147, JSMSG_INVALID_BACKREF = 148, JSMSG_BAD_BACKREF = 149, JSMSG_PRECISION_RANGE = 150, JSMSG_BAD_GETTER_OR_SETTER = 151, JSMSG_BAD_ARRAY_LENGTH = 152, JSMSG_CANT_DESCRIBE_PROPS = 153, JSMSG_BAD_APPLY_ARGS = 154, JSMSG_REDECLARED_VAR = 155, JSMSG_UNDECLARED_VAR = 156, JSMSG_ANON_NO_RETURN_VALUE = 157, JSMSG_DEPRECATED_USAGE = 158, JSMSG_BAD_URI = 159, JSMSG_GETTER_ONLY = 160, JSMSG_IDSTART_AFTER_NUMBER = 161, JSMSG_UNDEFINED_PROP = 162, JSMSG_USELESS_EXPR = 163, JSMSG_REDECLARED_PARAM = 164, JSMSG_NEWREGEXP_FLAGGED = 165, JSMSG_RESERVED_SLOT_RANGE = 166, JSMSG_CANT_DECODE_PRINCIPALS = 167, JSMSG_CANT_SEAL_OBJECT = 168, JSMSG_TOO_MANY_CATCH_VARS = 169, JSMSG_BAD_XML_MARKUP = 170, JSMSG_BAD_XML_CHARACTER = 171, JSMSG_BAD_DEFAULT_XML_NAMESPACE = 172, JSMSG_BAD_XML_NAME_SYNTAX = 173, JSMSG_BRACKET_AFTER_ATTR_EXPR = 174, JSMSG_NESTING_GENERATOR = 175, JSMSG_CURLY_IN_XML_EXPR = 176, JSMSG_BAD_XML_NAMESPACE = 177, JSMSG_BAD_XML_ATTR_NAME = 178, JSMSG_BAD_XML_NAME = 179, JSMSG_BAD_XML_CONVERSION = 180, JSMSG_BAD_XMLLIST_CONVERSION = 181, JSMSG_BAD_GENERATOR_SEND = 182, JSMSG_NO_ASSIGN_IN_XML_ATTR = 183, JSMSG_BAD_XML_ATTR_VALUE = 184, JSMSG_XML_TAG_NAME_MISMATCH = 185, JSMSG_BAD_XML_TAG_SYNTAX = 186, JSMSG_BAD_XML_LIST_SYNTAX = 187, JSMSG_INCOMPATIBLE_METHOD = 188, JSMSG_CANT_SET_XML_ATTRS = 189, JSMSG_END_OF_XML_SOURCE = 190, JSMSG_END_OF_XML_ENTITY = 191, JSMSG_BAD_XML_QNAME = 192, JSMSG_BAD_FOR_EACH_LOOP = 193, JSMSG_BAD_XMLLIST_PUT = 194, JSMSG_UNKNOWN_XML_ENTITY = 195, JSMSG_BAD_XML_NCR = 196, JSMSG_UNDEFINED_XML_NAME = 197, JSMSG_DUPLICATE_XML_ATTR = 198, JSMSG_TOO_MANY_LOCALS = 199, JSMSG_ARRAY_INIT_TOO_BIG = 200, JSMSG_REGEXP_TOO_COMPLEX = 201, JSMSG_BUFFER_TOO_SMALL = 202, JSMSG_BAD_SURROGATE_CHAR = 203, JSMSG_UTF8_CHAR_TOO_LARGE = 204, JSMSG_MALFORMED_UTF8_CHAR = 205, JSMSG_USER_DEFINED_ERROR = 206, JSMSG_WRONG_CONSTRUCTOR = 207, JSMSG_BAD_GENERATOR_RETURN = 208, JSMSG_BAD_ANON_GENERATOR_RETURN = 209, JSMSG_NAME_AFTER_FOR_PAREN = 210, JSMSG_IN_AFTER_FOR_NAME = 211, JSMSG_BAD_TRAP_RETURN_VALUE = 212, JSMSG_KEYWORD_NOT_NS = 213, JSMSG_BAD_GENERATOR_YIELD = 214, JSMSG_BAD_GENERATOR_SYNTAX = 215, JSMSG_ARRAY_COMP_LEFTSIDE = 216, JSMSG_NON_XML_FILTER = 217, JSMSG_EMPTY_ARRAY_REDUCE = 218, JSMSG_NON_LIST_XML_METHOD = 219, JSMSG_BAD_DELETE_OPERAND = 220, JSMSG_BAD_INCOP_OPERAND = 221, JSMSG_UNEXPECTED_TYPE = 222, JSMSG_LET_DECL_NOT_IN_BLOCK = 223, JSMSG_BAD_OBJECT_INIT = 224, JSMSG_CANT_SET_ARRAY_ATTRS = 225, JSMSG_EVAL_ARITY = 226, JSMSG_MISSING_FUN_ARG = 227, JSMSG_JSON_BAD_PARSE = 228, JSMSG_JSON_BAD_STRINGIFY = 229, JSMSG_NOT_CALLABLE_OR_UNDEFINED = 230, JSMSG_NOT_NONNULL_OBJECT = 231, JSMSG_DEPRECATED_OCTAL = 232, JSMSG_STRICT_CODE_WITH = 233, JSMSG_DUPLICATE_PROPERTY = 234, JSMSG_DEPRECATED_DELETE_OPERAND = 235, JSMSG_DEPRECATED_ASSIGN = 236, JSMSG_BAD_BINDING = 237, JSMSG_INVALID_DESCRIPTOR = 238, JSMSG_OBJECT_NOT_EXTENSIBLE = 239, JSMSG_CANT_REDEFINE_PROP = 240, JSMSG_CANT_APPEND_TO_ARRAY = 241, JSMSG_CANT_DEFINE_ARRAY_LENGTH = 242, JSMSG_CANT_DEFINE_ARRAY_INDEX = 243, JSMSG_TYPED_ARRAY_BAD_INDEX = 244, JSMSG_TYPED_ARRAY_NEGATIVE_ARG = 245, JSMSG_TYPED_ARRAY_BAD_ARGS = 246, JSMSG_CSP_BLOCKED_FUNCTION = 247, JSMSG_BAD_GET_SET_FIELD = 248, JSMSG_BAD_PROXY_FIX = 249, JSMSG_INVALID_EVAL_SCOPE_ARG = 250, JSMSG_ACCESSOR_WRONG_ARGS = 251, JSMSG_THROW_TYPE_ERROR = 252, JSMSG_BAD_TOISOSTRING_PROP = 253, JSMSG_BAD_PARSE_NODE = 254, JSMSG_NOT_EXPECTED_TYPE = 255, JSMSG_CALLER_IS_STRICT = 256, JSMSG_NEED_DEBUG_MODE = 257, JSMSG_STRICT_CODE_LET_EXPR_STMT = 258, JSMSG_CANT_CHANGE_EXTENSIBILITY = 259, JSMSG_SC_BAD_SERIALIZED_DATA = 260, JSMSG_SC_UNSUPPORTED_TYPE = 261, JSMSG_SC_RECURSION = 262, JSMSG_CANT_WRAP_XML_OBJECT = 263, JSMSG_BAD_CLONE_VERSION = 264, JSMSG_CANT_CLONE_OBJECT = 265, JSMSG_NON_NATIVE_SCOPE = 266, JSMSG_STRICT_FUNCTION_STATEMENT = 267, JSMSG_INVALID_FOR_IN_INIT = 268, JSMSG_CLEARED_SCOPE = 269, JSMSG_MALFORMED_ESCAPE = 270, JSMSG_BAD_GENEXP_BODY = 271, JSMSG_XML_PROTO_FORBIDDEN = 272, JSMSG_UNNAMED_FUNCTION_STMT = 273, JSMSG_CCW_REQUIRED = 274, JSMSG_DEBUG_BAD_RESUMPTION = 275, JSMSG_ASSIGN_FUNCTION_OR_NULL = 276, JSMSG_DEBUG_NOT_LIVE = 277, JSMSG_DEBUG_OBJECT_WRONG_OWNER = 278, JSMSG_DEBUG_OBJECT_PROTO = 279, JSMSG_DEBUG_LOOP = 280, JSMSG_DEBUG_NOT_IDLE = 281, JSMSG_DEBUG_BAD_OFFSET = 282, JSMSG_DEBUG_BAD_LINE = 283, JSMSG_DEBUG_NOT_DEBUGGING = 284, JSMSG_DEBUG_COMPARTMENT_MISMATCH = 285, JSMSG_DEBUG_NOT_SCRIPT_FRAME = 286, JSMSG_CANT_WATCH_PROP = 287, JSMSG_CSP_BLOCKED_EVAL = 288, JSMSG_DEBUG_NO_SCOPE_OBJECT = 289, JSMSG_EMPTY_CONSEQUENT = 290, JSMSG_NOT_ITERABLE = 291, JSMSG_QUERY_LINE_WITHOUT_URL = 292, JSMSG_QUERY_INNERMOST_WITHOUT_LINE_URL = 293, JSMSG_DEBUG_VARIABLE_NOT_FOUND = 294, JSMSG_PARAMETER_AFTER_REST = 295, JSMSG_NO_REST_NAME = 296, JSMSG_ARGUMENTS_AND_REST = 297, JSMSG_FUNCTION_ARGUMENTS_AND_REST = 298, JSMSG_REST_WITH_DEFAULT = 299, JSMSG_NONDEFAULT_FORMAL_AFTER_DEFAULT = 300, JSMSG_YIELD_IN_DEFAULT = 301, # 820 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 2 #undef MSG_DEF JSErr_Limit } JSErrNum; extern __attribute__((visibility("default"))) const JSErrorFormatString * js_GetErrorMessage(void *userRef, const char *locale, const unsigned errorNumber); extern __attribute__((visibility("default"))) uint64_t js_GetSCOffset(JSStructuredCloneWriter* writer); namespace js { namespace ArrayBufferView { enum ViewType { TYPE_INT8 = 0, TYPE_UINT8, TYPE_INT16, TYPE_UINT16, TYPE_INT32, TYPE_UINT32, TYPE_FLOAT32, TYPE_FLOAT64, TYPE_UINT8_CLAMPED, TYPE_MAX }; } } typedef js::ArrayBufferView::ViewType JSArrayBufferViewType; # 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) JSObject * JS_NewInt8Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewUint8Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewUint8ClampedArray(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewInt16Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewUint16Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewInt32Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewUint32Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewFloat32Array(JSContext *cx, uint32_t nelements); extern __attribute__((visibility("default"))) JSObject * JS_NewFloat64Array(JSContext *cx, uint32_t nelements); # 898 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) JSObject * JS_NewInt8ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewUint8ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewUint8ClampedArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewInt16ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewUint16ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewInt32ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewUint32ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewFloat32ArrayFromArray(JSContext *cx, JSObject *array); extern __attribute__((visibility("default"))) JSObject * JS_NewFloat64ArrayFromArray(JSContext *cx, JSObject *array); # 924 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) JSObject * JS_NewInt8ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewUint8ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewUint8ClampedArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewInt16ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewUint16ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewInt32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewUint32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewFloat32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewFloat64ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, uint32_t byteOffset, int32_t length); extern __attribute__((visibility("default"))) JSObject * JS_NewArrayBuffer(JSContext *cx, uint32_t nbytes); extern __attribute__((visibility("default"))) JSBool JS_IsTypedArrayObject(JSObject *obj, JSContext *cx); # 974 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) JSBool JS_IsArrayBufferViewObject(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsInt8Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsUint8Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsUint8ClampedArray(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsInt16Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsUint16Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsInt32Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsUint32Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsFloat32Array(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsFloat64Array(JSObject *obj, JSContext *cx); # 1008 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) JSArrayBufferViewType JS_GetTypedArrayType(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsArrayBufferObject(JSObject *obj, JSContext *cx); # 1028 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) uint32_t JS_GetArrayBufferByteLength(JSObject *obj, JSContext *cx); # 1040 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) uint8_t * JS_GetArrayBufferData(JSObject *obj, JSContext *cx); # 1051 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) uint32_t JS_GetTypedArrayLength(JSObject *obj, JSContext *cx); # 1063 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) uint32_t JS_GetTypedArrayByteOffset(JSObject *obj, JSContext *cx); # 1074 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) uint32_t JS_GetTypedArrayByteLength(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_IsArrayBufferViewObject(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) uint32_t JS_GetArrayBufferViewByteLength(JSObject *obj, JSContext *cx); # 1102 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" extern __attribute__((visibility("default"))) int8_t * JS_GetInt8ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) uint8_t * JS_GetUint8ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) uint8_t * JS_GetUint8ClampedArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) int16_t * JS_GetInt16ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) uint16_t * JS_GetUint16ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) int32_t * JS_GetInt32ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) uint32_t * JS_GetUint32ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) float * JS_GetFloat32ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) double * JS_GetFloat64ArrayData(JSObject *obj, JSContext *cx); extern __attribute__((visibility("default"))) void * JS_GetArrayBufferViewData(JSObject *obj, JSContext *cx); __attribute__((visibility("default"))) JSBool JS_IsDataViewObject(JSContext *cx, JSObject *obj, JSBool *isDataView); # 1145 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" __attribute__((visibility("default"))) uint32_t JS_GetDataViewByteOffset(JSObject *obj, JSContext *cx); # 1156 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" __attribute__((visibility("default"))) uint32_t JS_GetDataViewByteLength(JSObject *obj, JSContext *cx); # 1167 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" __attribute__((visibility("default"))) void * JS_GetDataViewData(JSObject *obj, JSContext *cx); # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 1 # 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" #define jsinfer_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" #define LifoAlloc_h__ # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" namespace js { namespace detail { static const size_t LIFO_ALLOC_ALIGN = 8; __attribute__((always_inline)) inline char * AlignPtr(void *orig) { typedef tl::StaticAssert< tl::FloorLog2::result == tl::CeilingLog2::result >::result _; char *result = (char *) ((uintptr_t(orig) + (LIFO_ALLOC_ALIGN - 1)) & (~LIFO_ALLOC_ALIGN + 1)); do { } while(0); return result; } class BumpChunk { char *bump; char *limit; BumpChunk *next_; size_t bumpSpaceSize; char *headerBase() { return reinterpret_cast(this); } char *bumpBase() const { return limit - bumpSpaceSize; } BumpChunk *thisDuringConstruction() { return this; } explicit BumpChunk(size_t bumpSpaceSize) : bump(reinterpret_cast(thisDuringConstruction()) + sizeof(BumpChunk)), limit(bump + bumpSpaceSize), next_(__null), bumpSpaceSize(bumpSpaceSize) { do { } while(0); } void setBump(void *ptr) { do { } while(0); do { } while(0); DebugOnly prevBump = bump; bump = static_cast(ptr); } public: BumpChunk *next() const { return next_; } void setNext(BumpChunk *succ) { next_ = succ; } size_t used() const { return bump - bumpBase(); } size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) { return mallocSizeOf(this); } void resetBump() { setBump(headerBase() + sizeof(BumpChunk)); } void *mark() const { return bump; } void release(void *mark) { do { } while(0); do { } while(0); setBump(mark); } bool contains(void *mark) const { return bumpBase() <= mark && mark <= limit; } bool canAlloc(size_t n); __attribute__((always_inline)) inline void *tryAlloc(size_t n) { char *aligned = AlignPtr(bump); char *newBump = aligned + n; if (newBump > limit) return __null; if ((__builtin_expect((newBump < bump), 0))) return __null; do { } while(0); setBump(newBump); return aligned; } void *allocInfallible(size_t n) { void *result = tryAlloc(n); do { } while(0); return result; } static BumpChunk *new_(size_t chunkSize); static void delete_(BumpChunk *chunk); }; } class LifoAlloc { typedef detail::BumpChunk BumpChunk; BumpChunk *first; BumpChunk *latest; size_t markCount; size_t defaultChunkSize_; void operator=(const LifoAlloc &) ; LifoAlloc(const LifoAlloc &) ; # 160 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" BumpChunk *getOrCreateChunk(size_t n); void reset(size_t defaultChunkSize) { do { } while(0); first = latest = __null; defaultChunkSize_ = defaultChunkSize; markCount = 0; } public: explicit LifoAlloc(size_t defaultChunkSize) { reset(defaultChunkSize); } void steal(LifoAlloc *other) { do { } while(0); PodCopy((char *) this, (char *) other, sizeof(*this)); other->reset(defaultChunkSize_); } ~LifoAlloc() { freeAll(); } size_t defaultChunkSize() const { return defaultChunkSize_; } void freeAll(); void freeUnused(); __attribute__((always_inline)) inline void *alloc(size_t n) { do {} while(0); void *result; if (latest && (result = latest->tryAlloc(n))) return result; if (!getOrCreateChunk(n)) return __null; return latest->allocInfallible(n); } template T *newArray(size_t count) { void *mem = alloc(sizeof(T) * count); if (!mem) return __null; typedef int moz_static_assert45[(tl::IsPodType::result) ? 1 : -1]; return (T *) mem; } template T *newArrayUninitialized(size_t count) { return static_cast(alloc(sizeof(T) * count)); } void *mark() { markCount++; return latest ? latest->mark() : __null; } void release(void *mark) { markCount--; if (!mark) { latest = first; if (latest) latest->resetBump(); return; } BumpChunk *container = first; while (true) { if (container->contains(mark)) break; do { } while(0); container = container->next(); } latest = container; latest->release(mark); } size_t used() const { size_t accum = 0; BumpChunk *it = first; while (it) { accum += it->used(); it = it->next(); } return accum; } size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { size_t accum = 0; BumpChunk *it = first; while (it) { accum += it->sizeOfIncludingThis(mallocSizeOf); it = it->next(); } return accum; } size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); } template __attribute__((always_inline)) inline T *newPod() { return static_cast(alloc(sizeof(T))); } template __attribute__((always_inline)) inline T *new_() { void *memory = alloc(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = alloc(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } }; class LifoAllocScope { LifoAlloc *lifoAlloc; void *mark; bool shouldRelease; public: explicit LifoAllocScope(LifoAlloc *lifoAlloc ) : lifoAlloc(lifoAlloc), shouldRelease(true) { do { } while (0); mark = lifoAlloc->mark(); } ~LifoAllocScope() { if (shouldRelease) lifoAlloc->release(mark); } LifoAlloc &alloc() { return *lifoAlloc; } void releaseEarly() { do { } while(0); lifoAlloc->release(mark); shouldRelease = false; } }; } # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 1 # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 2 namespace JS { struct TypeInferenceSizes; } namespace js { namespace types { struct TypeObjectKey { static intptr_t keyBits(TypeObjectKey *obj) { return (intptr_t) obj; } static TypeObjectKey *getKey(TypeObjectKey *obj) { return obj; } }; class Type { uintptr_t data; Type(uintptr_t data) : data(data) {} public: uintptr_t raw() const { return data; } bool isPrimitive() const { return data < JSVAL_TYPE_OBJECT; } bool isPrimitive(JSValueType type) const { do { } while(0); return (uintptr_t) type == data; } JSValueType primitive() const { do { } while(0); return (JSValueType) data; } bool isAnyObject() const { return data == JSVAL_TYPE_OBJECT; } bool isUnknown() const { return data == JSVAL_TYPE_UNKNOWN; } bool isObject() const { do { } while(0); return data > JSVAL_TYPE_UNKNOWN; } inline TypeObjectKey *objectKey() const; bool isSingleObject() const { return isObject() && !!(data & 1); } inline JSObject *singleObject() const; bool isTypeObject() const { return isObject() && !(data & 1); } inline TypeObject *typeObject() const; bool operator == (Type o) const { return data == o.data; } bool operator != (Type o) const { return data != o.data; } static inline Type UndefinedType() { return Type(JSVAL_TYPE_UNDEFINED); } static inline Type NullType() { return Type(JSVAL_TYPE_NULL); } static inline Type BooleanType() { return Type(JSVAL_TYPE_BOOLEAN); } static inline Type Int32Type() { return Type(JSVAL_TYPE_INT32); } static inline Type DoubleType() { return Type(JSVAL_TYPE_DOUBLE); } static inline Type StringType() { return Type(JSVAL_TYPE_STRING); } static inline Type MagicArgType() { return Type(JSVAL_TYPE_MAGIC); } static inline Type AnyObjectType() { return Type(JSVAL_TYPE_OBJECT); } static inline Type UnknownType() { return Type(JSVAL_TYPE_UNKNOWN); } static inline Type PrimitiveType(JSValueType type) { do { } while(0); return Type(type); } static inline Type ObjectType(JSObject *obj); static inline Type ObjectType(TypeObject *obj); static inline Type ObjectType(TypeObjectKey *obj); }; inline Type GetValueType(JSContext *cx, const Value &val); # 144 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" class TypeConstraint { public: const char *kind() const { return __null; } TypeConstraint *next; TypeConstraint(const char *kind) : next(__null) { } virtual void newType(JSContext *cx, TypeSet *source, Type type) = 0; virtual void newPropertyState(JSContext *cx, TypeSet *source) {} virtual void newObjectState(JSContext *cx, TypeObject *object, bool force) {} }; enum { TYPE_FLAG_UNDEFINED = 0x1, TYPE_FLAG_NULL = 0x2, TYPE_FLAG_BOOLEAN = 0x4, TYPE_FLAG_INT32 = 0x8, TYPE_FLAG_DOUBLE = 0x10, TYPE_FLAG_STRING = 0x20, TYPE_FLAG_LAZYARGS = 0x40, TYPE_FLAG_ANYOBJECT = 0x80, TYPE_FLAG_OBJECT_COUNT_MASK = 0xff00, TYPE_FLAG_OBJECT_COUNT_SHIFT = 8, TYPE_FLAG_OBJECT_COUNT_LIMIT = TYPE_FLAG_OBJECT_COUNT_MASK >> TYPE_FLAG_OBJECT_COUNT_SHIFT, TYPE_FLAG_UNKNOWN = 0x00010000, TYPE_FLAG_BASE_MASK = 0x000100ff, TYPE_FLAG_PROPAGATED_PROPERTY = 0x00020000, TYPE_FLAG_OWN_PROPERTY = 0x00040000, TYPE_FLAG_CONFIGURED_PROPERTY = 0x00080000, TYPE_FLAG_DEFINITE_PROPERTY = 0x00100000, TYPE_FLAG_DEFINITE_MASK = 0x0f000000, TYPE_FLAG_DEFINITE_SHIFT = 24 }; typedef uint32_t TypeFlags; enum { OBJECT_FLAG_FUNCTION = 0x1, OBJECT_FLAG_NEW_SCRIPT_CLEARED = 0x2, OBJECT_FLAG_NEW_SCRIPT_REGENERATE = 0x4, OBJECT_FLAG_SETS_MARKED_UNKNOWN = 0x8, OBJECT_FLAG_PROPERTY_COUNT_MASK = 0xfff0, OBJECT_FLAG_PROPERTY_COUNT_SHIFT = 4, OBJECT_FLAG_PROPERTY_COUNT_LIMIT = OBJECT_FLAG_PROPERTY_COUNT_MASK >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT, OBJECT_FLAG_NON_DENSE_ARRAY = 0x00010000, OBJECT_FLAG_NON_PACKED_ARRAY = 0x00020000, OBJECT_FLAG_NON_TYPED_ARRAY = 0x00040000, OBJECT_FLAG_UNINLINEABLE = 0x00080000, OBJECT_FLAG_SPECIAL_EQUALITY = 0x00100000, OBJECT_FLAG_ITERATED = 0x00200000, OBJECT_FLAG_REENTRANT_FUNCTION = 0x00400000, OBJECT_FLAG_REGEXP_FLAGS_SET = 0x00800000, OBJECT_FLAG_DYNAMIC_MASK = 0x00ff0000, OBJECT_FLAG_UNKNOWN_PROPERTIES = 0x80000000, OBJECT_FLAG_UNKNOWN_MASK = OBJECT_FLAG_DYNAMIC_MASK | OBJECT_FLAG_UNKNOWN_PROPERTIES | OBJECT_FLAG_SETS_MARKED_UNKNOWN }; typedef uint32_t TypeObjectFlags; class TypeSet { TypeFlags flags; TypeObjectKey **objectSet; public: TypeConstraint *constraintList; TypeSet() : flags(0), objectSet(__null), constraintList(__null) {} void print(JSContext *cx); inline void sweep(JSCompartment *compartment); inline size_t computedSizeOfExcludingThis(); inline bool hasType(Type type); TypeFlags baseFlags() const { return flags & TYPE_FLAG_BASE_MASK; } bool unknown() const { return !!(flags & TYPE_FLAG_UNKNOWN); } bool unknownObject() const { return !!(flags & (TYPE_FLAG_UNKNOWN | TYPE_FLAG_ANYOBJECT)); } bool empty() const { return !baseFlags() && !baseObjectCount(); } bool hasAnyFlag(TypeFlags flags) const { do { } while(0); return !!(baseFlags() & flags); } bool isOwnProperty(bool configurable) const { return flags & (configurable ? TYPE_FLAG_CONFIGURED_PROPERTY : TYPE_FLAG_OWN_PROPERTY); } bool isDefiniteProperty() const { return flags & TYPE_FLAG_DEFINITE_PROPERTY; } unsigned definiteSlot() const { do { } while(0); return flags >> TYPE_FLAG_DEFINITE_SHIFT; } inline void addType(JSContext *cx, Type type); inline void setOwnProperty(JSContext *cx, bool configured); inline unsigned getObjectCount(); inline TypeObjectKey *getObject(unsigned i); inline JSObject *getSingleObject(unsigned i); inline TypeObject *getTypeObject(unsigned i); void setOwnProperty(bool configurable) { flags |= TYPE_FLAG_OWN_PROPERTY; if (configurable) flags |= TYPE_FLAG_CONFIGURED_PROPERTY; } void setDefinite(unsigned slot) { do { } while(0); flags |= TYPE_FLAG_DEFINITE_PROPERTY | (slot << TYPE_FLAG_DEFINITE_SHIFT); } bool hasPropagatedProperty() { return !!(flags & TYPE_FLAG_PROPAGATED_PROPERTY); } void setPropagatedProperty() { flags |= TYPE_FLAG_PROPAGATED_PROPERTY; } enum FilterKind { FILTER_ALL_PRIMITIVES, FILTER_NULL_VOID, FILTER_VOID }; inline void add(JSContext *cx, TypeConstraint *constraint, bool callExisting = true); void addSubset(JSContext *cx, TypeSet *target); void addGetProperty(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *target, jsid id); void addSetProperty(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *target, jsid id); void addCallProperty(JSContext *cx, JSScript *script, jsbytecode *pc, jsid id); void addSetElement(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *objectTypes, TypeSet *valueTypes); void addCall(JSContext *cx, TypeCallsite *site); void addArith(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *target, TypeSet *other = __null); void addTransformThis(JSContext *cx, JSScript *script, TypeSet *target); void addPropagateThis(JSContext *cx, JSScript *script, jsbytecode *pc, Type type, TypeSet *types = __null); void addFilterPrimitives(JSContext *cx, TypeSet *target, FilterKind filter); void addSubsetBarrier(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *target); static TypeSet *make(JSContext *cx, const char *name); # 424 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" void addFreeze(JSContext *cx); JSValueType getKnownTypeTag(JSContext *cx); bool isMagicArguments(JSContext *cx) { return getKnownTypeTag(cx) == JSVAL_TYPE_MAGIC; } bool hasObjectFlags(JSContext *cx, TypeObjectFlags flags); static bool HasObjectFlags(JSContext *cx, TypeObject *object, TypeObjectFlags flags); static void WatchObjectStateChange(JSContext *cx, TypeObject *object); # 449 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" bool isOwnProperty(JSContext *cx, TypeObject *object, bool configurable); bool knownNonEmpty(JSContext *cx); bool knownSubset(JSContext *cx, TypeSet *other); int getTypedArrayType(JSContext *cx); JSObject *getSingleton(JSContext *cx, bool freeze = true); bool hasGlobalObject(JSContext *cx, JSObject *global); inline void clearObjects(); bool needsBarrier(JSContext *cx); bool propertyNeedsBarrier(JSContext *cx, jsid id); private: uint32_t baseObjectCount() const { return (flags & TYPE_FLAG_OBJECT_COUNT_MASK) >> TYPE_FLAG_OBJECT_COUNT_SHIFT; } inline void setBaseObjectCount(uint32_t count); }; struct TypeResult { uint32_t offset; Type type; TypeResult *next; TypeResult(uint32_t offset, Type type) : offset(offset), type(type), next(__null) {} }; # 562 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" struct TypeBarrier { TypeBarrier *next; TypeSet *target; Type type; JSObject *singleton; jsid singletonId; TypeBarrier(TypeSet *target, Type type, JSObject *singleton, jsid singletonId) : next(__null), target(target), type(type), singleton(singleton), singletonId(singletonId) {} }; struct Property { HeapId id; TypeSet types; inline Property(jsid id); inline Property(const Property &o); static uint32_t keyBits(jsid id) { return uint32_t((id)); } static jsid getKey(Property *p) { return p->id; } }; # 615 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" struct TypeNewScript { HeapPtrFunction fun; gc::AllocKind allocKind; HeapPtrShape shape; # 636 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" struct Initializer { enum Kind { SETPROP, FRAME_PUSH, FRAME_POP, DONE } kind; uint32_t offset; Initializer(Kind kind, uint32_t offset) : kind(kind), offset(offset) {} }; Initializer *initializerList; static inline void writeBarrierPre(TypeNewScript *newScript); static inline void writeBarrierPost(TypeNewScript *newScript, void *addr); }; # 681 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" struct TypeObject : gc::Cell { HeapPtrObject proto; HeapPtrObject singleton; static const size_t LAZY_SINGLETON = 1; bool lazy() const { return singleton == (JSObject *) LAZY_SINGLETON; } TypeObjectFlags flags; # 714 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" uint32_t contribution; static const uint32_t CONTRIBUTION_LIMIT = 2000; HeapPtr newScript; # 754 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" Property **propertySet; HeapPtrFunction interpretedFunction; void *padding; inline TypeObject(JSObject *proto, bool isFunction, bool unknown); bool isFunction() { return !!(flags & OBJECT_FLAG_FUNCTION); } bool hasAnyFlags(TypeObjectFlags flags) { do { } while(0); return !!(this->flags & flags); } bool hasAllFlags(TypeObjectFlags flags) { do { } while(0); return (this->flags & flags) == flags; } bool unknownProperties() { do { } while (0) ; return !!(flags & OBJECT_FLAG_UNKNOWN_PROPERTIES); } inline TypeSet *getProperty(JSContext *cx, jsid id, bool assign); inline TypeSet *maybeGetProperty(JSContext *cx, jsid id); inline unsigned getPropertyCount(); inline Property *getProperty(unsigned i); inline void setFlagsFromKey(JSContext *cx, JSProtoKey kind); inline JSObject *getGlobal(); bool addProperty(JSContext *cx, jsid id, Property **pprop); bool addDefiniteProperties(JSContext *cx, JSObject *obj); bool matchDefiniteProperties(JSObject *obj); void addPrototype(JSContext *cx, TypeObject *proto); void addPropertyType(JSContext *cx, jsid id, Type type); void addPropertyType(JSContext *cx, jsid id, const Value &value); void addPropertyType(JSContext *cx, const char *name, Type type); void addPropertyType(JSContext *cx, const char *name, const Value &value); void markPropertyConfigured(JSContext *cx, jsid id); void markStateChange(JSContext *cx); void setFlags(JSContext *cx, TypeObjectFlags flags); void markUnknown(JSContext *cx); void clearNewScript(JSContext *cx); void getFromPrototypes(JSContext *cx, jsid id, TypeSet *types, bool force = false); void print(JSContext *cx); inline void clearProperties(); inline void sweep(FreeOp *fop); inline size_t computedSizeOfExcludingThis(); void sizeOfExcludingThis(TypeInferenceSizes *sizes, JSMallocSizeOfFun mallocSizeOf); void finalize(FreeOp *fop) {} static inline void writeBarrierPre(TypeObject *type); static inline void writeBarrierPost(TypeObject *type, void *addr); static inline void readBarrier(TypeObject *type); static inline ThingRootKind rootKind() { return THING_ROOT_TYPE_OBJECT; } private: inline uint32_t basePropertyCount() const; inline void setBasePropertyCount(uint32_t count); static void staticAsserts() { typedef int moz_static_assert46[(__builtin_offsetof (TypeObject, proto) == __builtin_offsetof (js::shadow::TypeObject, proto)) ? 1 : -1]; } }; struct TypeObjectEntry { typedef JSObject *Lookup; static inline HashNumber hash(JSObject *base); static inline bool match(TypeObject *key, JSObject *lookup); }; typedef HashSet, TypeObjectEntry, SystemAllocPolicy> TypeObjectSet; bool UseNewType(JSContext *cx, JSScript *script, jsbytecode *pc); bool UseNewTypeForInitializer(JSContext *cx, JSScript *script, jsbytecode *pc); bool ArrayPrototypeHasIndexedProperty(JSContext *cx, JSScript *script); struct TypeCallsite { JSScript *script; jsbytecode *pc; bool isNew; unsigned argumentCount; TypeSet **argumentTypes; TypeSet *thisTypes; TypeSet *returnTypes; inline TypeCallsite(JSContext *cx, JSScript *script, jsbytecode *pc, bool isNew, unsigned argumentCount); }; # 945 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" struct TypeScriptNesting { # 955 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" JSScript *parent; JSScript *children; JSScript *next; JSObject *activeCall; # 974 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" const Value *argArray; const Value *varArray; uint32_t activeFrames; TypeScriptNesting() { PodZero(this); } ~TypeScriptNesting(); }; bool CheckScriptNesting(JSContext *cx, JSScript *script); void NestingPrologue(JSContext *cx, StackFrame *fp); void NestingEpilogue(StackFrame *fp); class TypeScript { friend struct ::JSScript; analyze::ScriptAnalysis *analysis; static const size_t GLOBAL_MISSING_SCOPE = 0x1; HeapPtr global; public: TypeScriptNesting *nesting; TypeResult *dynamicList; inline TypeScript(); bool hasScope() { return size_t(global.get()) != GLOBAL_MISSING_SCOPE; } TypeSet *typeArray() { return (TypeSet *) (uintptr_t(this) + sizeof(TypeScript)); } static inline unsigned NumTypeSets(JSScript *script); static bool SetScope(JSContext *cx, JSScript *script, JSObject *scope); static inline TypeSet *ReturnTypes(JSScript *script); static inline TypeSet *ThisTypes(JSScript *script); static inline TypeSet *ArgTypes(JSScript *script, unsigned i); static inline TypeSet *LocalTypes(JSScript *script, unsigned i); static inline TypeSet *SlotTypes(JSScript *script, unsigned slot); static inline TypeObject *StandardType(JSContext *cx, JSScript *script, JSProtoKey kind); static inline TypeObject *InitObject(JSContext *cx, JSScript *script, jsbytecode *pc, JSProtoKey kind); static inline void MonitorOverflow(JSContext *cx, JSScript *script, jsbytecode *pc); static inline void MonitorString(JSContext *cx, JSScript *script, jsbytecode *pc); static inline void MonitorUnknown(JSContext *cx, JSScript *script, jsbytecode *pc); static inline void GetPcScript(JSContext *cx, JSScript **script, jsbytecode **pc); static inline void MonitorOverflow(JSContext *cx); static inline void MonitorString(JSContext *cx); static inline void MonitorUnknown(JSContext *cx); # 1067 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" static inline void Monitor(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &val); static inline void Monitor(JSContext *cx, const js::Value &rval); static inline void MonitorAssign(JSContext *cx, JSObject *obj, jsid id); static inline void SetThis(JSContext *cx, JSScript *script, Type type); static inline void SetThis(JSContext *cx, JSScript *script, const js::Value &value); static inline void SetLocal(JSContext *cx, JSScript *script, unsigned local, Type type); static inline void SetLocal(JSContext *cx, JSScript *script, unsigned local, const js::Value &value); static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type); static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value); static void Sweep(FreeOp *fop, JSScript *script); inline void trace(JSTracer *trc); void destroy(); }; struct ArrayTableKey; typedef HashMap,ArrayTableKey,SystemAllocPolicy> ArrayTypeTable; struct ObjectTableKey; struct ObjectTableEntry; typedef HashMap ObjectTypeTable; struct AllocationSiteKey; typedef HashMap,AllocationSiteKey,SystemAllocPolicy> AllocationSiteTable; struct RecompileInfo { JSScript *script; bool constructing : 1; bool barriers : 1; uint32_t chunkIndex:30; bool operator == (const RecompileInfo &o) const { return script == o.script && constructing == o.constructing && barriers == o.barriers && chunkIndex == o.chunkIndex; } }; struct TypeCompartment { struct PendingWork { TypeConstraint *constraint; TypeSet *source; Type type; }; PendingWork *pendingArray; unsigned pendingCount; unsigned pendingCapacity; bool resolving; bool inferenceEnabled; bool pendingNukeTypes; unsigned scriptCount; Vector *pendingRecompiles; unsigned recompilations; unsigned frameExpansions; RecompileInfo compiledInfo; AllocationSiteTable *allocationSiteTable; ArrayTypeTable *arrayTypeTable; ObjectTypeTable *objectTypeTable; void fixArrayType(JSContext *cx, JSObject *obj); void fixObjectType(JSContext *cx, JSObject *obj); static const unsigned TYPE_COUNT_LIMIT = 4; unsigned typeCounts[TYPE_COUNT_LIMIT]; unsigned typeCountOver; void init(JSContext *cx); ~TypeCompartment(); inline JSCompartment *compartment(); inline void addPending(JSContext *cx, TypeConstraint *constraint, TypeSet *source, Type type); bool growPendingArray(JSContext *cx); inline void resolvePending(JSContext *cx); void print(JSContext *cx, bool force); TypeObject *newTypeObject(JSContext *cx, JSScript *script, JSProtoKey kind, JSObject *proto, bool unknown = false); TypeObject *newAllocationSiteTypeObject(JSContext *cx, const AllocationSiteKey &key); void nukeTypes(FreeOp *fop); void processPendingRecompiles(FreeOp *fop); void setPendingNukeTypes(JSContext *cx); void setPendingNukeTypesNoReport(); void addPendingRecompile(JSContext *cx, const RecompileInfo &info); void addPendingRecompile(JSContext *cx, JSScript *script, jsbytecode *pc); void monitorBytecode(JSContext *cx, JSScript *script, uint32_t offset, bool returnOnly = false); void markSetsUnknown(JSContext *cx, TypeObject *obj); void sweep(FreeOp *fop); void finalizeObjects(); }; enum SpewChannel { ISpewOps, ISpewResult, SPEW_COUNT }; # 1252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" inline const char * InferSpewColorReset() { return __null; } inline const char * InferSpewColor(TypeConstraint *constraint) { return __null; } inline const char * InferSpewColor(TypeSet *types) { return __null; } inline void InferSpew(SpewChannel which, const char *fmt, ...) {} inline const char * TypeString(Type type) { return __null; } inline const char * TypeObjectString(TypeObject *type) { return __null; } void TypeFailure(JSContext *cx, const char *fmt, ...); } } namespace JS { template<> class AnchorPermitted { }; } # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" #define ObjectImpl_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 1 # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" 1 # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 1 # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" #define NumericConversions_h___ # 1 "/usr/include/math.h" 1 3 4 # 26 "/usr/include/math.h" 3 4 #define _MATH_H 1 extern "C" { # 1 "/usr/include/bits/huge_val.h" 1 3 4 # 29 "/usr/include/bits/huge_val.h" 3 4 #define HUGE_VAL (__builtin_huge_val()) # 35 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_valf.h" 1 3 4 # 29 "/usr/include/bits/huge_valf.h" 3 4 #define HUGE_VALF (__builtin_huge_valf()) # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_vall.h" 1 3 4 # 26 "/usr/include/bits/huge_vall.h" 3 4 #define HUGE_VALL (__builtin_huge_vall()) # 38 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/inf.h" 1 3 4 # 27 "/usr/include/bits/inf.h" 3 4 #define INFINITY (__builtin_inff()) # 41 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/nan.h" 1 3 4 # 29 "/usr/include/bits/nan.h" 3 4 #define NAN (__builtin_nanf ("")) # 44 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/mathdef.h" 1 3 4 # 25 "/usr/include/bits/mathdef.h" 3 4 #define _MATH_H_MATHDEF 1 typedef float float_t; typedef double double_t; #define FP_ILOGB0 (-2147483647) #define FP_ILOGBNAN (2147483647) # 56 "/usr/include/bits/mathdef.h" 3 4 #define __NO_LONG_DOUBLE_MATH 1 # 48 "/usr/include/math.h" 2 3 4 #define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args) #define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) #define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib) #define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) #define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) #define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD #define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern double acos (double __x) throw (); extern double __acos (double __x) throw (); extern double asin (double __x) throw (); extern double __asin (double __x) throw (); extern double atan (double __x) throw (); extern double __atan (double __x) throw (); extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); extern double cos (double __x) throw (); extern double __cos (double __x) throw (); extern double sin (double __x) throw (); extern double __sin (double __x) throw (); extern double tan (double __x) throw (); extern double __tan (double __x) throw (); extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () ; extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); extern double exp (double __x) throw (); extern double __exp (double __x) throw (); extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); extern double log (double __x) throw (); extern double __log (double __x) throw (); extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); extern double logb (double __x) throw (); extern double __logb (double __x) throw (); extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int isinf (double __value) throw () __attribute__ ((__const__)); extern int finite (double __value) throw () __attribute__ ((__const__)); extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); extern double significand (double __x) throw (); extern double __significand (double __x) throw (); extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int isnan (double __value) throw () __attribute__ ((__const__)); extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); extern double tgamma (double) throw (); extern double __tgamma (double) throw (); extern double gamma (double) throw (); extern double __gamma (double) throw (); extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); extern double rint (double __x) throw (); extern double __rint (double __x) throw (); extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) throw () __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 72 "/usr/include/math.h" 2 3 4 #undef _Mdouble_ #undef _Mdouble_BEGIN_NAMESPACE #undef _Mdouble_END_NAMESPACE #undef __MATH_PRECNAME # 84 "/usr/include/math.h" 3 4 #define _Mfloat_ float #define _Mdouble_ _Mfloat_ #define __MATH_PRECNAME(name,r) name ##f ##r #define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 #define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); extern void sincosf # 82 "/usr/include/bits/mathcalls.h" 3 4 (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf # 82 "/usr/include/bits/mathcalls.h" 3 4 (float __x, float *__sinx, float *__cosx) throw () ; extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); extern float expf (float __x) throw (); extern float __expf (float __x) throw (); extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); extern float logf (float __x) throw (); extern float __logf (float __x) throw (); extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); extern int isinff (float __value) throw () __attribute__ ((__const__)); extern int finitef (float __value) throw () __attribute__ ((__const__)); extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); extern int isnanf (float __value) throw () __attribute__ ((__const__)); extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); extern float gammaf (float) throw (); extern float __gammaf (float) throw (); extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) throw () __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 95 "/usr/include/math.h" 2 3 4 #undef _Mdouble_ #undef _Mdouble_BEGIN_NAMESPACE #undef _Mdouble_END_NAMESPACE #undef __MATH_PRECNAME # 132 "/usr/include/math.h" 3 4 #define _Mlong_double_ long double #define _Mdouble_ _Mlong_double_ #define __MATH_PRECNAME(name,r) name ##l ##r #define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 #define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 #define __MATH_DECLARE_LDOUBLE 1 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); extern void sincosl # 82 "/usr/include/bits/mathcalls.h" 3 4 (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl # 82 "/usr/include/bits/mathcalls.h" 3 4 (long double __x, long double *__sinx, long double *__cosx) throw () ; extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (long double __value) throw () __attribute__ ((__const__)); extern int isinfl (long double __value) throw () __attribute__ ((__const__)); extern int finitel (long double __value) throw () __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); extern int isnanl (long double __value) throw () __attribute__ ((__const__)); extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 144 "/usr/include/math.h" 2 3 4 #undef _Mdouble_ #undef _Mdouble_BEGIN_NAMESPACE #undef _Mdouble_END_NAMESPACE #undef __MATH_PRECNAME #undef __MATHDECL_1 #undef __MATHDECL #undef __MATHCALL extern int signgam; # 200 "/usr/include/math.h" 3 4 enum { FP_NAN, #define FP_NAN FP_NAN FP_INFINITE, #define FP_INFINITE FP_INFINITE FP_ZERO, #define FP_ZERO FP_ZERO FP_SUBNORMAL, #define FP_SUBNORMAL FP_SUBNORMAL FP_NORMAL #define FP_NORMAL FP_NORMAL }; #define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x)) # 228 "/usr/include/math.h" 3 4 #define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x)) # 240 "/usr/include/math.h" 3 4 #define isfinite(x) (sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x)) # 251 "/usr/include/math.h" 3 4 #define isnormal(x) (fpclassify (x) == FP_NORMAL) #define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x)) # 268 "/usr/include/math.h" 3 4 #define isinf(x) (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x)) # 279 "/usr/include/math.h" 3 4 #define MATH_ERRNO 1 #define MATH_ERREXCEPT 2 #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 316 "/usr/include/math.h" 3 4 struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw (); #define X_TLOSS 1.41484755040568800000e+16 #define DOMAIN 1 #define SING 2 #define OVERFLOW 3 #define UNDERFLOW 4 #define TLOSS 5 #define PLOSS 6 #define HUGE 3.40282347e+38F # 359 "/usr/include/math.h" 3 4 #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 #define M_LN2 0.69314718055994530942 #define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 #define M_PI_2 1.57079632679489661923 #define M_PI_4 0.78539816339744830962 #define M_1_PI 0.31830988618379067154 #define M_2_PI 0.63661977236758134308 #define M_2_SQRTPI 1.12837916709551257390 #define M_SQRT2 1.41421356237309504880 #define M_SQRT1_2 0.70710678118654752440 #define M_El 2.7182818284590452353602874713526625L #define M_LOG2El 1.4426950408889634073599246810018921L #define M_LOG10El 0.4342944819032518276511289189166051L #define M_LN2l 0.6931471805599453094172321214581766L #define M_LN10l 2.3025850929940456840179914546843642L #define M_PIl 3.1415926535897932384626433832795029L #define M_PI_2l 1.5707963267948966192313216916397514L #define M_PI_4l 0.7853981633974483096156608458198757L #define M_1_PIl 0.3183098861837906715377675267450287L #define M_2_PIl 0.6366197723675813430755350534900574L #define M_2_SQRTPIl 1.1283791670955125738961589031215452L #define M_SQRT2l 1.4142135623730950488016887242096981L #define M_SQRT1_2l 0.7071067811865475244008443621048490L # 408 "/usr/include/math.h" 3 4 #define isgreater(x,y) __builtin_isgreater(x, y) #define isgreaterequal(x,y) __builtin_isgreaterequal(x, y) #define isless(x,y) __builtin_isless(x, y) #define islessequal(x,y) __builtin_islessequal(x, y) #define islessgreater(x,y) __builtin_islessgreater(x, y) #define isunordered(u,v) __builtin_isunordered(u, v) # 1 "/usr/include/bits/mathinline.h" 1 3 4 # 419 "/usr/include/math.h" 2 3 4 # 480 "/usr/include/math.h" 3 4 } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 2 extern double js_NaN; namespace js { namespace detail { union DoublePun { struct { uint32_t lo, hi; } s; uint64_t u64; double d; }; } inline int32_t ToInt32(double d) { # 114 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" int32_t i; uint32_t tmp0; uint32_t tmp1; uint32_t tmp2; asm ( # 131 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" " mov %1, %R4, LSR #20\n" " bic %1, %1, #(1 << 11)\n" " orr %R4, %R4, #(1 << 20)\n" # 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" " sub %1, %1, #0xff\n" " subs %1, %1, #0x300\n" " bmi 8f\n" " subs %3, %1, #52\n" " bmi 1f\n" " bic %2, %3, #0xff\n" " orr %3, %3, %2, LSR #3\n" " mov %Q4, %Q4, LSL %3\n" " b 2f\n" "1:\n" " rsb %3, %1, #52\n" " mov %Q4, %Q4, LSR %3\n" "2:\n" " subs %3, %1, #31\n" " mov %1, %R4, LSL #11\n" " bmi 3f\n" " bic %2, %3, #0xff\n" " orr %3, %3, %2, LSR #3\n" " mov %2, %1, LSL %3\n" " b 4f\n" "3:\n" " rsb %3, %3, #0\n" " mov %2, %1, LSR %3\n" "4:\n" " orr %Q4, %Q4, %2\n" " eor %Q4, %Q4, %R4, ASR #31\n" " add %0, %Q4, %R4, LSR #31\n" " b 9f\n" "8:\n" " mov %0, #0\n" "9:\n" : "=r" (i), "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2), "=&r" (d) : "4" (d) : "cc" ); return i; # 252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" } inline uint32_t ToUint32(double d) { return uint32_t(ToInt32(d)); } inline double ToInteger(double d) { if (d == 0) return d; if (!MOZ_DOUBLE_IS_FINITE(d)) { if (MOZ_DOUBLE_IS_NaN(d)) return 0; return d; } bool neg = (d < 0); d = floor(neg ? -d : d); return neg ? -d : d; } } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 namespace js { class Debugger; class ObjectImpl; class AutoPropDescArrayRooter; static inline PropertyOp CastAsPropertyOp(JSObject *object) { return (__extension__ (PropertyOp) (size_t) (object)); } static inline StrictPropertyOp CastAsStrictPropertyOp(JSObject *object) { return (__extension__ (StrictPropertyOp) (size_t) (object)); } struct PropDesc { private: Value pd_; Value value_, get_, set_; uint8_t attrs; bool hasGet_ : 1; bool hasSet_ : 1; bool hasValue_ : 1; bool hasWritable_ : 1; bool hasEnumerable_ : 1; bool hasConfigurable_ : 1; bool isUndefined_ : 1; PropDesc(const Value &v) : pd_(UndefinedValue()), value_(v), get_(UndefinedValue()), set_(UndefinedValue()), attrs(0), hasGet_(false), hasSet_(false), hasValue_(true), hasWritable_(false), hasEnumerable_(false), hasConfigurable_(false), isUndefined_(false) { } public: friend class AutoPropDescArrayRooter; friend void JS::AutoGCRooter::trace(JSTracer *trc); enum Enumerability { Enumerable = true, NonEnumerable = false }; enum Configurability { Configurable = true, NonConfigurable = false }; enum Writability { Writable = true, NonWritable = false }; PropDesc(); static PropDesc undefined() { return PropDesc(); } static PropDesc valueOnly(const Value &v) { return PropDesc(v); } PropDesc(const Value &v, Writability writable, Enumerability enumerable, Configurability configurable) : pd_(UndefinedValue()), value_(v), get_(UndefinedValue()), set_(UndefinedValue()), attrs((writable ? 0 : 0x02) | (enumerable ? 0x01 : 0) | (configurable ? 0 : 0x04)), hasGet_(false), hasSet_(false), hasValue_(true), hasWritable_(true), hasEnumerable_(true), hasConfigurable_(true), isUndefined_(false) {} # 115 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" bool initialize(JSContext* cx, const Value &v, bool checkAccessors = true); # 126 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" void initFromPropertyDescriptor(const PropertyDescriptor &desc); bool makeObject(JSContext *cx); void setUndefined() { isUndefined_ = true; } bool isUndefined() const { return isUndefined_; } bool hasGet() const { do { } while(0); return hasGet_; } bool hasSet() const { do { } while(0); return hasSet_; } bool hasValue() const { do { } while(0); return hasValue_; } bool hasWritable() const { do { } while(0); return hasWritable_; } bool hasEnumerable() const { do { } while(0); return hasEnumerable_; } bool hasConfigurable() const { do { } while(0); return hasConfigurable_; } Value pd() const { do { } while(0); return pd_; } void clearPd() { pd_ = UndefinedValue(); } uint8_t attributes() const { do { } while(0); return attrs; } bool isAccessorDescriptor() const { return !isUndefined() && (hasGet() || hasSet()); } bool isDataDescriptor() const { return !isUndefined() && (hasValue() || hasWritable()); } bool isGenericDescriptor() const { return !isUndefined() && !isAccessorDescriptor() && !isDataDescriptor(); } bool configurable() const { do { } while(0); do { } while(0); return (attrs & 0x04) == 0; } bool enumerable() const { do { } while(0); do { } while(0); return (attrs & 0x01) != 0; } bool writable() const { do { } while(0); do { } while(0); return (attrs & 0x02) == 0; } const Value & value() const { do { } while(0); return value_; } JSObject * getterObject() const { do { } while(0); do { } while(0); return get_.isUndefined() ? __null : &get_.toObject(); } JSObject * setterObject() const { do { } while(0); do { } while(0); return set_.isUndefined() ? __null : &set_.toObject(); } const Value & getterValue() const { do { } while(0); do { } while(0); return get_; } const Value & setterValue() const { do { } while(0); do { } while(0); return set_; } PropertyOp getter() const { return CastAsPropertyOp(get_.isUndefined() ? __null : &get_.toObject()); } StrictPropertyOp setter() const { return CastAsStrictPropertyOp(set_.isUndefined() ? __null : &set_.toObject()); } bool checkGetter(JSContext *cx); bool checkSetter(JSContext *cx); bool unwrapDebuggerObjectsInto(JSContext *cx, Debugger *dbg, JSObject *obj, PropDesc *unwrapped) const; bool wrapInto(JSContext *cx, JSObject *obj, const jsid &id, jsid *wrappedId, PropDesc *wrappedDesc) const; class AutoRooter : private AutoGCRooter { public: explicit AutoRooter(JSContext *cx, PropDesc *pd_ ) : AutoGCRooter(cx, PROPDESC), pd(pd_), skip(cx, pd_) { do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); private: PropDesc *pd; SkipRoot skip; }; }; class DenseElementsHeader; class SparseElementsHeader; class Uint8ElementsHeader; class Int8ElementsHeader; class Uint16ElementsHeader; class Int16ElementsHeader; class Uint32ElementsHeader; class Int32ElementsHeader; class Uint8ClampedElementsHeader; class Float32ElementsHeader; class Float64ElementsHeader; class Uint8ClampedElementsHeader; class ArrayBufferElementsHeader; enum ElementsKind { DenseElements, SparseElements, ArrayBufferElements, Uint8Elements, Int8Elements, Uint16Elements, Int16Elements, Uint32Elements, Int32Elements, Uint8ClampedElements, Float32Elements, Float64Elements }; class ElementsHeader { protected: uint32_t type; uint32_t length; union { class { friend class DenseElementsHeader; uint32_t initializedLength; uint32_t capacity; } dense; class { friend class SparseElementsHeader; Shape * shape; } sparse; }; void staticAsserts() { typedef int moz_static_assert47 # 300 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(sizeof(ElementsHeader) == ValuesPerHeader * sizeof(Value)) ? 1 : -1] ; } public: ElementsKind kind() const { do { } while(0); return ElementsKind(type); } inline bool isDenseElements() const { return kind() == DenseElements; } inline bool isSparseElements() const { return kind() == SparseElements; } inline bool isArrayBufferElements() const { return kind() == ArrayBufferElements; } inline bool isUint8Elements() const { return kind() == Uint8Elements; } inline bool isInt8Elements() const { return kind() == Int8Elements; } inline bool isUint16Elements() const { return kind() == Uint16Elements; } inline bool isInt16Elements() const { return kind() == Int16Elements; } inline bool isUint32Elements() const { return kind() == Uint32Elements; } inline bool isInt32Elements() const { return kind() == Int32Elements; } inline bool isUint8ClampedElements() const { return kind() == Uint8ClampedElements; } inline bool isFloat32Elements() const { return kind() == Float32Elements; } inline bool isFloat64Elements() const { return kind() == Float64Elements; } inline DenseElementsHeader & asDenseElements(); inline SparseElementsHeader & asSparseElements(); inline ArrayBufferElementsHeader & asArrayBufferElements(); inline Uint8ElementsHeader & asUint8Elements(); inline Int8ElementsHeader & asInt8Elements(); inline Uint16ElementsHeader & asUint16Elements(); inline Int16ElementsHeader & asInt16Elements(); inline Uint32ElementsHeader & asUint32Elements(); inline Int32ElementsHeader & asInt32Elements(); inline Uint8ClampedElementsHeader & asUint8ClampedElements(); inline Float32ElementsHeader & asFloat32Elements(); inline Float64ElementsHeader & asFloat64Elements(); static ElementsHeader * fromElements(HeapSlot *elems) { return reinterpret_cast(uintptr_t(elems) - sizeof(ElementsHeader)); } static const size_t ValuesPerHeader = 2; }; class DenseElementsHeader : public ElementsHeader { public: uint32_t capacity() const { do { } while(0); return dense.capacity; } uint32_t initializedLength() const { do { } while(0); return dense.initializedLength; } uint32_t length() const { do { } while(0); return ElementsHeader::length; } bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded); bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded); private: inline bool isDenseElements() const ; inline DenseElementsHeader & asDenseElements() ; DenseElementsHeader(const DenseElementsHeader &other) ; void operator=(const DenseElementsHeader &other) ; }; class SparseElementsHeader : public ElementsHeader { public: Shape * shape() { do { } while(0); return sparse.shape; } uint32_t length() const { do { } while(0); return ElementsHeader::length; } bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded); bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded); private: inline bool isSparseElements() const ; inline SparseElementsHeader & asSparseElements() ; SparseElementsHeader(const SparseElementsHeader &other) ; void operator=(const SparseElementsHeader &other) ; }; extern uint32_t ClampDoubleToUint8(const double x); struct uint8_clamped { uint8_t val; uint8_clamped() { } uint8_clamped(const uint8_clamped& other) : val(other.val) { } uint8_clamped(uint8_t x) { *this = x; } uint8_clamped(uint16_t x) { *this = x; } uint8_clamped(uint32_t x) { *this = x; } uint8_clamped(int8_t x) { *this = x; } uint8_clamped(int16_t x) { *this = x; } uint8_clamped(int32_t x) { *this = x; } uint8_clamped(double x) { *this = x; } uint8_clamped& operator=(const uint8_clamped& x) { val = x.val; return *this; } uint8_clamped& operator=(uint8_t x) { val = x; return *this; } uint8_clamped& operator=(uint16_t x) { val = (x > 255) ? 255 : uint8_t(x); return *this; } uint8_clamped& operator=(uint32_t x) { val = (x > 255) ? 255 : uint8_t(x); return *this; } uint8_clamped& operator=(int8_t x) { val = (x >= 0) ? uint8_t(x) : 0; return *this; } uint8_clamped& operator=(int16_t x) { val = (x >= 0) ? ((x < 255) ? uint8_t(x) : 255) : 0; return *this; } uint8_clamped& operator=(int32_t x) { val = (x >= 0) ? ((x < 255) ? uint8_t(x) : 255) : 0; return *this; } uint8_clamped& operator=(const double x) { val = uint8_t(ClampDoubleToUint8(x)); return *this; } operator uint8_t() const { return val; } void staticAsserts() { typedef int moz_static_assert48 # 477 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(sizeof(uint8_clamped) == 1) ? 1 : -1] ; } }; template static inline const bool TypeIsFloatingPoint() { return false; } template<> inline const bool TypeIsFloatingPoint() { return true; } template<> inline const bool TypeIsFloatingPoint() { return true; } template static inline const bool TypeIsUnsigned() { return false; } template<> inline const bool TypeIsUnsigned() { return true; } template<> inline const bool TypeIsUnsigned() { return true; } template<> inline const bool TypeIsUnsigned() { return true; } template class TypedElementsHeader : public ElementsHeader { T getElement(uint32_t index) { do { } while(0); return reinterpret_cast(this + 1)[index]; } inline void assign(uint32_t index, double d); void setElement(uint32_t index, T value) { do { } while(0); reinterpret_cast(this + 1)[index] = value; } public: uint32_t length() const { do { } while(0); do { } while(0); return ElementsHeader::length; } bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded); bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded); private: TypedElementsHeader(const TypedElementsHeader &other) ; void operator=(const TypedElementsHeader &other) ; }; template inline void TypedElementsHeader::assign(uint32_t index, double d) { __builtin_unreachable(); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { double i = ToInteger(d); uint8_t u = (i <= 0) ? 0 : (i >= 255) ? 255 : uint8_t(i); setElement(index, uint8_clamped(u)); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, uint8_t(ToUint32(d))); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, int8_t(ToInt32(d))); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, uint16_t(ToUint32(d))); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, int16_t(ToInt32(d))); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, ToUint32(d)); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, int32_t(ToInt32(d))); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, float(d)); } template<> inline void TypedElementsHeader::assign(uint32_t index, double d) { setElement(index, d); } class Uint8ElementsHeader : public TypedElementsHeader { private: inline bool isUint8Elements() const ; inline Uint8ElementsHeader & asUint8Elements() ; Uint8ElementsHeader(const Uint8ElementsHeader &other) ; void operator=(const Uint8ElementsHeader &other) ; }; class Int8ElementsHeader : public TypedElementsHeader { private: bool isInt8Elements() const ; Int8ElementsHeader & asInt8Elements() ; Int8ElementsHeader(const Int8ElementsHeader &other) ; void operator=(const Int8ElementsHeader &other) ; }; class Uint16ElementsHeader : public TypedElementsHeader { private: bool isUint16Elements() const ; Uint16ElementsHeader & asUint16Elements() ; Uint16ElementsHeader(const Uint16ElementsHeader &other) ; void operator=(const Uint16ElementsHeader &other) ; }; class Int16ElementsHeader : public TypedElementsHeader { private: bool isInt16Elements() const ; Int16ElementsHeader & asInt16Elements() ; Int16ElementsHeader(const Int16ElementsHeader &other) ; void operator=(const Int16ElementsHeader &other) ; }; class Uint32ElementsHeader : public TypedElementsHeader { private: bool isUint32Elements() const ; Uint32ElementsHeader & asUint32Elements() ; Uint32ElementsHeader(const Uint32ElementsHeader &other) ; void operator=(const Uint32ElementsHeader &other) ; }; class Int32ElementsHeader : public TypedElementsHeader { private: bool isInt32Elements() const ; Int32ElementsHeader & asInt32Elements() ; Int32ElementsHeader(const Int32ElementsHeader &other) ; void operator=(const Int32ElementsHeader &other) ; }; class Float32ElementsHeader : public TypedElementsHeader { private: bool isFloat32Elements() const ; Float32ElementsHeader & asFloat32Elements() ; Float32ElementsHeader(const Float32ElementsHeader &other) ; void operator=(const Float32ElementsHeader &other) ; }; class Float64ElementsHeader : public TypedElementsHeader { private: bool isFloat64Elements() const ; Float64ElementsHeader & asFloat64Elements() ; Float64ElementsHeader(const Float64ElementsHeader &other) ; void operator=(const Float64ElementsHeader &other) ; }; class Uint8ClampedElementsHeader : public TypedElementsHeader { private: inline bool isUint8Clamped() const ; inline Uint8ClampedElementsHeader & asUint8ClampedElements() ; Uint8ClampedElementsHeader(const Uint8ClampedElementsHeader &other) ; void operator=(const Uint8ClampedElementsHeader &other) ; }; class ArrayBufferElementsHeader : public ElementsHeader { public: bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded); bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded); private: inline bool isArrayBufferElements() const ; inline ArrayBufferElementsHeader & asArrayBufferElements() ; ArrayBufferElementsHeader(const ArrayBufferElementsHeader &other) ; void operator=(const ArrayBufferElementsHeader &other) ; }; inline DenseElementsHeader & ElementsHeader::asDenseElements() { do { } while(0); return *static_cast(this); } inline SparseElementsHeader & ElementsHeader::asSparseElements() { do { } while(0); return *static_cast(this); } inline Uint8ElementsHeader & ElementsHeader::asUint8Elements() { do { } while(0); return *static_cast(this); } inline Int8ElementsHeader & ElementsHeader::asInt8Elements() { do { } while(0); return *static_cast(this); } inline Uint16ElementsHeader & ElementsHeader::asUint16Elements() { do { } while(0); return *static_cast(this); } inline Int16ElementsHeader & ElementsHeader::asInt16Elements() { do { } while(0); return *static_cast(this); } inline Uint32ElementsHeader & ElementsHeader::asUint32Elements() { do { } while(0); return *static_cast(this); } inline Int32ElementsHeader & ElementsHeader::asInt32Elements() { do { } while(0); return *static_cast(this); } inline Uint8ClampedElementsHeader & ElementsHeader::asUint8ClampedElements() { do { } while(0); return *static_cast(this); } inline Float32ElementsHeader & ElementsHeader::asFloat32Elements() { do { } while(0); return *static_cast(this); } inline Float64ElementsHeader & ElementsHeader::asFloat64Elements() { do { } while(0); return *static_cast(this); } inline ArrayBufferElementsHeader & ElementsHeader::asArrayBufferElements() { do { } while(0); return *static_cast(this); } class ArrayBufferObject; class ObjectElements { friend struct ::JSObject; friend class ObjectImpl; friend class ArrayBufferObject; uint32_t capacity; uint32_t initializedLength; uint32_t length; uint32_t unused; void staticAsserts() { typedef int moz_static_assert49 # 804 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(sizeof(ObjectElements) == VALUES_PER_HEADER * sizeof(Value)) ? 1 : -1] ; } public: ObjectElements(uint32_t capacity, uint32_t length) : capacity(capacity), initializedLength(0), length(length) {} HeapSlot *elements() { return (HeapSlot *)(uintptr_t(this) + sizeof(ObjectElements)); } static ObjectElements * fromElements(HeapSlot *elems) { return (ObjectElements *)(uintptr_t(elems) - sizeof(ObjectElements)); } static int offsetOfCapacity() { return (int)__builtin_offsetof (ObjectElements, capacity) - (int)sizeof(ObjectElements); } static int offsetOfInitializedLength() { return (int)__builtin_offsetof (ObjectElements, initializedLength) - (int)sizeof(ObjectElements); } static int offsetOfLength() { return (int)__builtin_offsetof (ObjectElements, length) - (int)sizeof(ObjectElements); } static const size_t VALUES_PER_HEADER = 2; }; extern HeapSlot *emptyObjectElements; struct Class; struct GCMarker; struct ObjectOps; struct Shape; class NewObjectCache; inline Value ObjectValue(ObjectImpl &obj); # 893 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" class ObjectImpl : public gc::Cell { protected: HeapPtrShape shape_; HeapPtrTypeObject type_; HeapSlot *slots; HeapSlot *elements; private: static void staticAsserts() { typedef int moz_static_assert50 # 914 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(sizeof(ObjectImpl) == sizeof(shadow::Object)) ? 1 : -1] ; typedef int moz_static_assert51 # 916 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(sizeof(ObjectImpl) % sizeof(Value) == 0) ? 1 : -1] ; typedef int moz_static_assert52 # 919 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(__builtin_offsetof (ObjectImpl, shape_) == __builtin_offsetof (shadow::Object, shape)) ? 1 : -1] ; typedef int moz_static_assert53 # 921 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(__builtin_offsetof (ObjectImpl, type_) == __builtin_offsetof (shadow::Object, type)) ? 1 : -1] ; typedef int moz_static_assert54 # 923 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(__builtin_offsetof (ObjectImpl, slots) == __builtin_offsetof (shadow::Object, slots)) ? 1 : -1] ; typedef int moz_static_assert55 # 925 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(__builtin_offsetof (ObjectImpl, elements) == __builtin_offsetof (shadow::Object, _1)) ? 1 : -1] ; } JSObject * asObjectPtr() { return reinterpret_cast(this); } friend inline Value ObjectValue(ObjectImpl &obj); public: JSObject * getProto() const { return type_->proto; } inline bool isExtensible() const; inline bool isDenseArray() const; inline bool isSlowArray() const; inline bool isArray() const; inline HeapSlotArray getDenseArrayElements(); inline const Value & getDenseArrayElement(uint32_t idx); inline uint32_t getDenseArrayInitializedLength(); bool makeElementsSparse(JSContext *cx) { __builtin_unreachable(); __builtin_unreachable(); return false; } protected: void checkShapeConsistency() { } private: inline void getSlotRangeUnchecked(uint32_t start, uint32_t length, HeapSlot **fixedStart, HeapSlot **fixedEnd, HeapSlot **slotsStart, HeapSlot **slotsEnd); inline void getSlotRange(uint32_t start, uint32_t length, HeapSlot **fixedStart, HeapSlot **fixedEnd, HeapSlot **slotsStart, HeapSlot **slotsEnd); protected: friend struct GCMarker; friend struct Shape; friend class NewObjectCache; inline bool hasContiguousSlots(uint32_t start, uint32_t count) const; inline void invalidateSlotRange(uint32_t start, uint32_t count); inline void initializeSlotRange(uint32_t start, uint32_t count); void initSlotRange(uint32_t start, const Value *vector, uint32_t length); void copySlotRange(uint32_t start, const Value *vector, uint32_t length); # 1016 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" static const uint32_t SLOT_CAPACITY_MIN = 8; HeapSlot *fixedSlots() const { return reinterpret_cast(uintptr_t(this) + sizeof(ObjectImpl)); } friend class ElementsHeader; friend class DenseElementsHeader; friend class SparseElementsHeader; enum DenseElementsResult { Failure, ConvertToSparse, Succeeded }; DenseElementsResult ensureDenseElementsInitialized(JSContext *cx, uint32_t index, uint32_t extra) { __builtin_unreachable(); __builtin_unreachable(); return Failure; } public: Shape * lastProperty() const { do { } while(0); return shape_; } inline bool isNative() const; types::TypeObject *type() const { do { } while(0); return type_; } uint32_t numFixedSlots() const { return reinterpret_cast(this)->numFixedSlots(); } bool hasSingletonType() const { return !!type_->singleton; } bool hasLazyType() const { return type_->lazy(); } inline uint32_t slotSpan() const; inline uint32_t numDynamicSlots() const; const Shape * nativeLookup(JSContext *cx, jsid id); inline Class *getClass() const; inline JSClass *getJSClass() const; inline bool hasClass(const Class *c) const; inline const ObjectOps *getOps() const; # 1100 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" inline bool isDelegate() const; inline bool inDictionaryMode() const; const Value &getSlot(uint32_t slot) const { do { } while(0); uint32_t fixed = numFixedSlots(); if (slot < fixed) return fixedSlots()[slot]; return slots[slot - fixed]; } HeapSlot *getSlotAddressUnchecked(uint32_t slot) { uint32_t fixed = numFixedSlots(); if (slot < fixed) return fixedSlots() + slot; return slots + (slot - fixed); } HeapSlot *getSlotAddress(uint32_t slot) { do { } while(0); return getSlotAddressUnchecked(slot); } HeapSlot &getSlotRef(uint32_t slot) { do { } while(0); return *getSlotAddress(slot); } inline HeapSlot &nativeGetSlotRef(uint32_t slot); inline const Value &nativeGetSlot(uint32_t slot) const; inline void setSlot(uint32_t slot, const Value &value); inline void initSlot(uint32_t slot, const Value &value); inline void initSlotUnchecked(uint32_t slot, const Value &value); HeapSlot &getFixedSlotRef(uint32_t slot) { do { } while(0); return fixedSlots()[slot]; } const Value &getFixedSlot(uint32_t slot) const { do { } while(0); return fixedSlots()[slot]; } inline void setFixedSlot(uint32_t slot, const Value &value); inline void initFixedSlot(uint32_t slot, const Value &value); static inline uint32_t dynamicSlotsCount(uint32_t nfixed, uint32_t span); inline size_t sizeOfThis() const; ObjectElements * getElementsHeader() const { return ObjectElements::fromElements(elements); } ElementsHeader & elementsHeader() const { __builtin_unreachable(); return *ElementsHeader::fromElements(elements); } inline HeapSlot *fixedElements() const { typedef int moz_static_assert56 # 1184 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" [(2 * sizeof(Value) == sizeof(ObjectElements)) ? 1 : -1] ; return &fixedSlots()[2]; } void setFixedElements() { this->elements = fixedElements(); } inline bool hasDynamicElements() const { return elements != emptyObjectElements && elements != fixedElements(); } static inline void readBarrier(ObjectImpl *obj); static inline void writeBarrierPre(ObjectImpl *obj); static inline void writeBarrierPost(ObjectImpl *obj, void *addr); inline void privateWriteBarrierPre(void **oldval); inline void privateWriteBarrierPost(void **oldval); void markChildren(JSTracer *trc); inline void *&privateRef(uint32_t nfixed) const; inline bool hasPrivate() const; inline void *getPrivate() const; inline void setPrivate(void *data); inline void setPrivateUnbarriered(void *data); inline void initPrivate(void *data); inline void *getPrivate(uint32_t nfixed) const; static size_t offsetOfShape() { return __builtin_offsetof (ObjectImpl, shape_); } HeapPtrShape *addressOfShape() { return &shape_; } static size_t offsetOfType() { return __builtin_offsetof (ObjectImpl, type_); } HeapPtrTypeObject *addressOfType() { return &type_; } static size_t offsetOfElements() { return __builtin_offsetof (ObjectImpl, elements); } static size_t offsetOfFixedElements() { return sizeof(ObjectImpl) + sizeof(ObjectElements); } static size_t getFixedSlotOffset(size_t slot) { return sizeof(ObjectImpl) + slot * sizeof(Value); } static size_t getPrivateDataOffset(size_t nfixed) { return getFixedSlotOffset(nfixed); } static size_t offsetOfSlots() { return __builtin_offsetof (ObjectImpl, slots); } }; inline Value ObjectValue(ObjectImpl &obj) { Value v; v.setObject(*obj.asObjectPtr()); return v; } bool GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); extern bool GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, Value *vp); extern bool DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded); extern bool SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded); extern bool HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found); } # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" #define String_h_ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 1 #define jsstr_h___ # 1 "/usr/include/ctype.h" 1 3 4 # 25 "/usr/include/ctype.h" 3 4 #define _CTYPE_H 1 extern "C" { # 45 "/usr/include/ctype.h" 3 4 #define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 81 "/usr/include/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) throw () __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) throw () __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) throw () __attribute__ ((__const)); #define __isctype_f(type) __extern_inline int is ##type (int __c) __THROW { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS ##type; } #define __isascii(c) (((c) & ~0x7f) == 0) #define __toascii(c) ((c) & 0x7f) #define __exctype(name) extern int name (int) __THROW extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); extern int tolower (int __c) throw (); extern int toupper (int __c) throw (); extern int isblank (int) throw (); extern int isctype (int __c, int __mask) throw (); extern int isascii (int __c) throw (); extern int toascii (int __c) throw (); extern int _toupper (int) throw (); extern int _tolower (int) throw (); #define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; })) # 263 "/usr/include/ctype.h" 3 4 #define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) #define __exctype_l(name) extern int name (int, __locale_t) __THROW extern int isalnum_l (int, __locale_t) throw (); extern int isalpha_l (int, __locale_t) throw (); extern int iscntrl_l (int, __locale_t) throw (); extern int isdigit_l (int, __locale_t) throw (); extern int islower_l (int, __locale_t) throw (); extern int isgraph_l (int, __locale_t) throw (); extern int isprint_l (int, __locale_t) throw (); extern int ispunct_l (int, __locale_t) throw (); extern int isspace_l (int, __locale_t) throw (); extern int isupper_l (int, __locale_t) throw (); extern int isxdigit_l (int, __locale_t) throw (); extern int isblank_l (int, __locale_t) throw (); extern int __tolower_l (int __c, __locale_t __l) throw (); extern int tolower_l (int __c, __locale_t __l) throw (); extern int __toupper_l (int __c, __locale_t __l) throw (); extern int toupper_l (int __c, __locale_t __l) throw (); # 349 "/usr/include/ctype.h" 3 4 } # 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" 1 #define Unicode_h__ # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" extern const bool js_isidstart[]; extern const bool js_isident[]; extern const bool js_isspace[]; namespace js { namespace unicode { # 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" struct CharFlag { enum temp { SPACE = 1 << 0, LETTER = 1 << 1, IDENTIFIER_PART = 1 << 2, NO_DELTA = 1 << 3, ENCLOSING_MARK = 1 << 4, COMBINING_SPACING_MARK = 1 << 5 }; }; const jschar BYTE_ORDER_MARK2 = 0xFFFE; const jschar NO_BREAK_SPACE = 0x00A0; class CharacterInfo { # 103 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" public: uint16_t upperCase; uint16_t lowerCase; uint8_t flags; inline bool isSpace() const { return flags & CharFlag::SPACE; } inline bool isLetter() const { return flags & CharFlag::LETTER; } inline bool isIdentifierPart() const { return flags & (CharFlag::IDENTIFIER_PART | CharFlag::LETTER); } inline bool isEnclosingMark() const { return flags & CharFlag::ENCLOSING_MARK; } inline bool isCombiningSpacingMark() const { return flags & CharFlag::COMBINING_SPACING_MARK; } }; extern const uint8_t index1[]; extern const uint8_t index2[]; extern const CharacterInfo js_charinfo[]; inline const CharacterInfo& CharInfo(jschar code) { size_t index = index1[code >> 6]; index = index2[(index << 6) + (code & 0x3f)]; return js_charinfo[index]; } inline bool IsIdentifierStart(jschar ch) { # 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" if (ch < 128) return js_isidstart[ch]; return CharInfo(ch).isLetter(); } inline bool IsIdentifierPart(jschar ch) { if (ch < 128) return js_isident[ch]; return CharInfo(ch).isIdentifierPart(); } inline bool IsLetter(jschar ch) { return CharInfo(ch).isLetter(); } inline bool IsSpace(jschar ch) { # 192 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" if (ch < 128) return js_isspace[ch]; if (ch == NO_BREAK_SPACE) return true; return CharInfo(ch).isSpace(); } inline bool IsSpaceOrBOM2(jschar ch) { if (ch < 128) return js_isspace[ch]; if (ch == NO_BREAK_SPACE || ch == BYTE_ORDER_MARK2) return true; return CharInfo(ch).isSpace(); } inline jschar ToUpperCase(jschar ch) { const CharacterInfo &info = CharInfo(ch); if (info.flags & CharFlag::NO_DELTA) return info.upperCase; return uint16_t(ch) + info.upperCase; } inline jschar ToLowerCase(jschar ch) { const CharacterInfo &info = CharInfo(ch); if (info.flags & CharFlag::NO_DELTA) return info.lowerCase; return uint16_t(ch) + info.lowerCase; } inline bool IsXMLSpace(jschar ch) { return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; } inline bool IsXMLNamespaceStart(jschar ch) { if (ch == '_') return true; return CharInfo(ch).isCombiningSpacingMark() || IsIdentifierStart(ch); } inline bool IsXMLNamespacePart(jschar ch) { if (ch == '.' || ch == '-' || ch == '_') return true; return CharInfo(ch).isEnclosingMark() || IsIdentifierPart(ch); } inline bool IsXMLNameStart(jschar ch) { if (ch == '_' || ch == ':') return true; return CharInfo(ch).isCombiningSpacingMark() || IsIdentifierStart(ch); } inline bool IsXMLNamePart(jschar ch) { if (ch == '.' || ch == '-' || ch == '_' || ch == ':') return true; return CharInfo(ch).isEnclosingMark() || IsIdentifierPart(ch); } } } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 2 namespace js { class StringBuffer; # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" class StringSegmentRange; class MutatingRopeSegmentRange; class RopeBuilder; } extern JSString * js_ConcatStrings(JSContext *cx, js::HandleString s1, js::HandleString s2); extern JSString * js_toLowerCase(JSContext *cx, JSString *str); extern JSString * js_toUpperCase(JSContext *cx, JSString *str); struct JSSubString { size_t length; const jschar *chars; }; extern jschar js_empty_ucstr[]; extern JSSubString js_EmptySubString; #define JS7_ISDEC(c) ((((unsigned)(c)) - '0') <= 9) #define JS7_UNDEC(c) ((c) - '0') #define JS7_ISHEX(c) ((c) < 128 && isxdigit(c)) #define JS7_UNHEX(c) (unsigned)(JS7_ISDEC(c) ? (c) - '0' : 10 + tolower(c) - 'a') #define JS7_ISLET(c) ((c) < 128 && isalpha(c)) extern JSObject * js_InitStringClass(JSContext *cx, JSObject *obj); extern const char js_escape_str[]; extern const char js_unescape_str[]; extern const char js_uneval_str[]; extern const char js_decodeURI_str[]; extern const char js_encodeURI_str[]; extern const char js_decodeURIComponent_str[]; extern const char js_encodeURIComponent_str[]; extern JSFixedString * js_NewString(JSContext *cx, jschar *chars, size_t length); extern JSLinearString * js_NewDependentString(JSContext *cx, JSString *base, size_t start, size_t length); extern JSFixedString * js_NewStringCopyN(JSContext *cx, const jschar *s, size_t n); extern JSFixedString * js_NewStringCopyN(JSContext *cx, const char *s, size_t n); extern JSFixedString * js_NewStringCopyZ(JSContext *cx, const jschar *s); extern JSFixedString * js_NewStringCopyZ(JSContext *cx, const char *s); extern const char * js_ValueToPrintable(JSContext *cx, const js::Value &, JSAutoByteString *bytes, bool asSource = false); namespace js { extern JSString * ToStringSlow(JSContext *cx, const Value &v); static __attribute__((always_inline)) inline JSString * ToString(JSContext *cx, const js::Value &v) { if (v.isString()) return v.toString(); return ToStringSlow(cx, v); } inline bool ValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb); } extern __attribute__((visibility("default"))) JSString * js_ValueToSource(JSContext *cx, const js::Value &v); namespace js { extern bool EqualStrings(JSContext *cx, JSString *str1, JSString *str2, bool *result); extern bool EqualStrings(JSContext *cx, JSLinearString *str1, JSLinearString *str2, bool *result) ; extern bool EqualStrings(JSLinearString *str1, JSLinearString *str2); extern bool CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32_t *result); extern bool StringEqualsAscii(JSLinearString *str, const char *asciiBytes); } extern size_t js_strlen(const jschar *s); extern jschar * js_strchr(const jschar *s, jschar c); extern jschar * js_strchr_limit(const jschar *s, jschar c, const jschar *limit); static __attribute__((always_inline)) inline void js_strncpy(jschar *dst, const jschar *src, size_t nelem) { return js::PodCopy(dst, src, nelem); } namespace js { extern jschar * InflateString(JSContext *cx, const char *bytes, size_t *length, FlationCoding fc = NormalEncoding); extern char * DeflateString(JSContext *cx, const jschar *chars, size_t length); # 216 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" extern bool InflateStringToBuffer(JSContext *cx, const char *bytes, size_t length, jschar *chars, size_t *charsLength); extern bool InflateUTF8StringToBuffer(JSContext *cx, const char *bytes, size_t length, jschar *chars, size_t *charsLength, FlationCoding fc = NormalEncoding); extern size_t GetDeflatedStringLength(JSContext *cx, const jschar *chars, size_t charsLength); extern size_t GetDeflatedUTF8StringLength(JSContext *cx, const jschar *chars, size_t charsLength, FlationCoding fc = NormalEncoding); extern bool DeflateStringToBuffer(JSContext *cx, const jschar *chars, size_t charsLength, char *bytes, size_t *length); extern bool DeflateStringToUTF8Buffer(JSContext *cx, const jschar *chars, size_t charsLength, char *bytes, size_t *length, FlationCoding fc = NormalEncoding); extern JSBool str_replace(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool str_fromCharCode(JSContext *cx, unsigned argc, Value *vp); } extern JSBool js_str_toString(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool js_str_charAt(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool js_str_charCodeAt(JSContext *cx, unsigned argc, js::Value *vp); extern int js_OneUcs4ToUtf8Char(uint8_t *utf8Buffer, uint32_t ucs4Char); namespace js { extern size_t PutEscapedStringImpl(char *buffer, size_t size, FILE *fp, JSLinearString *str, uint32_t quote); # 295 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" inline size_t PutEscapedString(char *buffer, size_t size, JSLinearString *str, uint32_t quote) { size_t n = PutEscapedStringImpl(buffer, size, __null, str, quote); do { } while(0); return n; } inline bool FileEscapedString(FILE *fp, JSLinearString *str, uint32_t quote) { return PutEscapedStringImpl(__null, 0, fp, str, quote) != size_t(-1); } JSBool str_match(JSContext *cx, unsigned argc, Value *vp); JSBool str_search(JSContext *cx, unsigned argc, Value *vp); JSBool str_split(JSContext *cx, unsigned argc, Value *vp); } extern JSBool js_String(JSContext *cx, unsigned argc, js::Value *vp); # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 2 class JSString; class JSDependentString; class JSUndependedString; class JSExtensibleString; class JSExternalString; class JSLinearString; class JSFixedString; class JSRope; class JSAtom; namespace js { class StaticStrings; class PropertyName; static const size_t UINT32_CHAR_BUFFER_LENGTH = sizeof("4294967295") - 1; } # 131 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" class JSString : public js::gc::Cell { protected: static const size_t NUM_INLINE_CHARS = 2 * sizeof(void *) / sizeof(jschar); struct Data { size_t lengthAndFlags; union { const jschar *chars; JSString *left; } u1; union { jschar inlineStorage[NUM_INLINE_CHARS]; struct { union { JSLinearString *base; JSString *right; size_t capacity; const JSStringFinalizer *externalFinalizer; } u2; union { JSString *parent; size_t reserved; } u3; } s; }; } d; public: # 200 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" static const size_t LENGTH_SHIFT = 4; static const size_t FLAGS_MASK = (((uint32_t)1 << (LENGTH_SHIFT)) - 1); static const size_t ROPE_BIT = ((uint32_t)1 << (0)); static const size_t DEPENDENT_FLAGS = ((uint32_t)1 << (1)); static const size_t EXTENSIBLE_FLAGS = ((uint32_t)1 << (2)); static const size_t FIXED_FLAGS = ((uint32_t)1 << (1)) | ((uint32_t)1 << (2)); static const size_t UNDEPENDED_FLAGS = ((uint32_t)1 << (1)) | ((uint32_t)1 << (3)); static const size_t ATOM_MASK = (((uint32_t)1 << (3)) - 1); static const size_t NON_STATIC_ATOM_FLAGS = ((uint32_t)1 << (3)); static const size_t MAX_LENGTH = ((uint32_t)1 << (32 - LENGTH_SHIFT)) - 1; size_t buildLengthAndFlags(size_t length, size_t flags) { do { } while(0); do { } while(0); return (length << LENGTH_SHIFT) | flags; } static inline bool validateLength(JSContext *cx, size_t length); static void staticAsserts() { typedef int moz_static_assert57[((8 * 4) >= 32) ? 1 : -1]; typedef int moz_static_assert58 # 230 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" [(((JSString::MAX_LENGTH << JSString::LENGTH_SHIFT) >> JSString::LENGTH_SHIFT) == JSString::MAX_LENGTH) ? 1 : -1] ; typedef int moz_static_assert59 # 232 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" [(sizeof(JSString) == __builtin_offsetof (JSString, d.inlineStorage) + NUM_INLINE_CHARS * sizeof(jschar)) ? 1 : -1] ; typedef int moz_static_assert60 # 234 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" [(__builtin_offsetof (JSString, d.u1.chars) == __builtin_offsetof (js::shadow::Atom, chars)) ? 1 : -1] ; } friend class JSRope; public: __attribute__((always_inline)) inline size_t length() const { return d.lengthAndFlags >> LENGTH_SHIFT; } __attribute__((always_inline)) inline bool empty() const { return d.lengthAndFlags <= FLAGS_MASK; } inline const jschar *getChars(JSContext *cx); inline const jschar *getCharsZ(JSContext *cx); inline JSLinearString *ensureLinear(JSContext *cx); inline JSFlatString *ensureFlat(JSContext *cx); inline JSFixedString *ensureFixed(JSContext *cx); __attribute__((always_inline)) inline bool isRope() const { bool rope = d.lengthAndFlags & ROPE_BIT; do { } while (0); return rope; } __attribute__((always_inline)) inline JSRope &asRope() const { do { } while(0); return *(JSRope *)this; } __attribute__((always_inline)) inline bool isLinear() const { return !(d.lengthAndFlags & ROPE_BIT); } __attribute__((always_inline)) inline JSLinearString &asLinear() const { do { } while(0); return *(JSLinearString *)this; } __attribute__((always_inline)) inline bool isDependent() const { return (d.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS; } __attribute__((always_inline)) inline JSDependentString &asDependent() const { do { } while(0); return *(JSDependentString *)this; } __attribute__((always_inline)) inline bool isFlat() const { return isLinear() && !isDependent(); } __attribute__((always_inline)) inline JSFlatString &asFlat() const { do { } while(0); return *(JSFlatString *)this; } __attribute__((always_inline)) inline bool isExtensible() const { return (d.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS; } __attribute__((always_inline)) inline JSExtensibleString &asExtensible() const { do { } while(0); return *(JSExtensibleString *)this; } bool isShort() const; bool isFixed() const; bool isInline() const; __attribute__((always_inline)) inline JSFixedString &asFixed() const { do { } while(0); return *(JSFixedString *)this; } bool isExternal() const; __attribute__((always_inline)) inline JSExternalString &asExternal() const { do { } while(0); return *(JSExternalString *)this; } __attribute__((always_inline)) inline bool isUndepended() const { return (d.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS; } __attribute__((always_inline)) inline bool isAtom() const { return !(d.lengthAndFlags & ATOM_MASK); } __attribute__((always_inline)) inline JSAtom &asAtom() const { do { } while(0); return *(JSAtom *)this; } inline bool hasBase() const { typedef int moz_static_assert61[((DEPENDENT_FLAGS | ((uint32_t)1 << (3))) == UNDEPENDED_FLAGS) ? 1 : -1]; return (d.lengthAndFlags & (((uint32_t)1 << (3)) - 1)) == DEPENDENT_FLAGS; } inline JSLinearString *base() const { do { } while(0); return d.s.u2.base; } inline void markBase(JSTracer *trc); inline void finalize(js::FreeOp *fop); size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf); static size_t offsetOfLengthAndFlags() { return __builtin_offsetof (JSString, d.lengthAndFlags); } static size_t offsetOfChars() { return __builtin_offsetof (JSString, d.u1.chars); } static inline void writeBarrierPre(JSString *str); static inline void writeBarrierPost(JSString *str, void *addr); static inline bool needWriteBarrierPre(JSCompartment *comp); static inline void readBarrier(JSString *str); static inline js::ThingRootKind rootKind() { return js::THING_ROOT_STRING; } private: JSString() ; JSString(const JSString &other) ; void operator=(const JSString &other) ; }; class JSRope : public JSString { enum UsingBarrier { WithIncrementalBarrier, NoBarrier }; template JSFlatString *flattenInternal(JSContext *cx); friend class JSString; JSFlatString *flatten(JSContext *cx); void init(JSString *left, JSString *right, size_t length); public: static inline JSRope *new_(JSContext *cx, js::HandleString left, js::HandleString right, size_t length); inline JSString *leftChild() const { do { } while(0); return d.u1.left; } inline JSString *rightChild() const { do { } while(0); return d.s.u2.right; } inline void markChildren(JSTracer *trc); }; typedef int moz_static_assert62[(sizeof(JSRope) == sizeof(JSString)) ? 1 : -1]; class JSLinearString : public JSString { friend class JSString; JSLinearString *ensureLinear(JSContext *cx) ; bool isLinear() const ; JSLinearString &asLinear() const ; public: __attribute__((always_inline)) inline const jschar *chars() const { do { } while(0); return d.u1.chars; } }; typedef int moz_static_assert63[(sizeof(JSLinearString) == sizeof(JSString)) ? 1 : -1]; class JSDependentString : public JSLinearString { friend class JSString; JSFixedString *undepend(JSContext *cx); void init(JSLinearString *base, const jschar *chars, size_t length); bool isDependent() const ; JSDependentString &asDependent() const ; public: static inline JSDependentString *new_(JSContext *cx, JSLinearString *base, const jschar *chars, size_t length); }; typedef int moz_static_assert64[(sizeof(JSDependentString) == sizeof(JSString)) ? 1 : -1]; class JSFlatString : public JSLinearString { JSFlatString *ensureFlat(JSContext *cx) ; bool isFlat() const ; JSFlatString &asFlat() const ; bool isIndexSlow(uint32_t *indexp) const; public: __attribute__((always_inline)) inline const jschar *charsZ() const { do { } while(0); return chars(); } inline bool isIndex(uint32_t *indexp) const { const jschar *s = chars(); return ((((unsigned)(*s)) - '0') <= 9) && isIndexSlow(indexp); } inline js::PropertyName *toPropertyName(JSContext *cx); inline void finalize(js::FreeOp *fop); }; typedef int moz_static_assert65[(sizeof(JSFlatString) == sizeof(JSString)) ? 1 : -1]; class JSExtensibleString : public JSFlatString { bool isExtensible() const ; JSExtensibleString &asExtensible() const ; public: __attribute__((always_inline)) inline size_t capacity() const { do { } while(0); return d.s.u2.capacity; } }; typedef int moz_static_assert66[(sizeof(JSExtensibleString) == sizeof(JSString)) ? 1 : -1]; class JSFixedString : public JSFlatString { void init(const jschar *chars, size_t length); JSFlatString *ensureFixed(JSContext *cx) ; bool isFixed() const ; JSFixedString &asFixed() const ; public: static inline JSFixedString *new_(JSContext *cx, const jschar *chars, size_t length); inline JSAtom *morphAtomizedStringIntoAtom(); }; typedef int moz_static_assert67[(sizeof(JSFixedString) == sizeof(JSString)) ? 1 : -1]; class JSInlineString : public JSFixedString { static const size_t MAX_INLINE_LENGTH = NUM_INLINE_CHARS - 1; public: static inline JSInlineString *new_(JSContext *cx); inline jschar *init(size_t length); inline void resetLength(size_t length); static bool lengthFits(size_t length) { return length <= MAX_INLINE_LENGTH; } }; typedef int moz_static_assert68[(sizeof(JSInlineString) == sizeof(JSString)) ? 1 : -1]; class JSShortString : public JSInlineString { static const size_t INLINE_EXTENSION_CHARS = sizeof(JSString::Data) / sizeof(jschar); static void staticAsserts() { typedef int moz_static_assert69[(INLINE_EXTENSION_CHARS % js::gc::Cell::CellSize == 0) ? 1 : -1]; typedef int moz_static_assert70 # 582 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" [(MAX_SHORT_LENGTH + 1 == (sizeof(JSShortString) - __builtin_offsetof (JSShortString, d.inlineStorage)) / sizeof(jschar)) ? 1 : -1] ; } jschar inlineStorageExtension[INLINE_EXTENSION_CHARS]; public: static inline JSShortString *new_(JSContext *cx); jschar *inlineStorageBeforeInit() { return d.inlineStorage; } inline void initAtOffsetInBuffer(const jschar *chars, size_t length); static const size_t MAX_SHORT_LENGTH = JSString::NUM_INLINE_CHARS + INLINE_EXTENSION_CHARS -1 ; static bool lengthFits(size_t length) { return length <= MAX_SHORT_LENGTH; } __attribute__((always_inline)) inline void finalize(js::FreeOp *fop); }; typedef int moz_static_assert71[(sizeof(JSShortString) == 2 * sizeof(JSString)) ? 1 : -1]; class JSExternalString : public JSFixedString { void init(const jschar *chars, size_t length, const JSStringFinalizer *fin); bool isExternal() const ; JSExternalString &asExternal() const ; public: static inline JSExternalString *new_(JSContext *cx, const jschar *chars, size_t length, const JSStringFinalizer *fin); const JSStringFinalizer *externalFinalizer() const { do { } while(0); return d.s.u2.externalFinalizer; } inline void finalize(js::FreeOp *fop); }; typedef int moz_static_assert72[(sizeof(JSExternalString) == sizeof(JSString)) ? 1 : -1]; class JSUndependedString : public JSFixedString { }; typedef int moz_static_assert73[(sizeof(JSUndependedString) == sizeof(JSString)) ? 1 : -1]; class JSAtom : public JSFixedString { bool isAtom() const ; JSAtom &asAtom() const ; public: inline js::PropertyName *asPropertyName(); inline void finalize(js::FreeOp *fop); }; typedef int moz_static_assert74[(sizeof(JSAtom) == sizeof(JSString)) ? 1 : -1]; class JSInlineAtom : public JSInlineString { }; typedef int moz_static_assert75[(sizeof(JSInlineAtom) == sizeof(JSInlineString)) ? 1 : -1]; class JSShortAtom : public JSShortString { }; typedef int moz_static_assert76[(sizeof(JSShortAtom) == sizeof(JSShortString)) ? 1 : -1]; namespace js { class StaticStrings { private: static const size_t SMALL_CHAR_LIMIT = 128U; static const size_t NUM_SMALL_CHARS = 64U; static const size_t INT_STATIC_LIMIT = 256U; JSAtom *length2StaticTable[NUM_SMALL_CHARS * NUM_SMALL_CHARS]; JSAtom *intStaticTable[INT_STATIC_LIMIT]; public: static const size_t UNIT_STATIC_LIMIT = 256U; JSAtom *unitStaticTable[UNIT_STATIC_LIMIT]; StaticStrings() { PodArrayZero(unitStaticTable); PodArrayZero(length2StaticTable); PodArrayZero(intStaticTable); } bool init(JSContext *cx); void trace(JSTracer *trc); static inline bool hasUint(uint32_t u); inline JSAtom *getUint(uint32_t u); static inline bool hasInt(int32_t i); inline JSAtom *getInt(int32_t i); static inline bool hasUnit(jschar c); JSAtom *getUnit(jschar c); inline JSLinearString *getUnitStringForElement(JSContext *cx, JSString *str, size_t index); static bool isStatic(JSAtom *atom); inline JSAtom *lookup(const jschar *chars, size_t length); private: typedef uint8_t SmallChar; static const SmallChar INVALID_SMALL_CHAR = -1; static inline bool fitsInSmallChar(jschar c); static const SmallChar toSmallChar[]; JSAtom *getLength2(jschar c1, jschar c2); JSAtom *getLength2(uint32_t u); }; # 759 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" class PropertyName : public JSAtom {}; typedef int moz_static_assert77[(sizeof(PropertyName) == sizeof(JSString)) ? 1 : -1]; static __attribute__((always_inline)) inline jsid NameToId(PropertyName *name) { return NON_INTEGER_ATOM_TO_JSID(name); } typedef HeapPtr HeapPtrAtom; } __attribute__((always_inline)) inline const jschar * JSString::getChars(JSContext *cx) { if (JSLinearString *str = ensureLinear(cx)) return str->chars(); return __null; } __attribute__((always_inline)) inline const jschar * JSString::getCharsZ(JSContext *cx) { if (JSFlatString *str = ensureFlat(cx)) return str->chars(); return __null; } __attribute__((always_inline)) inline JSLinearString * JSString::ensureLinear(JSContext *cx) { return isLinear() ? &asLinear() : asRope().flatten(cx); } __attribute__((always_inline)) inline JSFlatString * JSString::ensureFlat(JSContext *cx) { return isFlat() ? &asFlat() : isDependent() ? asDependent().undepend(cx) : asRope().flatten(cx); } __attribute__((always_inline)) inline JSFixedString * JSString::ensureFixed(JSContext *cx) { if (!ensureFlat(cx)) return __null; if (isExtensible()) d.lengthAndFlags = buildLengthAndFlags(length(), FIXED_FLAGS); return &asFixed(); } inline js::PropertyName * JSAtom::asPropertyName() { return static_cast(this); } # 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 namespace js { class AutoPropDescArrayRooter; class BaseProxyHandler; class CallObject; struct GCMarker; struct NativeIterator; namespace mjit { class Compiler; } inline JSObject * CastAsObject(PropertyOp op) { return (__extension__ (JSObject *) (size_t) (op)); } inline JSObject * CastAsObject(StrictPropertyOp op) { return (__extension__ (JSObject *) (size_t) (op)); } inline Value CastAsObjectJsval(PropertyOp op) { return ObjectOrNullValue(CastAsObject(op)); } inline Value CastAsObjectJsval(StrictPropertyOp op) { return ObjectOrNullValue(CastAsObject(op)); } #define JS_PSG(name,getter,flags) {name, 0, (flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS, (JSPropertyOp)getter, NULL} #define JS_PSGS(name,getter,setter,flags) {name, 0, (flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS, (JSPropertyOp)getter, (JSStrictPropertyOp)setter} #define JS_PS_END {0, 0, 0, 0, 0} typedef Vector PropDescArray; namespace baseops { extern __attribute__((visibility("default"))) JSBool LookupProperty(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, JSProperty **propp); inline bool LookupProperty(JSContext *cx, HandleObject obj, PropertyName *name, JSObject **objp, JSProperty **propp) { return LookupProperty(cx, obj, RootedId(cx, NameToId(name)), objp, propp); } extern __attribute__((visibility("default"))) JSBool LookupElement(JSContext *cx, HandleObject obj, uint32_t index, JSObject **objp, JSProperty **propp); extern JSBool DefineProperty(JSContext *cx, HandleObject obj, HandleId id, const js::Value *value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern JSBool DefineElement(JSContext *cx, HandleObject obj, uint32_t index, const js::Value *value, JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); extern JSBool GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, js::Value *vp); extern JSBool GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, js::Value *vp); inline JSBool GetProperty(JSContext *cx, HandleObject obj, HandleId id, js::Value *vp) { return GetProperty(cx, obj, obj, id, vp); } inline JSBool GetElement(JSContext *cx, HandleObject obj, uint32_t index, js::Value *vp) { return GetElement(cx, obj, obj, index, vp); } extern JSBool GetPropertyDefault(JSContext *cx, HandleObject obj, HandleId id, const Value &def, Value *vp); extern JSBool SetPropertyHelper(JSContext *cx, HandleObject obj, HandleId id, unsigned defineHow, Value *vp, JSBool strict); inline bool SetPropertyHelper(JSContext *cx, HandleObject obj, PropertyName *name, unsigned defineHow, Value *vp, JSBool strict) { return SetPropertyHelper(cx, obj, RootedId(cx, NameToId(name)), defineHow, vp, strict); } extern JSBool SetElementHelper(JSContext *cx, HandleObject obj, uint32_t index, unsigned defineHow, Value *vp, JSBool strict); extern JSType TypeOf(JSContext *cx, HandleObject obj); extern JSBool GetAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); extern JSBool SetAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); extern JSBool GetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); extern JSBool SetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); extern JSBool DeleteProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *rval, JSBool strict); extern JSBool DeleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); extern JSBool DeleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *rval, JSBool strict); extern JSBool DeleteGeneric(JSContext *cx, HandleObject obj, HandleId id, Value *rval, JSBool strict); } extern JSBool DefaultValue(JSContext *cx, HandleObject obj, JSType hint, Value *vp); extern Class ArrayClass; extern Class ArrayBufferClass; extern Class BlockClass; extern Class BooleanClass; extern Class CallableObjectClass; extern Class DataViewClass; extern Class DateClass; extern Class ErrorClass; extern Class ElementIteratorClass; extern Class GeneratorClass; extern Class IteratorClass; extern Class JSONClass; extern Class MathClass; extern Class NumberClass; extern Class NormalArgumentsObjectClass; extern Class ObjectClass; extern Class ProxyClass; extern Class RegExpClass; extern Class RegExpStaticsClass; extern Class SlowArrayClass; extern Class StopIterationClass; extern Class StringClass; extern Class StrictArgumentsObjectClass; extern Class WeakMapClass; extern Class WithClass; extern Class XMLFilterClass; class ArgumentsObject; class ArrayBufferObject; class BlockObject; class BooleanObject; class ClonedBlockObject; class DataViewObject; class DebugScopeObject; class DeclEnvObject; class ElementIteratorObject; class GlobalObject; class NestedScopeObject; class NewObjectCache; class NormalArgumentsObject; class NumberObject; class ScopeObject; class StaticBlockObject; class StrictArgumentsObject; class StringObject; class RegExpObject; class WithObject; } # 252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" struct JSObject : public js::ObjectImpl { private: friend struct js::Shape; friend struct js::GCMarker; friend class js::NewObjectCache; void makeLazyType(JSContext *cx); public: bool setLastProperty(JSContext *cx, const js::Shape *shape); inline void setLastPropertyInfallible(const js::Shape *shape); static inline JSObject *create(JSContext *cx, js::gc::AllocKind kind, js::HandleShape shape, js::HandleTypeObject type, js::HeapSlot *slots); static inline JSObject *createDenseArray(JSContext *cx, js::gc::AllocKind kind, js::HandleShape shape, js::HandleTypeObject type, uint32_t length); inline void removeLastProperty(JSContext *cx); inline bool canRemoveLastProperty(); bool setSlotSpan(JSContext *cx, uint32_t span); inline bool nativeContains(JSContext *cx, jsid id); inline bool nativeContains(JSContext *cx, const js::Shape &shape); static const uint32_t NELEMENTS_LIMIT = ((uint32_t)1 << (28)); public: inline bool setDelegate(JSContext *cx); inline bool isBoundFunction() const; inline bool isSystem() const; inline bool setSystem(JSContext *cx); inline bool hasSpecialEquality() const; inline bool watched() const; inline bool setWatched(JSContext *cx); inline bool isVarObj(); inline bool setVarObj(JSContext *cx); inline bool hasUncacheableProto() const; inline bool setUncacheableProto(JSContext *cx); bool generateOwnShape(JSContext *cx, js::Shape *newShape = __null) { return replaceWithNewEquivalentShape(cx, lastProperty(), newShape); } private: js::Shape *replaceWithNewEquivalentShape(JSContext *cx, js::Shape *existingShape, js::Shape *newShape = __null); enum GenerateShape { GENERATE_NONE, GENERATE_SHAPE }; bool setFlag(JSContext *cx, uint32_t flag, GenerateShape generateShape = GENERATE_NONE); public: inline bool nativeEmpty() const; bool shadowingShapeChange(JSContext *cx, const js::Shape &shape); inline bool isIndexed() const; inline uint32_t propertyCount() const; inline bool hasShapeTable() const; inline size_t computedSizeOfThisSlotsElements() const; inline void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *slotsSize, size_t *elementsSize, size_t *miscSize) const; static const uint32_t MAX_FIXED_SLOTS = 16; public: inline bool isFixedSlot(size_t slot); inline size_t dynamicSlotIndex(size_t slot); inline const js::HeapSlot *getRawSlots(); bool growSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount); void shrinkSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount); bool hasDynamicSlots() const { return slots != __null; } protected: inline bool updateSlotsForSpan(JSContext *cx, size_t oldSpan, size_t newSpan); public: inline void prepareSlotRangeForOverwrite(size_t start, size_t end); inline void prepareElementRangeForOverwrite(size_t start, size_t end); void rollbackProperties(JSContext *cx, uint32_t slotSpan); inline void nativeSetSlot(unsigned slot, const js::Value &value); inline void nativeSetSlotWithType(JSContext *cx, const js::Shape *shape, const js::Value &value); inline const js::Value &getReservedSlot(unsigned index) const; inline js::HeapSlot &getReservedSlotRef(unsigned index); inline void initReservedSlot(unsigned index, const js::Value &v); inline void setReservedSlot(unsigned index, const js::Value &v); inline bool setSingletonType(JSContext *cx); inline js::types::TypeObject *getType(JSContext *cx); const js::HeapPtr &typeFromGC() const { return type_; } inline void setType(js::types::TypeObject *newType); js::types::TypeObject *getNewType(JSContext *cx, JSFunction *fun = __null); # 443 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" inline bool setIteratedSingleton(JSContext *cx); bool setNewTypeUnknown(JSContext *cx); bool splicePrototype(JSContext *cx, JSObject *proto); bool shouldSplicePrototype(JSContext *cx); # 487 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" inline JSObject *getParent() const; static bool setParent(JSContext *cx, js::HandleObject obj, js::HandleObject newParent); inline JSObject *enclosingScope(); inline js::GlobalObject &global() const; inline JSPrincipals *principals(JSContext *cx); inline bool clearType(JSContext *cx); bool clearParent(JSContext *cx); private: enum ImmutabilityType { SEAL, FREEZE }; bool sealOrFreeze(JSContext *cx, ImmutabilityType it); bool isSealedOrFrozen(JSContext *cx, ImmutabilityType it, bool *resultp); static inline unsigned getSealedOrFrozenAttributes(unsigned attrs, ImmutabilityType it); public: bool preventExtensions(JSContext *cx); inline bool seal(JSContext *cx) { return sealOrFreeze(cx, SEAL); } bool freeze(JSContext *cx) { return sealOrFreeze(cx, FREEZE); } bool isSealed(JSContext *cx, bool *resultp) { return isSealedOrFrozen(cx, SEAL, resultp); } bool isFrozen(JSContext *cx, bool *resultp) { return isSealedOrFrozen(cx, FREEZE, resultp); } inline bool ensureElements(JSContext *cx, unsigned cap); bool growElements(JSContext *cx, unsigned cap); void shrinkElements(JSContext *cx, unsigned cap); inline js::ElementIteratorObject *asElementIterator(); bool allocateSlowArrayElements(JSContext *cx); inline uint32_t getArrayLength() const; inline void setArrayLength(JSContext *cx, uint32_t length); inline uint32_t getDenseArrayCapacity(); inline void setDenseArrayLength(uint32_t length); inline void setDenseArrayInitializedLength(uint32_t length); inline void ensureDenseArrayInitializedLength(JSContext *cx, unsigned index, unsigned extra); inline void setDenseArrayElement(unsigned idx, const js::Value &val); inline void initDenseArrayElement(unsigned idx, const js::Value &val); inline void setDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val); inline void initDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val); inline void copyDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count); inline void initDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count); inline void moveDenseArrayElements(unsigned dstStart, unsigned srcStart, unsigned count); inline void moveDenseArrayElementsUnbarriered(unsigned dstStart, unsigned srcStart, unsigned count); inline bool denseArrayHasInlineSlots() const; inline void markDenseArrayNotPacked(JSContext *cx); # 577 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" enum EnsureDenseResult { ED_OK, ED_FAILED, ED_SPARSE }; inline EnsureDenseResult ensureDenseArrayElements(JSContext *cx, unsigned index, unsigned extra); bool willBeSparseDenseArray(unsigned requiredCapacity, unsigned newElementsHint); static bool makeDenseArraySlow(JSContext *cx, js::HandleObject obj); bool arrayGetOwnDataElement(JSContext *cx, size_t i, js::Value *vp); public: static const uint32_t JSSLOT_DATE_UTC_TIME = 0; static const uint32_t JSSLOT_DATE_COMPONENTS_START = 1; static const uint32_t JSSLOT_DATE_LOCAL_TIME = 1; static const uint32_t JSSLOT_DATE_LOCAL_YEAR = 2; static const uint32_t JSSLOT_DATE_LOCAL_MONTH = 3; static const uint32_t JSSLOT_DATE_LOCAL_DATE = 4; static const uint32_t JSSLOT_DATE_LOCAL_DAY = 5; static const uint32_t JSSLOT_DATE_LOCAL_HOURS = 6; static const uint32_t JSSLOT_DATE_LOCAL_MINUTES = 7; static const uint32_t JSSLOT_DATE_LOCAL_SECONDS = 8; static const uint32_t DATE_CLASS_RESERVED_SLOTS = 9; inline const js::Value &getDateUTCTime() const; inline void setDateUTCTime(const js::Value &pthis); friend struct JSFunction; inline JSFunction *toFunction(); inline const JSFunction *toFunction() const; public: static const uint32_t ITER_CLASS_NFIXED_SLOTS = 1; inline js::NativeIterator *getNativeIterator() const; inline void setNativeIterator(js::NativeIterator *); # 653 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" private: static const uint32_t JSSLOT_NAME_PREFIX = 0; static const uint32_t JSSLOT_NAME_URI = 1; static const uint32_t JSSLOT_NAMESPACE_DECLARED = 2; static const uint32_t JSSLOT_QNAME_LOCAL_NAME = 2; public: static const uint32_t NAMESPACE_CLASS_RESERVED_SLOTS = 3; static const uint32_t QNAME_CLASS_RESERVED_SLOTS = 3; inline JSLinearString *getNamePrefix() const; inline jsval getNamePrefixVal() const; inline void setNamePrefix(JSLinearString *prefix); inline void clearNamePrefix(); inline JSLinearString *getNameURI() const; inline jsval getNameURIVal() const; inline void setNameURI(JSLinearString *uri); inline jsval getNamespaceDeclared() const; inline void setNamespaceDeclared(jsval decl); inline JSAtom *getQNameLocalName() const; inline jsval getQNameLocalNameVal() const; inline void setQNameLocalName(JSAtom *name); inline bool isCallable(); inline void finish(js::FreeOp *fop); __attribute__((always_inline)) inline void finalize(js::FreeOp *fop); inline bool hasProperty(JSContext *cx, js::HandleId id, bool *foundp, unsigned flags = 0); # 698 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" bool allocSlot(JSContext *cx, uint32_t *slotp); void freeSlot(JSContext *cx, uint32_t slot); public: static bool reportReadOnly(JSContext *cx, jsid id, unsigned report = 0x0); bool reportNotConfigurable(JSContext* cx, jsid id, unsigned report = 0x0); bool reportNotExtensible(JSContext *cx, unsigned report = 0x0); bool callMethod(JSContext *cx, js::HandleId id, unsigned argc, js::Value *argv, js::Value *vp); private: js::Shape *getChildProperty(JSContext *cx, js::Shape *parent, js::StackShape &child); protected: js::Shape *addPropertyInternal(JSContext *cx, jsid id, JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, unsigned attrs, unsigned flags, int shortid, js::Shape **spp, bool allowDictionary); private: bool toDictionaryMode(JSContext *cx); struct TradeGutsReserved; static bool ReserveForTradeGuts(JSContext *cx, JSObject *a, JSObject *b, TradeGutsReserved &reserved); static void TradeGuts(JSContext *cx, JSObject *a, JSObject *b, TradeGutsReserved &reserved); public: js::Shape *addProperty(JSContext *cx, jsid id, JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, unsigned attrs, unsigned flags, int shortid, bool allowDictionary = true); js::Shape *addDataProperty(JSContext *cx, jsid id, uint32_t slot, unsigned attrs) { do { } while(0); return addProperty(cx, id, __null, __null, slot, attrs, 0, 0); } js::Shape *putProperty(JSContext *cx, jsid id, JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, unsigned attrs, unsigned flags, int shortid); inline js::Shape * putProperty(JSContext *cx, js::PropertyName *name, JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, unsigned attrs, unsigned flags, int shortid) { return putProperty(cx, js::NameToId(name), getter, setter, slot, attrs, flags, shortid); } js::Shape *changeProperty(JSContext *cx, js::Shape *shape, unsigned attrs, unsigned mask, JSPropertyOp getter, JSStrictPropertyOp setter); inline bool changePropertyAttributes(JSContext *cx, js::Shape *shape, unsigned attrs); bool removeProperty(JSContext *cx, jsid id); void clear(JSContext *cx); inline JSBool lookupGeneric(JSContext *cx, js::HandleId id, JSObject **objp, JSProperty **propp); inline JSBool lookupProperty(JSContext *cx, js::PropertyName *name, JSObject **objp, JSProperty **propp); inline JSBool lookupElement(JSContext *cx, uint32_t index, JSObject **objp, JSProperty **propp); inline JSBool lookupSpecial(JSContext *cx, js::SpecialId sid, JSObject **objp, JSProperty **propp); inline JSBool defineGeneric(JSContext *cx, js::HandleId id, const js::Value &value, JSPropertyOp getter = JS_PropertyStub, JSStrictPropertyOp setter = JS_StrictPropertyStub, unsigned attrs = 0x01); inline JSBool defineProperty(JSContext *cx, js::PropertyName *name, const js::Value &value, JSPropertyOp getter = JS_PropertyStub, JSStrictPropertyOp setter = JS_StrictPropertyStub, unsigned attrs = 0x01); inline JSBool defineElement(JSContext *cx, uint32_t index, const js::Value &value, JSPropertyOp getter = JS_PropertyStub, JSStrictPropertyOp setter = JS_StrictPropertyStub, unsigned attrs = 0x01); inline JSBool defineSpecial(JSContext *cx, js::SpecialId sid, const js::Value &value, JSPropertyOp getter = JS_PropertyStub, JSStrictPropertyOp setter = JS_StrictPropertyStub, unsigned attrs = 0x01); inline JSBool getGeneric(JSContext *cx, js::HandleObject receiver, js::HandleId id, js::Value *vp); inline JSBool getProperty(JSContext *cx, js::HandleObject receiver, js::PropertyName *name, js::Value *vp); inline JSBool getElement(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp); inline JSBool getElementIfPresent(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp, bool *present); inline JSBool getSpecial(JSContext *cx, js::HandleObject receiver, js::SpecialId sid, js::Value *vp); inline JSBool getGeneric(JSContext *cx, js::HandleId id, js::Value *vp); inline JSBool getProperty(JSContext *cx, js::PropertyName *name, js::Value *vp); inline JSBool getElement(JSContext *cx, uint32_t index, js::Value *vp); inline JSBool getSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp); inline JSBool setGeneric(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict); inline JSBool setProperty(JSContext *cx, js::PropertyName *name, js::Value *vp, JSBool strict); inline JSBool setElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict); inline JSBool setSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp, JSBool strict); JSBool nonNativeSetProperty(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict); JSBool nonNativeSetElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict); inline JSBool getGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp); inline JSBool getPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp); inline JSBool getElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp); inline JSBool getSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp); inline JSBool setGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp); inline JSBool setPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp); inline JSBool setElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp); inline JSBool setSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp); inline bool deleteProperty(JSContext *cx, js::HandlePropertyName name, js::Value *rval, bool strict); inline bool deleteElement(JSContext *cx, uint32_t index, js::Value *rval, bool strict); inline bool deleteSpecial(JSContext *cx, js::HandleSpecialId sid, js::Value *rval, bool strict); bool deleteByValue(JSContext *cx, const js::Value &property, js::Value *rval, bool strict); inline bool enumerate(JSContext *cx, JSIterateOp iterop, js::Value *statep, jsid *idp); inline bool defaultValue(JSContext *cx, JSType hint, js::Value *vp); inline JSType typeOf(JSContext *cx); inline JSObject *thisObject(JSContext *cx); static bool thisObject(JSContext *cx, const js::Value &v, js::Value *vp); bool swap(JSContext *cx, JSObject *other); inline void initArrayClass(); # 881 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" inline bool isArguments() const; inline bool isArrayBuffer() const; inline bool isDataView() const; inline bool isDate() const; inline bool isElementIterator() const; inline bool isError() const; inline bool isFunction() const; inline bool isGenerator() const; inline bool isGlobal() const; inline bool isIterator() const; inline bool isObject() const; inline bool isPrimitive() const; inline bool isProxy() const; inline bool isRegExp() const; inline bool isRegExpStatics() const; inline bool isScope() const; inline bool isScript() const; inline bool isStopIteration() const; inline bool isTypedArray() const; inline bool isWeakMap() const; inline bool isNamespace() const; inline bool isQName() const; inline bool isXML() const; inline bool isXMLId() const; inline bool isBlock() const; inline bool isCall() const; inline bool isDeclEnv() const; inline bool isNestedScope() const; inline bool isWith() const; inline bool isClonedBlock() const; inline bool isStaticBlock() const; inline bool isBoolean() const; inline bool isNumber() const; inline bool isString() const; inline bool isNormalArguments() const; inline bool isStrictArguments() const; inline bool isDebugScope() const; inline bool isWrapper() const; inline bool isFunctionProxy() const; inline bool isCrossCompartmentWrapper() const; inline js::ArgumentsObject &asArguments(); inline js::ArrayBufferObject &asArrayBuffer(); inline const js::ArgumentsObject &asArguments() const; inline js::BlockObject &asBlock(); inline js::BooleanObject &asBoolean(); inline js::CallObject &asCall(); inline js::ClonedBlockObject &asClonedBlock(); inline js::DataViewObject &asDataView(); inline js::DeclEnvObject &asDeclEnv(); inline js::DebugScopeObject &asDebugScope(); inline js::GlobalObject &asGlobal(); inline js::NestedScopeObject &asNestedScope(); inline js::NormalArgumentsObject &asNormalArguments(); inline js::NumberObject &asNumber(); inline js::RegExpObject &asRegExp(); inline js::ScopeObject &asScope(); inline js::StrictArgumentsObject &asStrictArguments(); inline js::StaticBlockObject &asStaticBlock(); inline js::StringObject &asString(); inline js::WithObject &asWith(); static inline js::ThingRootKind rootKind() { return js::THING_ROOT_OBJECT; } private: static void staticAsserts() { typedef int moz_static_assert78 # 961 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" [(sizeof(JSObject) == sizeof(js::shadow::Object)) ? 1 : -1] ; typedef int moz_static_assert79 # 963 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" [(sizeof(JSObject) == sizeof(js::ObjectImpl)) ? 1 : -1] ; typedef int moz_static_assert80 # 965 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" [(sizeof(JSObject) % sizeof(js::Value) == 0) ? 1 : -1] ; } JSObject() ; JSObject(const JSObject &other) ; void operator=(const JSObject &other) ; }; static __attribute__((always_inline)) inline bool operator==(const JSObject &lhs, const JSObject &rhs) { return &lhs == &rhs; } static __attribute__((always_inline)) inline bool operator!=(const JSObject &lhs, const JSObject &rhs) { return &lhs != &rhs; } struct JSObject_Slots2 : JSObject { js::Value fslots[2]; }; struct JSObject_Slots4 : JSObject { js::Value fslots[4]; }; struct JSObject_Slots8 : JSObject { js::Value fslots[8]; }; struct JSObject_Slots12 : JSObject { js::Value fslots[12]; }; struct JSObject_Slots16 : JSObject { js::Value fslots[16]; }; #define JSSLOT_FREE(clasp) JSCLASS_RESERVED_SLOTS(clasp) class JSValueArray { public: jsval *array; size_t length; JSValueArray(jsval *v, size_t c) : array(v), length(c) {} }; class ValueArray { public: js::Value *array; size_t length; ValueArray(js::Value *v, size_t c) : array(v), length(c) {} }; extern bool js_EnterSharpObject(JSContext *cx, js::HandleObject obj, JSIdArray **idap, bool *alreadySeen, bool *isSharp); extern void js_LeaveSharpObject(JSContext *cx, JSIdArray **idap); extern void js_TraceSharpMap(JSTracer *trc, JSSharpObjectMap *map); extern JSBool js_HasOwnPropertyHelper(JSContext *cx, js::LookupGenericOp lookup, unsigned argc, js::Value *vp); extern JSBool js_HasOwnProperty(JSContext *cx, js::LookupGenericOp lookup, js::HandleObject obj, js::HandleId id, JSObject **objp, JSProperty **propp); extern JSBool js_PropertyIsEnumerable(JSContext *cx, js::HandleObject obj, js::HandleId id, js::Value *vp); extern JSPropertySpec object_props[]; extern JSFunctionSpec object_methods[]; extern JSFunctionSpec object_static_methods[]; namespace js { bool IsStandardClassResolved(JSObject *obj, js::Class *clasp); void MarkStandardClassInitializedNoProto(JSObject *obj, js::Class *clasp); } extern const char js_watch_str[]; extern const char js_unwatch_str[]; extern const char js_hasOwnProperty_str[]; extern const char js_isPrototypeOf_str[]; extern const char js_propertyIsEnumerable_str[]; extern const char js_defineGetter_str[]; extern const char js_defineSetter_str[]; extern const char js_lookupGetter_str[]; extern const char js_lookupSetter_str[]; extern JSBool js_PopulateObject(JSContext *cx, js::HandleObject newborn, JSObject *props); extern JSBool js_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key, JSObject **objp); extern JSProtoKey js_IdentifyClassPrototype(JSObject *obj); extern JSBool js_FindClassObject(JSContext *cx, JSObject *start, JSProtoKey key, js::Value *vp, js::Class *clasp = __null); extern JSObject * js_CreateThisForFunctionWithProto(JSContext *cx, js::HandleObject callee, JSObject *proto); extern JSObject * js_CreateThisForFunction(JSContext *cx, js::HandleObject callee, bool newType); extern JSObject * js_CreateThis(JSContext *cx, js::Class *clasp, JSObject *callee); extern js::Shape * js_AddNativeProperty(JSContext *cx, js::HandleObject obj, jsid id, JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, unsigned attrs, unsigned flags, int shortid); extern JSBool js_DefineOwnProperty(JSContext *cx, js::HandleObject obj, js::HandleId id, const js::Value &descriptor, JSBool *bp); namespace js { const unsigned DNP_CACHE_RESULT = 1; const unsigned DNP_DONT_PURGE = 2; const unsigned DNP_UNQUALIFIED = 4; const unsigned DNP_SKIP_TYPE = 8; extern const Shape * DefineNativeProperty(JSContext *cx, HandleObject obj, HandleId id, const Value &value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs, unsigned flags, int shortid, unsigned defineHow = 0); inline const Shape * DefineNativeProperty(JSContext *cx, HandleObject obj, PropertyName *name, const Value &value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs, unsigned flags, int shortid, unsigned defineHow = 0) { return DefineNativeProperty(cx, obj, RootedId(cx, NameToId(name)), value, getter, setter, attrs, flags, shortid, defineHow); } extern bool LookupPropertyWithFlags(JSContext *cx, HandleObject obj, HandleId id, unsigned flags, JSObject **objp, JSProperty **propp); inline bool LookupPropertyWithFlags(JSContext *cx, HandleObject obj, PropertyName *name, unsigned flags, JSObject **objp, JSProperty **propp) { return LookupPropertyWithFlags(cx, obj, RootedId(cx, NameToId(name)), flags, objp, propp); } # 1178 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" extern bool DefineProperty(JSContext *cx, js::HandleObject obj, js::HandleId id, const PropDesc &desc, bool throwError, bool *rval); extern bool ReadPropertyDescriptors(JSContext *cx, JSObject *props, bool checkAccessors, AutoIdVector *ids, AutoPropDescArrayRooter *descs); static const unsigned RESOLVE_INFER = 0xffff; extern bool FindPropertyHelper(JSContext *cx, HandlePropertyName name, bool cacheResult, HandleObject scopeChain, JSObject **objp, JSObject **pobjp, JSProperty **propp); extern bool FindProperty(JSContext *cx, HandlePropertyName name, HandleObject scopeChain, JSObject **objp, JSObject **pobjp, JSProperty **propp); extern JSObject * FindIdentifierBase(JSContext *cx, HandleObject scopeChain, HandlePropertyName name); } extern JSObject * js_FindVariableScope(JSContext *cx, JSFunction **funp); const unsigned JSGET_CACHE_RESULT = 1; extern JSBool js_NativeGet(JSContext *cx, JSObject *obj, JSObject *pobj, const js::Shape *shape, unsigned getHow, js::Value *vp); extern JSBool js_NativeSet(JSContext *cx, JSObject *obj, const js::Shape *shape, bool added, bool strict, js::Value *vp); namespace js { bool GetPropertyHelper(JSContext *cx, HandleObject obj, jsid id, uint32_t getHow, Value *vp); inline bool GetPropertyHelper(JSContext *cx, HandleObject obj, PropertyName *name, uint32_t getHow, Value *vp) { return GetPropertyHelper(cx, obj, NameToId(name), getHow, vp); } bool GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id, PropertyDescriptor *desc); bool GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id, Value *vp); bool NewPropertyDescriptorObject(JSContext *cx, const PropertyDescriptor *desc, Value *vp); extern JSBool GetMethod(JSContext *cx, HandleObject obj, HandleId id, unsigned getHow, Value *vp); inline bool GetMethod(JSContext *cx, HandleObject obj, PropertyName *name, unsigned getHow, Value *vp) { return GetMethod(cx, obj, RootedId(cx, NameToId(name)), getHow, vp); } extern bool HasDataProperty(JSContext *cx, HandleObject obj, jsid id, Value *vp); inline bool HasDataProperty(JSContext *cx, HandleObject obj, PropertyName *name, Value *vp) { return HasDataProperty(cx, obj, NameToId(name), vp); } extern JSBool CheckAccess(JSContext *cx, JSObject *obj, HandleId id, JSAccessMode mode, js::Value *vp, unsigned *attrsp); } extern bool js_IsDelegate(JSContext *cx, JSObject *obj, const js::Value &v); extern JSBool js_PrimitiveToObject(JSContext *cx, js::Value *vp); extern JSBool js_ValueToObjectOrNull(JSContext *cx, const js::Value &v, JSObject **objp); extern JSObject * js_ValueToNonNullObject(JSContext *cx, const js::Value &v); namespace js { extern JSObject * ToObjectSlow(JSContext *cx, Value *vp); __attribute__((always_inline)) inline JSObject * ToObject(JSContext *cx, Value *vp) { if (vp->isObject()) return &vp->toObject(); return ToObjectSlow(cx, vp); } inline JSObject * ValueToObject(JSContext *cx, const Value &v) { if (v.isObject()) return &v.toObject(); return js_ValueToNonNullObject(cx, v); } } extern void js_GetObjectSlotName(JSTracer *trc, char *buf, size_t bufsize); extern bool js_ClearNative(JSContext *cx, JSObject *obj); extern JSBool js_ReportGetterOnlyAssignment(JSContext *cx); extern unsigned js_InferFlags(JSContext *cx, unsigned defaultFlags); JSBool js_Object(JSContext *cx, unsigned argc, js::Value *vp); # 1354 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" extern __attribute__((visibility("default"))) JSBool js_GetClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, JSObject **protop, js::Class *clasp = __null); namespace js { extern bool SetProto(JSContext *cx, HandleObject obj, HandleObject proto, bool checkForCycles); extern JSString * obj_toStringHelper(JSContext *cx, JSObject *obj); extern JSBool eval(JSContext *cx, unsigned argc, Value *vp); extern bool DirectEval(JSContext *cx, const CallArgs &args); extern bool IsBuiltinEvalForScope(JSObject *scopeChain, const js::Value &v); extern bool IsAnyBuiltinEval(JSFunction *fun); extern JSPrincipals * PrincipalsForCompiledCode(const CallReceiver &call, JSContext *cx); extern JSObject * NonNullObject(JSContext *cx, const Value &v); extern const char * InformalValueTypeName(const Value &v); inline void DestroyIdArray(FreeOp *fop, JSIdArray *ida); extern bool GetFirstArgumentAsObject(JSContext *cx, unsigned argc, Value *vp, const char *method, JSObject **objp); extern bool Throw(JSContext *cx, jsid id, unsigned errorNumber); extern bool Throw(JSContext *cx, JSObject *obj, unsigned errorNumber); # 1424 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" extern bool CheckDefineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertytree.h" 1 #define jspropertytree_h___ namespace js { struct ShapeHasher { typedef js::Shape *Key; typedef js::StackShape Lookup; static inline HashNumber hash(const Lookup &l); static inline bool match(Key k, const Lookup &l); }; typedef HashSet KidsHash; class KidsPointer { private: enum { SHAPE = 0, HASH = 1, TAG = 1 }; uintptr_t w; public: bool isNull() const { return !w; } void setNull() { w = 0; } bool isShape() const { return (w & TAG) == SHAPE && !isNull(); } js::Shape *toShape() const { do { } while(0); return reinterpret_cast(w & ~uintptr_t(TAG)); } void setShape(js::Shape *shape) { do { } while(0); do { } while(0); w = reinterpret_cast(shape) | SHAPE; } bool isHash() const { return (w & TAG) == HASH; } KidsHash *toHash() const { do { } while(0); return reinterpret_cast(w & ~uintptr_t(TAG)); } void setHash(KidsHash *hash) { do { } while(0); do { } while(0); w = reinterpret_cast(hash) | HASH; } }; class PropertyTree { friend struct ::JSFunction; JSCompartment *compartment; bool insertChild(JSContext *cx, js::Shape *parent, js::Shape *child); PropertyTree(); public: enum { MAX_HEIGHT = 128 }; PropertyTree(JSCompartment *comp) : compartment(comp) { } js::Shape *newShape(JSContext *cx); js::Shape *getChild(JSContext *cx, Shape *parent, uint32_t nfixed, const StackShape &child); }; } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 # 98 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" namespace js { static const uint32_t SHAPE_INVALID_SLOT = ((uint32_t)1 << (24)) - 1; static const uint32_t SHAPE_MAXIMUM_SLOT = ((uint32_t)1 << (24)) - 2; struct ShapeTable { static const uint32_t HASH_BITS = tl::BitSize::result; static const uint32_t MIN_ENTRIES = 7; static const uint32_t MIN_SIZE_LOG2 = 4; static const uint32_t MIN_SIZE = ((uint32_t)1 << (MIN_SIZE_LOG2)); int hashShift; uint32_t entryCount; uint32_t removedCount; uint32_t freelist; js::Shape **entries; ShapeTable(uint32_t nentries) : hashShift(HASH_BITS - MIN_SIZE_LOG2), entryCount(nentries), removedCount(0), freelist(SHAPE_INVALID_SLOT) { } ~ShapeTable() { js::UnwantedForeground::free_(entries); } uint32_t capacity() const { return ((uint32_t)1 << (HASH_BITS - hashShift)); } static size_t sizeOfEntries(size_t cap) { return cap * sizeof(Shape *); } size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(this) + mallocSizeOf(entries); } bool needsToGrow() const { uint32_t size = capacity(); return entryCount + removedCount >= size - (size >> 2); } bool grow(JSContext *cx); bool init(JSRuntime *rt, js::Shape *lastProp); bool change(int log2Delta, JSContext *cx); js::Shape **search(jsid id, bool adding); }; } struct JSObject; namespace js { class PropertyTree; #define JSPROP_SHADOWABLE JSPROP_INDEX # 234 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" class UnownedBaseShape; class BaseShape : public js::gc::Cell { public: friend struct Shape; friend struct StackBaseShape; friend struct StackShape; enum Flag { OWNED_SHAPE = 0x1, HAS_GETTER_OBJECT = 0x2, HAS_SETTER_OBJECT = 0x4, EXTENSIBLE_PARENTS = 0x8, DELEGATE = 0x10, SYSTEM = 0x20, NOT_EXTENSIBLE = 0x40, INDEXED = 0x80, BOUND_FUNCTION = 0x100, VAROBJ = 0x200, WATCHED = 0x400, ITERATED_SINGLETON = 0x800, NEW_TYPE_UNKNOWN = 0x1000, UNCACHEABLE_PROTO = 0x2000, OBJECT_FLAG_MASK = 0x3ff8 }; private: Class *clasp; HeapPtrObject parent; uint32_t flags; uint32_t slotSpan_; union { js::PropertyOp rawGetter; JSObject *getterObj; }; union { js::StrictPropertyOp rawSetter; JSObject *setterObj; }; HeapPtr unowned_; ShapeTable *table_; BaseShape(const BaseShape &base) ; public: void finalize(FreeOp *fop); inline BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags); inline BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags, uint8_t attrs, PropertyOp rawGetter, StrictPropertyOp rawSetter); inline BaseShape(const StackBaseShape &base); ~BaseShape(); inline BaseShape &operator=(const BaseShape &other); bool isOwned() const { return !!(flags & OWNED_SHAPE); } inline bool matchesGetterSetter(PropertyOp rawGetter, StrictPropertyOp rawSetter) const; inline void adoptUnowned(UnownedBaseShape *other); inline void setOwned(UnownedBaseShape *unowned); JSObject *getObjectParent() const { return parent; } uint32_t getObjectFlags() const { return flags & OBJECT_FLAG_MASK; } bool hasGetterObject() const { return !!(flags & HAS_GETTER_OBJECT); } JSObject *getterObject() const { do { } while(0); return getterObj; } bool hasSetterObject() const { return !!(flags & HAS_SETTER_OBJECT); } JSObject *setterObject() const { do { } while(0); return setterObj; } bool hasTable() const { do { } while (0); return table_ != __null; } ShapeTable &table() const { do { } while(0); return *table_; } void setTable(ShapeTable *table) { do { } while(0); table_ = table; } uint32_t slotSpan() const { do { } while(0); return slotSpan_; } void setSlotSpan(uint32_t slotSpan) { do { } while(0); slotSpan_ = slotSpan; } static UnownedBaseShape *getUnowned(JSContext *cx, const StackBaseShape &base); inline UnownedBaseShape *unowned(); inline UnownedBaseShape *baseUnowned(); inline UnownedBaseShape *toUnowned(); inline void assertConsistency(); static inline size_t offsetOfClass() { return __builtin_offsetof (BaseShape, clasp); } static inline size_t offsetOfParent() { return __builtin_offsetof (BaseShape, parent); } static inline size_t offsetOfFlags() { return __builtin_offsetof (BaseShape, flags); } static inline void writeBarrierPre(BaseShape *shape); static inline void writeBarrierPost(BaseShape *shape, void *addr); static inline void readBarrier(BaseShape *shape); static inline ThingRootKind rootKind() { return THING_ROOT_BASE_SHAPE; } inline void markChildren(JSTracer *trc); private: static void staticAsserts() { typedef int moz_static_assert81[(__builtin_offsetof (BaseShape, clasp) == __builtin_offsetof (js::shadow::BaseShape, clasp)) ? 1 : -1]; } }; class UnownedBaseShape : public BaseShape {}; UnownedBaseShape * BaseShape::unowned() { return isOwned() ? baseUnowned() : toUnowned(); } UnownedBaseShape * BaseShape::toUnowned() { do { } while(0); return static_cast(this); } UnownedBaseShape * BaseShape::baseUnowned() { do { } while(0); return unowned_; } struct StackBaseShape { typedef const StackBaseShape *Lookup; uint32_t flags; Class *clasp; JSObject *parent; PropertyOp rawGetter; StrictPropertyOp rawSetter; StackBaseShape(BaseShape *base) : flags(base->flags & BaseShape::OBJECT_FLAG_MASK), clasp(base->clasp), parent(base->parent), rawGetter(__null), rawSetter(__null) {} StackBaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags) : flags(objectFlags), clasp(clasp), parent(parent), rawGetter(__null), rawSetter(__null) {} inline StackBaseShape(Shape *shape); inline void updateGetterSetter(uint8_t attrs, PropertyOp rawGetter, StrictPropertyOp rawSetter); static inline HashNumber hash(const StackBaseShape *lookup); static inline bool match(UnownedBaseShape *key, const StackBaseShape *lookup); class AutoRooter : private AutoGCRooter { public: explicit AutoRooter(JSContext *cx, const StackBaseShape *base_ ) : AutoGCRooter(cx, STACKBASESHAPE), base(base_), skip(cx, base_) { do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); private: const StackBaseShape *base; SkipRoot skip; }; }; typedef HashSet, StackBaseShape, SystemAllocPolicy> BaseShapeSet; struct Shape : public js::gc::Cell { friend struct ::JSObject; friend struct ::JSFunction; friend class js::Bindings; friend class js::ObjectImpl; friend class js::PropertyTree; friend class js::StaticBlockObject; friend struct js::StackShape; friend struct js::StackBaseShape; protected: HeapPtrBaseShape base_; HeapId propid_; enum SlotInfo { FIXED_SLOTS_MAX = 0x1f, FIXED_SLOTS_SHIFT = 27, FIXED_SLOTS_MASK = uint32_t(FIXED_SLOTS_MAX << FIXED_SLOTS_SHIFT), LINEAR_SEARCHES_MAX = 0x7, LINEAR_SEARCHES_SHIFT = 24, LINEAR_SEARCHES_MASK = LINEAR_SEARCHES_MAX << LINEAR_SEARCHES_SHIFT, SLOT_MASK = ((uint32_t)1 << (24)) - 1 } __attribute__((packed)); uint32_t slotInfo; uint8_t attrs; uint8_t flags; int16_t shortid_; HeapPtrShape parent; union { KidsPointer kids; HeapPtrShape *listp; }; static inline Shape *search(JSContext *cx, Shape *start, jsid id, Shape ***pspp, bool adding = false); inline void removeFromDictionary(JSObject *obj); inline void insertIntoDictionary(HeapPtrShape *dictp); inline void initDictionaryShape(const StackShape &child, uint32_t nfixed, HeapPtrShape *dictp); Shape *getChildBinding(JSContext *cx, const StackShape &child); static Shape *replaceLastProperty(JSContext *cx, const StackBaseShape &base, JSObject *proto, Shape *shape); bool hashify(JSContext *cx); void handoffTableTo(Shape *newShape); inline void setParent(js::Shape *p); bool ensureOwnBaseShape(JSContext *cx) { if (base()->isOwned()) return true; return makeOwnBaseShape(cx); } bool makeOwnBaseShape(JSContext *cx); public: bool hasTable() const { return base()->hasTable(); } js::ShapeTable &table() const { return base()->table(); } void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *propTableSize, size_t *kidsSize) const { *propTableSize = hasTable() ? table().sizeOfIncludingThis(mallocSizeOf) : 0; *kidsSize = !inDictionary() && kids.isHash() ? kids.toHash()->sizeOfIncludingThis(mallocSizeOf) : 0; } bool isNative() const { do { } while(0); return !(flags & NON_NATIVE); } const HeapPtrShape &previous() const { return parent; } class Range { protected: friend struct Shape; const Shape *cursor; public: Range(const Shape *shape) : cursor(shape) { } bool empty() const { return cursor->isEmptyShape(); } const Shape &front() const { do { } while(0); return *cursor; } void popFront() { do { } while(0); cursor = cursor->parent; } class AutoRooter : private AutoGCRooter { public: explicit AutoRooter(JSContext *cx, Range *r_ ) : AutoGCRooter(cx, SHAPERANGE), r(r_), skip(cx, r_) { do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); void trace(JSTracer *trc); private: Range *r; SkipRoot skip; }; }; Range all() const { return Range(this); } Class *getObjectClass() const { return base()->clasp; } JSObject *getObjectParent() const { return base()->parent; } static Shape *setObjectParent(JSContext *cx, JSObject *obj, JSObject *proto, Shape *last); static Shape *setObjectFlag(JSContext *cx, BaseShape::Flag flag, JSObject *proto, Shape *last); uint32_t getObjectFlags() const { return base()->getObjectFlags(); } bool hasObjectFlag(BaseShape::Flag flag) const { do { } while(0); return !!(base()->flags & flag); } protected: enum { NON_NATIVE = 0x01, IN_DICTIONARY = 0x02, UNUSED_BITS = 0x3C }; Shape(const StackShape &other, uint32_t nfixed); Shape(UnownedBaseShape *base, uint32_t nfixed); Shape(const Shape &other) ; bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; } public: enum { HAS_SHORTID = 0x40, PUBLIC_FLAGS = HAS_SHORTID }; bool inDictionary() const { return (flags & IN_DICTIONARY) != 0; } unsigned getFlags() const { return flags & PUBLIC_FLAGS; } bool hasShortID() const { return (flags & HAS_SHORTID) != 0; } PropertyOp getter() const { return base()->rawGetter; } bool hasDefaultGetter() const { return !base()->rawGetter; } PropertyOp getterOp() const { do { } while(0); return base()->rawGetter; } JSObject *getterObject() const { do { } while(0); return base()->getterObj; } Value getterValue() const { do { } while(0); return base()->getterObj ? js::ObjectValue(*base()->getterObj) : js::UndefinedValue(); } Value getterOrUndefined() const { return (hasGetterValue() && base()->getterObj) ? ObjectValue(*base()->getterObj) : UndefinedValue(); } StrictPropertyOp setter() const { return base()->rawSetter; } bool hasDefaultSetter() const { return !base()->rawSetter; } StrictPropertyOp setterOp() const { do { } while(0); return base()->rawSetter; } JSObject *setterObject() const { do { } while(0); return base()->setterObj; } Value setterValue() const { do { } while(0); return base()->setterObj ? js::ObjectValue(*base()->setterObj) : js::UndefinedValue(); } Value setterOrUndefined() const { return (hasSetterValue() && base()->setterObj) ? ObjectValue(*base()->setterObj) : UndefinedValue(); } void update(js::PropertyOp getter, js::StrictPropertyOp setter, uint8_t attrs); inline bool matches(const Shape *other) const; inline bool matches(const StackShape &other) const; inline bool matchesParamsAfterId(BaseShape *base, uint32_t aslot, unsigned aattrs, unsigned aflags, int ashortid) const; bool get(JSContext* cx, HandleObject receiver, JSObject *obj, JSObject *pobj, js::Value* vp) const; bool set(JSContext* cx, HandleObject obj, bool strict, js::Value* vp) const; BaseShape *base() const { return base_; } bool hasSlot() const { return (attrs & 0x40) == 0; } uint32_t slot() const { do { } while(0); return maybeSlot(); } uint32_t maybeSlot() const { return slotInfo & SLOT_MASK; } bool isEmptyShape() const { do { } while (0); return JSID_IS_EMPTY(propid_); } uint32_t slotSpan() const { do { } while(0); uint32_t free = (((getObjectClass())->flags >> 8) & (((uint32_t)1 << (8)) - 1)); return hasMissingSlot() ? free : Max(free, maybeSlot() + 1); } void setSlot(uint32_t slot) { do { } while(0); slotInfo = slotInfo & ~Shape::SLOT_MASK; slotInfo = slotInfo | slot; } uint32_t numFixedSlots() const { return (slotInfo >> FIXED_SLOTS_SHIFT); } void setNumFixedSlots(uint32_t nfixed) { do { } while(0); slotInfo = slotInfo & ~FIXED_SLOTS_MASK; slotInfo = slotInfo | (nfixed << FIXED_SLOTS_SHIFT); } uint32_t numLinearSearches() const { return (slotInfo & LINEAR_SEARCHES_MASK) >> LINEAR_SEARCHES_SHIFT; } void incrementNumLinearSearches() { uint32_t count = numLinearSearches(); do { } while(0); slotInfo = slotInfo & ~LINEAR_SEARCHES_MASK; slotInfo = slotInfo | ((count + 1) << LINEAR_SEARCHES_SHIFT); } const HeapId &propid() const { do { } while(0); do { } while(0); return propid_; } HeapId &propidRef() { do { } while(0); return propid_; } int16_t shortid() const { do { } while(0); return maybeShortid(); } int16_t maybeShortid() const { return shortid_; } inline bool getUserId(JSContext *cx, jsid *idp) const; uint8_t attributes() const { return attrs; } bool configurable() const { return (attrs & 0x04) == 0; } bool enumerable() const { return (attrs & 0x01) != 0; } bool writable() const { return (attrs & 0x02) == 0; } bool hasGetterValue() const { return attrs & 0x10; } bool hasSetterValue() const { return attrs & 0x20; } bool isDataDescriptor() const { return (attrs & (0x20 | 0x10)) == 0; } bool isAccessorDescriptor() const { return (attrs & (0x20 | 0x10)) != 0; } bool shadowable() const { do { } while (0); return hasSlot() || (attrs & 0x80); } # 837 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" static Shape *setExtensibleParents(JSContext *cx, Shape *shape); bool extensibleParents() const { return !!(base()->flags & BaseShape::EXTENSIBLE_PARENTS); } uint32_t entryCount() const { if (hasTable()) return table().entryCount; const js::Shape *shape = this; uint32_t count = 0; for (js::Shape::Range r = shape->all(); !r.empty(); r.popFront()) ++count; return count; } bool isBigEnoughForAShapeTable() const { do { } while(0); const js::Shape *shape = this; uint32_t count = 0; for (js::Shape::Range r = shape->all(); !r.empty(); r.popFront()) { ++count; if (count >= ShapeTable::MIN_ENTRIES) return true; } return false; } void finalize(FreeOp *fop); void removeChild(js::Shape *child); static inline void writeBarrierPre(const Shape *shape); static inline void writeBarrierPost(const Shape *shape, void *addr); static inline void readBarrier(const Shape *shape); static inline ThingRootKind rootKind() { return THING_ROOT_SHAPE; } inline void markChildren(JSTracer *trc); static inline size_t offsetOfBase() { return __builtin_offsetof (Shape, base_); } private: static void staticAsserts() { typedef int moz_static_assert82[(__builtin_offsetof (Shape, base_) == __builtin_offsetof (js::shadow::Shape, base)) ? 1 : -1]; typedef int moz_static_assert83[(__builtin_offsetof (Shape, slotInfo) == __builtin_offsetof (js::shadow::Shape, slotInfo)) ? 1 : -1]; typedef int moz_static_assert84[(FIXED_SLOTS_SHIFT == js::shadow::Shape::FIXED_SLOTS_SHIFT) ? 1 : -1]; } }; class AutoRooterGetterSetter { class Inner : private AutoGCRooter { public: Inner(JSContext *cx, uint8_t attrs, PropertyOp *pgetter_, StrictPropertyOp *psetter_) : AutoGCRooter(cx, GETTERSETTER), attrs(attrs), pgetter(pgetter_), psetter(psetter_), getterRoot(cx, pgetter_), setterRoot(cx, psetter_) {} friend void AutoGCRooter::trace(JSTracer *trc); private: uint8_t attrs; PropertyOp *pgetter; StrictPropertyOp *psetter; SkipRoot getterRoot, setterRoot; }; public: explicit AutoRooterGetterSetter(JSContext *cx, uint8_t attrs, PropertyOp *pgetter, StrictPropertyOp *psetter ) { if (attrs & (0x10 | 0x20)) inner.construct(cx, attrs, pgetter, psetter); do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); private: Maybe inner; }; struct EmptyShape : public js::Shape { EmptyShape(UnownedBaseShape *base, uint32_t nfixed); static Shape *getInitialShape(JSContext *cx, Class *clasp, JSObject *proto, JSObject *parent, gc::AllocKind kind, uint32_t objectFlags = 0); static void insertInitialShape(JSContext *cx, Shape *shape, JSObject *proto); }; struct InitialShapeEntry { ReadBarriered shape; JSObject *proto; struct Lookup { Class *clasp; JSObject *proto; JSObject *parent; uint32_t nfixed; uint32_t baseFlags; Lookup(Class *clasp, JSObject *proto, JSObject *parent, uint32_t nfixed, uint32_t baseFlags) : clasp(clasp), proto(proto), parent(parent), nfixed(nfixed), baseFlags(baseFlags) {} }; inline InitialShapeEntry(); inline InitialShapeEntry(const ReadBarriered &shape, JSObject *proto); inline Lookup getLookup(); static inline HashNumber hash(const Lookup &lookup); static inline bool match(const InitialShapeEntry &key, const Lookup &lookup); }; typedef HashSet InitialShapeSet; struct StackShape { UnownedBaseShape *base; jsid propid; uint32_t slot_; uint8_t attrs; uint8_t flags; int16_t shortid; StackShape(UnownedBaseShape *base, jsid propid, uint32_t slot, uint32_t nfixed, unsigned attrs, unsigned flags, int shortid) : base(base), propid(propid), slot_(slot), attrs(uint8_t(attrs)), flags(uint8_t(flags)), shortid(int16_t(shortid)) { do { } while(0); do { } while(0); do { } while(0); } StackShape(const Shape *shape) : base(shape->base()->unowned()), propid(const_cast(shape)->propidRef()), slot_(shape->slotInfo & Shape::SLOT_MASK), attrs(shape->attrs), flags(shape->flags), shortid(shape->shortid_) {} bool hasSlot() const { return (attrs & 0x40) == 0; } bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; } uint32_t slot() const { do { } while(0); return slot_; } uint32_t maybeSlot() const { return slot_; } uint32_t slotSpan() const { uint32_t free = (((base->clasp)->flags >> 8) & (((uint32_t)1 << (8)) - 1)); return hasMissingSlot() ? free : (maybeSlot() + 1); } void setSlot(uint32_t slot) { do { } while(0); slot_ = slot; } inline HashNumber hash() const; class AutoRooter : private AutoGCRooter { public: explicit AutoRooter(JSContext *cx, const StackShape *shape_ ) : AutoGCRooter(cx, STACKSHAPE), shape(shape_), skip(cx, shape_) { do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); private: const StackShape *shape; SkipRoot skip; }; }; } #define SHAPE_COLLISION (uintptr_t(1)) #define SHAPE_REMOVED ((js::Shape *) SHAPE_COLLISION) #define SHAPE_IS_FREE(shape) ((shape) == NULL) #define SHAPE_IS_REMOVED(shape) ((shape) == SHAPE_REMOVED) #define SHAPE_IS_LIVE(shape) ((shape) > SHAPE_REMOVED) #define SHAPE_FLAG_COLLISION(spp,shape) (*(spp) = (js::Shape *) (uintptr_t(shape) | SHAPE_COLLISION)) #define SHAPE_HAD_COLLISION(shape) (uintptr_t(shape) & SHAPE_COLLISION) #define SHAPE_FETCH(spp) SHAPE_CLEAR_COLLISION(*(spp)) #define SHAPE_CLEAR_COLLISION(shape) ((js::Shape *) (uintptr_t(shape) & ~SHAPE_COLLISION)) #define SHAPE_STORE_PRESERVING_COLLISION(spp,shape) (*(spp) = (js::Shape *) (uintptr_t(shape) | SHAPE_HAD_COLLISION(*(spp)))) namespace js { inline Shape * Shape::search(JSContext *cx, Shape *start, jsid id, Shape ***pspp, bool adding) { if (start->inDictionary()) { *pspp = start->table().search(id, adding); return ((js::Shape *) (uintptr_t(*(*pspp)) & ~(uintptr_t(1)))); } *pspp = __null; if (start->hasTable()) { Shape **spp = start->table().search(id, adding); return ((js::Shape *) (uintptr_t(*(spp)) & ~(uintptr_t(1)))); } if (start->numLinearSearches() == LINEAR_SEARCHES_MAX) { if (start->isBigEnoughForAShapeTable()) { RootedShape startRoot(cx, start); RootedId idRoot(cx, id); if (start->hashify(cx)) { Shape **spp = start->table().search(id, adding); return ((js::Shape *) (uintptr_t(*(spp)) & ~(uintptr_t(1)))); } start = startRoot; id = idRoot; } do { } while(0); } else { start->incrementNumLinearSearches(); } for (Shape *shape = start; shape; shape = shape->parent) { if (shape->propidRef() == id) return shape; } return __null; } # 1150 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" } namespace JS { template<> class AnchorPermitted { }; template<> class AnchorPermitted { }; } # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" #define jsobjinlines_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 1 #define jsarray_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 1 # 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" #define jscntxt_h___ # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" 1 #define jsclist_h___ typedef struct JSCListStr { struct JSCListStr *next; struct JSCListStr *prev; } JSCList; #define JS_INSERT_BEFORE(_e,_l) JS_BEGIN_MACRO (_e)->next = (_l); (_e)->prev = (_l)->prev; (_l)->prev->next = (_e); (_l)->prev = (_e); JS_END_MACRO # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" #define JS_INSERT_AFTER(_e,_l) JS_BEGIN_MACRO (_e)->next = (_l)->next; (_e)->prev = (_l); (_l)->next->prev = (_e); (_l)->next = (_e); JS_END_MACRO # 44 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" #define JS_NEXT_LINK(_e) ((_e)->next) #define JS_PREV_LINK(_e) ((_e)->prev) #define JS_APPEND_LINK(_e,_l) JS_INSERT_BEFORE(_e,_l) #define JS_INSERT_LINK(_e,_l) JS_INSERT_AFTER(_e,_l) #define JS_LIST_HEAD(_l) (_l)->next #define JS_LIST_TAIL(_l) (_l)->prev #define JS_REMOVE_LINK(_e) JS_BEGIN_MACRO (_e)->prev->next = (_e)->next; (_e)->next->prev = (_e)->prev; JS_END_MACRO # 79 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" #define JS_REMOVE_AND_INIT_LINK(_e) JS_BEGIN_MACRO (_e)->prev->next = (_e)->next; (_e)->next->prev = (_e)->prev; (_e)->next = (_e); (_e)->prev = (_e); JS_END_MACRO # 91 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" #define JS_CLIST_IS_EMPTY(_l) ((_l)->next == (_l)) #define JS_INIT_CLIST(_l) JS_BEGIN_MACRO (_l)->next = (_l); (_l)->prev = (_l); JS_END_MACRO #define JS_INIT_STATIC_CLIST(_l) {(_l), (_l)} # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 1 #define jsgc_h___ # 1 "/usr/include/setjmp.h" 1 3 4 # 24 "/usr/include/setjmp.h" 3 4 #define _SETJMP_H 1 extern "C" { # 1 "/usr/include/bits/setjmp.h" 1 3 4 # 22 "/usr/include/bits/setjmp.h" 3 4 #define _BITS_SETJMP_H 1 # 35 "/usr/include/bits/setjmp.h" 3 4 typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); # 31 "/usr/include/setjmp.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 32 "/usr/include/setjmp.h" 2 3 4 struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; }; typedef struct __jmp_buf_tag jmp_buf[1]; extern int setjmp (jmp_buf __env) throw (); extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw (); extern int _setjmp (struct __jmp_buf_tag __env[1]) throw (); #define setjmp(env) _setjmp (env) # 78 "/usr/include/setjmp.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; #define sigsetjmp(env,savemask) __sigsetjmp (env, savemask) extern void siglongjmp (sigjmp_buf __env, int __val) throw () __attribute__ ((__noreturn__)); # 1 "/usr/include/bits/setjmp2.h" 1 3 4 # 26 "/usr/include/bits/setjmp2.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") __attribute__ ((__noreturn__)); extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") __attribute__ ((__noreturn__)); # 118 "/usr/include/setjmp.h" 2 3 4 } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_VERSION_ECMA_3 148 #define JS_VERSION_ECMA_3_TEST 149 # 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_STR_HTML_HELPERS 1 #define JS_HAS_OBJ_PROTO_PROP 1 #define JS_HAS_OBJ_WATCHPOINT 1 #define JS_HAS_TOSOURCE 1 #define JS_HAS_CATCH_GUARD 1 #define JS_HAS_UNEVAL 1 #define JS_HAS_CONST 1 #define JS_HAS_FUN_EXPR_STMT 1 #define JS_HAS_NO_SUCH_METHOD 1 #define JS_HAS_GENERATORS 1 #define JS_HAS_BLOCK_SCOPE 1 #define JS_HAS_DESTRUCTURING 2 #define JS_HAS_GENERATOR_EXPRS 1 #define JS_HAS_EXPR_CLOSURES 1 # 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_NEW_GLOBAL_OBJECT 1 #define JS_HAS_MAKE_SYSTEM_OBJECT 1 #define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) #define OLD_GETTER_SETTER_METHODS 1 #define USE_NEW_OBJECT_REPRESENTATION 0 #define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 1 # 26 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Statistics.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Statistics.h" #define jsgc_statistics_h___ struct JSCompartment; namespace js { namespace gcstats { enum Phase { PHASE_GC_BEGIN, PHASE_WAIT_BACKGROUND_THREAD, PHASE_PURGE, PHASE_MARK, PHASE_MARK_DISCARD_CODE, PHASE_MARK_ROOTS, PHASE_MARK_TYPES, PHASE_MARK_DELAYED, PHASE_MARK_WEAK, PHASE_MARK_GRAY, PHASE_MARK_GRAY_WEAK, PHASE_FINALIZE_START, PHASE_SWEEP, PHASE_SWEEP_ATOMS, PHASE_SWEEP_COMPARTMENTS, PHASE_SWEEP_TABLES, PHASE_SWEEP_OBJECT, PHASE_SWEEP_STRING, PHASE_SWEEP_SCRIPT, PHASE_SWEEP_SHAPE, PHASE_SWEEP_DISCARD_CODE, PHASE_DISCARD_ANALYSIS, PHASE_DISCARD_TI, PHASE_FREE_TI_ARENA, PHASE_SWEEP_TYPES, PHASE_CLEAR_SCRIPT_ANALYSIS, PHASE_FINALIZE_END, PHASE_DESTROY, PHASE_GC_END, PHASE_LIMIT }; enum Stat { STAT_NEW_CHUNK, STAT_DESTROY_CHUNK, STAT_LIMIT }; class StatisticsSerializer; struct Statistics { Statistics(JSRuntime *rt); ~Statistics(); void beginPhase(Phase phase); void endPhase(Phase phase); void beginSlice(int collectedCount, int compartmentCount, gcreason::Reason reason); void endSlice(); void reset(const char *reason) { slices.back().resetReason = reason; } void nonincremental(const char *reason) { nonincrementalReason = reason; } void count(Stat s) { do { } while(0); counts[s]++; } jschar *formatMessage(); jschar *formatJSON(uint64_t timestamp); private: JSRuntime *runtime; int64_t startupTime; FILE *fp; bool fullFormat; int gcDepth; int collectedCount; int compartmentCount; const char *nonincrementalReason; struct SliceData { SliceData(gcreason::Reason reason, int64_t start, size_t startFaults) : reason(reason), resetReason(__null), start(start), startFaults(startFaults) { PodArrayZero(phaseTimes); } gcreason::Reason reason; const char *resetReason; int64_t start, end; size_t startFaults, endFaults; int64_t phaseTimes[PHASE_LIMIT]; int64_t duration() const { return end - start; } }; Vector slices; int64_t phaseStartTimes[PHASE_LIMIT]; int64_t phaseTimes[PHASE_LIMIT]; int64_t phaseTotals[PHASE_LIMIT]; unsigned int counts[STAT_LIMIT]; size_t preBytes; void beginGC(); void endGC(); int64_t gcDuration(); void printStats(); bool formatData(StatisticsSerializer &ss, uint64_t timestamp); double computeMMU(int64_t resolution); }; struct AutoGCSlice { AutoGCSlice(Statistics &stats, int collectedCount, int compartmentCount, gcreason::Reason reason ) : stats(stats) { do { } while (0); stats.beginSlice(collectedCount, compartmentCount, reason); } ~AutoGCSlice() { stats.endSlice(); } Statistics &stats; }; struct AutoPhase { AutoPhase(Statistics &stats, Phase phase ) : stats(stats), phase(phase) { do { } while (0); stats.beginPhase(phase); } ~AutoPhase() { stats.endPhase(phase); } Statistics &stats; Phase phase; }; } } # 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 struct JSCompartment; #define JS_CHECK_STACK_SIZE(limit,lval) ((uintptr_t)(lval) > limit) namespace js { class GCHelperThread; struct Shape; namespace gc { enum State { NO_INCREMENTAL, MARK_ROOTS, MARK, INVALID }; class ChunkPool { Chunk *emptyChunkListHead; size_t emptyCount; public: ChunkPool() : emptyChunkListHead(__null), emptyCount(0) { } size_t getEmptyCount() const { return emptyCount; } inline bool wantBackgroundAllocation(JSRuntime *rt) const; inline Chunk *get(JSRuntime *rt); inline void put(Chunk *chunk); Chunk *expire(JSRuntime *rt, bool releaseAll); void expireAndFree(JSRuntime *rt, bool releaseAll); __attribute__((visibility("default"))) int64_t countCleanDecommittedArenas(JSRuntime *rt); }; static inline JSGCTraceKind MapAllocToTraceKind(AllocKind thingKind) { static const JSGCTraceKind map[FINALIZE_LIMIT] = { JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_OBJECT, JSTRACE_SCRIPT, JSTRACE_SHAPE, JSTRACE_BASE_SHAPE, JSTRACE_TYPE_OBJECT, JSTRACE_XML, JSTRACE_STRING, JSTRACE_STRING, JSTRACE_STRING, }; return map[thingKind]; } inline JSGCTraceKind GetGCThingTraceKind(const void *thing); struct ArenaLists { # 134 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" struct ArenaList { ArenaHeader *head; ArenaHeader **cursor; ArenaList() { clear(); } void clear() { head = __null; cursor = &head; } }; private: # 158 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" FreeSpan freeLists[FINALIZE_LIMIT]; ArenaList arenaLists[FINALIZE_LIMIT]; # 179 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" enum BackgroundFinalizeState { BFS_DONE, BFS_RUN, BFS_JUST_FINISHED }; volatile uintptr_t backgroundFinalizeState[FINALIZE_LIMIT]; public: ArenaLists() { for (size_t i = 0; i != FINALIZE_LIMIT; ++i) freeLists[i].initAsEmpty(); for (size_t i = 0; i != FINALIZE_LIMIT; ++i) backgroundFinalizeState[i] = BFS_DONE; } ~ArenaLists() { for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { do { } while(0); ArenaHeader **headp = &arenaLists[i].head; while (ArenaHeader *aheader = *headp) { *headp = aheader->next; aheader->chunk()->releaseArena(aheader); } } } const FreeSpan *getFreeList(AllocKind thingKind) const { return &freeLists[thingKind]; } ArenaHeader *getFirstArena(AllocKind thingKind) const { return arenaLists[thingKind].head; } bool arenaListsAreEmpty() const { for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { if (backgroundFinalizeState[i] != BFS_DONE) return false; if (arenaLists[i].head) return false; } return true; } # 257 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" bool doneBackgroundFinalize(AllocKind kind) const { return backgroundFinalizeState[kind] == BFS_DONE; } void purge() { for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { FreeSpan *headSpan = &freeLists[i]; if (!headSpan->isEmpty()) { ArenaHeader *aheader = headSpan->arenaHeader(); aheader->setFirstFreeSpan(headSpan); headSpan->initAsEmpty(); } } } inline void prepareForIncrementalGC(JSRuntime *rt); void copyFreeListsToArenas() { for (size_t i = 0; i != FINALIZE_LIMIT; ++i) copyFreeListToArena(AllocKind(i)); } void copyFreeListToArena(AllocKind thingKind) { FreeSpan *headSpan = &freeLists[thingKind]; if (!headSpan->isEmpty()) { ArenaHeader *aheader = headSpan->arenaHeader(); do { } while(0); aheader->setFirstFreeSpan(headSpan); } } void clearFreeListsInArenas() { for (size_t i = 0; i != FINALIZE_LIMIT; ++i) clearFreeListInArena(AllocKind(i)); } void clearFreeListInArena(AllocKind kind) { FreeSpan *headSpan = &freeLists[kind]; if (!headSpan->isEmpty()) { ArenaHeader *aheader = headSpan->arenaHeader(); do { } while(0); aheader->setAsFullyUsed(); } } bool isSynchronizedFreeList(AllocKind kind) { FreeSpan *headSpan = &freeLists[kind]; if (headSpan->isEmpty()) return true; ArenaHeader *aheader = headSpan->arenaHeader(); if (aheader->hasFreeThings()) { do { } while(0); return true; } return false; } __attribute__((always_inline)) inline void *allocateFromFreeList(AllocKind thingKind, size_t thingSize) { return freeLists[thingKind].allocate(thingSize); } static void *refillFreeList(JSContext *cx, AllocKind thingKind); void checkEmptyFreeLists() { } void checkEmptyFreeList(AllocKind kind) { do { } while(0); } void finalizeObjects(FreeOp *fop); void finalizeStrings(FreeOp *fop); void finalizeShapes(FreeOp *fop); void finalizeScripts(FreeOp *fop); static void backgroundFinalize(FreeOp *fop, ArenaHeader *listHead); private: inline void finalizeNow(FreeOp *fop, AllocKind thingKind); inline void finalizeLater(FreeOp *fop, AllocKind thingKind); inline void *allocateFromArena(JSCompartment *comp, AllocKind thingKind); }; const size_t INITIAL_CHUNK_CAPACITY = 16 * 1024 * 1024 / ChunkSize; const size_t MAX_EMPTY_CHUNK_AGE = 4; inline Cell * AsCell(JSObject *obj) { return reinterpret_cast(obj); } } struct GCPtrHasher { typedef void *Lookup; static HashNumber hash(void *key) { return HashNumber(uintptr_t(key) >> JS_GCTHING_ZEROBITS); } static bool match(void *l, void *k) { return l == k; } }; typedef HashMap GCLocks; struct RootInfo { RootInfo() {} RootInfo(const char *name, JSGCRootType type) : name(name), type(type) {} const char *name; JSGCRootType type; }; typedef js::HashMap, js::SystemAllocPolicy> RootedValueMap; } extern __attribute__((visibility("default"))) JSGCTraceKind js_GetGCThingTraceKind(void *thing); extern JSBool js_InitGC(JSRuntime *rt, uint32_t maxbytes); extern void js_FinishGC(JSRuntime *rt); extern JSBool js_AddRoot(JSContext *cx, js::Value *vp, const char *name); extern JSBool js_AddGCThingRoot(JSContext *cx, void **rp, const char *name); # 437 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" extern uint32_t js_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data); typedef struct JSPtrTable { size_t count; void **array; } JSPtrTable; extern JSBool js_LockGCThingRT(JSRuntime *rt, void *thing); extern void js_UnlockGCThingRT(JSRuntime *rt, void *thing); extern bool js_IsAddressableGCThing(JSRuntime *rt, uintptr_t w, js::gc::AllocKind *thingKind, void **thing); namespace js { extern void MarkCompartmentActive(js::StackFrame *fp); extern void TraceRuntime(JSTracer *trc); extern __attribute__((visibility("default"))) void MarkContext(JSTracer *trc, JSContext *acx); extern void TriggerGC(JSRuntime *rt, js::gcreason::Reason reason); extern void TriggerCompartmentGC(JSCompartment *comp, js::gcreason::Reason reason); extern void MaybeGC(JSContext *cx); extern void ShrinkGCBuffers(JSRuntime *rt); extern __attribute__((visibility("default"))) void PrepareForFullGC(JSRuntime *rt); typedef enum JSGCInvocationKind { GC_NORMAL = 0, GC_SHRINK = 1 } JSGCInvocationKind; extern void GC(JSRuntime *rt, JSGCInvocationKind gckind, js::gcreason::Reason reason); extern void GCSlice(JSRuntime *rt, JSGCInvocationKind gckind, js::gcreason::Reason reason); extern void GCDebugSlice(JSRuntime *rt, bool limit, int64_t objCount); extern void PrepareForDebugGC(JSRuntime *rt); } namespace js { void InitTracer(JSTracer *trc, JSRuntime *rt, JSTraceCallback callback); class GCHelperThread { enum State { IDLE, SWEEPING, ALLOCATING, CANCEL_ALLOCATION, SHUTDOWN }; # 534 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" static const size_t FREE_ARRAY_SIZE = size_t(1) << 16; static const size_t FREE_ARRAY_LENGTH = FREE_ARRAY_SIZE / sizeof(void *); JSRuntime *const rt; PRThread *thread; PRCondVar *wakeup; PRCondVar *done; volatile State state; bool sweepFlag; bool shrinkFlag; Vector freeVector; void **freeCursor; void **freeCursorEnd; Vector finalizeVector; bool backgroundAllocation; friend struct js::gc::ArenaLists; __attribute__((visibility("default"))) void replenishAndFreeLater(void *ptr); static void freeElementsAndArray(void **array, void **end) { do { } while(0); for (void **p = array; p != end; ++p) js::Foreground::free_(*p); js::Foreground::free_(array); } static void threadMain(void* arg); void threadLoop(); void doSweep(); public: GCHelperThread(JSRuntime *rt) : rt(rt), thread(__null), wakeup(__null), done(__null), state(IDLE), sweepFlag(false), shrinkFlag(false), freeCursor(__null), freeCursorEnd(__null), backgroundAllocation(true) { } bool init(); void finish(); void startBackgroundSweep(bool shouldShrink); void startBackgroundShrink(); void waitBackgroundSweepEnd(); void waitBackgroundSweepOrAllocEnd(); inline void startBackgroundAllocationIfIdle(); bool canBackgroundAllocate() const { return backgroundAllocation; } void disableBackgroundAllocation() { backgroundAllocation = false; } PRThread *getThread() const { return thread; } bool sweeping() const { return state == SWEEPING; } bool shouldShrink() const { do { } while(0); return shrinkFlag; } void freeLater(void *ptr) { do { } while(0); if (freeCursor != freeCursorEnd) *freeCursor++ = ptr; else replenishAndFreeLater(ptr); } bool prepareForBackgroundSweep(); }; struct GCChunkHasher { typedef gc::Chunk *Lookup; static HashNumber hash(gc::Chunk *chunk) { do { } while(0); return HashNumber(uintptr_t(chunk) >> gc::ChunkShift); } static bool match(gc::Chunk *k, gc::Chunk *l) { do { } while(0); do { } while(0); return k == l; } }; typedef HashSet GCChunkSet; template struct MarkStack { T *stack; T *tos; T *limit; T *ballast; T *ballastLimit; size_t sizeLimit; MarkStack(size_t sizeLimit) : stack(__null), tos(__null), limit(__null), ballast(__null), ballastLimit(__null), sizeLimit(sizeLimit) { } ~MarkStack() { if (stack != ballast) js_free(stack); js_free(ballast); } bool init(size_t ballastcap) { do { } while(0); if (ballastcap == 0) return true; ballast = (T *)js_malloc(sizeof(T) * ballastcap); if (!ballast) return false; ballastLimit = ballast + ballastcap; initFromBallast(); return true; } void initFromBallast() { stack = ballast; limit = ballastLimit; if (size_t(limit - stack) > sizeLimit) limit = stack + sizeLimit; tos = stack; } void setSizeLimit(size_t size) { do { } while(0); sizeLimit = size; reset(); } bool push(T item) { if (tos == limit) { if (!enlarge()) return false; } do { } while(0); *tos++ = item; return true; } bool push(T item1, T item2, T item3) { T *nextTos = tos + 3; if (nextTos > limit) { if (!enlarge()) return false; nextTos = tos + 3; } do { } while(0); tos[0] = item1; tos[1] = item2; tos[2] = item3; tos = nextTos; return true; } bool isEmpty() const { return tos == stack; } T pop() { do { } while(0); return *--tos; } ptrdiff_t position() const { return tos - stack; } void reset() { if (stack != ballast) js_free(stack); initFromBallast(); do { } while(0); } bool enlarge() { size_t tosIndex = tos - stack; size_t cap = limit - stack; if (cap == sizeLimit) return false; size_t newcap = cap * 2; if (newcap == 0) newcap = 32; if (newcap > sizeLimit) newcap = sizeLimit; T *newStack; if (stack == ballast) { newStack = (T *)js_malloc(sizeof(T) * newcap); if (!newStack) return false; for (T *src = stack, *dst = newStack; src < tos; ) *dst++ = *src++; } else { newStack = (T *)js_realloc(stack, sizeof(T) * newcap); if (!newStack) return false; } stack = newStack; tos = stack + tosIndex; limit = newStack + newcap; return true; } size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { size_t n = 0; if (stack != ballast) n += mallocSizeOf(stack); n += mallocSizeOf(ballast); return n; } }; struct SliceBudget { int64_t deadline; intptr_t counter; static const intptr_t CounterReset = 1000; static const int64_t Unlimited = 0; static int64_t TimeBudget(int64_t millis); static int64_t WorkBudget(int64_t work); SliceBudget(); SliceBudget(int64_t budget); void reset() { deadline = (9223372036854775807LL); counter = (2147483647); } void step(intptr_t amt = 1) { counter -= amt; } bool checkOverBudget(); bool isOverBudget() { if (counter >= 0) return false; return checkOverBudget(); } }; static const size_t MARK_STACK_LENGTH = 32768; struct GCMarker : public JSTracer { private: enum StackTag { ValueArrayTag, ObjectTag, TypeTag, XmlTag, ArenaTag, SavedValueArrayTag, LastTag = SavedValueArrayTag }; static const uintptr_t StackTagMask = 7; static void staticAsserts() { typedef int moz_static_assert85[(StackTagMask >= uintptr_t(LastTag)) ? 1 : -1]; typedef int moz_static_assert86[(StackTagMask <= gc::Cell::CellMask) ? 1 : -1]; } public: explicit GCMarker(); bool init(); void setSizeLimit(size_t size) { stack.setSizeLimit(size); } size_t sizeLimit() const { return stack.sizeLimit; } void start(JSRuntime *rt); void stop(); void reset(); void pushObject(JSObject *obj) { pushTaggedPtr(ObjectTag, obj); } void pushArenaList(gc::ArenaHeader *firstArena) { pushTaggedPtr(ArenaTag, firstArena); } void pushType(types::TypeObject *type) { pushTaggedPtr(TypeTag, type); } void pushXML(JSXML *xml) { pushTaggedPtr(XmlTag, xml); } uint32_t getMarkColor() const { return color; } # 908 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" void setMarkColorGray() { do { } while(0); do { } while(0); color = gc::GRAY; } inline void delayMarkingArena(gc::ArenaHeader *aheader); void delayMarkingChildren(const void *thing); void markDelayedChildren(gc::ArenaHeader *aheader); bool markDelayedChildren(SliceBudget &budget); bool hasDelayedChildren() const { return !!unmarkedArenaStackTop; } bool isDrained() { return isMarkStackEmpty() && !unmarkedArenaStackTop; } bool drainMarkStack(SliceBudget &budget); # 936 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" bool hasBufferedGrayRoots() const; void startBufferingGrayRoots(); void endBufferingGrayRoots(); void markBufferedGrayRoots(); static void GrayCallback(JSTracer *trc, void **thing, JSGCTraceKind kind); size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const; MarkStack stack; private: void checkCompartment(void *p) {} void pushTaggedPtr(StackTag tag, void *ptr) { checkCompartment(ptr); uintptr_t addr = reinterpret_cast(ptr); do { } while(0); if (!stack.push(addr | uintptr_t(tag))) delayMarkingChildren(ptr); } void pushValueArray(JSObject *obj, void *start, void *end) { checkCompartment(obj); do { } while(0); uintptr_t tagged = reinterpret_cast(obj) | GCMarker::ValueArrayTag; uintptr_t startAddr = reinterpret_cast(start); uintptr_t endAddr = reinterpret_cast(end); if (!stack.push(endAddr, startAddr, tagged)) delayMarkingChildren(obj); } bool isMarkStackEmpty() { return stack.isEmpty(); } bool restoreValueArray(JSObject *obj, void **vpp, void **endp); void saveValueRanges(); inline void processMarkStackTop(SliceBudget &budget); void processMarkStackOther(SliceBudget &budget, uintptr_t tag, uintptr_t addr); void appendGrayRoot(void *thing, JSGCTraceKind kind); uint32_t color; DebugOnly started; js::gc::ArenaHeader *unmarkedArenaStackTop; DebugOnly markLaterArenas; struct GrayRoot { void *thing; JSGCTraceKind kind; GrayRoot(void *thing, JSGCTraceKind kind) : thing(thing), kind(kind) {} }; bool grayFailed; Vector grayRoots; }; void SetMarkStackLimit(JSRuntime *rt, size_t limit); void MarkStackRangeConservatively(JSTracer *trc, Value *begin, Value *end); typedef void (*IterateChunkCallback)(JSRuntime *rt, void *data, gc::Chunk *chunk); typedef void (*IterateArenaCallback)(JSRuntime *rt, void *data, gc::Arena *arena, JSGCTraceKind traceKind, size_t thingSize); typedef void (*IterateCellCallback)(JSRuntime *rt, void *data, void *thing, JSGCTraceKind traceKind, size_t thingSize); extern __attribute__((visibility("default"))) void IterateCompartmentsArenasCells(JSRuntime *rt, void *data, JSIterateCompartmentCallback compartmentCallback, IterateArenaCallback arenaCallback, IterateCellCallback cellCallback); extern __attribute__((visibility("default"))) void IterateChunks(JSRuntime *rt, void *data, IterateChunkCallback chunkCallback); extern __attribute__((visibility("default"))) void IterateCells(JSRuntime *rt, JSCompartment *compartment, gc::AllocKind thingKind, void *data, IterateCellCallback cellCallback); } extern void js_FinalizeStringRT(JSRuntime *rt, JSString *str); #define IS_GC_MARKING_TRACER(trc) ((trc)->callback == NULL || (trc)->callback == GCMarker::GrayCallback) namespace js { namespace gc { JSCompartment * NewCompartment(JSContext *cx, JSPrincipals *principals); void RunDebugGC(JSContext *cx); void SetDeterministicGC(JSContext *cx, bool enabled); const int ZealPokeValue = 1; const int ZealAllocValue = 2; const int ZealFrameGCValue = 3; const int ZealVerifierValue = 4; const int ZealFrameVerifierValue = 5; # 1094 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" static inline void VerifyBarriers(JSRuntime *rt) { } static inline void MaybeVerifyBarriers(JSContext *cx, bool always = false) { } } static inline JSCompartment * GetObjectCompartment(JSObject *obj) { return reinterpret_cast(obj)->compartment(); } } # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" #define jspropertycache_h___ namespace js { class PropertyCache; struct PropertyCacheEntry { jsbytecode *kpc; const Shape *kshape; const Shape *pshape; const Shape *prop; friend class PropertyCache; private: uint8_t scopeIndex; uint8_t protoIndex; public: static const size_t MaxScopeIndex = 15; static const size_t MaxProtoIndex = 15; # 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" bool isOwnPropertyHit() const { return scopeIndex == 0 && protoIndex == 0; } # 63 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" bool isPrototypePropertyHit() const { return scopeIndex == 0 && protoIndex == 1; } void assign(jsbytecode *kpc, const Shape *kshape, const Shape *pshape, const Shape *prop, unsigned scopeIndex, unsigned protoIndex) { do { } while(0); do { } while(0); this->kpc = kpc; this->kshape = kshape; this->pshape = pshape; this->prop = prop; this->scopeIndex = uint8_t(scopeIndex); this->protoIndex = uint8_t(protoIndex); } }; #define JS_NO_PROP_CACHE_FILL ((js::PropertyCacheEntry *) NULL + 1) class PropertyCache { private: enum { SIZE_LOG2 = 12, SIZE = ((uint32_t)1 << (SIZE_LOG2)), MASK = (((uint32_t)1 << (SIZE_LOG2)) - 1) }; PropertyCacheEntry table[SIZE]; JSBool empty; public: # 136 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" #define PCMETER(x) ((void)0) PropertyCache() { PodZero(this); } private: static inline uintptr_t hash(jsbytecode *pc, const Shape *kshape) { return (((uintptr_t(pc) >> SIZE_LOG2) ^ uintptr_t(pc) ^ ((uintptr_t)kshape >> 3)) & MASK); } static inline bool matchShape(JSContext *cx, JSObject *obj, uint32_t shape); PropertyName * fullTest(JSContext *cx, jsbytecode *pc, JSObject **objp, JSObject **pobjp, PropertyCacheEntry *entry); inline void assertEmpty() {} public: __attribute__((always_inline)) inline void test(JSContext *cx, jsbytecode *pc, JSObject *&obj, JSObject *&pobj, PropertyCacheEntry *&entry, PropertyName *&name); # 174 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" __attribute__((always_inline)) inline bool testForSet(JSContext *cx, jsbytecode *pc, JSObject *obj, PropertyCacheEntry **entryp, JSObject **obj2p, PropertyName **namep); # 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" PropertyCacheEntry *fill(JSContext *cx, JSObject *obj, unsigned scopeIndex, JSObject *pobj, const js::Shape *shape); void purge(JSRuntime *rt); void restore(PropertyCacheEntry *entry); }; } # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 1 #define prmjtime_h___ # 1 "/usr/include/time.h" 1 3 4 # 27 "/usr/include/time.h" 3 4 #define _TIME_H 1 extern "C" { #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_size_t # 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_wchar_t # 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef NULL #define NULL __null # 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 39 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 41 "/usr/include/bits/time.h" 3 4 #define _BITS_TIME_H 1 #define CLOCKS_PER_SEC 1000000l # 61 "/usr/include/bits/time.h" 3 4 #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 #define CLOCK_PROCESS_CPUTIME_ID 2 #define CLOCK_THREAD_CPUTIME_ID 3 #define CLOCK_MONOTONIC_RAW 4 #define CLOCK_REALTIME_COARSE 5 #define CLOCK_MONOTONIC_COARSE 6 #define CLOCK_BOOTTIME 7 #define CLOCK_REALTIME_ALARM 8 #define CLOCK_BOOTTIME_ALARM 9 #define TIMER_ABSTIME 1 # 1 "/usr/include/bits/timex.h" 1 3 4 # 20 "/usr/include/bits/timex.h" 3 4 #define _BITS_TIMEX_H 1 struct timex { unsigned int modes; long int offset; long int freq; long int maxerror; long int esterror; int status; long int constant; long int precision; long int tolerance; struct timeval time; long int tick; long int ppsfreq; long int jitter; int shift; long int stabil; long int jitcnt; long int calcnt; long int errcnt; long int stbcnt; int tai; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; #define ADJ_OFFSET 0x0001 #define ADJ_FREQUENCY 0x0002 #define ADJ_MAXERROR 0x0004 #define ADJ_ESTERROR 0x0008 #define ADJ_STATUS 0x0010 #define ADJ_TIMECONST 0x0020 #define ADJ_TAI 0x0080 #define ADJ_MICRO 0x1000 #define ADJ_NANO 0x2000 #define ADJ_TICK 0x4000 #define ADJ_OFFSET_SINGLESHOT 0x8001 #define ADJ_OFFSET_SS_READ 0xa001 #define MOD_OFFSET ADJ_OFFSET #define MOD_FREQUENCY ADJ_FREQUENCY #define MOD_MAXERROR ADJ_MAXERROR #define MOD_ESTERROR ADJ_ESTERROR #define MOD_STATUS ADJ_STATUS #define MOD_TIMECONST ADJ_TIMECONST #define MOD_CLKB ADJ_TICK #define MOD_CLKA ADJ_OFFSET_SINGLESHOT #define MOD_TAI ADJ_TAI #define MOD_MICRO ADJ_MICRO #define MOD_NANO ADJ_NANO #define STA_PLL 0x0001 #define STA_PPSFREQ 0x0002 #define STA_PPSTIME 0x0004 #define STA_FLL 0x0008 #define STA_INS 0x0010 #define STA_DEL 0x0020 #define STA_UNSYNC 0x0040 #define STA_FREQHOLD 0x0080 #define STA_PPSSIGNAL 0x0100 #define STA_PPSJITTER 0x0200 #define STA_PPSWANDER 0x0400 #define STA_PPSERROR 0x0800 #define STA_CLOCKERR 0x1000 #define STA_NANO 0x2000 #define STA_MODE 0x4000 #define STA_CLK 0x8000 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) # 87 "/usr/include/bits/time.h" 2 3 4 extern "C" { extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); } #undef __need_timeval # 43 "/usr/include/time.h" 2 3 4 # 67 "/usr/include/time.h" 3 4 #undef __need_clock_t # 83 "/usr/include/time.h" 3 4 #undef __need_time_t # 95 "/usr/include/time.h" 3 4 #undef __clockid_time_t # 107 "/usr/include/time.h" 3 4 #undef __need_timer_t # 127 "/usr/include/time.h" 3 4 #undef __need_timespec struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; # 180 "/usr/include/time.h" 3 4 extern clock_t clock (void) throw (); extern time_t time (time_t *__timer) throw (); extern double difftime (time_t __time1, time_t __time0) throw () __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) throw (); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) throw (); extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) throw (); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) throw (); extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) throw (); extern struct tm *gmtime (__const time_t *__timer) throw (); extern struct tm *localtime (__const time_t *__timer) throw (); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern char *asctime (__const struct tm *__tp) throw (); extern char *ctime (__const time_t *__timer) throw (); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) throw (); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) throw (); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) throw (); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) throw (); #define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # 313 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) throw (); extern time_t timelocal (struct tm *__tp) throw (); extern int dysize (int __year) throw () __attribute__ ((__const__)); # 328 "/usr/include/time.h" 3 4 extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) throw (); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) throw (); extern int timer_delete (timer_t __timerid) throw (); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) throw (); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) throw (); extern int timer_getoverrun (timer_t __timerid) throw (); # 390 "/usr/include/time.h" 3 4 extern int getdate_err; # 399 "/usr/include/time.h" 3 4 extern struct tm *getdate (__const char *__string); # 413 "/usr/include/time.h" 3 4 extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); } # 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 2 struct JSContext; # 58 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" class DSTOffsetCache { public: inline DSTOffsetCache(); int64_t getDSTOffsetMilliseconds(int64_t localTimeMilliseconds, JSContext *cx); inline void purge(); private: int64_t computeDSTOffsetMilliseconds(int64_t localTimeSeconds); int64_t offsetMilliseconds; int64_t rangeStartSeconds, rangeEndSeconds; int64_t oldOffsetMilliseconds; int64_t oldRangeStartSeconds, oldRangeEndSeconds; static const int64_t MAX_UNIX_TIMET = 2145859200; static const int64_t MILLISECONDS_PER_SECOND = 1000; static const int64_t SECONDS_PER_MINUTE = 60; static const int64_t SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE; static const int64_t SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR; static const int64_t RANGE_EXPANSION_AMOUNT = 30 * SECONDS_PER_DAY; private: void sanityCheck(); }; extern "C" { typedef struct PRMJTime PRMJTime; struct PRMJTime { int32_t tm_usec; int8_t tm_sec; int8_t tm_min; int8_t tm_hour; int8_t tm_mday; int8_t tm_mon; int8_t tm_wday; int32_t tm_year; int16_t tm_yday; int8_t tm_isdst; }; #define PRMJ_USEC_PER_SEC 1000000L #define PRMJ_USEC_PER_MSEC 1000L extern int64_t PRMJ_Now(void); #define PRMJ_NowShutdown() extern int32_t PRMJ_LocalGMTDifference(void); extern size_t PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *tm); } # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" #define Stack_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 1 #define jsfun_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" #define jsscript_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" #define jsdbgapi_h___ extern "C" { extern __attribute__((visibility("default"))) JSCrossCompartmentCall * JS_EnterCrossCompartmentCallScript(JSContext *cx, JSScript *target); extern __attribute__((visibility("default"))) JSCrossCompartmentCall * JS_EnterCrossCompartmentCallStackFrame(JSContext *cx, JSStackFrame *target); } namespace JS { class __attribute__((visibility("default"))) AutoEnterScriptCompartment { protected: JSCrossCompartmentCall *call; public: AutoEnterScriptCompartment() : call(__null) {} bool enter(JSContext *cx, JSScript *target); bool entered() const { return call != __null; } ~AutoEnterScriptCompartment() { if (call && call != reinterpret_cast(1)) JS_LeaveCrossCompartmentCall(call); } }; class __attribute__((visibility("default"))) AutoEnterFrameCompartment : public AutoEnterScriptCompartment { public: bool enter(JSContext *cx, JSStackFrame *target); }; } __attribute__((visibility("default"))) void js_DumpBacktrace(JSContext *cx); extern "C" { extern __attribute__((visibility("default"))) JSString * JS_DecompileScript(JSContext *cx, JSScript *script, const char *name, unsigned indent); extern __attribute__((visibility("default"))) void JS_SetRuntimeDebugMode(JSRuntime *rt, JSBool debug); # 86 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" extern __attribute__((visibility("default"))) JSBool JS_GetDebugMode(JSContext *cx); __attribute__((visibility("default"))) JSBool JS_SetDebugModeForAllCompartments(JSContext *cx, JSBool debug); __attribute__((visibility("default"))) JSBool JS_SetDebugModeForCompartment(JSContext *cx, JSCompartment *comp, JSBool debug); __attribute__((visibility("default"))) JSBool JS_SetDebugMode(JSContext *cx, JSBool debug); extern __attribute__((visibility("default"))) JSBool JS_SetSingleStepMode(JSContext *cx, JSScript *script, JSBool singleStep); extern __attribute__((visibility("default"))) JSBool JS_SetTrap(JSContext *cx, JSScript *script, jsbytecode *pc, JSTrapHandler handler, jsval closure); extern __attribute__((visibility("default"))) void JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc, JSTrapHandler *handlerp, jsval *closurep); extern __attribute__((visibility("default"))) void JS_ClearScriptTraps(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) void JS_ClearAllTrapsForCompartment(JSContext *cx); extern __attribute__((visibility("default"))) JSBool JS_SetInterrupt(JSRuntime *rt, JSInterruptHook handler, void *closure); extern __attribute__((visibility("default"))) JSBool JS_ClearInterrupt(JSRuntime *rt, JSInterruptHook *handlerp, void **closurep); extern __attribute__((visibility("default"))) JSBool JS_SetWatchPoint(JSContext *cx, JSObject *obj, jsid id, JSWatchPointHandler handler, JSObject *closure); extern __attribute__((visibility("default"))) JSBool JS_ClearWatchPoint(JSContext *cx, JSObject *obj, jsid id, JSWatchPointHandler *handlerp, JSObject **closurep); extern __attribute__((visibility("default"))) JSBool JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_ClearAllWatchPoints(JSContext *cx); extern __attribute__((visibility("default"))) unsigned JS_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc); extern __attribute__((visibility("default"))) jsbytecode * JS_LineNumberToPC(JSContext *cx, JSScript *script, unsigned lineno); extern __attribute__((visibility("default"))) jsbytecode * JS_EndPC(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) JSBool JS_GetLinePCs(JSContext *cx, JSScript *script, unsigned startLine, unsigned maxLines, unsigned* count, unsigned** lines, jsbytecode*** pcs); extern __attribute__((visibility("default"))) unsigned JS_GetFunctionArgumentCount(JSContext *cx, JSFunction *fun); extern __attribute__((visibility("default"))) JSBool JS_FunctionHasLocalNames(JSContext *cx, JSFunction *fun); extern __attribute__((visibility("default"))) uintptr_t * JS_GetFunctionLocalNameArray(JSContext *cx, JSFunction *fun, void **markp); extern __attribute__((visibility("default"))) JSAtom * JS_LocalNameToAtom(uintptr_t w); extern __attribute__((visibility("default"))) JSString * JS_AtomKey(JSAtom *atom); extern __attribute__((visibility("default"))) void JS_ReleaseFunctionLocalNameArray(JSContext *cx, void *mark); extern __attribute__((visibility("default"))) JSScript * JS_GetFunctionScript(JSContext *cx, JSFunction *fun); extern __attribute__((visibility("default"))) JSNative JS_GetFunctionNative(JSContext *cx, JSFunction *fun); extern __attribute__((visibility("default"))) JSPrincipals * JS_GetScriptPrincipals(JSScript *script); extern __attribute__((visibility("default"))) JSPrincipals * JS_GetScriptOriginPrincipals(JSScript *script); # 209 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" extern __attribute__((visibility("default"))) JSStackFrame * JS_FrameIterator(JSContext *cx, JSStackFrame **iteratorp); extern __attribute__((visibility("default"))) JSScript * JS_GetFrameScript(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) jsbytecode * JS_GetFramePC(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) void * JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) void JS_SetFrameAnnotation(JSContext *cx, JSStackFrame *fp, void *annotation); extern __attribute__((visibility("default"))) JSBool JS_IsScriptFrame(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) JSObject * JS_GetFrameScopeChain(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) JSObject * JS_GetFrameCallObject(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) JSBool JS_GetFrameThis(JSContext *cx, JSStackFrame *fp, jsval *thisv); extern __attribute__((visibility("default"))) JSFunction * JS_GetFrameFunction(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) JSObject * JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp); __attribute__((visibility("default"))) JSFunction * JS_GetScriptFunction(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) JSObject * JS_GetParentOrScopeChain(JSContext *cx, JSObject *obj); #define JS_IsContructorFrame JS_IsConstructorFrame extern __attribute__((visibility("default"))) JSBool JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) JSBool JS_IsDebuggerFrame(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) JSBool JS_IsGlobalFrame(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) jsval JS_GetFrameReturnValue(JSContext *cx, JSStackFrame *fp); extern __attribute__((visibility("default"))) void JS_SetFrameReturnValue(JSContext *cx, JSStackFrame *fp, jsval rval); extern __attribute__((visibility("default"))) JSObject * JS_GetFrameCalleeObject(JSContext *cx, JSStackFrame *fp); # 281 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" extern __attribute__((visibility("default"))) const char * JS_GetDebugClassName(JSObject *obj); extern __attribute__((visibility("default"))) const char * JS_GetScriptFilename(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) const jschar * JS_GetScriptSourceMap(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) unsigned JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) unsigned JS_GetScriptLineExtent(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) JSVersion JS_GetScriptVersion(JSContext *cx, JSScript *script); # 308 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" #define JS_SetNewScriptHook JS_SetNewScriptHookProc #define JS_SetDestroyScriptHook JS_SetDestroyScriptHookProc extern __attribute__((visibility("default"))) void JS_SetNewScriptHookProc(JSRuntime *rt, JSNewScriptHook hook, void *callerdata); extern __attribute__((visibility("default"))) void JS_SetDestroyScriptHookProc(JSRuntime *rt, JSDestroyScriptHook hook, void *callerdata); extern __attribute__((visibility("default"))) JSBool JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp, const jschar *chars, unsigned length, const char *filename, unsigned lineno, jsval *rval); extern __attribute__((visibility("default"))) JSBool JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp, const char *bytes, unsigned length, const char *filename, unsigned lineno, jsval *rval); typedef struct JSPropertyDesc { jsval id; jsval value; uint8_t flags; uint8_t spare; uint16_t slot; jsval alias; } JSPropertyDesc; #define JSPD_ENUMERATE 0x01 #define JSPD_READONLY 0x02 #define JSPD_PERMANENT 0x04 #define JSPD_ALIAS 0x08 #define JSPD_ARGUMENT 0x10 #define JSPD_VARIABLE 0x20 #define JSPD_EXCEPTION 0x40 #define JSPD_ERROR 0x80 typedef struct JSPropertyDescArray { uint32_t length; JSPropertyDesc *array; } JSPropertyDescArray; typedef struct JSScopeProperty JSScopeProperty; extern __attribute__((visibility("default"))) JSBool JS_GetPropertyDescArray(JSContext *cx, JSObject *obj, JSPropertyDescArray *pda); extern __attribute__((visibility("default"))) void JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda); extern __attribute__((visibility("default"))) JSBool JS_SetDebuggerHandler(JSRuntime *rt, JSDebuggerHandler hook, void *closure); extern __attribute__((visibility("default"))) JSBool JS_SetSourceHandler(JSRuntime *rt, JSSourceHandler handler, void *closure); extern __attribute__((visibility("default"))) JSBool JS_SetExecuteHook(JSRuntime *rt, JSInterpreterHook hook, void *closure); extern __attribute__((visibility("default"))) JSBool JS_SetCallHook(JSRuntime *rt, JSInterpreterHook hook, void *closure); extern __attribute__((visibility("default"))) JSBool JS_SetThrowHook(JSRuntime *rt, JSThrowHook hook, void *closure); extern __attribute__((visibility("default"))) JSBool JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure); extern __attribute__((visibility("default"))) size_t JS_GetObjectTotalSize(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) size_t JS_GetFunctionTotalSize(JSContext *cx, JSFunction *fun); extern __attribute__((visibility("default"))) size_t JS_GetScriptTotalSize(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) JSBool JS_IsSystemObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_MakeSystemObject(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) void js_RevertVersion(JSContext *cx); extern __attribute__((visibility("default"))) const JSDebugHooks * JS_GetGlobalDebugHooks(JSRuntime *rt); # 434 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" extern __attribute__((visibility("default"))) JSBool JS_StartProfiling(const char *profileName); extern __attribute__((visibility("default"))) JSBool JS_StopProfiling(const char *profileName); extern __attribute__((visibility("default"))) JSBool JS_DumpProfile(const char *outfile, const char *profileName); extern __attribute__((visibility("default"))) JSBool JS_PauseProfilers(const char *profileName); extern __attribute__((visibility("default"))) JSBool JS_ResumeProfilers(const char *profileName); extern __attribute__((visibility("default"))) JSBool JS_DefineProfilingFunctions(JSContext *cx, JSObject *obj); extern __attribute__((visibility("default"))) JSBool JS_DefineDebuggerObject(JSContext *cx, JSObject *obj); __attribute__((visibility("default"))) const char * JS_UnsafeGetLastProfilingError(); # 514 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" extern __attribute__((visibility("default"))) JSBool js_StartPerf(); extern __attribute__((visibility("default"))) JSBool js_StopPerf(); extern __attribute__((visibility("default"))) void JS_DumpBytecode(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) void JS_DumpCompartmentBytecode(JSContext *cx); extern __attribute__((visibility("default"))) void JS_DumpPCCounts(JSContext *cx, JSScript *script); extern __attribute__((visibility("default"))) void JS_DumpCompartmentPCCounts(JSContext *cx); extern __attribute__((visibility("default"))) JSObject * JS_UnwrapObject(JSObject *obj); extern __attribute__((visibility("default"))) JSObject * JS_UnwrapObjectAndInnerize(JSObject *obj); extern __attribute__((visibility("default"))) JSBool js_CallContextDebugHandler(JSContext *cx); } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 1 #define jsopcode_h___ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 2 extern "C" { typedef enum JSOp { #define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) op = val, # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" 1 # 80 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" JSOP_NOP = 0, JSOP_UNDEFINED = 1, JSOP_POPV = 2, JSOP_ENTERWITH = 3, JSOP_LEAVEWITH = 4, JSOP_RETURN = 5, JSOP_GOTO = 6, JSOP_IFEQ = 7, JSOP_IFNE = 8, JSOP_ARGUMENTS = 9, JSOP_SWAP = 10, JSOP_POPN = 11, JSOP_DUP = 12, JSOP_DUP2 = 13, JSOP_SETCONST = 14, JSOP_BITOR = 15, JSOP_BITXOR = 16, JSOP_BITAND = 17, JSOP_EQ = 18, JSOP_NE = 19, JSOP_LT = 20, JSOP_LE = 21, JSOP_GT = 22, JSOP_GE = 23, JSOP_LSH = 24, JSOP_RSH = 25, JSOP_URSH = 26, JSOP_ADD = 27, JSOP_SUB = 28, JSOP_MUL = 29, JSOP_DIV = 30, JSOP_MOD = 31, JSOP_NOT = 32, JSOP_BITNOT = 33, JSOP_NEG = 34, JSOP_POS = 35, JSOP_DELNAME = 36, JSOP_DELPROP = 37, JSOP_DELELEM = 38, JSOP_TYPEOF = 39, JSOP_VOID = 40, JSOP_INCNAME = 41, JSOP_INCPROP = 42, JSOP_INCELEM = 43, JSOP_DECNAME = 44, JSOP_DECPROP = 45, JSOP_DECELEM = 46, JSOP_NAMEINC = 47, JSOP_PROPINC = 48, JSOP_ELEMINC = 49, JSOP_NAMEDEC = 50, JSOP_PROPDEC = 51, JSOP_ELEMDEC = 52, JSOP_GETPROP = 53, JSOP_SETPROP = 54, JSOP_GETELEM = 55, JSOP_SETELEM = 56, JSOP_CALLNAME = 57, JSOP_CALL = 58, JSOP_NAME = 59, JSOP_DOUBLE = 60, JSOP_STRING = 61, JSOP_ZERO = 62, JSOP_ONE = 63, JSOP_NULL = 64, JSOP_THIS = 65, JSOP_FALSE = 66, JSOP_TRUE = 67, JSOP_OR = 68, JSOP_AND = 69, JSOP_TABLESWITCH = 70, JSOP_LOOKUPSWITCH = 71, JSOP_STRICTEQ = 72, JSOP_STRICTNE = 73, JSOP_SETCALL = 74, # 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" JSOP_ITER = 75, JSOP_MOREITER = 76, JSOP_ITERNEXT = 77, JSOP_ENDITER = 78, JSOP_FUNAPPLY = 79, JSOP_OBJECT = 80, JSOP_POP = 81, JSOP_NEW = 82, JSOP_UNUSED0 = 83, JSOP_GETARG = 84, JSOP_SETARG = 85, JSOP_GETLOCAL = 86, JSOP_SETLOCAL = 87, JSOP_UINT16 = 88, # 221 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" JSOP_NEWINIT = 89, JSOP_NEWARRAY = 90, JSOP_NEWOBJECT = 91, JSOP_ENDINIT = 92, JSOP_INITPROP = 93, JSOP_INITELEM = 94, JSOP_UNUSED14 = 95, JSOP_UNUSED15 = 96, JSOP_INCARG = 97, JSOP_DECARG = 98, JSOP_ARGINC = 99, JSOP_ARGDEC = 100, JSOP_INCLOCAL = 101, JSOP_DECLOCAL = 102, JSOP_LOCALINC = 103, JSOP_LOCALDEC = 104, JSOP_LEAVEFORLETIN = 105, JSOP_LABEL = 106, JSOP_UNUSED3 = 107, JSOP_FUNCALL = 108, JSOP_LOOPHEAD = 109, JSOP_BINDNAME = 110, JSOP_SETNAME = 111, JSOP_THROW = 112, JSOP_IN = 113, JSOP_INSTANCEOF = 114, JSOP_DEBUGGER = 115, JSOP_GOSUB = 116, JSOP_RETSUB = 117, JSOP_EXCEPTION = 118, JSOP_LINENO = 119, JSOP_CONDSWITCH = 120, JSOP_CASE = 121, JSOP_DEFAULT = 122, JSOP_EVAL = 123, JSOP_ENUMELEM = 124, JSOP_GETTER = 125, JSOP_SETTER = 126, JSOP_DEFFUN = 127, JSOP_DEFCONST = 128, JSOP_DEFVAR = 129, JSOP_LAMBDA = 130, JSOP_CALLEE = 131, JSOP_UNUSED31 = 132, JSOP_PICK = 133, JSOP_TRY = 134, JSOP_FINALLY = 135, # 337 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" JSOP_GETALIASEDVAR = 136, JSOP_CALLALIASEDVAR = 137, JSOP_SETALIASEDVAR = 138, JSOP_INCALIASEDVAR = 139, JSOP_DECALIASEDVAR = 140, JSOP_ALIASEDVARINC = 141, JSOP_ALIASEDVARDEC = 142, JSOP_UNUSED8 = 143, JSOP_UNUSED9 = 144, JSOP_UNUSED10 = 145, JSOP_UNUSED11 = 146, JSOP_UNUSED12 = 147, JSOP_UNUSED13 = 148, JSOP_BACKPATCH = 149, JSOP_BACKPATCH_POP = 150, JSOP_THROWING = 151, JSOP_SETRVAL = 152, JSOP_RETRVAL = 153, JSOP_GETGNAME = 154, JSOP_SETGNAME = 155, JSOP_INCGNAME = 156, JSOP_DECGNAME = 157, JSOP_GNAMEINC = 158, JSOP_GNAMEDEC = 159, JSOP_REGEXP = 160, JSOP_DEFXMLNS = 161, JSOP_ANYNAME = 162, JSOP_QNAMEPART = 163, JSOP_QNAMECONST = 164, JSOP_QNAME = 165, JSOP_TOATTRNAME = 166, JSOP_TOATTRVAL = 167, JSOP_ADDATTRNAME = 168, JSOP_ADDATTRVAL = 169, JSOP_BINDXMLNAME = 170, JSOP_SETXMLNAME = 171, JSOP_XMLNAME = 172, JSOP_DESCENDANTS = 173, JSOP_FILTER = 174, JSOP_ENDFILTER = 175, JSOP_TOXML = 176, JSOP_TOXMLLIST = 177, JSOP_XMLTAGEXPR = 178, JSOP_XMLELTEXPR = 179, JSOP_XMLCDATA = 180, JSOP_XMLCOMMENT = 181, JSOP_XMLPI = 182, JSOP_DELDESC = 183, JSOP_CALLPROP = 184, JSOP_ENTERLET0 = 185, JSOP_ENTERLET1 = 186, JSOP_UINT24 = 187, JSOP_UNUSED18 = 188, JSOP_UNUSED19 = 189, JSOP_UNUSED20 = 190, JSOP_STARTXML = 191, JSOP_STARTXMLEXPR = 192, JSOP_CALLELEM = 193, JSOP_STOP = 194, JSOP_GETXPROP = 195, JSOP_CALLXMLNAME = 196, JSOP_TYPEOFEXPR = 197, JSOP_ENTERBLOCK = 198, JSOP_LEAVEBLOCK = 199, JSOP_UNUSED1 = 200, JSOP_UNUSED2 = 201, JSOP_GENERATOR = 202, JSOP_YIELD = 203, JSOP_ARRAYPUSH = 204, JSOP_GETFUNNS = 205, JSOP_ENUMCONSTELEM = 206, JSOP_LEAVEBLOCKEXPR = 207, JSOP_UNUSED21 = 208, JSOP_UNUSED22 = 209, JSOP_UNUSED23 = 210, JSOP_CALLGNAME = 211, JSOP_CALLLOCAL = 212, JSOP_CALLARG = 213, JSOP_BINDGNAME = 214, JSOP_INT8 = 215, JSOP_INT32 = 216, JSOP_LENGTH = 217, JSOP_HOLE = 218, JSOP_UNUSED17 = 219, JSOP_UNUSED24 = 220, JSOP_UNUSED25 = 221, JSOP_UNUSED29 = 222, JSOP_UNUSED30 = 223, JSOP_REST = 224, JSOP_TOID = 225, JSOP_IMPLICITTHIS = 226, JSOP_LOOPENTRY = 227, JSOP_ACTUALSFILLED = 228, # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 2 #undef OPDEF JSOP_LIMIT, JSOP_GETPROP2 = JSOP_LIMIT, JSOP_GETELEM2 = JSOP_LIMIT + 1, JSOP_FORLOCAL = JSOP_LIMIT + 2, JSOP_FAKE_LIMIT = JSOP_FORLOCAL } JSOp; #define JOF_BYTE 0 #define JOF_JUMP 1 #define JOF_ATOM 2 #define JOF_UINT16 3 #define JOF_TABLESWITCH 4 #define JOF_LOOKUPSWITCH 5 #define JOF_QARG 6 #define JOF_LOCAL 7 #define JOF_DOUBLE 8 #define JOF_UINT24 12 #define JOF_UINT8 13 #define JOF_INT32 14 #define JOF_OBJECT 15 #define JOF_SLOTOBJECT 16 #define JOF_REGEXP 17 #define JOF_INT8 18 #define JOF_ATOMOBJECT 19 #define JOF_UINT16PAIR 20 #define JOF_SCOPECOORD 21 #define JOF_TYPEMASK 0x001f #define JOF_NAME (1U<<5) #define JOF_PROP (2U<<5) #define JOF_ELEM (3U<<5) #define JOF_XMLNAME (4U<<5) #define JOF_MODEMASK (7U<<5) #define JOF_SET (1U<<8) #define JOF_DEL (1U<<9) #define JOF_DEC (1U<<10) #define JOF_INC (2U<<10) #define JOF_INCDEC (3U<<10) #define JOF_POST (1U<<12) #define JOF_ASSIGNING JOF_SET #define JOF_DETECTING (1U<<14) #define JOF_BACKPATCH (1U<<15) #define JOF_LEFTASSOC (1U<<16) #define JOF_DECLARING (1U<<17) #define JOF_PARENHEAD (1U<<20) #define JOF_INVOKE (1U<<21) #define JOF_TMPSLOT (1U<<22) #define JOF_TMPSLOT2 (2U<<22) #define JOF_TMPSLOT3 (3U<<22) #define JOF_TMPSLOT_SHIFT 22 #define JOF_TMPSLOT_MASK (JS_BITMASK(2) << JOF_TMPSLOT_SHIFT) #define JOF_GNAME (1U<<25) #define JOF_TYPESET (1U<<26) #define JOF_DECOMPOSE (1U<<27) #define JOF_ARITH (1U<<28) #define JOF_TYPE(fmt) ((fmt) & JOF_TYPEMASK) #define JOF_OPTYPE(op) JOF_TYPE(js_CodeSpec[op].format) #define JOF_MODE(fmt) ((fmt) & JOF_MODEMASK) #define JOF_OPMODE(op) JOF_MODE(js_CodeSpec[op].format) #define JOF_TYPE_IS_EXTENDED_JUMP(t) ((unsigned)((t) - JOF_JUMP) <= (unsigned)(JOF_LOOKUPSWITCH - JOF_JUMP)) static __attribute__((always_inline)) inline uint8_t GET_UINT8(jsbytecode *pc) { return (uint8_t) pc[1]; } static __attribute__((always_inline)) inline void SET_UINT8(jsbytecode *pc, uint8_t u) { pc[1] = (jsbytecode) u; } #define UINT16_LEN 2 #define UINT16_HI(i) ((jsbytecode)((i) >> 8)) #define UINT16_LO(i) ((jsbytecode)(i)) #define GET_UINT16(pc) ((unsigned)(((pc)[1] << 8) | (pc)[2])) #define SET_UINT16(pc,i) ((pc)[1] = UINT16_HI(i), (pc)[2] = UINT16_LO(i)) #define UINT16_LIMIT ((unsigned)1 << 16) #define JUMP_OFFSET_LEN 4 #define JUMP_OFFSET_MIN INT32_MIN #define JUMP_OFFSET_MAX INT32_MAX static __attribute__((always_inline)) inline int32_t GET_JUMP_OFFSET(jsbytecode *pc) { return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4]; } static __attribute__((always_inline)) inline void SET_JUMP_OFFSET(jsbytecode *pc, int32_t off) { pc[1] = (jsbytecode)(off >> 24); pc[2] = (jsbytecode)(off >> 16); pc[3] = (jsbytecode)(off >> 8); pc[4] = (jsbytecode)off; } #define UINT32_INDEX_LEN 4 static __attribute__((always_inline)) inline uint32_t GET_UINT32_INDEX(const jsbytecode *pc) { return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4]; } static __attribute__((always_inline)) inline void SET_UINT32_INDEX(jsbytecode *pc, uint32_t index) { pc[1] = (jsbytecode)(index >> 24); pc[2] = (jsbytecode)(index >> 16); pc[3] = (jsbytecode)(index >> 8); pc[4] = (jsbytecode)index; } #define UINT24_HI(i) ((jsbytecode)((i) >> 16)) #define UINT24_MID(i) ((jsbytecode)((i) >> 8)) #define UINT24_LO(i) ((jsbytecode)(i)) #define GET_UINT24(pc) ((jsatomid)(((pc)[1] << 16) | ((pc)[2] << 8) | (pc)[3])) #define SET_UINT24(pc,i) ((pc)[1] = UINT24_HI(i), (pc)[2] = UINT24_MID(i), (pc)[3] = UINT24_LO(i)) #define GET_INT8(pc) (int8_t((pc)[1])) #define GET_INT32(pc) (((uint32_t((pc)[1]) << 24) | (uint32_t((pc)[2]) << 16) | (uint32_t((pc)[3]) << 8) | uint32_t((pc)[4]))) #define SET_INT32(pc,i) ((pc)[1] = (jsbytecode)(uint32_t(i) >> 24), (pc)[2] = (jsbytecode)(uint32_t(i) >> 16), (pc)[3] = (jsbytecode)(uint32_t(i) >> 8), (pc)[4] = (jsbytecode)uint32_t(i)) #define INDEX_LIMIT_LOG2 23 #define INDEX_LIMIT (uint32_t(1) << INDEX_LIMIT_LOG2) #define ARGC_HI(argc) UINT16_HI(argc) #define ARGC_LO(argc) UINT16_LO(argc) #define GET_ARGC(pc) GET_UINT16(pc) #define ARGC_LIMIT UINT16_LIMIT #define GET_ARGNO(pc) GET_UINT16(pc) #define SET_ARGNO(pc,argno) SET_UINT16(pc,argno) #define ARGNO_LEN 2 #define ARGNO_LIMIT UINT16_LIMIT #define GET_SLOTNO(pc) GET_UINT16(pc) #define SET_SLOTNO(pc,varno) SET_UINT16(pc,varno) #define SLOTNO_LEN 2 #define SLOTNO_LIMIT UINT16_LIMIT struct JSCodeSpec { int8_t length; int8_t nuses; int8_t ndefs; uint8_t prec; uint32_t format; uint32_t type() const { return ((format) & 0x001f); } }; extern const JSCodeSpec js_CodeSpec[]; extern unsigned js_NumCodeSpecs; extern const char *js_CodeName[]; extern const char js_EscapeMap[]; # 244 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" extern JSString * js_QuoteString(JSContext *cx, JSString *str, jschar quote); # 258 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" extern JSPrinter * js_NewPrinter(JSContext *cx, const char *name, JSFunction *fun, unsigned indent, JSBool pretty, JSBool grouped, JSBool strict); extern void js_DestroyPrinter(JSPrinter *jp); extern JSString * js_GetPrinterOutput(JSPrinter *jp); extern int js_printf(JSPrinter *jp, const char *format, ...); extern JSBool js_puts(JSPrinter *jp, const char *s); #define GET_ATOM_FROM_BYTECODE(script,pc,pcoff,atom) JS_BEGIN_MACRO JS_ASSERT(js_CodeSpec[*(pc)].format & JOF_ATOM); (atom) = (script)->getAtom(GET_UINT32_INDEX((pc) + (pcoff))); JS_END_MACRO #define GET_NAME_FROM_BYTECODE(script,pc,pcoff,name) JS_BEGIN_MACRO JSAtom *atom_; GET_ATOM_FROM_BYTECODE(script, pc, pcoff, atom_); JS_ASSERT(js_CodeSpec[*(pc)].format & (JOF_NAME | JOF_PROP)); (name) = atom_->asPropertyName(); JS_END_MACRO namespace js { extern unsigned StackUses(JSScript *script, jsbytecode *pc); extern unsigned StackDefs(JSScript *script, jsbytecode *pc); } extern JSBool js_DecompileScript(JSPrinter *jp, JSScript *script); extern JSBool js_DecompileFunctionBody(JSPrinter *jp); extern JSBool js_DecompileFunction(JSPrinter *jp); # 317 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" typedef JSBool (* JSDecompilerPtr)(JSPrinter *); extern JSString * js_DecompileToString(JSContext *cx, const char *name, JSFunction *fun, unsigned indent, JSBool pretty, JSBool grouped, JSBool strict, JSDecompilerPtr decompiler); # 336 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" extern char * js_DecompileValueGenerator(JSContext *cx, int spindex, jsval v, JSString *fallback); extern unsigned js_ReconstructStackDepth(JSContext *cx, JSScript *script, jsbytecode *pc); } #define JSDVG_IGNORE_STACK 0 #define JSDVG_SEARCH_STACK 1 extern size_t js_GetVariableBytecodeLength(jsbytecode *pc); namespace js { static inline char * DecompileValueGenerator(JSContext *cx, int spindex, const Value &v, JSString *fallback) { return js_DecompileValueGenerator(cx, spindex, v, fallback); } class Sprinter { public: struct InvariantChecker { const Sprinter *parent; explicit InvariantChecker(const Sprinter *p) : parent(p) { parent->checkInvariants(); } ~InvariantChecker() { parent->checkInvariants(); } }; JSContext *context; private: static const size_t DefaultSize; char *base; size_t size; ptrdiff_t offset; bool realloc_(size_t newSize); public: explicit Sprinter(JSContext *cx); ~Sprinter(); bool init(); void checkInvariants() const; const char *string() const; const char *stringEnd() const; char *stringAt(ptrdiff_t off) const; char &operator[](size_t off); bool empty() const; char *reserve(size_t len); char *reserveAndClear(size_t len); ptrdiff_t put(const char *s, size_t len); ptrdiff_t put(const char *s); ptrdiff_t putString(JSString *str); int printf(const char *fmt, ...); void setOffset(const char *end); void setOffset(ptrdiff_t off); ptrdiff_t getOffset() const; ptrdiff_t getOffsetOf(const char *string) const; }; extern ptrdiff_t Sprint(Sprinter *sp, const char *format, ...); extern bool CallResultEscapes(jsbytecode *pc); static inline unsigned GetDecomposeLength(jsbytecode *pc, size_t len) { do { } while(0); return (unsigned) pc[len - 1]; } static inline unsigned GetBytecodeLength(jsbytecode *pc) { JSOp op = (JSOp)*pc; do { } while(0); if (js_CodeSpec[op].length != -1) return js_CodeSpec[op].length; return js_GetVariableBytecodeLength(pc); } extern bool IsValidBytecodeOffset(JSContext *cx, JSScript *script, size_t offset); inline bool FlowsIntoNext(JSOp op) { return op != JSOP_STOP && op != JSOP_RETURN && op != JSOP_RETRVAL && op != JSOP_THROW && op != JSOP_GOTO && op != JSOP_RETSUB; } class PCCounts { friend struct ::JSScript; double *counts; public: enum BaseCounts { BASE_INTERP = 0, BASE_METHODJIT, BASE_METHODJIT_STUBS, BASE_METHODJIT_CODE, BASE_METHODJIT_PICS, BASE_LIMIT }; enum AccessCounts { ACCESS_MONOMORPHIC = BASE_LIMIT, ACCESS_DIMORPHIC, ACCESS_POLYMORPHIC, ACCESS_BARRIER, ACCESS_NOBARRIER, ACCESS_UNDEFINED, ACCESS_NULL, ACCESS_BOOLEAN, ACCESS_INT32, ACCESS_DOUBLE, ACCESS_STRING, ACCESS_OBJECT, ACCESS_LIMIT }; static bool accessOp(JSOp op) { if (op == JSOP_SETELEM || op == JSOP_SETPROP) return true; int format = js_CodeSpec[op].format; return !!(format & ((1U<<5) | (1U<<25) | (3U<<5) | (2U<<5))) && !(format & ((1U<<8) | (3U<<10))); } enum ElementCounts { ELEM_ID_INT = ACCESS_LIMIT, ELEM_ID_DOUBLE, ELEM_ID_OTHER, ELEM_ID_UNKNOWN, ELEM_OBJECT_TYPED, ELEM_OBJECT_PACKED, ELEM_OBJECT_DENSE, ELEM_OBJECT_OTHER, ELEM_LIMIT }; static bool elementOp(JSOp op) { return accessOp(op) && (((js_CodeSpec[op].format) & (7U<<5)) == (3U<<5)); } enum PropertyCounts { PROP_STATIC = ACCESS_LIMIT, PROP_DEFINITE, PROP_OTHER, PROP_LIMIT }; static bool propertyOp(JSOp op) { return accessOp(op) && (((js_CodeSpec[op].format) & (7U<<5)) == (2U<<5)); } enum ArithCounts { ARITH_INT = BASE_LIMIT, ARITH_DOUBLE, ARITH_OTHER, ARITH_UNKNOWN, ARITH_LIMIT }; static bool arithOp(JSOp op) { return !!(js_CodeSpec[op].format & ((3U<<10) | (1U<<28))); } static size_t numCounts(JSOp op) { if (accessOp(op)) { if (elementOp(op)) return ELEM_LIMIT; if (propertyOp(op)) return PROP_LIMIT; return ACCESS_LIMIT; } if (arithOp(op)) return ARITH_LIMIT; return BASE_LIMIT; } static const char *countName(JSOp op, size_t which); double *rawCounts() { return counts; } double& get(size_t which) { do { } while(0); return counts[which]; } operator void*() const { return counts; } }; } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 1 # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 typedef enum JSTryNoteKind { JSTRY_CATCH, JSTRY_FINALLY, JSTRY_ITER } JSTryNoteKind; struct JSTryNote { uint8_t kind; uint8_t padding; uint16_t stackDepth; uint32_t start; uint32_t length; }; namespace js { struct ConstArray { js::HeapValue *vector; uint32_t length; }; struct ObjectArray { js::HeapPtrObject *vector; uint32_t length; }; struct TryNoteArray { JSTryNote *vector; uint32_t length; }; struct ClosedSlotArray { uint32_t *vector; uint32_t length; }; struct Shape; enum BindingKind { NONE, ARGUMENT, VARIABLE, CONSTANT }; struct BindingName { JSAtom *maybeAtom; BindingKind kind; }; typedef Vector BindingNames; class Bindings { HeapPtr lastBinding; uint16_t nargs; uint16_t nvars; bool hasDup_:1; inline Shape *initialShape(JSContext *cx) const; public: inline Bindings(JSContext *cx); inline void transfer(JSContext *cx, Bindings *bindings); inline void clone(JSContext *cx, Bindings *bindings); uint16_t numArgs() const { return nargs; } uint16_t numVars() const { return nvars; } unsigned count() const { return nargs + nvars; } bool bindingIsArg(uint16_t i) const { return i < nargs; } bool bindingIsLocal(uint16_t i) const { return i >= nargs; } uint16_t argToBinding(uint16_t i) { do { } while(0); return i; } uint16_t localToBinding(uint16_t i) { return i + nargs; } uint16_t bindingToArg(uint16_t i) { do { } while(0); return i; } uint16_t bindingToLocal(uint16_t i) { do { } while(0); return i - nargs; } inline bool ensureShape(JSContext *cx); inline Shape *lastShape() const; Shape *callObjectShape(JSContext *cx) const; inline bool extensibleParents(); bool setExtensibleParents(JSContext *cx); bool setParent(JSContext *cx, JSObject *obj); enum { BINDING_COUNT_LIMIT = 0xFFFF }; # 162 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" bool add(JSContext *cx, HandleAtom name, BindingKind kind); bool addVariable(JSContext *cx, HandleAtom name) { return add(cx, name, VARIABLE); } bool addConstant(JSContext *cx, HandleAtom name) { return add(cx, name, CONSTANT); } bool addArgument(JSContext *cx, HandleAtom name, uint16_t *slotp) { do { } while(0); *slotp = nargs; return add(cx, name, ARGUMENT); } bool addDestructuring(JSContext *cx, uint16_t *slotp) { *slotp = nargs; return add(cx, RootedAtom(cx), ARGUMENT); } void noteDup() { hasDup_ = true; } bool hasDup() const { return hasDup_; } BindingKind lookup(JSContext *cx, JSAtom *name, unsigned *indexp) const; bool hasBinding(JSContext *cx, JSAtom *name) const { return lookup(cx, name, __null) != NONE; } # 206 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" bool getLocalNameArray(JSContext *cx, BindingNames *namesp); void makeImmutable(); # 224 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" const js::Shape *lastArgument() const; const js::Shape *lastVariable() const; void trace(JSTracer *trc); class AutoRooter : private AutoGCRooter { public: explicit AutoRooter(JSContext *cx, Bindings *bindings_ ) : AutoGCRooter(cx, BINDINGS), bindings(bindings_), skip(cx, bindings_) { do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); void trace(JSTracer *trc); private: Bindings *bindings; SkipRoot skip; }; }; } #define JS_OBJECT_ARRAY_SIZE(length) (offsetof(ObjectArray, vector) + sizeof(JSObject *) * (length)) namespace JSC { class ExecutablePool; } namespace js { namespace mjit { struct JITScript; class CallCompiler; } } namespace js { namespace analyze { class ScriptAnalysis; } class ScriptCounts { friend struct ::JSScript; friend struct ScriptAndCounts; PCCounts *pcCountsVector; public: ScriptCounts() : pcCountsVector(__null) { } inline void destroy(FreeOp *fop); void set(js::ScriptCounts counts) { pcCountsVector = counts.pcCountsVector; } }; typedef HashMap, SystemAllocPolicy> ScriptCountsMap; typedef HashMap, SystemAllocPolicy> SourceMapMap; class DebugScript { friend struct ::JSScript; # 314 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" uint32_t stepMode; uint32_t numSites; BreakpointSite *breakpoints[1]; }; typedef HashMap, SystemAllocPolicy> DebugScriptMap; } struct JSScript : public js::gc::Cell { private: static const uint32_t stepFlagMask = 0x80000000U; static const uint32_t stepCountMask = 0x7fffffffU; public: class JITScriptHandle { friend class js::mjit::CallCompiler; # 358 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" static const js::mjit::JITScript *UNJITTABLE; js::mjit::JITScript *value; public: JITScriptHandle() { value = __null; } bool isEmpty() { return value == __null; } bool isUnjittable() { return value == UNJITTABLE; } bool isValid() { return value > UNJITTABLE; } js::mjit::JITScript *getValid() { do { } while(0); return value; } void setEmpty() { value = __null; } void setUnjittable() { value = const_cast(UNJITTABLE); } void setValid(js::mjit::JITScript *jit) { value = jit; do { } while(0); } static void staticAsserts(); }; struct JITScriptSet { JITScriptHandle jitHandleNormal; JITScriptHandle jitHandleNormalBarriered; JITScriptHandle jitHandleCtor; JITScriptHandle jitHandleCtorBarriered; static size_t jitHandleOffset(bool constructing, bool barriers) { return constructing ? (barriers ? __builtin_offsetof (JITScriptSet, jitHandleCtorBarriered) : __builtin_offsetof (JITScriptSet, jitHandleCtor)) : (barriers ? __builtin_offsetof (JITScriptSet, jitHandleNormalBarriered) : __builtin_offsetof (JITScriptSet, jitHandleNormal)); } }; # 411 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" public: js::Bindings bindings; public: jsbytecode *code; uint8_t *data; const char *filename; js::HeapPtrAtom *atoms; JSPrincipals *principals; JSPrincipals *originPrincipals; # 439 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" js::HeapPtr globalObject; js::types::TypeScript *types; private: JITScriptSet *jitInfo; js::HeapPtrFunction function_; public: uint32_t length; uint32_t lineno; uint32_t mainOffset; uint32_t natoms; private: uint32_t useCount; uint32_t pad32; # 482 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" private: uint16_t version; public: uint16_t nfixed; uint16_t nTypeSets; uint16_t nslots; uint16_t staticLevel; private: uint16_t argsSlot_; public: enum ArrayKind { CONSTS, OBJECTS, REGEXPS, TRYNOTES, CLOSED_ARGS, CLOSED_VARS, LIMIT }; typedef uint8_t ArrayBitsT; private: ArrayBitsT hasArrayBits; public: bool noScriptRval:1; bool savedCallerFun:1; bool strictModeCode:1; bool compileAndGo:1; bool bindingsAccessedDynamically:1; bool warnedAboutTwoArgumentEval:1; bool warnedAboutUndefinedProp:1; bool hasSingletons:1; bool isOuterFunction:1; bool isInnerFunction:1; bool isActiveEval:1; bool isCachedEval:1; bool uninlineable:1; bool reentrantOuterFunction:1; bool typesPurged:1; bool debugMode:1; bool failedBoundsCheck:1; bool callDestroyHook:1; bool isGenerator:1; bool hasScriptCounts:1; bool hasSourceMap:1; bool hasDebugScript:1; private: bool argsHasLocalBinding_:1; bool needsArgsAnalysis_:1; bool needsArgsObj_:1; # 578 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" public: static JSScript *NewScript(JSContext *cx, uint32_t length, uint32_t nsrcnotes, uint32_t natoms, uint32_t nobjects, uint32_t nregexps, uint32_t ntrynotes, uint32_t nconsts, uint16_t nClosedArgs, uint16_t nClosedVars, uint32_t nTypeSets, JSVersion version); static JSScript *NewScriptFromEmitter(JSContext *cx, js::BytecodeEmitter *bce); void setVersion(JSVersion v) { version = v; } bool argumentsHasLocalBinding() const { return argsHasLocalBinding_; } jsbytecode *argumentsBytecode() const { do { } while(0); return code; } unsigned argumentsLocalSlot() const { do { } while(0); return argsSlot_; } void setArgumentsHasLocalBinding(uint16_t slot); # 604 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" bool analyzedArgsUsage() const { return !needsArgsAnalysis_; } bool needsArgsObj() const { do { } while(0); return needsArgsObj_; } void setNeedsArgsObj(bool needsArgsObj); static bool applySpeculationFailed(JSContext *cx, JSScript *script); # 618 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" bool argsObjAliasesFormals() const { return needsArgsObj() && !strictModeCode; } JSScript *&evalHashLink() { return *globalObject.unsafeGetUnioned(); } JSFunction *function() const { return function_; } void setFunction(JSFunction *fun); unsigned id() { return 0; } inline bool ensureHasTypes(JSContext *cx); inline bool ensureRanAnalysis(JSContext *cx, JSObject *scope); inline bool ensureRanInference(JSContext *cx); inline bool hasAnalysis(); inline void clearAnalysis(); inline js::analyze::ScriptAnalysis *analysis(); bool typeSetFunction(JSContext *cx, JSFunction *fun, bool singleton = false); inline bool hasGlobal() const; inline bool hasClearedGlobal() const; inline js::GlobalObject *global() const; inline js::types::TypeScriptNesting *nesting() const; inline void clearNesting(); js::GlobalObject *getGlobalObjectOrNull() const { return (isCachedEval || isActiveEval) ? __null : globalObject.get(); } private: bool makeTypes(JSContext *cx); bool makeAnalysis(JSContext *cx); private: friend class js::mjit::CallCompiler; public: bool hasJITInfo() { return jitInfo != __null; } static size_t offsetOfJITInfo() { return __builtin_offsetof (JSScript, jitInfo); } inline bool ensureHasJITInfo(JSContext *cx); inline void destroyJITInfo(js::FreeOp *fop); JITScriptHandle *jitHandle(bool constructing, bool barriers) { do { } while(0); return constructing ? (barriers ? &jitInfo->jitHandleCtorBarriered : &jitInfo->jitHandleCtor) : (barriers ? &jitInfo->jitHandleNormalBarriered : &jitInfo->jitHandleNormal); } js::mjit::JITScript *getJIT(bool constructing, bool barriers) { if (!jitInfo) return __null; JITScriptHandle *jith = jitHandle(constructing, barriers); return jith->isValid() ? jith->getValid() : __null; } static void ReleaseCode(js::FreeOp *fop, JITScriptHandle *jith); inline void **nativeMap(bool constructing); inline void *nativeCodeForPC(bool constructing, jsbytecode *pc); uint32_t getUseCount() const { return useCount; } uint32_t incUseCount() { return ++useCount; } uint32_t *addressOfUseCount() { return &useCount; } void resetUseCount() { useCount = 0; } size_t sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf); public: bool initScriptCounts(JSContext *cx); js::PCCounts getPCCounts(jsbytecode *pc); js::ScriptCounts releaseScriptCounts(); void destroyScriptCounts(js::FreeOp *fop); bool setSourceMap(JSContext *cx, jschar *sourceMap); jschar *getSourceMap(); jschar *releaseSourceMap(); void destroySourceMap(js::FreeOp *fop); jsbytecode *main() { return code + mainOffset; } size_t computedSizeOfData(); size_t sizeOfData(JSMallocSizeOfFun mallocSizeOf); uint32_t numNotes(); jssrcnote *notes() { return (jssrcnote *)(code + length); } bool hasArray(ArrayKind kind) { return (hasArrayBits & (1 << kind)); } void setHasArray(ArrayKind kind) { hasArrayBits |= (1 << kind); } void cloneHasArray(JSScript *script) { hasArrayBits = script->hasArrayBits; } bool hasConsts() { return hasArray(CONSTS); } bool hasObjects() { return hasArray(OBJECTS); } bool hasRegexps() { return hasArray(REGEXPS); } bool hasTrynotes() { return hasArray(TRYNOTES); } bool hasClosedArgs() { return hasArray(CLOSED_ARGS); } bool hasClosedVars() { return hasArray(CLOSED_VARS); } #define OFF(fooOff,hasFoo,t) (fooOff() + (hasFoo() ? sizeof(t) : 0)) size_t constsOffset() { return 0; } size_t objectsOffset() { return (constsOffset() + (hasConsts() ? sizeof(js::ConstArray) : 0)); } size_t regexpsOffset() { return (objectsOffset() + (hasObjects() ? sizeof(js::ObjectArray) : 0)); } size_t trynotesOffset() { return (regexpsOffset() + (hasRegexps() ? sizeof(js::ObjectArray) : 0)); } size_t closedArgsOffset() { return (trynotesOffset() + (hasTrynotes() ? sizeof(js::TryNoteArray) : 0)); } size_t closedVarsOffset() { return (closedArgsOffset() + (hasClosedArgs() ? sizeof(js::ClosedSlotArray) : 0)); } js::ConstArray *consts() { do { } while(0); return reinterpret_cast(data + constsOffset()); } js::ObjectArray *objects() { do { } while(0); return reinterpret_cast(data + objectsOffset()); } js::ObjectArray *regexps() { do { } while(0); return reinterpret_cast(data + regexpsOffset()); } js::TryNoteArray *trynotes() { do { } while(0); return reinterpret_cast(data + trynotesOffset()); } js::ClosedSlotArray *closedArgs() { do { } while(0); return reinterpret_cast(data + closedArgsOffset()); } js::ClosedSlotArray *closedVars() { do { } while(0); return reinterpret_cast(data + closedVarsOffset()); } uint32_t numClosedArgs() { return hasClosedArgs() ? closedArgs()->length : 0; } uint32_t numClosedVars() { return hasClosedVars() ? closedVars()->length : 0; } js::HeapPtrAtom &getAtom(size_t index) const { do { } while(0); return atoms[index]; } js::PropertyName *getName(size_t index) { return getAtom(index)->asPropertyName(); } JSObject *getObject(size_t index) { js::ObjectArray *arr = objects(); do { } while(0); return arr->vector[index]; } JSVersion getVersion() const { return JSVersion(version); } inline JSFunction *getFunction(size_t index); inline JSFunction *getCallerFunction(); inline JSObject *getRegExp(size_t index); const js::Value &getConst(size_t index) { js::ConstArray *arr = consts(); do { } while(0); return arr->vector[index]; } inline bool isEmpty() const; uint32_t getClosedArg(uint32_t index) { js::ClosedSlotArray *arr = closedArgs(); do { } while(0); return arr->vector[index]; } uint32_t getClosedVar(uint32_t index) { js::ClosedSlotArray *arr = closedVars(); do { } while(0); return arr->vector[index]; } # 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" private: void recompileForStepMode(js::FreeOp *fop); bool tryNewStepMode(JSContext *cx, uint32_t newValue); bool ensureHasDebugScript(JSContext *cx); js::DebugScript *debugScript(); js::DebugScript *releaseDebugScript(); void destroyDebugScript(js::FreeOp *fop); public: bool hasBreakpointsAt(jsbytecode *pc) { return !!getBreakpointSite(pc); } bool hasAnyBreakpointsOrStepMode() { return hasDebugScript; } js::BreakpointSite *getBreakpointSite(jsbytecode *pc) { do { } while(0); return hasDebugScript ? debugScript()->breakpoints[pc - code] : __null; } js::BreakpointSite *getOrCreateBreakpointSite(JSContext *cx, jsbytecode *pc, js::GlobalObject *scriptGlobal); void destroyBreakpointSite(js::FreeOp *fop, jsbytecode *pc); void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler); void clearTraps(js::FreeOp *fop); void markTrapClosures(JSTracer *trc); bool setStepModeFlag(JSContext *cx, bool step); bool changeStepModeCount(JSContext *cx, int delta); bool stepModeEnabled() { return hasDebugScript && !!debugScript()->stepMode; } void finalize(js::FreeOp *fop); static inline void writeBarrierPre(JSScript *script); static inline void writeBarrierPost(JSScript *script, void *addr); static inline js::ThingRootKind rootKind() { return js::THING_ROOT_SCRIPT; } static JSPrincipals *normalizeOriginPrincipals(JSPrincipals *principals, JSPrincipals *originPrincipals) { return originPrincipals ? originPrincipals : principals; } void markChildren(JSTracer *trc); }; typedef int moz_static_assert87[(sizeof(JSScript::ArrayBitsT) * 8 >= JSScript::LIMIT) ? 1 : -1]; typedef int moz_static_assert88[(sizeof(JSScript) % js::gc::Cell::CellSize == 0) ? 1 : -1]; static inline unsigned StackDepth(JSScript *script) { return script->nslots - script->nfixed; } extern __attribute__((visibility("default"))) void js_CallNewScriptHook(JSContext *cx, JSScript *script, JSFunction *fun); namespace js { extern void CallDestroyScriptHook(FreeOp *fop, JSScript *script); extern const char * SaveScriptFilename(JSContext *cx, const char *filename); struct ScriptFilenameEntry { bool marked; char filename[1]; static ScriptFilenameEntry *fromFilename(const char *filename) { return (ScriptFilenameEntry *)(filename - __builtin_offsetof (ScriptFilenameEntry, filename)); } }; struct ScriptFilenameHasher { typedef const char *Lookup; static HashNumber hash(const char *l) { return JS_HashString(l); } static bool match(const ScriptFilenameEntry *e, const char *l) { return strcmp(e->filename, l) == 0; } }; typedef HashSet ScriptFilenameTable; inline void MarkScriptFilename(JSRuntime *rt, const char *filename); extern void SweepScriptFilenames(JSRuntime *rt); extern void FreeScriptFilenames(JSRuntime *rt); struct ScriptAndCounts { JSScript *script; ScriptCounts scriptCounts; PCCounts &getPCCounts(jsbytecode *pc) const { do { } while(0); return scriptCounts.pcCountsVector[pc - script->code]; } }; } #define js_GetSrcNote(script,pc) js_GetSrcNoteCached(cx, script, pc) extern jssrcnote * js_GetSrcNoteCached(JSContext *cx, JSScript *script, jsbytecode *pc); extern jsbytecode * js_LineNumberToPC(JSScript *script, unsigned lineno); extern __attribute__((visibility("default"))) unsigned js_GetScriptLineExtent(JSScript *script); namespace js { extern unsigned PCToLineNumber(JSScript *script, jsbytecode *pc); extern unsigned PCToLineNumber(unsigned startLine, jssrcnote *notes, jsbytecode *code, jsbytecode *pc); extern unsigned CurrentLine(JSContext *cx); # 1051 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" enum LineOption { CALLED_FROM_JSOP_EVAL, NOT_CALLED_FROM_JSOP_EVAL }; inline void CurrentScriptFileLineOrigin(JSContext *cx, unsigned *linenop, LineOption = NOT_CALLED_FROM_JSOP_EVAL); extern JSScript * CloneScript(JSContext *cx, JSScript *script); template bool XDRScript(XDRState *xdr, JSScript **scriptp, JSScript *parentScript); } # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 1 # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 2 # 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" #define JSFUN_PROTOTYPE 0x0800 #define JSFUN_EXPR_CLOSURE 0x1000 #define JSFUN_EXTENDED 0x2000 #define JSFUN_INTERPRETED 0x4000 #define JSFUN_NULL_CLOSURE 0x8000 #define JSFUN_KINDMASK 0xc000 namespace js { class FunctionExtended; } struct JSFunction : public JSObject { uint16_t nargs; uint16_t flags; union U { js::Native native; struct Scripted { JSScript *script_; JSObject *env_; } i; void *nativeOrScript; } u; js::HeapPtrAtom atom; bool hasDefaults() const { return flags & 0x0400; } bool hasRest() const { return flags & 0x0100; } bool isInterpreted() const { return kind() >= 0x4000; } bool isNative() const { return !isInterpreted(); } bool isNativeConstructor() const { return flags & 0x0200; } bool isHeavyweight() const { return ((flags) & 0x80); } bool isNullClosure() const { return kind() == 0x8000; } bool isFunctionPrototype() const { return flags & 0x0800; } bool isInterpretedConstructor() const { return isInterpreted() && !isFunctionPrototype(); } uint16_t kind() const { return flags & 0xc000; } void setKind(uint16_t k) { do { } while(0); flags = (flags & ~0xc000) | k; } inline bool inStrictMode() const; void setArgCount(uint16_t nargs) { do { } while(0); this->nargs = nargs; } void setHasRest() { do { } while(0); this->flags |= 0x0100; } void setHasDefaults() { do { } while(0); this->flags |= 0x0400; } enum { MAX_ARGS_AND_VARS = 2 * ((1U << 16) - 1) }; inline JSObject *environment() const; inline void setEnvironment(JSObject *obj); inline void initEnvironment(JSObject *obj); static inline size_t offsetOfEnvironment() { return __builtin_offsetof (JSFunction, u.i.env_); } JSScript *script() const { do { } while(0); return *(js::HeapPtrScript *)&u.i.script_; } js::HeapPtrScript &mutableScript() { do { } while(0); return *(js::HeapPtrScript *)&u.i.script_; } inline void setScript(JSScript *script_); inline void initScript(JSScript *script_); JSScript *maybeScript() const { return isInterpreted() ? script() : __null; } JSNative native() const { do { } while(0); return u.native; } JSNative maybeNative() const { return isInterpreted() ? __null : native(); } static unsigned offsetOfNativeOrScript() { typedef int moz_static_assert89[(__builtin_offsetof (U, native) == __builtin_offsetof (U, i.script_)) ? 1 : -1]; typedef int moz_static_assert90[(__builtin_offsetof (U, native) == __builtin_offsetof (U, nativeOrScript)) ? 1 : -1]; return __builtin_offsetof (JSFunction, u.nativeOrScript); } static const js::gc::AllocKind FinalizeKind = js::gc::FINALIZE_OBJECT2_BACKGROUND; static const js::gc::AllocKind ExtendedFinalizeKind = js::gc::FINALIZE_OBJECT4_BACKGROUND; # 163 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" inline void trace(JSTracer *trc); inline bool initBoundFunction(JSContext *cx, js::HandleValue thisArg, const js::Value *args, unsigned argslen); inline JSObject *getBoundFunctionTarget() const; inline const js::Value &getBoundFunctionThis() const; inline const js::Value &getBoundFunctionArgument(unsigned which) const; inline size_t getBoundFunctionArgumentCount() const; private: inline js::FunctionExtended *toExtended(); inline const js::FunctionExtended *toExtended() const; inline bool isExtended() const { typedef int moz_static_assert91[(FinalizeKind != ExtendedFinalizeKind) ? 1 : -1]; do { } while(0); return !!(flags & 0x2000); } public: inline void initializeExtended(); inline void setExtendedSlot(size_t which, const js::Value &val); inline const js::Value &getExtendedSlot(size_t which) const; private: inline JSFunction *toFunction() ; inline const JSFunction *toFunction() const ; }; inline JSFunction * JSObject::toFunction() { do { } while(0); return static_cast(this); } inline const JSFunction * JSObject::toFunction() const { do { } while(0); return static_cast(this); } extern JSString * fun_toStringHelper(JSContext *cx, JSObject *obj, unsigned indent); extern JSFunction * js_NewFunction(JSContext *cx, JSObject *funobj, JSNative native, unsigned nargs, unsigned flags, js::HandleObject parent, JSAtom *atom, js::gc::AllocKind kind = JSFunction::FinalizeKind); extern JSFunction * js_CloneFunctionObject(JSContext *cx, js::HandleFunction fun, js::HandleObject parent, js::HandleObject proto, js::gc::AllocKind kind = JSFunction::FinalizeKind); extern JSFunction * js_DefineFunction(JSContext *cx, js::HandleObject obj, js::HandleId id, JSNative native, unsigned nargs, unsigned flags, js::gc::AllocKind kind = JSFunction::FinalizeKind); #define JSV2F_CONSTRUCT INITIAL_CONSTRUCT #define JSV2F_SEARCH_STACK 0x10000 extern JSFunction * js_ValueToFunction(JSContext *cx, const js::Value *vp, unsigned flags); extern JSObject * js_ValueToCallableObject(JSContext *cx, js::Value *vp, unsigned flags); extern void js_ReportIsNotFunction(JSContext *cx, const js::Value *vp, unsigned flags); extern void js_PutCallObject(js::StackFrame *fp, js::CallObject &callobj); namespace js { class FunctionExtended : public JSFunction { friend struct JSFunction; HeapValue extendedSlots[2]; }; } inline js::FunctionExtended * JSFunction::toExtended() { do { } while(0); return static_cast(this); } inline const js::FunctionExtended * JSFunction::toExtended() const { do { } while(0); return static_cast(this); } extern void js_PutArgsObject(js::StackFrame *fp); inline bool js_IsNamedLambda(JSFunction *fun) { return (fun->flags & 0x08) && fun->atom; } namespace js { template bool XDRInterpretedFunction(XDRState *xdr, JSObject **objp, JSScript *parentScript); extern JSObject * CloneInterpretedFunction(JSContext *cx, JSFunction *fun); } extern JSBool js_fun_apply(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool js_fun_call(JSContext *cx, unsigned argc, js::Value *vp); extern JSObject* js_fun_bind(JSContext *cx, js::HandleObject target, js::HandleValue thisArg, js::Value *boundArgs, unsigned argslen); # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 2 # 1 "./jsautooplen.h" 1 #define JSOP_NOP_LENGTH 1 #define JSOP_UNDEFINED_LENGTH 1 #define JSOP_POPV_LENGTH 1 #define JSOP_ENTERWITH_LENGTH 1 #define JSOP_LEAVEWITH_LENGTH 1 #define JSOP_RETURN_LENGTH 1 #define JSOP_GOTO_LENGTH 5 #define JSOP_IFEQ_LENGTH 5 #define JSOP_IFNE_LENGTH 5 #define JSOP_ARGUMENTS_LENGTH 1 #define JSOP_SWAP_LENGTH 1 #define JSOP_POPN_LENGTH 3 #define JSOP_DUP_LENGTH 1 #define JSOP_DUP2_LENGTH 1 #define JSOP_SETCONST_LENGTH 5 #define JSOP_BITOR_LENGTH 1 #define JSOP_BITXOR_LENGTH 1 #define JSOP_BITAND_LENGTH 1 #define JSOP_EQ_LENGTH 1 #define JSOP_NE_LENGTH 1 #define JSOP_LT_LENGTH 1 #define JSOP_LE_LENGTH 1 #define JSOP_GT_LENGTH 1 #define JSOP_GE_LENGTH 1 #define JSOP_LSH_LENGTH 1 #define JSOP_RSH_LENGTH 1 #define JSOP_URSH_LENGTH 1 #define JSOP_ADD_LENGTH 1 #define JSOP_SUB_LENGTH 1 #define JSOP_MUL_LENGTH 1 #define JSOP_DIV_LENGTH 1 #define JSOP_MOD_LENGTH 1 #define JSOP_NOT_LENGTH 1 #define JSOP_BITNOT_LENGTH 1 #define JSOP_NEG_LENGTH 1 #define JSOP_POS_LENGTH 1 #define JSOP_DELNAME_LENGTH 5 #define JSOP_DELPROP_LENGTH 5 #define JSOP_DELELEM_LENGTH 1 #define JSOP_TYPEOF_LENGTH 1 #define JSOP_VOID_LENGTH 1 #define JSOP_INCNAME_LENGTH 6 #define JSOP_INCPROP_LENGTH 6 #define JSOP_INCELEM_LENGTH 2 #define JSOP_DECNAME_LENGTH 6 #define JSOP_DECPROP_LENGTH 6 #define JSOP_DECELEM_LENGTH 2 #define JSOP_NAMEINC_LENGTH 6 #define JSOP_PROPINC_LENGTH 6 #define JSOP_ELEMINC_LENGTH 2 #define JSOP_NAMEDEC_LENGTH 6 #define JSOP_PROPDEC_LENGTH 6 #define JSOP_ELEMDEC_LENGTH 2 #define JSOP_GETPROP_LENGTH 5 #define JSOP_SETPROP_LENGTH 5 #define JSOP_GETELEM_LENGTH 1 #define JSOP_SETELEM_LENGTH 1 #define JSOP_CALLNAME_LENGTH 5 #define JSOP_CALL_LENGTH 3 #define JSOP_NAME_LENGTH 5 #define JSOP_DOUBLE_LENGTH 5 #define JSOP_STRING_LENGTH 5 #define JSOP_ZERO_LENGTH 1 #define JSOP_ONE_LENGTH 1 #define JSOP_NULL_LENGTH 1 #define JSOP_THIS_LENGTH 1 #define JSOP_FALSE_LENGTH 1 #define JSOP_TRUE_LENGTH 1 #define JSOP_OR_LENGTH 5 #define JSOP_AND_LENGTH 5 #define JSOP_TABLESWITCH_LENGTH -1 #define JSOP_LOOKUPSWITCH_LENGTH -1 #define JSOP_STRICTEQ_LENGTH 1 #define JSOP_STRICTNE_LENGTH 1 #define JSOP_SETCALL_LENGTH 1 #define JSOP_ITER_LENGTH 2 #define JSOP_MOREITER_LENGTH 1 #define JSOP_ITERNEXT_LENGTH 2 #define JSOP_ENDITER_LENGTH 1 #define JSOP_FUNAPPLY_LENGTH 3 #define JSOP_OBJECT_LENGTH 5 #define JSOP_POP_LENGTH 1 #define JSOP_NEW_LENGTH 3 #define JSOP_UNUSED0_LENGTH 1 #define JSOP_GETARG_LENGTH 3 #define JSOP_SETARG_LENGTH 3 #define JSOP_GETLOCAL_LENGTH 3 #define JSOP_SETLOCAL_LENGTH 3 #define JSOP_UINT16_LENGTH 3 #define JSOP_NEWINIT_LENGTH 5 #define JSOP_NEWARRAY_LENGTH 4 #define JSOP_NEWOBJECT_LENGTH 5 #define JSOP_ENDINIT_LENGTH 1 #define JSOP_INITPROP_LENGTH 5 #define JSOP_INITELEM_LENGTH 1 #define JSOP_UNUSED14_LENGTH 1 #define JSOP_UNUSED15_LENGTH 1 #define JSOP_INCARG_LENGTH 3 #define JSOP_DECARG_LENGTH 3 #define JSOP_ARGINC_LENGTH 3 #define JSOP_ARGDEC_LENGTH 3 #define JSOP_INCLOCAL_LENGTH 3 #define JSOP_DECLOCAL_LENGTH 3 #define JSOP_LOCALINC_LENGTH 3 #define JSOP_LOCALDEC_LENGTH 3 #define JSOP_LEAVEFORLETIN_LENGTH 1 #define JSOP_LABEL_LENGTH 5 #define JSOP_UNUSED3_LENGTH 1 #define JSOP_FUNCALL_LENGTH 3 #define JSOP_LOOPHEAD_LENGTH 1 #define JSOP_BINDNAME_LENGTH 5 #define JSOP_SETNAME_LENGTH 5 #define JSOP_THROW_LENGTH 1 #define JSOP_IN_LENGTH 1 #define JSOP_INSTANCEOF_LENGTH 1 #define JSOP_DEBUGGER_LENGTH 1 #define JSOP_GOSUB_LENGTH 5 #define JSOP_RETSUB_LENGTH 1 #define JSOP_EXCEPTION_LENGTH 1 #define JSOP_LINENO_LENGTH 3 #define JSOP_CONDSWITCH_LENGTH 1 #define JSOP_CASE_LENGTH 5 #define JSOP_DEFAULT_LENGTH 5 #define JSOP_EVAL_LENGTH 3 #define JSOP_ENUMELEM_LENGTH 1 #define JSOP_GETTER_LENGTH 1 #define JSOP_SETTER_LENGTH 1 #define JSOP_DEFFUN_LENGTH 5 #define JSOP_DEFCONST_LENGTH 5 #define JSOP_DEFVAR_LENGTH 5 #define JSOP_LAMBDA_LENGTH 5 #define JSOP_CALLEE_LENGTH 1 #define JSOP_UNUSED31_LENGTH 1 #define JSOP_PICK_LENGTH 2 #define JSOP_TRY_LENGTH 1 #define JSOP_FINALLY_LENGTH 1 #define JSOP_GETALIASEDVAR_LENGTH 9 #define JSOP_CALLALIASEDVAR_LENGTH 9 #define JSOP_SETALIASEDVAR_LENGTH 9 #define JSOP_INCALIASEDVAR_LENGTH 10 #define JSOP_DECALIASEDVAR_LENGTH 10 #define JSOP_ALIASEDVARINC_LENGTH 10 #define JSOP_ALIASEDVARDEC_LENGTH 10 #define JSOP_UNUSED8_LENGTH 1 #define JSOP_UNUSED9_LENGTH 1 #define JSOP_UNUSED10_LENGTH 1 #define JSOP_UNUSED11_LENGTH 1 #define JSOP_UNUSED12_LENGTH 1 #define JSOP_UNUSED13_LENGTH 1 #define JSOP_BACKPATCH_LENGTH 5 #define JSOP_BACKPATCH_POP_LENGTH 5 #define JSOP_THROWING_LENGTH 1 #define JSOP_SETRVAL_LENGTH 1 #define JSOP_RETRVAL_LENGTH 1 #define JSOP_GETGNAME_LENGTH 5 #define JSOP_SETGNAME_LENGTH 5 #define JSOP_INCGNAME_LENGTH 6 #define JSOP_DECGNAME_LENGTH 6 #define JSOP_GNAMEINC_LENGTH 6 #define JSOP_GNAMEDEC_LENGTH 6 #define JSOP_REGEXP_LENGTH 5 #define JSOP_DEFXMLNS_LENGTH 1 #define JSOP_ANYNAME_LENGTH 1 #define JSOP_QNAMEPART_LENGTH 5 #define JSOP_QNAMECONST_LENGTH 5 #define JSOP_QNAME_LENGTH 1 #define JSOP_TOATTRNAME_LENGTH 1 #define JSOP_TOATTRVAL_LENGTH 1 #define JSOP_ADDATTRNAME_LENGTH 1 #define JSOP_ADDATTRVAL_LENGTH 1 #define JSOP_BINDXMLNAME_LENGTH 1 #define JSOP_SETXMLNAME_LENGTH 1 #define JSOP_XMLNAME_LENGTH 1 #define JSOP_DESCENDANTS_LENGTH 1 #define JSOP_FILTER_LENGTH 5 #define JSOP_ENDFILTER_LENGTH 5 #define JSOP_TOXML_LENGTH 1 #define JSOP_TOXMLLIST_LENGTH 1 #define JSOP_XMLTAGEXPR_LENGTH 1 #define JSOP_XMLELTEXPR_LENGTH 1 #define JSOP_XMLCDATA_LENGTH 5 #define JSOP_XMLCOMMENT_LENGTH 5 #define JSOP_XMLPI_LENGTH 5 #define JSOP_DELDESC_LENGTH 1 #define JSOP_CALLPROP_LENGTH 5 #define JSOP_ENTERLET0_LENGTH 5 #define JSOP_ENTERLET1_LENGTH 5 #define JSOP_UINT24_LENGTH 4 #define JSOP_UNUSED18_LENGTH 1 #define JSOP_UNUSED19_LENGTH 1 #define JSOP_UNUSED20_LENGTH 1 #define JSOP_STARTXML_LENGTH 1 #define JSOP_STARTXMLEXPR_LENGTH 1 #define JSOP_CALLELEM_LENGTH 1 #define JSOP_STOP_LENGTH 1 #define JSOP_GETXPROP_LENGTH 5 #define JSOP_CALLXMLNAME_LENGTH 1 #define JSOP_TYPEOFEXPR_LENGTH 1 #define JSOP_ENTERBLOCK_LENGTH 5 #define JSOP_LEAVEBLOCK_LENGTH 3 #define JSOP_UNUSED1_LENGTH 1 #define JSOP_UNUSED2_LENGTH 1 #define JSOP_GENERATOR_LENGTH 1 #define JSOP_YIELD_LENGTH 1 #define JSOP_ARRAYPUSH_LENGTH 3 #define JSOP_GETFUNNS_LENGTH 1 #define JSOP_ENUMCONSTELEM_LENGTH 1 #define JSOP_LEAVEBLOCKEXPR_LENGTH 3 #define JSOP_UNUSED21_LENGTH 1 #define JSOP_UNUSED22_LENGTH 1 #define JSOP_UNUSED23_LENGTH 1 #define JSOP_CALLGNAME_LENGTH 5 #define JSOP_CALLLOCAL_LENGTH 3 #define JSOP_CALLARG_LENGTH 3 #define JSOP_BINDGNAME_LENGTH 5 #define JSOP_INT8_LENGTH 2 #define JSOP_INT32_LENGTH 5 #define JSOP_LENGTH_LENGTH 5 #define JSOP_HOLE_LENGTH 1 #define JSOP_UNUSED17_LENGTH 1 #define JSOP_UNUSED24_LENGTH 1 #define JSOP_UNUSED25_LENGTH 1 #define JSOP_UNUSED29_LENGTH 1 #define JSOP_UNUSED30_LENGTH 1 #define JSOP_REST_LENGTH 1 #define JSOP_TOID_LENGTH 1 #define JSOP_IMPLICITTHIS_LENGTH 5 #define JSOP_LOOPENTRY_LENGTH 1 #define JSOP_ACTUALSFILLED_LENGTH 3 # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 2 struct JSContext; struct JSCompartment; namespace js { namespace mjit { struct CallSite; }} typedef js::mjit::CallSite JSInlinedSite; typedef size_t JSRejoinState; namespace js { class StackFrame; class FrameRegs; class StackSegment; class StackSpace; class ContextStack; class InvokeArgsGuard; class InvokeFrameGuard; class FrameGuard; class ExecuteFrameGuard; class DummyFrameGuard; class GeneratorFrameGuard; class CallIter; class ScriptFrameIter; class AllFramesIter; class ArgumentsObject; class StaticBlockObject; namespace mjit { struct JITScript; jsbytecode *NativeToPC(JITScript *jit, void *ncode, CallSite **pinline); } namespace detail { struct OOMCheck; } # 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" class CallReceiver { protected: void setUsedRval() const {} void clearUsedRval() const {} Value *argv_; public: friend CallReceiver CallReceiverFromVp(Value *); friend CallReceiver CallReceiverFromArgv(Value *); Value *base() const { return argv_ - 2; } JSObject &callee() const { do { } while(0); return argv_[-2].toObject(); } Value &calleev() const { do { } while(0); return argv_[-2]; } Value &thisv() const { return argv_[-1]; } Value &rval() const { setUsedRval(); return argv_[-2]; } Value *spAfterCall() const { setUsedRval(); return argv_ - 1; } void setCallee(Value calleev) { clearUsedRval(); this->calleev() = calleev; } }; __attribute__((always_inline)) inline CallReceiver CallReceiverFromArgv(Value *argv) { CallReceiver receiver; receiver.clearUsedRval(); receiver.argv_ = argv; return receiver; } __attribute__((always_inline)) inline CallReceiver CallReceiverFromVp(Value *vp) { return CallReceiverFromArgv(vp + 2); } class CallArgs : public CallReceiver { protected: unsigned argc_; public: friend CallArgs CallArgsFromVp(unsigned, Value *); friend CallArgs CallArgsFromArgv(unsigned, Value *); friend CallArgs CallArgsFromSp(unsigned, Value *); Value &operator[](unsigned i) const { do { } while(0); return argv_[i]; } Value *array() const { return argv_; } unsigned length() const { return argc_; } Value *end() const { return argv_ + argc_; } bool hasDefined(unsigned i) const { return i < argc_ && !argv_[i].isUndefined(); } }; __attribute__((always_inline)) inline CallArgs CallArgsFromArgv(unsigned argc, Value *argv) { CallArgs args; args.clearUsedRval(); args.argv_ = argv; args.argc_ = argc; return args; } __attribute__((always_inline)) inline CallArgs CallArgsFromVp(unsigned argc, Value *vp) { return CallArgsFromArgv(argc, vp + 2); } __attribute__((always_inline)) inline CallArgs CallArgsFromSp(unsigned argc, Value *sp) { return CallArgsFromArgv(argc, sp - argc); } # 260 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" class CallArgsList : public CallArgs { friend class StackSegment; CallArgsList *prev_; bool active_; public: friend CallArgsList CallArgsListFromVp(unsigned, Value *, CallArgsList *); friend CallArgsList CallArgsListFromArgv(unsigned, Value *, CallArgsList *); CallArgsList *prev() const { return prev_; } bool active() const { return active_; } void setActive() { active_ = true; } void setInactive() { active_ = false; } }; __attribute__((always_inline)) inline CallArgsList CallArgsListFromArgv(unsigned argc, Value *argv, CallArgsList *prev) { CallArgsList args; args.argv_ = argv; args.argc_ = argc; args.prev_ = prev; args.active_ = false; return args; } __attribute__((always_inline)) inline CallArgsList CallArgsListFromVp(unsigned argc, Value *vp, CallArgsList *prev) { return CallArgsListFromArgv(argc, vp + 2, prev); } enum InitialFrameFlags { INITIAL_NONE = 0, INITIAL_CONSTRUCT = 0x80, INITIAL_LOWERED = 0x200000 }; enum ExecuteType { EXECUTE_GLOBAL = 0x1, EXECUTE_DIRECT_EVAL = 0x8, EXECUTE_INDIRECT_EVAL = 0x9, EXECUTE_DEBUG = 0x18 }; class StackFrame { public: enum Flags { GLOBAL = 0x1, FUNCTION = 0x2, DUMMY = 0x4, EVAL = 0x8, DEBUGGER = 0x10, GENERATOR = 0x20, FLOATING_GENERATOR = 0x40, CONSTRUCTING = 0x80, YIELDING = 0x100, FINISHED_IN_INTERP = 0x200, OVERFLOW_ARGS = 0x400, UNDERFLOW_ARGS = 0x800, HAS_CALL_OBJ = 0x1000, HAS_ARGS_OBJ = 0x2000, HAS_HOOK_DATA = 0x4000, HAS_ANNOTATION = 0x8000, HAS_RVAL = 0x10000, HAS_SCOPECHAIN = 0x20000, HAS_PREVPC = 0x40000, HAS_BLOCKCHAIN = 0x80000, DOWN_FRAMES_EXPANDED = 0x100000, LOWERED_CALL_APPLY = 0x200000 }; private: mutable uint32_t flags_; union { JSScript *script; JSFunction *fun; } exec; union { unsigned nactual; JSScript *evalScript; } u; mutable JSObject *scopeChain_; StackFrame *prev_; void *ncode_; Value rval_; StaticBlockObject *blockChain_; ArgumentsObject *argsObj_; jsbytecode *prevpc_; JSInlinedSite *prevInline_; void *hookData_; void *annotation_; JSRejoinState rejoin_; static void staticAsserts() { typedef int moz_static_assert92[(__builtin_offsetof (StackFrame, rval_) % sizeof(Value) == 0) ? 1 : -1]; typedef int moz_static_assert93[(sizeof(StackFrame) % sizeof(Value) == 0) ? 1 : -1]; } inline void initPrev(JSContext *cx); jsbytecode *prevpcSlow(JSInlinedSite **pinlined); public: # 394 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" void initCallFrame(JSContext *cx, JSFunction &callee, JSScript *script, uint32_t nactual, StackFrame::Flags flags); void initFixupFrame(StackFrame *prev, StackFrame::Flags flags, void *ncode, unsigned nactual); void initExecuteFrame(JSScript *script, StackFrame *prev, FrameRegs *regs, const Value &thisv, JSObject &scopeChain, ExecuteType type); enum TriggerPostBarriers { DoPostBarrier = true, NoPostBarrier = false }; template void stealFrameAndSlots(JSContext *cx, StackFrame *fp, T *vp, StackFrame *otherfp, U *othervp, Value *othersp); void writeBarrierPost(); void initDummyFrame(JSContext *cx, JSObject &chain); # 428 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool isFunctionFrame() const { return !!(flags_ & FUNCTION); } bool isGlobalFrame() const { return !!(flags_ & GLOBAL); } bool isDummyFrame() const { return !!(flags_ & DUMMY); } bool isScriptFrame() const { bool retval = !!(flags_ & (FUNCTION | GLOBAL)); do { } while(0); return retval; } # 458 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool isEvalFrame() const { do { } while (0); return flags_ & EVAL; } bool isEvalInFunction() const { return (flags_ & (EVAL | FUNCTION)) == (EVAL | FUNCTION); } bool isNonEvalFunctionFrame() const { return (flags_ & (FUNCTION | EVAL)) == FUNCTION; } inline bool isStrictEvalFrame() const { return isEvalFrame() && script()->strictModeCode; } bool isNonStrictEvalFrame() const { return isEvalFrame() && !script()->strictModeCode; } bool isDirectEvalFrame() const { return isEvalFrame() && script()->staticLevel > 0; } bool isNonStrictDirectEvalFrame() const { return isNonStrictEvalFrame() && isDirectEvalFrame(); } # 500 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" StackFrame *prev() const { return prev_; } inline void resetGeneratorPrev(JSContext *cx); inline void resetInlinePrev(StackFrame *prevfp, jsbytecode *prevpc); inline void initInlineFrame(JSFunction *fun, StackFrame *prevfp, jsbytecode *prevpc); inline JSObject *createRestParameter(JSContext *cx); # 519 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" Value *slots() const { return (Value *)(this + 1); } Value *base() const { return slots() + script()->nfixed; } Value &varSlot(unsigned i) { do { } while(0); do { } while (0); return slots()[i]; } Value &localSlot(unsigned i) { do { } while(0); return slots()[i]; } # 574 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" jsbytecode *pcQuadratic(const ContextStack &stack, StackFrame *next = __null, JSInlinedSite **pinlined = __null); jsbytecode *prevpc(JSInlinedSite **pinlined) { if (flags_ & HAS_PREVPC) { if (pinlined) *pinlined = prevInline_; return prevpc_; } return prevpcSlow(pinlined); } JSInlinedSite *prevInline() { do { } while(0); return prevInline_; } JSScript *script() const { do { } while(0); return isFunctionFrame() ? isEvalFrame() ? u.evalScript : fun()->script() : exec.script; } JSScript *functionScript() const { do { } while(0); return isEvalFrame() ? u.evalScript : fun()->script(); } JSScript *globalScript() const { do { } while(0); return exec.script; } JSScript *maybeScript() const { return isScriptFrame() ? script() : __null; } size_t numFixed() const { return script()->nfixed; } size_t numSlots() const { return script()->nslots; } size_t numGlobalVars() const { do { } while(0); return exec.script->nfixed; } # 634 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" JSFunction* fun() const { do { } while(0); return exec.fun; } JSFunction* maybeFun() const { return isFunctionFrame() ? fun() : __null; } JSFunction* maybeScriptFunction() const { if (!isFunctionFrame()) return __null; const StackFrame *fp = this; while (fp->isEvalFrame()) fp = fp->prev(); return fp->script()->function(); } # 672 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool hasArgs() const { return isNonEvalFunctionFrame(); } unsigned numFormalArgs() const { do { } while(0); return fun()->nargs; } Value &formalArg(unsigned i) const { do { } while(0); return formalArgs()[i]; } Value *formalArgs() const { do { } while(0); return (Value *)this - numFormalArgs(); } Value *formalArgsEnd() const { do { } while(0); return (Value *)this; } Value *maybeFormalArgs() const { return (flags_ & (FUNCTION | EVAL)) == FUNCTION ? formalArgs() : __null; } inline unsigned numActualArgs() const; inline Value *actualArgs() const; inline Value *actualArgsEnd() const; inline Value &canonicalActualArg(unsigned i) const; template inline bool forEachCanonicalActualArg(Op op, unsigned start = 0, unsigned count = unsigned(-1)); template inline bool forEachFormalArg(Op op); bool hasArgsObj() const { return !!(flags_ & HAS_ARGS_OBJ); } ArgumentsObject &argsObj() const { do { } while(0); return *argsObj_; } ArgumentsObject *maybeArgsObj() const { return hasArgsObj() ? &argsObj() : __null; } void initArgsObj(ArgumentsObject &argsObj) { do { } while(0); do { } while(0); argsObj_ = &argsObj; flags_ |= HAS_ARGS_OBJ; } # 754 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" Value &functionThis() const { do { } while(0); if (isEvalFrame()) return ((Value *)this)[-1]; return formalArgs()[-1]; } JSObject &constructorThis() const { do { } while(0); return formalArgs()[-1].toObject(); } Value &globalThis() const { do { } while(0); return ((Value *)this)[-1]; } Value &thisValue() const { if (flags_ & (EVAL | GLOBAL)) return ((Value *)this)[-1]; return formalArgs()[-1]; } # 786 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" JSFunction &callee() const { do { } while(0); return *calleev().toObject().toFunction(); } const Value &calleev() const { do { } while(0); return mutableCalleev(); } const Value &maybeCalleev() const { do { } while(0); Value &calleev = flags_ & (EVAL | GLOBAL) ? ((Value *)this)[-2] : formalArgs()[-2]; do { } while(0); return calleev; } Value &mutableCalleev() const { do { } while(0); if (isEvalFrame()) return ((Value *)this)[-2]; return formalArgs()[-2]; } CallReceiver callReceiver() const { return CallReceiverFromArgv(formalArgs()); } # 846 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" inline HandleObject scopeChain() const; inline GlobalObject &global() const; bool hasCallObj() const { bool ret = !!(flags_ & HAS_CALL_OBJ); do { } while (0); return ret; } inline CallObject &callObj() const; inline void initScopeChain(CallObject &callobj); inline void setScopeChain(JSObject &obj); # 874 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" inline JSObject &varObj(); bool hasBlockChain() const { return (flags_ & HAS_BLOCKCHAIN) && blockChain_; } StaticBlockObject *maybeBlockChain() { return (flags_ & HAS_BLOCKCHAIN) ? blockChain_ : __null; } StaticBlockObject &blockChain() const { do { } while(0); return *blockChain_; } bool pushBlock(JSContext *cx, StaticBlockObject &block); void popBlock(JSContext *cx); void popWith(JSContext *cx); inline bool functionPrologue(JSContext *cx); inline void functionEpilogue(JSContext *cx); inline void updateEpilogueFlags(); inline bool maintainNestingState() const; # 927 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" inline JSCompartment *compartment() const; void* annotation() const { return (flags_ & HAS_ANNOTATION) ? annotation_ : __null; } void setAnnotation(void *annot) { flags_ |= HAS_ANNOTATION; annotation_ = annot; } JSRejoinState rejoin() const { return rejoin_; } void setRejoin(JSRejoinState state) { rejoin_ = state; } void setDownFramesExpanded() { flags_ |= DOWN_FRAMES_EXPANDED; } bool downFramesExpanded() { return !!(flags_ & DOWN_FRAMES_EXPANDED); } bool hasHookData() const { return !!(flags_ & HAS_HOOK_DATA); } void* hookData() const { do { } while(0); return hookData_; } void* maybeHookData() const { return hasHookData() ? hookData_ : __null; } void setHookData(void *v) { hookData_ = v; flags_ |= HAS_HOOK_DATA; } bool hasReturnValue() const { return !!(flags_ & HAS_RVAL); } Value &returnValue() { if (!(flags_ & HAS_RVAL)) rval_.setUndefined(); return rval_; } void markReturnValue() { flags_ |= HAS_RVAL; } void setReturnValue(const Value &v) { rval_ = v; markReturnValue(); } void clearReturnValue() { rval_.setUndefined(); markReturnValue(); } void *nativeReturnAddress() const { return ncode_; } void setNativeReturnAddress(void *addr) { ncode_ = addr; } void **addressOfNativeReturnAddress() { return &ncode_; } # 1028 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool isGeneratorFrame() const { return !!(flags_ & GENERATOR); } bool isFloatingGenerator() const { do { } while (0); return !!(flags_ & FLOATING_GENERATOR); } void initFloatingGenerator() { do { } while(0); flags_ |= (GENERATOR | FLOATING_GENERATOR); } void unsetFloatingGenerator() { flags_ &= ~FLOATING_GENERATOR; } void setFloatingGenerator() { flags_ |= FLOATING_GENERATOR; } # 1057 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool isFramePushedByExecute() const { return !!(flags_ & (GLOBAL | EVAL)); } InitialFrameFlags initialFlags() const { typedef int moz_static_assert94[((int)INITIAL_NONE == 0) ? 1 : -1]; typedef int moz_static_assert95[((int)INITIAL_CONSTRUCT == (int)CONSTRUCTING) ? 1 : -1]; typedef int moz_static_assert96[((int)INITIAL_LOWERED == (int)LOWERED_CALL_APPLY) ? 1 : -1]; uint32_t mask = CONSTRUCTING | LOWERED_CALL_APPLY; do { } while(0); return InitialFrameFlags(flags_ & mask); } bool isConstructing() const { return !!(flags_ & CONSTRUCTING); } bool loweredCallOrApply() const { return !!(flags_ & LOWERED_CALL_APPLY); } bool isDebuggerFrame() const { return !!(flags_ & DEBUGGER); } bool hasOverflowArgs() const { return !!(flags_ & OVERFLOW_ARGS); } bool isYielding() { return !!(flags_ & YIELDING); } void setYielding() { flags_ |= YIELDING; } void clearYielding() { flags_ &= ~YIELDING; } void setFinishedInInterpreter() { flags_ |= FINISHED_IN_INTERP; } bool finishedInInterpreter() const { return !!(flags_ & FINISHED_IN_INTERP); } public: static size_t offsetOfFlags() { return __builtin_offsetof (StackFrame, flags_); } static size_t offsetOfExec() { return __builtin_offsetof (StackFrame, exec); } static size_t offsetOfNumActual() { return __builtin_offsetof (StackFrame, u.nactual); } static size_t offsetOfScopeChain() { return __builtin_offsetof (StackFrame, scopeChain_); } static size_t offsetOfPrev() { return __builtin_offsetof (StackFrame, prev_); } static size_t offsetOfReturnValue() { return __builtin_offsetof (StackFrame, rval_); } static size_t offsetOfArgsObj() { return __builtin_offsetof (StackFrame, argsObj_); } static ptrdiff_t offsetOfNcode() { return __builtin_offsetof (StackFrame, ncode_); } static ptrdiff_t offsetOfCallee(JSFunction *fun) { do { } while(0); return -(fun->nargs + 2) * sizeof(Value); } static ptrdiff_t offsetOfThis(JSFunction *fun) { return fun == __null ? -1 * ptrdiff_t(sizeof(Value)) : -(fun->nargs + 1) * ptrdiff_t(sizeof(Value)); } static ptrdiff_t offsetOfFormalArg(JSFunction *fun, unsigned i) { do { } while(0); return (-(int)fun->nargs + i) * sizeof(Value); } static size_t offsetOfFixed(unsigned i) { return sizeof(StackFrame) + i * sizeof(Value); } inline mjit::JITScript *jit(); void methodjitStaticAsserts(); public: void mark(JSTracer *trc); }; static const size_t VALUES_PER_STACK_FRAME = sizeof(StackFrame) / sizeof(Value); static inline unsigned ToReportFlags(InitialFrameFlags initial) { return unsigned(initial & StackFrame::CONSTRUCTING); } static inline StackFrame::Flags ToFrameFlags(InitialFrameFlags initial) { return StackFrame::Flags(initial); } static inline InitialFrameFlags InitialFrameFlagsFromConstructing(bool b) { return b ? INITIAL_CONSTRUCT : INITIAL_NONE; } static inline bool InitialFrameFlagsAreConstructing(InitialFrameFlags initial) { return !!(initial & INITIAL_CONSTRUCT); } static inline bool InitialFrameFlagsAreLowered(InitialFrameFlags initial) { return !!(initial & INITIAL_LOWERED); } inline StackFrame * Valueify(JSStackFrame *fp) { return (StackFrame *)fp; } static inline JSStackFrame * Jsvalify(StackFrame *fp) { return (JSStackFrame *)fp; } class FrameRegs { public: Value *sp; jsbytecode *pc; private: JSInlinedSite *inlined_; StackFrame *fp_; public: StackFrame *fp() const { return fp_; } JSInlinedSite *inlined() const { return inlined_; } static const size_t offsetOfFp = 3 * sizeof(void *); static const size_t offsetOfInlined = 2 * sizeof(void *); static void staticAssert() { typedef int moz_static_assert97[(offsetOfFp == __builtin_offsetof (FrameRegs, fp_)) ? 1 : -1]; typedef int moz_static_assert98[(offsetOfInlined == __builtin_offsetof (FrameRegs, inlined_)) ? 1 : -1]; } void clearInlined() { inlined_ = __null; } void rebaseFromTo(const FrameRegs &from, StackFrame &to) { fp_ = &to; sp = to.slots() + (from.sp - from.fp_->slots()); pc = from.pc; inlined_ = from.inlined_; do { } while(0); } void popFrame(Value *newsp) { pc = fp_->prevpc(&inlined_); sp = newsp; fp_ = fp_->prev(); do { } while(0); } void popPartialFrame(Value *newsp) { sp = newsp; fp_ = fp_->prev(); do { } while(0); } void restorePartialFrame(Value *newfp) { fp_ = (StackFrame *) newfp; } void refreshFramePointer(StackFrame *fp) { fp_ = fp; } void prepareToRun(StackFrame &fp, JSScript *script) { pc = script->code; sp = fp.slots() + script->nfixed; fp_ = &fp; inlined_ = __null; } void setToEndOfScript() { JSScript *script = fp()->script(); sp = fp()->base(); pc = script->code + script->length - 1; do { } while(0); } void initDummyFrame(StackFrame &fp) { pc = __null; sp = fp.slots(); fp_ = &fp; inlined_ = __null; } void expandInline(StackFrame *innerfp, jsbytecode *innerpc) { pc = innerpc; fp_ = innerfp; inlined_ = __null; } void updateForNcode(mjit::JITScript *jit, void *ncode) { pc = mjit::NativeToPC(jit, ncode, &inlined_); } }; class StackSegment { StackSegment *const prevInContext_; StackSegment *const prevInMemory_; FrameRegs *regs_; CallArgsList *calls_; public: StackSegment(StackSegment *prevInContext, StackSegment *prevInMemory, FrameRegs *regs, CallArgsList *calls) : prevInContext_(prevInContext), prevInMemory_(prevInMemory), regs_(regs), calls_(calls) {} Value *slotsBegin() const { return (Value *)(this + 1); } FrameRegs ®s() const { do { } while(0); return *regs_; } FrameRegs *maybeRegs() const { return regs_; } StackFrame *fp() const { return regs_->fp(); } StackFrame *maybefp() const { return regs_ ? regs_->fp() : __null; } jsbytecode *maybepc() const { return regs_ ? regs_->pc : __null; } CallArgsList &calls() const { do { } while(0); return *calls_; } CallArgsList *maybeCalls() const { return calls_; } Value *callArgv() const { return calls_->array(); } Value *maybeCallArgv() const { return calls_ ? calls_->array() : __null; } StackSegment *prevInContext() const { return prevInContext_; } StackSegment *prevInMemory() const { return prevInMemory_; } void repointRegs(FrameRegs *regs) { do { } while (0); regs_ = regs; } bool isEmpty() const { return !calls_ && !regs_; } bool contains(const StackFrame *fp) const; bool contains(const FrameRegs *regs) const; bool contains(const CallArgsList *call) const; StackFrame *computeNextFrame(const StackFrame *fp) const; Value *end() const; FrameRegs *pushRegs(FrameRegs ®s); void popRegs(FrameRegs *regs); void pushCall(CallArgsList &callList); void pointAtCall(CallArgsList &callList); void popCall(); static const size_t offsetOfRegs() { return __builtin_offsetof (StackSegment, regs_); } }; static const size_t VALUES_PER_STACK_SEGMENT = sizeof(StackSegment) / sizeof(Value); typedef int moz_static_assert99[(sizeof(StackSegment) % sizeof(Value) == 0) ? 1 : -1]; class StackSpace { StackSegment *seg_; Value *base_; mutable Value *conservativeEnd_; Value *defaultEnd_; Value *trustedEnd_; void assertInvariants() const { do { } while(0); do { } while(0); do { } while(0); } static const size_t CAPACITY_VALS = 512 * 1024; static const size_t CAPACITY_BYTES = CAPACITY_VALS * sizeof(Value); static const size_t COMMIT_VALS = 16 * 1024; static const size_t COMMIT_BYTES = COMMIT_VALS * sizeof(Value); static const size_t BUFFER_VALS = 16 * 1024; static const size_t BUFFER_BYTES = BUFFER_VALS * sizeof(Value); static void staticAsserts() { typedef int moz_static_assert100[(CAPACITY_VALS % COMMIT_VALS == 0) ? 1 : -1]; } friend class AllFramesIter; friend class ContextStack; friend class StackFrame; # 1474 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" static const size_t CX_COMPARTMENT = 0xc; inline bool ensureSpace(JSContext *cx, MaybeReportError report, Value *from, ptrdiff_t nvals, JSCompartment *dest = (JSCompartment *)CX_COMPARTMENT) const; __attribute__((visibility("default"))) bool ensureSpaceSlow(JSContext *cx, MaybeReportError report, Value *from, ptrdiff_t nvals, JSCompartment *dest) const; StackSegment &findContainingSegment(const StackFrame *target) const; public: StackSpace(); bool init(); ~StackSpace(); # 1501 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" static const unsigned ARGS_LENGTH_MAX = CAPACITY_VALS - (2 * BUFFER_VALS); inline Value *firstUnused() const { return seg_ ? seg_->end() : base_; } StackSegment &containingSegment(const StackFrame *target) const; # 1516 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" static const size_t STACK_JIT_EXTRA = ( 8 + 18) * 10; # 1532 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" inline Value *getStackLimit(JSContext *cx, MaybeReportError report); bool tryBumpLimit(JSContext *cx, Value *from, unsigned nvals, Value **limit); void mark(JSTracer *trc); void markFrameSlots(JSTracer *trc, StackFrame *fp, Value *slotsEnd, jsbytecode *pc); void markActiveCompartments(); __attribute__((visibility("default"))) size_t sizeOfCommitted(); }; class ContextStack { StackSegment *seg_; StackSpace *const space_; JSContext *cx_; # 1566 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool onTop() const; void assertSpaceInSync() const {} StackSegment *pushSegment(JSContext *cx); enum MaybeExtend { CAN_EXTEND = true, CANT_EXTEND = false }; Value *ensureOnTop(JSContext *cx, MaybeReportError report, unsigned nvars, MaybeExtend extend, bool *pushedSeg, JSCompartment *dest = (JSCompartment *)StackSpace::CX_COMPARTMENT); inline StackFrame * getCallFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, JSFunction *fun, JSScript *script, StackFrame::Flags *pflags) const; void popSegment(); friend class InvokeArgsGuard; void popInvokeArgs(const InvokeArgsGuard &iag); friend class FrameGuard; void popFrame(const FrameGuard &fg); friend class GeneratorFrameGuard; void popGeneratorFrame(const GeneratorFrameGuard &gfg); friend class StackIter; public: ContextStack(JSContext *cx); ~ContextStack(); bool empty() const { return !seg_; } inline bool hasfp() const { return seg_ && seg_->maybeRegs(); } inline FrameRegs *maybeRegs() const { return seg_ ? seg_->maybeRegs() : __null; } inline StackFrame *maybefp() const { return seg_ ? seg_->maybefp() : __null; } inline FrameRegs ®s() const { do { } while(0); return seg_->regs(); } inline StackFrame *fp() const { do { } while(0); return seg_->fp(); } StackSpace &space() const { return *space_; } bool containsSlow(const StackFrame *target) const; # 1641 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool pushInvokeArgs(JSContext *cx, unsigned argc, InvokeArgsGuard *ag); bool pushInvokeFrame(JSContext *cx, const CallArgs &args, InitialFrameFlags initial, InvokeFrameGuard *ifg); bool pushExecuteFrame(JSContext *cx, JSScript *script, const Value &thisv, JSObject &scopeChain, ExecuteType type, StackFrame *evalInFrame, ExecuteFrameGuard *efg); bool pushGeneratorFrame(JSContext *cx, JSGenerator *gen, GeneratorFrameGuard *gfg); # 1669 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" bool pushDummyFrame(JSContext *cx, JSCompartment *dest, JSObject &scopeChain, DummyFrameGuard *dfg); bool pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, JSFunction &callee, JSScript *script, InitialFrameFlags initial); bool pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, JSFunction &callee, JSScript *script, InitialFrameFlags initial, Value **stackLimit); void popInlineFrame(FrameRegs ®s); void popFrameAfterOverflow(); inline JSScript *currentScript(jsbytecode **pc = __null) const; inline JSScript *currentScriptWithDiagnostics(jsbytecode **pc = __null) const; inline HandleObject currentScriptedScopeChain() const; StackFrame *getFixupFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, JSFunction *fun, JSScript *script, void *ncode, InitialFrameFlags initial, Value **stackLimit); bool saveFrameChain(); void restoreFrameChain(); inline void repointRegs(FrameRegs *regs) { do { } while(0); seg_->repointRegs(regs); } # 1719 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" void threadReset(); static size_t offsetOfSeg() { return __builtin_offsetof (ContextStack, seg_); } }; class InvokeArgsGuard : public CallArgsList { friend class ContextStack; ContextStack *stack_; bool pushedSeg_; void setPushed(ContextStack &stack) { do { } while(0); stack_ = &stack; } public: InvokeArgsGuard() : CallArgsList(), stack_(__null), pushedSeg_(false) {} ~InvokeArgsGuard() { if (pushed()) stack_->popInvokeArgs(*this); } bool pushed() const { return !!stack_; } void pop() { stack_->popInvokeArgs(*this); stack_ = __null; } }; class FrameGuard { protected: friend class ContextStack; ContextStack *stack_; bool pushedSeg_; FrameRegs regs_; FrameRegs *prevRegs_; void setPushed(ContextStack &stack) { stack_ = &stack; } public: FrameGuard() : stack_(__null), pushedSeg_(false) {} ~FrameGuard() { if (pushed()) stack_->popFrame(*this); } bool pushed() const { return !!stack_; } void pop() { stack_->popFrame(*this); stack_ = __null; } StackFrame *fp() const { return regs_.fp(); } }; class InvokeFrameGuard : public FrameGuard {}; class ExecuteFrameGuard : public FrameGuard {}; class DummyFrameGuard : public FrameGuard {}; class GeneratorFrameGuard : public FrameGuard { friend class ContextStack; JSGenerator *gen_; Value *stackvp_; public: ~GeneratorFrameGuard() { if (pushed()) stack_->popGeneratorFrame(*this); } }; # 1797 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" class StackIter { friend class ContextStack; JSContext *maybecx_; public: enum SavedOption { STOP_AT_SAVED, GO_THROUGH_SAVED }; private: SavedOption savedOption_; enum State { DONE, SCRIPTED, NATIVE, IMPLICIT_NATIVE }; State state_; StackFrame *fp_; CallArgsList *calls_; StackSegment *seg_; Value *sp_; jsbytecode *pc_; JSScript *script_; CallArgs args_; void poisonRegs(); void popFrame(); void popCall(); void settleOnNewSegment(); void settleOnNewState(); void startOnSegment(StackSegment *seg); public: StackIter(JSContext *cx, SavedOption = STOP_AT_SAVED); StackIter(JSRuntime *rt, StackSegment &seg); bool done() const { return state_ == DONE; } StackIter &operator++(); bool operator==(const StackIter &rhs) const; bool operator!=(const StackIter &rhs) const { return !(*this == rhs); } bool isScript() const { do { } while(0); return state_ == SCRIPTED; } bool isImplicitNativeCall() const { do { } while(0); return state_ == IMPLICIT_NATIVE; } bool isNativeCall() const { do { } while(0); return state_ == NATIVE || state_ == IMPLICIT_NATIVE; } bool isFunctionFrame() const; bool isEvalFrame() const; bool isNonEvalFunctionFrame() const; bool isConstructing() const; StackFrame *fp() const { do { } while(0); return fp_; } Value *sp() const { do { } while(0); return sp_; } jsbytecode *pc() const { do { } while(0); return pc_; } JSScript *script() const { do { } while(0); return script_; } JSFunction *callee() const; Value calleev() const; Value thisv() const; CallArgs nativeArgs() const { do { } while(0); return args_; } }; class ScriptFrameIter : public StackIter { void settle() { while (!done() && !isScript()) StackIter::operator++(); } public: ScriptFrameIter(JSContext *cx, StackIter::SavedOption opt = StackIter::STOP_AT_SAVED) : StackIter(cx, opt) { settle(); } ScriptFrameIter &operator++() { StackIter::operator++(); settle(); return *this; } }; class AllFramesIter { public: AllFramesIter(StackSpace &space); bool done() const { return fp_ == __null; } AllFramesIter& operator++(); StackFrame *fp() const { return fp_; } private: void settle(); StackSegment *seg_; StackFrame *fp_; }; } # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 # 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" extern "C" { struct DtoaState; } struct JSSharpInfo { bool hasGen; bool isSharp; JSSharpInfo() : hasGen(false), isSharp(false) {} }; typedef js::HashMap JSSharpTable; struct JSSharpObjectMap { unsigned depth; uint32_t sharpgen; JSSharpTable table; JSSharpObjectMap(JSContext *cx) : depth(0), sharpgen(0), table(js::TempAllocPolicy(cx)) { table.init(); } }; namespace js { namespace mjit { class JaegerRuntime; } class MathCache; class WeakMapBase; class InterpreterFrames; class DebugScopes; struct GSNCache { typedef HashMap, SystemAllocPolicy> Map; jsbytecode *code; Map map; GSNCache() : code(__null) { } void purge(); }; inline GSNCache * GetGSNCache(JSContext *cx); struct PendingProxyOperation { PendingProxyOperation *next; RootedObject object; PendingProxyOperation(JSContext *cx, JSObject *object) : next(__null), object(cx, object) {} }; typedef Vector ScriptAndCountsVector; struct ConservativeGCData { uintptr_t *nativeStackTop; # 126 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" union { jmp_buf jmpbuf; uintptr_t words[(((sizeof(jmp_buf))+(sizeof(uintptr_t))-1)/(sizeof(uintptr_t)))]; } registerSnapshot; ConservativeGCData() { PodZero(this); } ~ConservativeGCData() { do { } while(0); } __attribute__((noinline)) void recordStackTop(); void updateForRequestEnd(unsigned suspendCount) { if (suspendCount) recordStackTop(); else nativeStackTop = __null; } bool hasStackToScan() const { return !!nativeStackTop; } }; class ToSourceCache { typedef HashMap, SystemAllocPolicy> Map; Map *map_; public: ToSourceCache() : map_(__null) {} JSString *lookup(JSFunction *fun); void put(JSFunction *fun, JSString *); void purge(); }; class EvalCache { static const unsigned SHIFT = 6; static const unsigned LENGTH = 1 << SHIFT; JSScript *table_[LENGTH]; public: EvalCache() { PodArrayZero(table_); } JSScript **bucket(JSLinearString *str); void purge(); }; class NativeIterCache { static const size_t SIZE = size_t(1) << 8; JSObject *data[SIZE]; static size_t getIndex(uint32_t key) { return size_t(key) % SIZE; } public: JSObject *last; NativeIterCache() : last(__null) { PodArrayZero(data); } void purge() { last = __null; PodArrayZero(data); } JSObject *get(uint32_t key) const { return data[getIndex(key)]; } void set(uint32_t key, JSObject *iterobj) { data[getIndex(key)] = iterobj; } }; class NewObjectCache { static const unsigned MAX_OBJ_SIZE = 4 * sizeof(void*) + 16 * sizeof(Value); static inline void staticAsserts(); struct Entry { Class *clasp; # 250 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" gc::Cell *key; gc::AllocKind kind; uint32_t nbytes; char templateObject[MAX_OBJ_SIZE]; }; Entry entries[41]; public: typedef int EntryIndex; NewObjectCache() { PodZero(this); } void purge() { PodZero(this); } inline bool lookupProto(Class *clasp, JSObject *proto, gc::AllocKind kind, EntryIndex *pentry); inline bool lookupGlobal(Class *clasp, js::GlobalObject *global, gc::AllocKind kind, EntryIndex *pentry); inline bool lookupType(Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, EntryIndex *pentry); inline JSObject *newObjectFromHit(JSContext *cx, EntryIndex entry); inline void fillProto(EntryIndex entry, Class *clasp, JSObject *proto, gc::AllocKind kind, JSObject *obj); inline void fillGlobal(EntryIndex entry, Class *clasp, js::GlobalObject *global, gc::AllocKind kind, JSObject *obj); inline void fillType(EntryIndex entry, Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, JSObject *obj); void invalidateEntriesForShape(JSContext *cx, Shape *shape, JSObject *proto); private: inline bool lookup(Class *clasp, gc::Cell *key, gc::AllocKind kind, EntryIndex *pentry); inline void fill(EntryIndex entry, Class *clasp, gc::Cell *key, gc::AllocKind kind, JSObject *obj); static inline void copyCachedToObject(JSObject *dst, JSObject *src); }; # 306 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" class FreeOp : public JSFreeOp { bool shouldFreeLater_; bool onBackgroundThread_; public: static FreeOp *get(JSFreeOp *fop) { return static_cast(fop); } FreeOp(JSRuntime *rt, bool shouldFreeLater, bool onBackgroundThread) : JSFreeOp(rt), shouldFreeLater_(shouldFreeLater), onBackgroundThread_(onBackgroundThread) { } bool shouldFreeLater() const { return shouldFreeLater_; } bool onBackgroundThread() const { return onBackgroundThread_; } inline void free_(void* p); template inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } static void staticAsserts() { typedef int moz_static_assert101[(__builtin_offsetof (FreeOp, shouldFreeLater_) == sizeof(JSFreeOp)) ? 1 : -1]; } }; } namespace JS { struct RuntimeSizes; } struct JSRuntime : js::RuntimeFriendFields { JSCompartment *atomsCompartment; js::CompartmentVector compartments; public: void *ownerThread() const { return ownerThread_; } void clearOwnerThread(); void setOwnerThread(); __attribute__((visibility("default"))) bool onOwnerThread() const; private: void *ownerThread_; public: js::StackSpace stackSpace; static const size_t TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 1 << 12; js::LifoAlloc tempLifoAlloc; private: JSC::ExecutableAllocator *execAlloc_; WTF::BumpPointerAllocator *bumpAlloc_; js::mjit::JaegerRuntime *jaegerRuntime_; JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx); WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx); js::mjit::JaegerRuntime *createJaegerRuntime(JSContext *cx); public: JSC::ExecutableAllocator *getExecAlloc(JSContext *cx) { return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx); } JSC::ExecutableAllocator &execAlloc() { do { } while(0); return *execAlloc_; } WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) { return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx); } js::mjit::JaegerRuntime *getJaegerRuntime(JSContext *cx) { return jaegerRuntime_ ? jaegerRuntime_ : createJaegerRuntime(cx); } bool hasJaegerRuntime() const { return jaegerRuntime_; } js::mjit::JaegerRuntime &jaegerRuntime() { do { } while(0); return *jaegerRuntime_; } uintptr_t nativeStackBase; size_t nativeStackQuota; js::InterpreterFrames *interpreterFrames; JSContextCallback cxCallback; JSDestroyCompartmentCallback destroyCompartmentCallback; js::ActivityCallback activityCallback; void *activityCallbackArg; unsigned suspendCount; unsigned requestDepth; # 460 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" js::GCChunkSet gcChunkSet; # 469 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" js::gc::Chunk *gcSystemAvailableChunkListHead; js::gc::Chunk *gcUserAvailableChunkListHead; js::gc::ChunkPool gcChunkPool; js::RootedValueMap gcRootsHash; js::GCLocks gcLocksHash; unsigned gcKeepAtoms; size_t gcBytes; size_t gcMaxBytes; size_t gcMaxMallocBytes; volatile uint32_t gcNumArenasFreeCommitted; js::GCMarker gcMarker; void *gcVerifyData; bool gcChunkAllocationSinceLastGC; int64_t gcNextFullGCTime; int64_t gcJitReleaseTime; JSGCMode gcMode; bool gcShouldCleanUpEverything; volatile uintptr_t gcIsNeeded; js::WeakMapBase *gcWeakMapList; js::gcstats::Statistics gcStats; uint64_t gcNumber; uint64_t gcStartNumber; bool gcIsFull; js::gcreason::Reason gcTriggerReason; bool gcStrictCompartmentChecking; js::gc::State gcIncrementalState; bool gcLastMarkSlice; volatile uintptr_t gcInterFrameGC; int64_t gcSliceBudget; bool gcIncrementalEnabled; bool gcExactScanningEnabled; # 572 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" bool gcPoke; bool gcRunning; # 614 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" int gcZeal() { return 0; } bool needZealousGC() { return false; } JSGCCallback gcCallback; js::GCSliceCallback gcSliceCallback; JSFinalizeCallback gcFinalizeCallback; private: volatile ptrdiff_t gcMallocBytes; public: JSTraceDataOp gcBlackRootsTraceOp; void *gcBlackRootsData; JSTraceDataOp gcGrayRootsTraceOp; void *gcGrayRootsData; js::AutoGCRooter *autoGCRooters; js::ScriptAndCountsVector *scriptAndCountsVector; js::Value NaNValue; js::Value negativeInfinityValue; js::Value positiveInfinityValue; JSAtom *emptyString; JSCList contextList; bool hasContexts() const { return !((&contextList)->next == (&contextList)); } JSDebugHooks debugHooks; bool debugMode; bool profilingScripts; bool alwaysPreserveCode; JSBool hadOutOfMemory; JSCList debuggerList; js::DebugScopes *debugScopes; void *data; PRLock *gcLock; js::GCHelperThread gcHelperThread; private: js::FreeOp defaultFreeOp_; public: js::FreeOp *defaultFreeOp() { return &defaultFreeOp_; } uint32_t debuggerMutations; const JSSecurityCallbacks *securityCallbacks; JSDestroyPrincipalsOp destroyPrincipals; const JSStructuredCloneCallbacks *structuredCloneCallbacks; JSAccumulateTelemetryDataCallback telemetryCallback; int32_t propertyRemovals; const char *thousandsSeparator; const char *decimalSeparator; const char *numGrouping; bool waiveGCQuota; private: js::MathCache *mathCache_; js::MathCache *createMathCache(JSContext *cx); public: js::MathCache *getMathCache(JSContext *cx) { return mathCache_ ? mathCache_ : createMathCache(cx); } js::GSNCache gsnCache; js::PropertyCache propertyCache; js::NewObjectCache newObjectCache; js::NativeIterCache nativeIterCache; js::ToSourceCache toSourceCache; js::EvalCache evalCache; DtoaState *dtoaState; js::PendingProxyOperation *pendingProxyOperation; js::ConservativeGCData conservativeGC; private: JSPrincipals *trustedPrincipals_; public: void setTrustedPrincipals(JSPrincipals *p) { trustedPrincipals_ = p; } JSPrincipals *trustedPrincipals() const { return trustedPrincipals_; } JSAtomState atomState; js::StaticStrings staticStrings; JSWrapObjectCallback wrapObjectCallback; JSSameCompartmentWrapObjectCallback sameCompartmentWrapObjectCallback; JSPreWrapCallback preWrapObjectCallback; js::PreserveWrapperCallback preserveWrapperCallback; js::ScriptFilenameTable scriptFilenameTable; # 783 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" int32_t inOOMReport; bool jitHardening; JSRuntime(); ~JSRuntime(); bool init(uint32_t maxbytes); JSRuntime *thisFromCtor() { return this; } void* malloc_(size_t bytes, JSContext *cx = __null) { updateMallocCounter(cx, bytes); void *p = ::js_malloc(bytes); return (__builtin_expect((!!p), 1)) ? p : onOutOfMemory(__null, bytes, cx); } void* calloc_(size_t bytes, JSContext *cx = __null) { updateMallocCounter(cx, bytes); void *p = ::js_calloc(bytes); return (__builtin_expect((!!p), 1)) ? p : onOutOfMemory(reinterpret_cast(1), bytes, cx); } void* realloc_(void* p, size_t oldBytes, size_t newBytes, JSContext *cx = __null) { do { } while(0); updateMallocCounter(cx, newBytes - oldBytes); void *p2 = ::js_realloc(p, newBytes); return (__builtin_expect((!!p2), 1)) ? p2 : onOutOfMemory(p, newBytes, cx); } void* realloc_(void* p, size_t bytes, JSContext *cx = __null) { if (!p) updateMallocCounter(cx, bytes); void *p2 = ::js_realloc(p, bytes); return (__builtin_expect((!!p2), 1)) ? p2 : onOutOfMemory(p, bytes, cx); } inline void free_(void* p) { js::Foreground::free_(p); } template __attribute__((always_inline)) inline T *new_() { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = malloc_(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } template __attribute__((always_inline)) inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template __attribute__((always_inline)) inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } void setGCMaxMallocBytes(size_t value); void resetGCMallocBytes() { gcMallocBytes = ptrdiff_t(gcMaxMallocBytes); } # 852 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" void updateMallocCounter(JSContext *cx, size_t nbytes); bool isTooMuchMalloc() const { return gcMallocBytes <= 0; } __attribute__((visibility("default"))) void onTooMuchMalloc(); # 871 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" __attribute__((visibility("default"))) void * onOutOfMemory(void *p, size_t nbytes, JSContext *cx); void triggerOperationCallback(); void setJitHardening(bool enabled); bool getJitHardening() const { return jitHardening; } void sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, JS::RuntimeSizes *runtime); size_t sizeOfExplicitNonHeap(); }; #define JS_PROPERTY_CACHE(cx) (cx->runtime->propertyCache) #define JS_KEEP_ATOMS(rt) (rt)->gcKeepAtoms++; #define JS_UNKEEP_ATOMS(rt) (rt)->gcKeepAtoms--; # 904 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" namespace js { struct AutoResolving; static inline bool OptionsHasAllowXML(uint32_t options) { return !!(options & ((uint32_t)1 << (6))); } static inline bool OptionsHasMoarXML(uint32_t options) { return !!(options & ((uint32_t)1 << (7))); } static inline bool OptionsSameVersionFlags(uint32_t self, uint32_t other) { static const uint32_t mask = ((uint32_t)1 << (7)); return !((self & mask) ^ (other & mask)); } # 935 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" namespace VersionFlags { static const unsigned MASK = 0x0FFF; static const unsigned ALLOW_XML = 0x1000; static const unsigned MOAR_XML = 0x2000; static const unsigned FULL_MASK = 0x3FFF; } static inline JSVersion VersionNumber(JSVersion version) { return JSVersion(uint32_t(version) & VersionFlags::MASK); } static inline bool VersionHasAllowXML(JSVersion version) { return !!(version & VersionFlags::ALLOW_XML); } static inline bool VersionHasMoarXML(JSVersion version) { return !!(version & VersionFlags::MOAR_XML); } static inline bool VersionShouldParseXML(JSVersion version) { return VersionHasMoarXML(version) || VersionNumber(version) >= JSVERSION_1_6; } static inline JSVersion VersionExtractFlags(JSVersion version) { return JSVersion(uint32_t(version) & ~VersionFlags::MASK); } static inline void VersionCopyFlags(JSVersion *version, JSVersion from) { *version = JSVersion(VersionNumber(*version) | VersionExtractFlags(from)); } static inline bool VersionHasFlags(JSVersion version) { return !!VersionExtractFlags(version); } static inline unsigned VersionFlagsToOptions(JSVersion version) { unsigned copts = (VersionHasAllowXML(version) ? ((uint32_t)1 << (6)) : 0) | (VersionHasMoarXML(version) ? ((uint32_t)1 << (7)) : 0); do { } while(0); return copts; } static inline JSVersion OptionFlagsToVersion(unsigned options, JSVersion version) { uint32_t v = version; v &= ~(VersionFlags::ALLOW_XML | VersionFlags::MOAR_XML); if (OptionsHasAllowXML(options)) v |= VersionFlags::ALLOW_XML; if (OptionsHasMoarXML(options)) v |= VersionFlags::MOAR_XML; return JSVersion(v); } static inline bool VersionIsKnown(JSVersion version) { return VersionNumber(version) != JSVERSION_UNKNOWN; } typedef HashSet, SystemAllocPolicy> BusyArraysSet; inline void FreeOp::free_(void* p) { if (shouldFreeLater()) { runtime()->gcHelperThread.freeLater(p); return; } runtime()->free_(p); } } struct JSContext : js::ContextFriendFields { explicit JSContext(JSRuntime *rt); JSContext *thisDuringConstruction() { return this; } ~JSContext(); JSCList link; private: JSVersion defaultVersion; JSVersion versionOverride; bool hasVersionOverride; JSBool throwing; js::Value exception; unsigned runOptions; public: int32_t reportGranularity; JSLocaleCallbacks *localeCallbacks; js::AutoResolving *resolvingList; bool generatingError; JSCompartment *compartment; inline void setCompartment(JSCompartment *compartment); js::ContextStack stack; inline bool hasfp() const { return stack.hasfp(); } inline js::StackFrame* fp() const { return stack.fp(); } inline js::StackFrame* maybefp() const { return stack.maybefp(); } inline js::FrameRegs& regs() const { return stack.regs(); } inline js::FrameRegs* maybeRegs() const { return stack.maybeRegs(); } void resetCompartment(); void wrapPendingException(); private: js::ParseMapPool *parseMapPool_; public: JSObject *globalObject; JSSharpObjectMap sharpObjectMap; js::BusyArraysSet busyArrays; JSArgumentFormatMap *argumentFormatMap; char *lastMessage; JSErrorReporter errorReporter; JSOperationCallback operationCallback; void *data; void *data2; inline js::RegExpStatics *regExpStatics(); public: js::ParseMapPool &parseMapPool() { do { } while(0); return *parseMapPool_; } inline bool ensureParseMapPool(); inline bool canSetDefaultVersion() const; inline void overrideVersion(JSVersion newVersion); void setDefaultVersion(JSVersion version) { defaultVersion = version; } void clearVersionOverride() { hasVersionOverride = false; } JSVersion getDefaultVersion() const { return defaultVersion; } bool isVersionOverridden() const { return hasVersionOverride; } JSVersion getVersionOverride() const { do { } while(0); return versionOverride; } inline bool maybeOverrideVersion(JSVersion newVersion); void maybeMigrateVersionOverride() { do { } while(0); if ((__builtin_expect((isVersionOverridden()), 0))) { defaultVersion = versionOverride; clearVersionOverride(); } } # 1170 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" inline JSVersion findVersion() const; void setRunOptions(unsigned ropts) { do { } while(0); runOptions = ropts; } inline void setCompileOptions(unsigned newcopts); unsigned getRunOptions() const { return runOptions; } inline unsigned getCompileOptions() const; inline unsigned allOptions() const; bool hasRunOption(unsigned ropt) const { do { } while(0); return !!(runOptions & ropt); } bool hasStrictOption() const { return hasRunOption(((uint32_t)1 << (0))); } bool hasWErrorOption() const { return hasRunOption(((uint32_t)1 << (1))); } bool hasAtLineOption() const { return hasRunOption(((uint32_t)1 << (5))); } js::LifoAlloc &tempLifoAlloc() { return runtime->tempLifoAlloc; } inline js::LifoAlloc &typeLifoAlloc(); inline js::PropertyTree &propertyTree(); unsigned outstandingRequests; unsigned resolveFlags; int64_t rngSeed; js::Value iterValue; bool methodJitEnabled; js::mjit::JaegerRuntime &jaegerRuntime() { return runtime->jaegerRuntime(); } bool inferenceEnabled; bool typeInferenceEnabled() { return inferenceEnabled; } void updateJITEnabled(); # 1239 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" DSTOffsetCache dstOffsetCache; JSObject *enumerators; private: js::Vector genStack; public: JSGenerator *generatorFor(js::StackFrame *fp) const; inline bool ensureGeneratorStackSpace(); bool enterGenerator(JSGenerator *gen) { return genStack.append(gen); } void leaveGenerator(JSGenerator *gen) { do { } while(0); genStack.popBack(); } inline void* malloc_(size_t bytes) { return runtime->malloc_(bytes, this); } inline void* mallocNoReport(size_t bytes) { do { } while(0); return runtime->malloc_(bytes, __null); } inline void* calloc_(size_t bytes) { return runtime->calloc_(bytes, this); } inline void* realloc_(void* p, size_t bytes) { return runtime->realloc_(p, bytes, this); } inline void* realloc_(void* p, size_t oldBytes, size_t newBytes) { return runtime->realloc_(p, oldBytes, newBytes, this); } inline void free_(void* p) { runtime->free_(p); } template inline T *new_() { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T () : __null; } template inline T *new_(P1 p1) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template inline T *new_(P1 p1, P2 p2) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = malloc_(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } template inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } void purge(); inline void assertValidStackDepth(unsigned depth); bool isExceptionPending() { return throwing; } js::Value getPendingException() { do { } while(0); return exception; } void setPendingException(js::Value v); void clearPendingException() { this->throwing = false; this->exception.setUndefined(); } # 1337 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" unsigned activeCompilations; bool runningWithTrustedPrincipals() const; __attribute__((visibility("default"))) size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const; static inline JSContext *fromLinkField(JSCList *link) { do { } while(0); return reinterpret_cast(uintptr_t(link) - __builtin_offsetof (JSContext, link)); } void mark(JSTracer *trc); private: __attribute__((visibility("default"))) void checkMallocGCPressure(void *p); }; namespace js { class AutoAllowUnaliasedVarAccess { JSContext *cx; public: AutoAllowUnaliasedVarAccess(JSContext *cx) : cx(cx) { } ~AutoAllowUnaliasedVarAccess() { } }; struct AutoResolving { public: enum Kind { LOOKUP, WATCH }; AutoResolving(JSContext *cx, JSObject *obj, jsid id, Kind kind = LOOKUP ) : context(cx), object(obj), id(id), kind(kind), link(cx->resolvingList) { do { } while (0); do { } while(0); cx->resolvingList = this; } ~AutoResolving() { do { } while(0); context->resolvingList = link; } bool alreadyStarted() const { return link && alreadyStartedSlow(); } private: bool alreadyStartedSlow() const; JSContext *const context; JSObject *const object; jsid const id; Kind const kind; AutoResolving *const link; }; class AutoXMLRooter : private AutoGCRooter { public: AutoXMLRooter(JSContext *cx, JSXML *xml ) : AutoGCRooter(cx, XML), xml(xml) { do { } while (0); do { } while(0); } friend void AutoGCRooter::trace(JSTracer *trc); private: JSXML * const xml; }; #define JS_LOCK_GC(rt) PR_Lock((rt)->gcLock) #define JS_UNLOCK_GC(rt) PR_Unlock((rt)->gcLock) class AutoLockGC { public: explicit AutoLockGC(JSRuntime *rt = __null ) : runtime(rt) { do { } while (0); if (rt) PR_Lock((rt)->gcLock); } ~AutoLockGC() { if (runtime) PR_Unlock((runtime)->gcLock); } bool locked() const { return !!runtime; } void lock(JSRuntime *rt) { do { } while(0); do { } while(0); runtime = rt; PR_Lock((rt)->gcLock); } private: JSRuntime *runtime; }; class AutoUnlockGC { private: JSRuntime *rt; public: explicit AutoUnlockGC(JSRuntime *rt ) : rt(rt) { do { } while (0); PR_Unlock((rt)->gcLock); } ~AutoUnlockGC() { PR_Lock((rt)->gcLock); } }; class AutoKeepAtoms { JSRuntime *rt; public: explicit AutoKeepAtoms(JSRuntime *rt ) : rt(rt) { do { } while (0); (rt)->gcKeepAtoms++;; } ~AutoKeepAtoms() { (rt)->gcKeepAtoms--;; } }; class AutoReleasePtr { JSContext *cx; void *ptr; AutoReleasePtr(const AutoReleasePtr &other) ; AutoReleasePtr operator=(const AutoReleasePtr &other) ; public: explicit AutoReleasePtr(JSContext *cx, void *ptr ) : cx(cx), ptr(ptr) { do { } while (0); } ~AutoReleasePtr() { cx->free_(ptr); } }; class AutoReleaseNullablePtr { JSContext *cx; void *ptr; AutoReleaseNullablePtr(const AutoReleaseNullablePtr &other) ; AutoReleaseNullablePtr operator=(const AutoReleaseNullablePtr &other) ; public: explicit AutoReleaseNullablePtr(JSContext *cx, void *ptr ) : cx(cx), ptr(ptr) { do { } while (0); } void reset(void *ptr2) { if (ptr) cx->free_(ptr); ptr = ptr2; } ~AutoReleaseNullablePtr() { if (ptr) cx->free_(ptr); } }; } class JSAutoResolveFlags { public: JSAutoResolveFlags(JSContext *cx, unsigned flags ) : mContext(cx), mSaved(cx->resolveFlags) { do { } while (0); cx->resolveFlags = flags; } ~JSAutoResolveFlags() { mContext->resolveFlags = mSaved; } private: JSContext *mContext; unsigned mSaved; }; namespace js { class ContextIter { JSCList *begin; JSCList *end; public: explicit ContextIter(JSRuntime *rt) { end = &rt->contextList; begin = end->next; } bool done() const { return begin == end; } void next() { do { } while(0); begin = begin->next; } JSContext *get() const { do { } while(0); return JSContext::fromLinkField(begin); } operator JSContext *() const { return get(); } JSContext *operator ->() const { return get(); } }; extern JSContext * NewContext(JSRuntime *rt, size_t stackChunkSize); enum DestroyContextMode { DCM_NO_GC, DCM_FORCE_GC, DCM_NEW_FAILED }; extern void DestroyContext(JSContext *cx, DestroyContextMode mode); } # 1653 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" namespace js { extern void ReportUsageError(JSContext *cx, JSObject *callee, const char *msg); } extern void js_ReportOutOfMemory(JSContext *cx); extern __attribute__((visibility("default"))) void js_ReportAllocationOverflow(JSContext *cx); extern __attribute__((visibility("default"))) void js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *report); extern void js_ReportIsNotDefined(JSContext *cx, const char *name); extern JSBool js_ReportIsNullOrUndefined(JSContext *cx, int spindex, const js::Value &v, JSString *fallback); extern void js_ReportMissingArg(JSContext *cx, const js::Value &v, unsigned arg); extern JSBool js_ReportValueErrorFlags(JSContext *cx, unsigned flags, const unsigned errorNumber, int spindex, const js::Value &v, JSString *fallback, const char *arg1, const char *arg2); #define js_ReportValueError(cx,errorNumber,spindex,v,fallback) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, NULL, NULL)) #define js_ReportValueError2(cx,errorNumber,spindex,v,fallback,arg1) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, NULL)) #define js_ReportValueError3(cx,errorNumber,spindex,v,fallback,arg1,arg2) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, arg2)) extern JSErrorFormatString js_ErrorFormatString[JSErr_Limit]; #define JS_ASSERT_REQUEST_DEPTH(cx) JS_ASSERT((cx)->runtime->requestDepth >= 1) # 1721 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" extern JSBool js_InvokeOperationCallback(JSContext *cx); extern JSBool js_HandleExecutionInterrupt(JSContext *cx); extern jsbytecode* js_GetCurrentBytecodePC(JSContext* cx); extern JSScript * js_GetCurrentScript(JSContext* cx); static __attribute__((always_inline)) inline bool JS_CHECK_OPERATION_LIMIT(JSContext *cx) { do { } while(0); return !cx->runtime->interrupt || js_InvokeOperationCallback(cx); } namespace js { namespace mjit { void ExpandInlineFrames(JSCompartment *compartment); } } enum FrameExpandKind { FRAME_EXPAND_NONE = 0, FRAME_EXPAND_ALL = 1 }; namespace js { static __attribute__((always_inline)) inline void MakeRangeGCSafe(Value *vec, size_t len) { PodZero(vec, len); } static __attribute__((always_inline)) inline void MakeRangeGCSafe(Value *beg, Value *end) { PodZero(beg, end - beg); } static __attribute__((always_inline)) inline void MakeRangeGCSafe(jsid *beg, jsid *end) { for (jsid *id = beg; id != end; ++id) *id = INT_TO_JSID(0); } static __attribute__((always_inline)) inline void MakeRangeGCSafe(jsid *vec, size_t len) { MakeRangeGCSafe(vec, vec + len); } static __attribute__((always_inline)) inline void MakeRangeGCSafe(const Shape **beg, const Shape **end) { PodZero(beg, end - beg); } static __attribute__((always_inline)) inline void MakeRangeGCSafe(const Shape **vec, size_t len) { PodZero(vec, len); } static __attribute__((always_inline)) inline void SetValueRangeToUndefined(Value *beg, Value *end) { for (Value *v = beg; v != end; ++v) v->setUndefined(); } static __attribute__((always_inline)) inline void SetValueRangeToUndefined(Value *vec, size_t len) { SetValueRangeToUndefined(vec, vec + len); } static __attribute__((always_inline)) inline void SetValueRangeToNull(Value *beg, Value *end) { for (Value *v = beg; v != end; ++v) v->setNull(); } static __attribute__((always_inline)) inline void SetValueRangeToNull(Value *vec, size_t len) { SetValueRangeToNull(vec, vec + len); } class AutoObjectVector : public AutoVectorRooter { public: explicit AutoObjectVector(JSContext *cx ) : AutoVectorRooter(cx, OBJVECTOR) { do { } while (0); } }; class AutoShapeVector : public AutoVectorRooter { public: explicit AutoShapeVector(JSContext *cx ) : AutoVectorRooter(cx, SHAPEVECTOR) { do { } while (0); } }; class AutoValueArray : public AutoGCRooter { js::Value *start_; unsigned length_; SkipRoot skip; public: AutoValueArray(JSContext *cx, js::Value *start, unsigned length ) : AutoGCRooter(cx, VALARRAY), start_(start), length_(length), skip(cx, start, length) { do { } while (0); } Value *start() { return start_; } unsigned length() const { return length_; } }; # 1885 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" class RuntimeAllocPolicy { JSRuntime *const runtime; public: RuntimeAllocPolicy(JSRuntime *rt) : runtime(rt) {} RuntimeAllocPolicy(JSContext *cx) : runtime(cx->runtime) {} void *malloc_(size_t bytes) { return runtime->malloc_(bytes); } void *realloc_(void *p, size_t bytes) { return runtime->realloc_(p, bytes); } void free_(void *p) { runtime->free_(p); } void reportAllocOverflow() const {} }; class ContextAllocPolicy { JSContext *const cx; public: ContextAllocPolicy(JSContext *cx) : cx(cx) {} JSContext *context() const { return cx; } void *malloc_(size_t bytes) { return cx->malloc_(bytes); } void *realloc_(void *p, size_t oldBytes, size_t bytes) { return cx->realloc_(p, oldBytes, bytes); } void free_(void *p) { cx->free_(p); } void reportAllocOverflow() const { js_ReportAllocationOverflow(cx); } }; } # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 2 const unsigned MIN_SPARSE_INDEX = 256; namespace js { const uint32_t MAX_ARRAY_INDEX = 4294967294u; } inline JSBool js_IdIsIndex(jsid id, uint32_t *indexp) { if (JSID_IS_INT(id)) { int32_t i = JSID_TO_INT(id); if (i < 0) return (int)0; *indexp = (uint32_t)i; return (int)1; } if ((__builtin_expect((!JSID_IS_STRING(id)), 0))) return (int)0; return js::StringIsArrayIndex(JSID_TO_ATOM(id), indexp); } extern JSObject * js_InitArrayClass(JSContext *cx, JSObject *obj); extern bool js_InitContextBusyArrayTable(JSContext *cx); namespace js { extern JSObject * NewDenseEmptyArray(JSContext *cx, JSObject *proto=__null); extern JSObject * NewDenseAllocatedArray(JSContext *cx, uint32_t length, JSObject *proto=__null); extern JSObject * NewDenseAllocatedEmptyArray(JSContext *cx, uint32_t length, JSObject *proto=__null); extern JSObject * NewDenseUnallocatedArray(JSContext *cx, uint32_t length, JSObject *proto=__null); extern JSObject * NewDenseCopiedArray(JSContext *cx, uint32_t length, const Value *vp, JSObject *proto = __null); extern JSObject * NewSlowEmptyArray(JSContext *cx); } extern JSBool js_GetLengthProperty(JSContext *cx, JSObject *obj, uint32_t *lengthp); extern JSBool js_SetLengthProperty(JSContext *cx, JSObject *obj, double length); namespace js { extern JSBool array_defineElement(JSContext *cx, HandleObject obj, uint32_t index, const Value *value, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); extern JSBool array_deleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); extern bool GetElements(JSContext *cx, HandleObject aobj, uint32_t length, js::Value *vp); extern JSBool array_sort(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool array_push(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool array_pop(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool array_concat(JSContext *cx, unsigned argc, js::Value *vp); extern JSBool array_shift(JSContext *cx, unsigned argc, js::Value *vp); } # 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" extern JSBool js_NewbornArrayPush(JSContext *cx, js::HandleObject obj, const js::Value &v); JSBool js_PrototypeHasIndexedProperties(JSContext *cx, JSObject *obj); JSBool js_GetDenseArrayElementValue(JSContext *cx, JSObject *obj, jsid id, js::Value *vp); JSBool js_Array(JSContext *cx, unsigned argc, js::Value *vp); # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsbool.h" 1 #define jsbool_h___ extern JSObject * js_InitBooleanClass(JSContext *cx, JSObject *obj); extern JSString * js_BooleanToString(JSContext *cx, JSBool b); namespace js { inline bool BooleanGetPrimitiveValue(JSContext *cx, JSObject &obj, Value *vp); } extern JSBool js_ValueToBoolean(const js::Value &v); # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 1 # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" #define jsiter_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_VERSION_ECMA_3 148 #define JS_VERSION_ECMA_3_TEST 149 # 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_STR_HTML_HELPERS 1 #define JS_HAS_OBJ_PROTO_PROP 1 #define JS_HAS_OBJ_WATCHPOINT 1 #define JS_HAS_TOSOURCE 1 #define JS_HAS_CATCH_GUARD 1 #define JS_HAS_UNEVAL 1 #define JS_HAS_CONST 1 #define JS_HAS_FUN_EXPR_STMT 1 #define JS_HAS_NO_SUCH_METHOD 1 #define JS_HAS_GENERATORS 1 #define JS_HAS_BLOCK_SCOPE 1 #define JS_HAS_DESTRUCTURING 2 #define JS_HAS_GENERATOR_EXPRS 1 #define JS_HAS_EXPR_CLOSURES 1 # 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" #define JS_HAS_NEW_GLOBAL_OBJECT 1 #define JS_HAS_MAKE_SYSTEM_OBJECT 1 #define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) #define OLD_GETTER_SETTER_METHODS 1 #define USE_NEW_OBJECT_REPRESENTATION 0 #define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 2 # 26 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" #define JSITER_ACTIVE 0x1000 #define JSITER_UNREUSABLE 0x2000 namespace js { struct NativeIterator { HeapPtrObject obj; HeapPtr *props_array; HeapPtr *props_cursor; HeapPtr *props_end; const Shape **shapes_array; uint32_t shapes_length; uint32_t shapes_key; uint32_t flags; JSObject *next; bool isKeyIter() const { return (flags & 0x2) == 0; } inline HeapPtr *begin() const { return props_array; } inline HeapPtr *end() const { return props_end; } size_t numKeys() const { return end() - begin(); } HeapPtr *current() const { do { } while(0); return props_cursor; } void incCursor() { props_cursor = props_cursor + 1; } static NativeIterator *allocateIterator(JSContext *cx, uint32_t slength, const js::AutoIdVector &props); void init(JSObject *obj, unsigned flags, uint32_t slength, uint32_t key); void mark(JSTracer *trc); }; class ElementIteratorObject : public JSObject { public: enum { TargetSlot, IndexSlot, NumSlots }; static JSObject *create(JSContext *cx, HandleObject target); inline uint32_t getIndex() const; inline void setIndex(uint32_t index); inline JSObject *getTargetObject() const; # 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" bool iteratorNext(JSContext *cx, Value *vp); }; bool VectorToIdArray(JSContext *cx, AutoIdVector &props, JSIdArray **idap); bool GetIterator(JSContext *cx, HandleObject obj, unsigned flags, Value *vp); bool VectorToKeyIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); bool VectorToValueIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); bool EnumeratedIdVectorToIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); extern JSBool ValueToIterator(JSContext *cx, unsigned flags, Value *vp); extern bool CloseIterator(JSContext *cx, JSObject *iterObj); extern bool UnwindIteratorForException(JSContext *cx, JSObject *obj); extern void UnwindIteratorForUncatchableException(JSContext *cx, JSObject *obj); } extern bool js_SuppressDeletedProperty(JSContext *cx, js::HandleObject obj, jsid id); extern bool js_SuppressDeletedElement(JSContext *cx, js::HandleObject obj, uint32_t index); extern bool js_SuppressDeletedElements(JSContext *cx, js::HandleObject obj, uint32_t begin, uint32_t end); extern JSBool js_IteratorMore(JSContext *cx, js::HandleObject iterobj, js::Value *rval); extern JSBool js_IteratorNext(JSContext *cx, JSObject *iterobj, js::Value *rval); extern JSBool js_ThrowStopIteration(JSContext *cx); namespace js { inline bool Next(JSContext *cx, HandleObject iter, Value *vp) { if (!js_IteratorMore(cx, iter, vp)) return false; if (vp->toBoolean()) return js_IteratorNext(cx, iter, vp); vp->setMagic(JS_NO_ITER_VALUE); return true; } # 226 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" template bool ForOf(JSContext *cx, const Value &iterable, Op op) { Value iterv(iterable); if (!ValueToIterator(cx, 0x20, &iterv)) return false; RootedObject iter(cx, &iterv.toObject()); bool ok = true; while (ok) { Value v; ok = Next(cx, iter, &v); if (ok) { if (v.isMagic(JS_NO_ITER_VALUE)) break; ok = op(cx, v); } } bool throwing = !ok && cx->isExceptionPending(); Value exc; if (throwing) { exc = cx->getPendingException(); cx->clearPendingException(); } bool closedOK = CloseIterator(cx, iter); if (throwing && closedOK) cx->setPendingException(exc); return ok && closedOK; } } typedef enum JSGeneratorState { JSGEN_NEWBORN, JSGEN_OPEN, JSGEN_RUNNING, JSGEN_CLOSING, JSGEN_CLOSED } JSGeneratorState; struct JSGenerator { js::HeapPtrObject obj; JSGeneratorState state; js::FrameRegs regs; JSObject *enumerators; js::StackFrame *floating; js::HeapValue floatingStack[1]; js::StackFrame *floatingFrame() { return floating; } js::StackFrame *liveFrame() { do { } while(0) ; return regs.fp(); } }; extern JSObject * js_NewGenerator(JSContext *cx); # 306 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" inline js::StackFrame * js_FloatingFrameIfGenerator(JSContext *cx, js::StackFrame *fp) { if ((__builtin_expect((fp->isGeneratorFrame()), 0))) return cx->generatorFor(fp)->floatingFrame(); return fp; } extern JSGenerator * js_FloatingFrameToGenerator(js::StackFrame *fp); inline js::StackFrame * js_LiveFrameIfGenerator(js::StackFrame *fp) { return fp->isGeneratorFrame() ? js_FloatingFrameToGenerator(fp)->liveFrame() : fp; } extern JSObject * js_InitIteratorClasses(JSContext *cx, JSObject *obj); # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 1 #define jsnum_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 1 # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 2 extern double js_NaN; extern double js_PositiveInfinity; extern double js_NegativeInfinity; namespace js { extern bool InitRuntimeNumberState(JSRuntime *rt); extern void FinishRuntimeNumberState(JSRuntime *rt); } extern JSObject * js_InitNumberClass(JSContext *cx, JSObject *obj); extern const char js_isNaN_str[]; extern const char js_isFinite_str[]; extern const char js_parseFloat_str[]; extern const char js_parseInt_str[]; class JSString; class JSFixedString; extern JSString * js_NumberToString(JSContext *cx, double d); namespace js { extern JSFixedString * Int32ToString(JSContext *cx, int32_t i); extern bool NumberValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb); extern JSFixedString * NumberToString(JSContext *cx, double d); extern JSFixedString * IndexToString(JSContext *cx, uint32_t index); struct ToCStringBuf { static const size_t sbufSize = 34; char sbuf[sbufSize]; char *dbuf; ToCStringBuf(); ~ToCStringBuf(); }; extern char * NumberToCString(JSContext *cx, ToCStringBuf *cbuf, double d, int base = 10); const double DOUBLE_INTEGRAL_PRECISION_LIMIT = uint64_t(1) << 53; # 121 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" extern bool GetPrefixInteger(JSContext *cx, const jschar *start, const jschar *end, int base, const jschar **endp, double *dp); __attribute__((always_inline)) inline bool ToNumber(JSContext *cx, Value *vp) { if (vp->isNumber()) return true; double d; extern bool ToNumberSlow(JSContext *cx, js::Value v, double *dp); if (!ToNumberSlow(cx, *vp, &d)) return false; vp->setNumber(d); return true; } __attribute__((always_inline)) inline bool ToUint32(JSContext *cx, const js::Value &v, uint32_t *out) { if (v.isInt32()) { *out = (uint32_t)v.toInt32(); return true; } extern bool ToUint32Slow(JSContext *cx, const js::Value &v, uint32_t *ip); return ToUint32Slow(cx, v, out); } __attribute__((always_inline)) inline bool ValueToUint16(JSContext *cx, const js::Value &v, uint16_t *out) { if (v.isInt32()) { *out = uint16_t(v.toInt32()); return true; } extern bool ValueToUint16Slow(JSContext *cx, const js::Value &v, uint16_t *out); return ValueToUint16Slow(cx, v, out); } JSBool num_parseInt(JSContext *cx, unsigned argc, Value *vp); } # 187 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" extern JSBool js_strtod(JSContext *cx, const jschar *s, const jschar *send, const jschar **ep, double *dp); extern JSBool js_num_valueOf(JSContext *cx, unsigned argc, js::Value *vp); namespace js { static __attribute__((always_inline)) inline bool ValueFitsInInt32(const Value &v, int32_t *pi) { if (v.isInt32()) { *pi = v.toInt32(); return true; } return v.isDouble() && MOZ_DOUBLE_IS_INT32(v.toDouble(), pi); } # 215 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" static __attribute__((always_inline)) inline bool IsDefinitelyIndex(const Value &v, uint32_t *indexp) { if (v.isInt32() && v.toInt32() >= 0) { *indexp = v.toInt32(); return true; } int32_t i; if (v.isDouble() && MOZ_DOUBLE_IS_INT32(v.toDouble(), &i) && i >= 0) { *indexp = uint32_t(i); return true; } return false; } static inline bool ToInteger(JSContext *cx, const js::Value &v, double *dp) { if (v.isInt32()) { *dp = v.toInt32(); return true; } if (v.isDouble()) { *dp = v.toDouble(); } else { extern bool ToNumberSlow(JSContext *cx, Value v, double *dp); if (!ToNumberSlow(cx, v, dp)) return false; } *dp = ToInteger(*dp); return true; } } # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" #define _JSPROBES_H # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" #define jsjaeger_h__ #define JSGC_INCREMENTAL_MJ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 1 # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 1 #define jscompartment_h___ # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" #define GlobalObject_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 1 # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsbool.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" #define jsexn_h___ extern JSObject * js_InitExceptionClasses(JSContext *cx, JSObject *obj); # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" extern JSBool js_ErrorToException(JSContext *cx, const char *message, JSErrorReport *reportp, JSErrorCallback callback, void *userRef); # 50 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" extern JSBool js_ReportUncaughtException(JSContext *cx); extern JSErrorReport * js_ErrorFromException(JSContext *cx, jsval exn); extern const JSErrorFormatString * js_GetLocalizedErrorMessage(JSContext* cx, void *userRef, const char *locale, const unsigned errorNumber); # 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" extern JSObject * js_CopyErrorObject(JSContext *cx, js::HandleObject errobj, js::HandleObject scope); static inline JSProtoKey GetExceptionProtoKey(int exn) { do { } while(0); do { } while(0); return JSProtoKey(JSProto_Error + exn); } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 1 # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 1 # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" #define RegExp_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" 2 JSObject * js_InitRegExpClass(JSContext *cx, JSObject *obj); namespace js { bool ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpObject &reobj, JSLinearString *input, const jschar *chars, size_t length, size_t *lastIndex, RegExpExecType type, Value *rval); bool ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpShared &shared, JSLinearString *input, const jschar *chars, size_t length, size_t *lastIndex, RegExpExecType type, Value *rval); extern JSBool regexp_exec(JSContext *cx, unsigned argc, Value *vp); extern JSBool regexp_test(JSContext *cx, unsigned argc, Value *vp); } # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 extern JSObject * js_InitObjectClass(JSContext *cx, JSObject *obj); extern JSObject * js_InitFunctionClass(JSContext *cx, JSObject *obj); extern JSObject * js_InitTypedArrayClasses(JSContext *cx, JSObject *obj); namespace js { class Debugger; # 64 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" class GlobalObject : public JSObject { static const unsigned STANDARD_CLASS_SLOTS = JSProto_LIMIT * 3; static const unsigned THROWTYPEERROR = STANDARD_CLASS_SLOTS; static const unsigned GENERATOR_PROTO = THROWTYPEERROR + 1; static const unsigned REGEXP_STATICS = GENERATOR_PROTO + 1; static const unsigned FUNCTION_NS = REGEXP_STATICS + 1; static const unsigned RUNTIME_CODEGEN_ENABLED = FUNCTION_NS + 1; static const unsigned EVAL = RUNTIME_CODEGEN_ENABLED + 1; static const unsigned FLAGS = EVAL + 1; static const unsigned DEBUGGERS = FLAGS + 1; static const unsigned RESERVED_SLOTS = DEBUGGERS + 1; void staticAsserts() { typedef int moz_static_assert102[((JSProto_LIMIT * 3 + 8) == RESERVED_SLOTS) ? 1 : -1]; } static const int32_t FLAGS_CLEARED = 0x1; inline void setFlags(int32_t flags); inline void initFlags(int32_t flags); friend JSObject * ::js_InitObjectClass(JSContext *cx, JSObject *obj); friend JSObject * ::js_InitFunctionClass(JSContext *cx, JSObject *obj); JSObject * initFunctionAndObjectClasses(JSContext *cx); inline void setDetailsForKey(JSProtoKey key, JSObject *ctor, JSObject *proto); inline void setObjectClassDetails(JSFunction *ctor, JSObject *proto); inline void setFunctionClassDetails(JSFunction *ctor, JSObject *proto); inline void setThrowTypeError(JSFunction *fun); inline void setOriginalEval(JSObject *evalobj); Value getConstructor(JSProtoKey key) const { do { } while(0); return getSlot(key); } Value getPrototype(JSProtoKey key) const { do { } while(0); return getSlot(JSProto_LIMIT + key); } bool classIsInitialized(JSProtoKey key) const { bool inited = !getConstructor(key).isUndefined(); do { } while(0); return inited; } bool functionObjectClassesInitialized() const { bool inited = classIsInitialized(JSProto_Function); do { } while(0); return inited; } bool arrayClassInitialized() const { return classIsInitialized(JSProto_Array); } bool booleanClassInitialized() const { return classIsInitialized(JSProto_Boolean); } bool numberClassInitialized() const { return classIsInitialized(JSProto_Number); } bool stringClassInitialized() const { return classIsInitialized(JSProto_String); } bool regexpClassInitialized() const { return classIsInitialized(JSProto_RegExp); } bool arrayBufferClassInitialized() const { return classIsInitialized(JSProto_ArrayBuffer); } bool errorClassesInitialized() const { return classIsInitialized(JSProto_Error); } public: static GlobalObject *create(JSContext *cx, Class *clasp); JSFunction * createConstructor(JSContext *cx, JSNative ctor, JSAtom *name, unsigned length, gc::AllocKind kind = JSFunction::FinalizeKind); # 180 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" JSObject *createBlankPrototype(JSContext *cx, js::Class *clasp); JSObject *createBlankPrototypeInheriting(JSContext *cx, js::Class *clasp, JSObject &proto); JSObject *getOrCreateObjectPrototype(JSContext *cx) { if (functionObjectClassesInitialized()) return &getPrototype(JSProto_Object).toObject(); Rooted self(cx, this); if (!initFunctionAndObjectClasses(cx)) return __null; return &self->getPrototype(JSProto_Object).toObject(); } JSObject *getOrCreateFunctionPrototype(JSContext *cx) { if (functionObjectClassesInitialized()) return &getPrototype(JSProto_Function).toObject(); Rooted self(cx, this); if (!initFunctionAndObjectClasses(cx)) return __null; return &self->getPrototype(JSProto_Function).toObject(); } JSObject *getOrCreateArrayPrototype(JSContext *cx) { if (arrayClassInitialized()) return &getPrototype(JSProto_Array).toObject(); Rooted self(cx, this); if (!js_InitArrayClass(cx, this)) return __null; return &self->getPrototype(JSProto_Array).toObject(); } JSObject *getOrCreateBooleanPrototype(JSContext *cx) { if (booleanClassInitialized()) return &getPrototype(JSProto_Boolean).toObject(); Rooted self(cx, this); if (!js_InitBooleanClass(cx, this)) return __null; return &self->getPrototype(JSProto_Boolean).toObject(); } JSObject *getOrCreateNumberPrototype(JSContext *cx) { if (numberClassInitialized()) return &getPrototype(JSProto_Number).toObject(); Rooted self(cx, this); if (!js_InitNumberClass(cx, this)) return __null; return &self->getPrototype(JSProto_Number).toObject(); } JSObject *getOrCreateStringPrototype(JSContext *cx) { if (stringClassInitialized()) return &getPrototype(JSProto_String).toObject(); Rooted self(cx, this); if (!js_InitStringClass(cx, this)) return __null; return &self->getPrototype(JSProto_String).toObject(); } JSObject *getOrCreateRegExpPrototype(JSContext *cx) { if (regexpClassInitialized()) return &getPrototype(JSProto_RegExp).toObject(); Rooted self(cx, this); if (!js_InitRegExpClass(cx, this)) return __null; return &self->getPrototype(JSProto_RegExp).toObject(); } JSObject *getOrCreateArrayBufferPrototype(JSContext *cx) { if (arrayBufferClassInitialized()) return &getPrototype(JSProto_ArrayBuffer).toObject(); Rooted self(cx, this); if (!js_InitTypedArrayClasses(cx, this)) return __null; return &self->getPrototype(JSProto_ArrayBuffer).toObject(); } JSObject *getOrCreateCustomErrorPrototype(JSContext *cx, int exnType) { JSProtoKey key = GetExceptionProtoKey(exnType); if (errorClassesInitialized()) return &getPrototype(key).toObject(); Rooted self(cx, this); if (!js_InitExceptionClasses(cx, this)) return __null; return &self->getPrototype(key).toObject(); } JSObject *getOrCreateGeneratorPrototype(JSContext *cx) { Value v = getSlotRef(GENERATOR_PROTO); if (v.isObject()) return &v.toObject(); Rooted self(cx, this); if (!js_InitIteratorClasses(cx, this)) return __null; return &self->getSlot(GENERATOR_PROTO).toObject(); } inline RegExpStatics *getRegExpStatics() const; JSObject *getThrowTypeError() const { do { } while(0); return &getSlot(THROWTYPEERROR).toObject(); } void clear(JSContext *cx); bool isCleared() const { return getSlot(FLAGS).toInt32() & FLAGS_CLEARED; } bool isRuntimeCodeGenEnabled(JSContext *cx); const Value &getOriginalEval() const { do { } while(0); return getSlot(EVAL); } bool getFunctionNamespace(JSContext *cx, Value *vp); static bool initGeneratorClass(JSContext *cx, Handle global); static bool initStandardClasses(JSContext *cx, Handle global); typedef js::Vector DebuggerVector; DebuggerVector *getDebuggers(); static DebuggerVector *getOrCreateDebuggers(JSContext *cx, Handle global); static bool addDebugger(JSContext *cx, Handle global, Debugger *dbg); }; extern bool LinkConstructorAndPrototype(JSContext *cx, JSObject *ctor, JSObject *proto); extern bool DefinePropertiesAndBrand(JSContext *cx, JSObject *obj, JSPropertySpec *ps, JSFunctionSpec *fs); typedef HashSet, SystemAllocPolicy> GlobalObjectSet; } inline bool JSObject::isGlobal() const { return !!(js::GetObjectClass(this)->flags & (1<<((8 + 8)+2))); } js::GlobalObject & JSObject::asGlobal() { do { } while(0); return *static_cast(this); } # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" #define RegExpObject_h__ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 1 # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 1 # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" #define Yarr_h # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 1 3 4 # 30 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 #define _GCC_LIMITS_H_ # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/syslimits.h" 1 3 4 #define _GCC_NEXT_LIMITS_H # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 1 3 4 # 169 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 25 "/usr/include/limits.h" 3 4 #define _LIBC_LIMITS_H_ 1 #define MB_LEN_MAX 16 # 133 "/usr/include/limits.h" 3 4 #define LLONG_MIN (-LLONG_MAX-1) #define LLONG_MAX __LONG_LONG_MAX__ #define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 # 26 "/usr/include/bits/posix1_lim.h" 3 4 #define _BITS_POSIX1_LIM_H 1 #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_ARG_MAX 4096 #define _POSIX_CHILD_MAX 25 #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_LINK_MAX 8 #define _POSIX_LOGIN_NAME_MAX 9 #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_NAME_MAX 14 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_OPEN_MAX 20 #define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX #define _POSIX_PATH_MAX 256 #define _POSIX_PIPE_BUF 512 #define _POSIX_RE_DUP_MAX 255 #define _POSIX_RTSIG_MAX 8 #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SEM_VALUE_MAX 32767 #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 #define _POSIX_TIMER_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_TZNAME_MAX 6 #define _POSIX_QLIMIT 1 #define _POSIX_HIWAT _POSIX_PIPE_BUF #define _POSIX_UIO_MAXIOV 16 #define _POSIX_CLOCKRES_MIN 20000000 # 1 "/usr/include/bits/local_lim.h" 1 3 4 # 26 "/usr/include/bits/local_lim.h" 3 4 #define __undef_NR_OPEN #define __undef_LINK_MAX #define __undef_OPEN_MAX #define __undef_ARG_MAX # 1 "/usr/include/linux/limits.h" 1 3 4 #define _LINUX_LIMITS_H #define NR_OPEN 1024 #define NGROUPS_MAX 65536 #define ARG_MAX 131072 #define LINK_MAX 127 #define MAX_CANON 255 #define MAX_INPUT 255 #define NAME_MAX 255 #define PATH_MAX 4096 #define PIPE_BUF 4096 #define XATTR_NAME_MAX 255 #define XATTR_SIZE_MAX 65536 #define XATTR_LIST_MAX 65536 #define RTSIG_MAX 32 # 40 "/usr/include/bits/local_lim.h" 2 3 4 #undef NR_OPEN #undef __undef_NR_OPEN #undef LINK_MAX #undef __undef_LINK_MAX #undef OPEN_MAX #undef __undef_OPEN_MAX #undef ARG_MAX #undef __undef_ARG_MAX #define _POSIX_THREAD_KEYS_MAX 128 #define PTHREAD_KEYS_MAX 1024 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define _POSIX_THREAD_THREADS_MAX 64 #undef PTHREAD_THREADS_MAX #define AIO_PRIO_DELTA_MAX 20 #define PTHREAD_STACK_MIN 16384 #define DELAYTIMER_MAX 2147483647 #define TTY_NAME_MAX 32 #define LOGIN_NAME_MAX 256 #define HOST_NAME_MAX 64 #define MQ_PRIO_MAX 32768 #define SEM_VALUE_MAX (2147483647) # 158 "/usr/include/bits/posix1_lim.h" 2 3 4 #define SSIZE_MAX LONG_MAX # 146 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 # 24 "/usr/include/bits/posix2_lim.h" 3 4 #define _BITS_POSIX2_LIM_H 1 #define _POSIX2_BC_BASE_MAX 99 #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 #define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 #define _POSIX2_CHARCLASS_NAME_MAX 14 #define BC_BASE_MAX _POSIX2_BC_BASE_MAX #define BC_DIM_MAX _POSIX2_BC_DIM_MAX #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX #define BC_STRING_MAX _POSIX2_BC_STRING_MAX #define COLL_WEIGHTS_MAX 255 #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX #define LINE_MAX _POSIX2_LINE_MAX #define CHARCLASS_NAME_MAX 2048 #define RE_DUP_MAX (0x7fff) # 150 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 # 31 "/usr/include/bits/xopen_lim.h" 3 4 #define _XOPEN_LIM_H 1 #define __need_IOV_MAX # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 24 "/usr/include/bits/stdio_lim.h" 3 4 #define L_tmpnam 20 #define TMP_MAX 238328 #define FILENAME_MAX 4096 #define L_ctermid 9 #define L_cuserid 9 #undef FOPEN_MAX #define FOPEN_MAX 16 #define IOV_MAX 1024 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 # 66 "/usr/include/bits/xopen_lim.h" 3 4 #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV #define NL_ARGMAX _POSIX_ARG_MAX #define NL_LANGMAX _POSIX2_LINE_MAX #define NL_MSGMAX INT_MAX #define NL_NMAX INT_MAX #define NL_SETMAX INT_MAX #define NL_TEXTMAX INT_MAX #define NZERO 20 # 110 "/usr/include/bits/xopen_lim.h" 3 4 #define WORD_BIT 32 # 130 "/usr/include/bits/xopen_lim.h" 3 4 #define LONG_BIT 32 # 154 "/usr/include/limits.h" 2 3 4 # 170 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 2 3 4 # 8 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/syslimits.h" 2 3 4 #undef _GCC_NEXT_LIMITS_H # 35 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 2 3 4 # 61 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 #define _LIMITS_H___ #undef CHAR_BIT #define CHAR_BIT __CHAR_BIT__ #undef SCHAR_MIN #define SCHAR_MIN (-SCHAR_MAX - 1) #undef SCHAR_MAX #define SCHAR_MAX __SCHAR_MAX__ #undef UCHAR_MAX #define UCHAR_MAX (SCHAR_MAX * 2 + 1) #undef CHAR_MIN #define CHAR_MIN 0 #undef CHAR_MAX #define CHAR_MAX UCHAR_MAX # 104 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 #undef SHRT_MIN #define SHRT_MIN (-SHRT_MAX - 1) #undef SHRT_MAX #define SHRT_MAX __SHRT_MAX__ #undef USHRT_MAX #define USHRT_MAX (SHRT_MAX * 2 + 1) #undef INT_MIN #define INT_MIN (-INT_MAX - 1) #undef INT_MAX #define INT_MAX __INT_MAX__ #undef UINT_MAX #define UINT_MAX (INT_MAX * 2U + 1U) #undef LONG_MIN #define LONG_MIN (-LONG_MAX - 1L) #undef LONG_MAX #define LONG_MAX __LONG_MAX__ #undef ULONG_MAX #define ULONG_MAX (LONG_MAX * 2UL + 1UL) # 152 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 #undef LONG_LONG_MIN #define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) #undef LONG_LONG_MAX #define LONG_LONG_MAX __LONG_LONG_MAX__ #undef ULONG_LONG_MAX #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) # 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" #define YarrInterpreter_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 1 # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" #define YarrPattern_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 1 #define jswtfbridge_h__ # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" 1 # 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_Platform_h #define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_ ##WTF_FEATURE && WTF_PLATFORM_ ##WTF_FEATURE) #define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_ ##WTF_FEATURE && WTF_COMPILER_ ##WTF_FEATURE) #define CPU(WTF_FEATURE) (defined WTF_CPU_ ##WTF_FEATURE && WTF_CPU_ ##WTF_FEATURE) #define HAVE(WTF_FEATURE) (defined HAVE_ ##WTF_FEATURE && HAVE_ ##WTF_FEATURE) #define OS(WTF_FEATURE) (defined WTF_OS_ ##WTF_FEATURE && WTF_OS_ ##WTF_FEATURE) #define USE(WTF_FEATURE) (defined WTF_USE_ ##WTF_FEATURE && WTF_USE_ ##WTF_FEATURE) #define ENABLE(WTF_FEATURE) (defined ENABLE_ ##WTF_FEATURE && ENABLE_ ##WTF_FEATURE) # 80 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define RVCT_VERSION_AT_LEAST(major,minor,patch,build) 0 #define WTF_COMPILER_GCC 1 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #define GCC_VERSION_AT_LEAST(major,minor,patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) # 233 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_CPU_ARM 1 # 247 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N) # 279 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_ARM_ARCH_VERSION 7 # 318 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_THUMB_ARCH_VERSION 4 # 346 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_CPU_ARM_TRADITIONAL 1 #define WTF_CPU_ARM_THUMB2 0 # 362 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 # 425 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_OS_LINUX 1 # 478 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_OS_UNIX 1 # 532 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_PLATFORM_IOS_SIMULATOR 0 #define WTF_PLATFORM_IOS 0 # 621 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_USE_ICU_UNICODE 1 # 760 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define HAVE_SIGNAL_H 1 # 772 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 #define HAVE_TIMEGM 1 # 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define HAVE_ERRNO_H 1 #define HAVE_LANGINFO_H 1 #define HAVE_MMAP 1 #define HAVE_SBRK 1 #define HAVE_STRINGS_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_TIME_H 1 # 896 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define ENABLE_FAST_MALLOC_MATCH_VALIDATION 0 #define ENABLE_ICONDATABASE 1 #define ENABLE_DATABASE 1 #define ENABLE_JAVASCRIPT_DEBUGGER 1 #define ENABLE_FTPDIR 1 #define ENABLE_CONTEXT_MENUS 1 #define ENABLE_DRAG_SUPPORT 1 #define ENABLE_DATA_TRANSFER_ITEMS 0 #define ENABLE_DASHBOARD_SUPPORT 0 #define ENABLE_INSPECTOR 1 #define ENABLE_JAVA_BRIDGE 0 #define ENABLE_NETSCAPE_PLUGIN_API 1 #define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0 #define ENABLE_PURGEABLE_MEMORY 0 #define WTF_USE_PLUGIN_HOST_PROCESS 0 #define ENABLE_ORIENTATION_EVENTS 0 #define ENABLE_OPCODE_STATS 0 #define ENABLE_GLOBAL_FASTMALLOC_NEW 1 #define ENABLE_DEBUG_WITH_BREAKPOINT 0 #define ENABLE_SAMPLING_COUNTERS 0 #define ENABLE_SAMPLING_FLAGS 0 #define ENABLE_OPCODE_SAMPLING 0 #define ENABLE_CODEBLOCK_SAMPLING 0 # 980 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define ENABLE_GEOLOCATION 0 #define ENABLE_GESTURE_RECOGNIZER 0 #define ENABLE_NOTIFICATIONS 0 #define ENABLE_TEXT_CARET 1 #define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0 #define ENABLE_FULLSCREEN_API 0 # 1016 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_USE_JSVALUE32_64 1 #define ENABLE_REPAINT_THROTTLING 0 # 1064 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define ENABLE_JIT_USE_SOFT_MODULO 1 #define ENABLE_JIT_OPTIMIZE_CALL 1 #define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 1 #define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 1 #define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1 # 1087 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define JSC_HOST_CALL #define HAVE_COMPUTED_GOTO 1 #define ENABLE_REGEXP_TRACING 0 #define ENABLE_YARR_JIT 1 #define ENABLE_YARR_JIT_DEBUG 0 #define ENABLE_ASSEMBLER 1 # 1128 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1 # 1137 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define ENABLE_SMOOTH_SCROLLING 0 #define ENABLE_WEB_ARCHIVE 0 # 1176 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result)) # 1186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK #define ENABLE_JSC_ZOMBIES 0 # 1226 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" #define WTF_USE_EXPORT_MACROS 0 # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 1 # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" #define ExecutableAllocator_h # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" 1 # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" #define WTF_Assertions_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" 1 # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 2 #define ASSERT_DISABLED 1 #define ASSERT(assertion) MOZ_ASSERT(assertion) #define ASSERT_UNUSED(variable,assertion) do { (void)variable; ASSERT(assertion); } while (0) #define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("") #define CRASH() MOZ_CRASH() #define COMPILE_ASSERT(exp,name) MOZ_STATIC_ASSERT(exp, #name) # 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 # 74 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" #define INITIAL_PROTECTION_FLAGS (PROT_READ | PROT_WRITE | PROT_EXEC) namespace JSC { class ExecutableAllocator; enum CodeKind { METHOD_CODE, REGEXP_CODE }; class ExecutablePool { friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime; friend class ExecutableAllocator; private: struct Allocation { char* pages; size_t size; }; ExecutableAllocator* m_allocator; char* m_freePtr; char* m_end; Allocation m_allocation; unsigned m_refCount; size_t m_mjitCodeMethod; size_t m_mjitCodeRegexp; public: bool m_destroy; size_t m_gcNumber; void release(bool willDestroy = false) { do { } while(0); if (--m_refCount == 0) { js::UnwantedForeground::delete_(this); } } private: void addRef() { do { } while(0); ++m_refCount; } ExecutablePool(ExecutableAllocator* allocator, Allocation a) : m_allocator(allocator), m_freePtr(a.pages), m_end(m_freePtr + a.size), m_allocation(a), m_refCount(1), m_mjitCodeMethod(0), m_mjitCodeRegexp(0), m_destroy(false), m_gcNumber(0) { } ~ExecutablePool(); void* alloc(size_t n, CodeKind kind) { do { } while(0); void *result = m_freePtr; m_freePtr += n; if ( kind == REGEXP_CODE ) m_mjitCodeRegexp += n; else m_mjitCodeMethod += n; return result; } size_t available() const { do { } while(0); return m_end - m_freePtr; } }; enum AllocationBehavior { AllocationCanRandomize, AllocationDeterministic }; class ExecutableAllocator { typedef void (*DestroyCallback)(void* addr, size_t size); enum ProtectionSetting { Writable, Executable }; DestroyCallback destroyCallback; void initSeed(); public: explicit ExecutableAllocator(AllocationBehavior allocBehavior) : destroyCallback(__null), allocBehavior(allocBehavior) { if (!pageSize) { pageSize = determinePageSize(); # 196 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" largeAllocSize = pageSize * 16; } do { } while(0); } ~ExecutableAllocator() { for (size_t i = 0; i < m_smallPools.length(); i++) m_smallPools[i]->release( true); } void* alloc(size_t n, ExecutablePool** poolp, CodeKind type) { n = roundUpAllocationSize(n, sizeof(void*)); if (n == OVERSIZE_ALLOCATION) { *poolp = __null; return __null; } *poolp = poolForSize(n); if (!*poolp) return __null; void *result = (*poolp)->alloc(n, type); do { } while(0); return result; } void releasePoolPages(ExecutablePool *pool) { do { } while(0); if (destroyCallback) destroyCallback(pool->m_allocation.pages, pool->m_allocation.size); systemRelease(pool->m_allocation); do { } while(0); m_pools.remove(m_pools.lookup(pool)); } void sizeOfCode(size_t *method, size_t *regexp, size_t *unused) const; void setDestroyCallback(DestroyCallback destroyCallback) { this->destroyCallback = destroyCallback; } void setRandomize(bool enabled) { allocBehavior = enabled ? AllocationCanRandomize : AllocationDeterministic; } private: static size_t pageSize; static size_t largeAllocSize; static const size_t OVERSIZE_ALLOCATION = size_t(-1); static size_t roundUpAllocationSize(size_t request, size_t granularity) { if ((std::numeric_limits::max() - granularity) <= request) return OVERSIZE_ALLOCATION; size_t size = request + (granularity - 1); size = size & ~(granularity - 1); do { } while(0); return size; } ExecutablePool::Allocation systemAlloc(size_t n); static void systemRelease(const ExecutablePool::Allocation& alloc); void *computeRandomAllocationAddress(); ExecutablePool* createPool(size_t n) { size_t allocSize = roundUpAllocationSize(n, pageSize); if (allocSize == OVERSIZE_ALLOCATION) return __null; if (!m_pools.initialized() && !m_pools.init()) return __null; ExecutablePool::Allocation a = systemAlloc(allocSize); if (!a.pages) return __null; ExecutablePool *pool = js::OffTheBooks::new_(this, a); if (!pool) { systemRelease(a); return __null; } m_pools.put(pool); return pool; } public: ExecutablePool* poolForSize(size_t n) { ExecutablePool *minPool = __null; for (size_t i = 0; i < m_smallPools.length(); i++) { ExecutablePool *pool = m_smallPools[i]; if (n <= pool->available() && (!minPool || pool->available() < minPool->available())) minPool = pool; } if (minPool) { minPool->addRef(); return minPool; } if (n > largeAllocSize) return createPool(n); ExecutablePool* pool = createPool(largeAllocSize); if (!pool) return __null; if (m_smallPools.length() < maxSmallPools) { m_smallPools.append(pool); pool->addRef(); } else { int iMin = 0; for (size_t i = 1; i < m_smallPools.length(); i++) if (m_smallPools[i]->available() < m_smallPools[iMin]->available()) { iMin = i; } ExecutablePool *minPool = m_smallPools[iMin]; if ((pool->available() - n) > minPool->available()) { minPool->release(); m_smallPools[iMin] = pool; pool->addRef(); } } return pool; } # 386 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" static void makeWritable(void*, size_t) {} static void makeExecutable(void*, size_t) {} # 451 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" static void cacheFlush(void* code, size_t size) { asm volatile ( "push {r7}\n" "mov r0, %0\n" "mov r1, %1\n" "mov r7, #0xf0000\n" "add r7, r7, #0x2\n" "mov r2, #0x0\n" "svc 0x0\n" "pop {r7}\n" : : "r" (code), "r" (reinterpret_cast(code) + size) : "r0", "r1", "r2"); } private: static const size_t maxSmallPools = 4; typedef js::Vector SmallExecPoolVector; SmallExecPoolVector m_smallPools; typedef js::HashSet, js::SystemAllocPolicy> ExecPoolHashSet; ExecPoolHashSet m_pools; AllocationBehavior allocBehavior; static size_t determinePageSize(); }; } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 namespace JSC { namespace Yarr { typedef jschar UChar; typedef JSLinearString UString; using namespace js::unicode; class Unicode { public: static UChar toUpper(UChar c) { return ToUpperCase(c); } static UChar toLower(UChar c) { return ToLowerCase(c); } }; template class RefCounted { }; template class RefPtr { T *ptr; public: RefPtr(T *p) { ptr = p; } operator bool() const { return ptr != __null; } const T *operator ->() const { return ptr; } T *get() { return ptr; } }; template class PassRefPtr { T *ptr; public: PassRefPtr(T *p) { ptr = p; } operator T*() { return ptr; } }; template class PassOwnPtr { T *ptr; public: PassOwnPtr(T *p) { ptr = p; } T *get() { return ptr; } }; template class OwnPtr { T *ptr; public: OwnPtr() : ptr(__null) { } OwnPtr(PassOwnPtr p) : ptr(p.get()) { } ~OwnPtr() { if (ptr) js::Foreground::delete_(ptr); } OwnPtr &operator=(PassOwnPtr p) { ptr = p.get(); return *this; } T *operator ->() { return ptr; } T *get() { return ptr; } T *release() { T *result = ptr; ptr = __null; return result; } }; template PassRefPtr adoptRef(T *p) { return PassRefPtr(p); } template PassOwnPtr adoptPtr(T *p) { return PassOwnPtr(p); } #define WTF_MAKE_FAST_ALLOCATED template class Ref { T &val; public: Ref(T &val) : val(val) { } operator T&() const { return val; } }; template class Vector { public: js::Vector impl; public: Vector() {} Vector(const Vector &v) { (void) append(v); } size_t size() const { return impl.length(); } T &operator[](size_t i) { return impl[i]; } const T &operator[](size_t i) const { return impl[i]; } T &at(size_t i) { return impl[i]; } const T *begin() const { return impl.begin(); } T &last() { return impl.back(); } bool isEmpty() const { return impl.empty(); } template void append(const U &u) { (void) impl.append(static_cast(u)); } template void append(const Vector &v) { (void) impl.append(v.impl); } void insert(size_t i, const T& t) { (void) impl.insert(&impl[i], t); } void remove(size_t i) { impl.erase(&impl[i]); } void clear() { return impl.clear(); } void shrink(size_t newLength) { do { } while(0); (void) impl.resize(newLength); } void deleteAllValues() { for (T *p = impl.begin(); p != impl.end(); ++p) js::Foreground::delete_(*p); } }; template class Vector > { public: js::Vector impl; public: Vector() {} size_t size() const { return impl.length(); } void append(T *t) { (void) impl.append(t); } PassOwnPtr operator[](size_t i) { return PassOwnPtr(impl[i]); } void clear() { for (T **p = impl.begin(); p != impl.end(); ++p) js::Foreground::delete_(*p); return impl.clear(); } }; template inline void deleteAllValues(Vector &v) { v.deleteAllValues(); } class JSGlobalData { public: ExecutableAllocator *regexAllocator; JSGlobalData(ExecutableAllocator *regexAllocator) : regexAllocator(regexAllocator) { } }; const size_t notFound = size_t(-1); #define UNUSED_PARAM(e) } namespace std { # 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" template inline T min(T t1, T t2) { return ((t1)<(t2)?(t1):(t2)); } template inline T max(T t1, T t2) { return ((t1)>(t2)?(t1):(t2)); } template inline void swap(T &t1, T &t2) { T tmp = t1; t1 = t2; t2 = tmp; } } } # 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" 1 # 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" #define WTF_ASCIICType_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 # 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" 2 # 48 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" namespace WTF { inline bool isASCII(char c) { return !(c & ~0x7F); } inline bool isASCII(unsigned short c) { return !(c & ~0x7F); } inline bool isASCII(wchar_t c) { return !(c & ~0x7F); } inline bool isASCII(int c) { return !(c & ~0x7F); } inline bool isASCII(unsigned c) { return !(c & ~0x7F); } inline bool isASCIIAlpha(char c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } inline bool isASCIIAlpha(unsigned short c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } inline bool isASCIIAlpha(wchar_t c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } inline bool isASCIIAlpha(int c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } inline bool isASCIIAlpha(unsigned c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } inline bool isASCIIAlphanumeric(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } inline bool isASCIIAlphanumeric(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } inline bool isASCIIAlphanumeric(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } inline bool isASCIIAlphanumeric(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } inline bool isASCIIAlphanumeric(unsigned c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } inline bool isASCIIDigit(char c) { return (c >= '0') & (c <= '9'); } inline bool isASCIIDigit(unsigned short c) { return (c >= '0') & (c <= '9'); } inline bool isASCIIDigit(wchar_t c) { return (c >= '0') & (c <= '9'); } inline bool isASCIIDigit(int c) { return (c >= '0') & (c <= '9'); } inline bool isASCIIDigit(unsigned c) { return (c >= '0') & (c <= '9'); } inline bool isASCIIHexDigit(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } inline bool isASCIIHexDigit(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } inline bool isASCIIHexDigit(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } inline bool isASCIIHexDigit(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } inline bool isASCIIHexDigit(unsigned c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } inline bool isASCIIOctalDigit(char c) { return (c >= '0') & (c <= '7'); } inline bool isASCIIOctalDigit(unsigned short c) { return (c >= '0') & (c <= '7'); } inline bool isASCIIOctalDigit(wchar_t c) { return (c >= '0') & (c <= '7'); } inline bool isASCIIOctalDigit(int c) { return (c >= '0') & (c <= '7'); } inline bool isASCIIOctalDigit(unsigned c) { return (c >= '0') & (c <= '7'); } inline bool isASCIILower(char c) { return c >= 'a' && c <= 'z'; } inline bool isASCIILower(unsigned short c) { return c >= 'a' && c <= 'z'; } inline bool isASCIILower(wchar_t c) { return c >= 'a' && c <= 'z'; } inline bool isASCIILower(int c) { return c >= 'a' && c <= 'z'; } inline bool isASCIILower(unsigned c) { return c >= 'a' && c <= 'z'; } inline bool isASCIIUpper(char c) { return c >= 'A' && c <= 'Z'; } inline bool isASCIIUpper(unsigned short c) { return c >= 'A' && c <= 'Z'; } inline bool isASCIIUpper(wchar_t c) { return c >= 'A' && c <= 'Z'; } inline bool isASCIIUpper(int c) { return c >= 'A' && c <= 'Z'; } inline bool isASCIIUpper(unsigned c) { return c >= 'A' && c <= 'Z'; } # 127 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" inline bool isASCIISpace(char c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } inline bool isASCIISpace(unsigned short c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } inline bool isASCIISpace(wchar_t c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } inline bool isASCIISpace(int c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } inline bool isASCIISpace(unsigned c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } inline char toASCIILower(char c) { return c | ((c >= 'A' && c <= 'Z') << 5); } inline unsigned short toASCIILower(unsigned short c) { return c | ((c >= 'A' && c <= 'Z') << 5); } inline wchar_t toASCIILower(wchar_t c) { return c | ((c >= 'A' && c <= 'Z') << 5); } inline int toASCIILower(int c) { return c | ((c >= 'A' && c <= 'Z') << 5); } inline unsigned toASCIILower(unsigned c) { return c | ((c >= 'A' && c <= 'Z') << 5); } inline char toASCIIUpper(char c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } inline unsigned short toASCIIUpper(unsigned short c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } inline wchar_t toASCIIUpper(wchar_t c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } inline int toASCIIUpper(int c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } inline unsigned toASCIIUpper(unsigned c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } inline int toASCIIHexValue(char c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } inline int toASCIIHexValue(unsigned short c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } inline int toASCIIHexValue(wchar_t c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } inline int toASCIIHexValue(int c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } inline int toASCIIHexValue(unsigned c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } inline bool isASCIIPrintable(char c) { return c >= ' ' && c <= '~'; } inline bool isASCIIPrintable(unsigned short c) { return c >= ' ' && c <= '~'; } inline bool isASCIIPrintable(wchar_t c) { return c >= ' ' && c <= '~'; } inline bool isASCIIPrintable(int c) { return c >= ' ' && c <= '~'; } inline bool isASCIIPrintable(unsigned c) { return c >= ' ' && c <= '~'; } } using WTF::isASCII; using WTF::isASCIIAlpha; using WTF::isASCIIAlphanumeric; using WTF::isASCIIDigit; using WTF::isASCIIHexDigit; using WTF::isASCIILower; using WTF::isASCIIOctalDigit; using WTF::isASCIIPrintable; using WTF::isASCIISpace; using WTF::isASCIIUpper; using WTF::toASCIIHexValue; using WTF::toASCIILower; using WTF::toASCIIUpper; # 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 2 namespace JSC { namespace Yarr { enum ErrorCode { NoError, PatternTooLarge, QuantifierOutOfOrder, QuantifierWithoutAtom, MissingParentheses, ParenthesesUnmatched, ParenthesesTypeInvalid, CharacterClassUnmatched, CharacterClassInvalidRange, CharacterClassOutOfOrder, EscapeUnterminated, QuantifierTooLarge, NumberOfErrorCodes }; struct PatternDisjunction; struct CharacterRange { UChar begin; UChar end; CharacterRange(UChar begin, UChar end) : begin(begin) , end(end) { } }; struct CharacterClassTable : RefCounted { friend class js::OffTheBooks; const char* m_table; bool m_inverted; static PassRefPtr create(const char* table, bool inverted) { return adoptRef(js::OffTheBooks::new_(table, inverted)); } private: CharacterClassTable(const char* table, bool inverted) : m_table(table) , m_inverted(inverted) { } }; struct CharacterClass { public: CharacterClass(PassRefPtr table) : m_table(table) { } ~CharacterClass() { js::Foreground::delete_(m_table.get()); } Vector m_matches; Vector m_ranges; Vector m_matchesUnicode; Vector m_rangesUnicode; RefPtr m_table; }; enum QuantifierType { QuantifierFixedCount, QuantifierGreedy, QuantifierNonGreedy }; struct PatternTerm { enum Type { TypeAssertionBOL, TypeAssertionEOL, TypeAssertionWordBoundary, TypePatternCharacter, TypeCharacterClass, TypeBackReference, TypeForwardReference, TypeParenthesesSubpattern, TypeParentheticalAssertion } type; bool m_capture :1; bool m_invert :1; union { UChar patternCharacter; CharacterClass* characterClass; unsigned backReferenceSubpatternId; struct { PatternDisjunction* disjunction; unsigned subpatternId; unsigned lastSubpatternId; bool isCopy; bool isTerminal; } parentheses; }; QuantifierType quantityType; unsigned quantityCount; int inputPosition; unsigned frameLocation; PatternTerm() : type(PatternTerm::TypePatternCharacter) , m_capture(false) , m_invert(false) { patternCharacter = 0; quantityType = QuantifierFixedCount; quantityCount = 1; } PatternTerm(UChar ch) : type(PatternTerm::TypePatternCharacter) , m_capture(false) , m_invert(false) { patternCharacter = ch; quantityType = QuantifierFixedCount; quantityCount = 1; } PatternTerm(CharacterClass* charClass, bool invert) : type(PatternTerm::TypeCharacterClass) , m_capture(false) , m_invert(invert) { characterClass = charClass; quantityType = QuantifierFixedCount; quantityCount = 1; } PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) : type(type) , m_capture(capture) , m_invert(invert) { parentheses.disjunction = disjunction; parentheses.subpatternId = subpatternId; parentheses.isCopy = false; parentheses.isTerminal = false; quantityType = QuantifierFixedCount; quantityCount = 1; } PatternTerm(Type type, bool invert = false) : type(type) , m_capture(false) , m_invert(invert) { quantityType = QuantifierFixedCount; quantityCount = 1; } PatternTerm(unsigned spatternId) : type(TypeBackReference) , m_capture(false) , m_invert(false) { backReferenceSubpatternId = spatternId; quantityType = QuantifierFixedCount; quantityCount = 1; } static PatternTerm ForwardReference() { return PatternTerm(TypeForwardReference); } static PatternTerm BOL() { return PatternTerm(TypeAssertionBOL); } static PatternTerm EOL() { return PatternTerm(TypeAssertionEOL); } static PatternTerm WordBoundary(bool invert) { return PatternTerm(TypeAssertionWordBoundary, invert); } bool invert() { return m_invert; } bool capture() { return m_capture; } void quantify(unsigned count, QuantifierType type) { quantityCount = count; quantityType = type; } }; struct PatternAlternative { public: PatternAlternative(PatternDisjunction* disjunction) : m_parent(disjunction) , m_onceThrough(false) , m_hasFixedSize(false) , m_startsWithBOL(false) , m_containsBOL(false) { } PatternTerm& lastTerm() { do { } while(0); return m_terms[m_terms.size() - 1]; } void removeLastTerm() { do { } while(0); m_terms.shrink(m_terms.size() - 1); } void setOnceThrough() { m_onceThrough = true; } bool onceThrough() { return m_onceThrough; } Vector m_terms; PatternDisjunction* m_parent; unsigned m_minimumSize; bool m_onceThrough : 1; bool m_hasFixedSize : 1; bool m_startsWithBOL : 1; bool m_containsBOL : 1; }; struct PatternDisjunction { public: PatternDisjunction(PatternAlternative* parent = 0) : m_parent(parent) , m_hasFixedSize(false) { } ~PatternDisjunction() { deleteAllValues(m_alternatives); } PatternAlternative* addNewAlternative() { PatternAlternative* alternative = js::OffTheBooks::new_(this); m_alternatives.append(alternative); return alternative; } Vector m_alternatives; PatternAlternative* m_parent; unsigned m_minimumSize; unsigned m_callFrameSize; bool m_hasFixedSize; }; CharacterClass* newlineCreate(); CharacterClass* digitsCreate(); CharacterClass* spacesCreate(); CharacterClass* wordcharCreate(); CharacterClass* nondigitsCreate(); CharacterClass* nonspacesCreate(); CharacterClass* nonwordcharCreate(); struct TermChain { TermChain(PatternTerm term) : term(term) {} PatternTerm term; Vector hotTerms; }; struct YarrPattern { YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, ErrorCode* error); ~YarrPattern() { deleteAllValues(m_disjunctions); deleteAllValues(m_userCharacterClasses); } void reset() { m_numSubpatterns = 0; m_maxBackReference = 0; m_containsBackreferences = false; m_containsBOL = false; newlineCached = 0; digitsCached = 0; spacesCached = 0; wordcharCached = 0; nondigitsCached = 0; nonspacesCached = 0; nonwordcharCached = 0; deleteAllValues(m_disjunctions); m_disjunctions.clear(); deleteAllValues(m_userCharacterClasses); m_userCharacterClasses.clear(); } bool containsIllegalBackReference() { return m_maxBackReference > m_numSubpatterns; } CharacterClass* newlineCharacterClass() { if (!newlineCached) m_userCharacterClasses.append(newlineCached = newlineCreate()); return newlineCached; } CharacterClass* digitsCharacterClass() { if (!digitsCached) m_userCharacterClasses.append(digitsCached = digitsCreate()); return digitsCached; } CharacterClass* spacesCharacterClass() { if (!spacesCached) m_userCharacterClasses.append(spacesCached = spacesCreate()); return spacesCached; } CharacterClass* wordcharCharacterClass() { if (!wordcharCached) m_userCharacterClasses.append(wordcharCached = wordcharCreate()); return wordcharCached; } CharacterClass* nondigitsCharacterClass() { if (!nondigitsCached) m_userCharacterClasses.append(nondigitsCached = nondigitsCreate()); return nondigitsCached; } CharacterClass* nonspacesCharacterClass() { if (!nonspacesCached) m_userCharacterClasses.append(nonspacesCached = nonspacesCreate()); return nonspacesCached; } CharacterClass* nonwordcharCharacterClass() { if (!nonwordcharCached) m_userCharacterClasses.append(nonwordcharCached = nonwordcharCreate()); return nonwordcharCached; } bool m_ignoreCase : 1; bool m_multiline : 1; bool m_containsBackreferences : 1; bool m_containsBOL : 1; unsigned m_numSubpatterns; unsigned m_maxBackReference; PatternDisjunction* m_body; Vector m_disjunctions; Vector m_userCharacterClasses; private: ErrorCode compile(const UString& patternString); CharacterClass* newlineCached; CharacterClass* digitsCached; CharacterClass* spacesCached; CharacterClass* wordcharCached; CharacterClass* nondigitsCached; CharacterClass* nonspacesCached; CharacterClass* nonwordcharCached; }; } } # 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" 2 namespace WTF { class BumpPointerAllocator; } using WTF::BumpPointerAllocator; namespace JSC { namespace Yarr { class ByteDisjunction; struct ByteTerm { enum Type { TypeBodyAlternativeBegin, TypeBodyAlternativeDisjunction, TypeBodyAlternativeEnd, TypeAlternativeBegin, TypeAlternativeDisjunction, TypeAlternativeEnd, TypeSubpatternBegin, TypeSubpatternEnd, TypeAssertionBOL, TypeAssertionEOL, TypeAssertionWordBoundary, TypePatternCharacterOnce, TypePatternCharacterFixed, TypePatternCharacterGreedy, TypePatternCharacterNonGreedy, TypePatternCasedCharacterOnce, TypePatternCasedCharacterFixed, TypePatternCasedCharacterGreedy, TypePatternCasedCharacterNonGreedy, TypeCharacterClass, TypeBackReference, TypeParenthesesSubpattern, TypeParenthesesSubpatternOnceBegin, TypeParenthesesSubpatternOnceEnd, TypeParenthesesSubpatternTerminalBegin, TypeParenthesesSubpatternTerminalEnd, TypeParentheticalAssertionBegin, TypeParentheticalAssertionEnd, TypeCheckInput, TypeUncheckInput } type; union { struct { union { UChar patternCharacter; struct { UChar lo; UChar hi; } casedCharacter; CharacterClass* characterClass; unsigned subpatternId; }; union { ByteDisjunction* parenthesesDisjunction; unsigned parenthesesWidth; }; QuantifierType quantityType; unsigned quantityCount; } atom; struct { int next; int end; bool onceThrough; } alternative; unsigned checkInputCount; }; unsigned frameLocation; bool m_capture : 1; bool m_invert : 1; int inputPosition; ByteTerm() { } ByteTerm(UChar ch, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType) : frameLocation(frameLocation) , m_capture(false) , m_invert(false) { switch (quantityType) { case QuantifierFixedCount: type = (quantityCount == 1) ? ByteTerm::TypePatternCharacterOnce : ByteTerm::TypePatternCharacterFixed; break; case QuantifierGreedy: type = ByteTerm::TypePatternCharacterGreedy; break; case QuantifierNonGreedy: type = ByteTerm::TypePatternCharacterNonGreedy; break; } atom.patternCharacter = ch; atom.quantityType = quantityType; atom.quantityCount = quantityCount; inputPosition = inputPos; } ByteTerm(UChar lo, UChar hi, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType) : frameLocation(frameLocation) , m_capture(false) , m_invert(false) { switch (quantityType) { case QuantifierFixedCount: type = (quantityCount == 1) ? ByteTerm::TypePatternCasedCharacterOnce : ByteTerm::TypePatternCasedCharacterFixed; break; case QuantifierGreedy: type = ByteTerm::TypePatternCasedCharacterGreedy; break; case QuantifierNonGreedy: type = ByteTerm::TypePatternCasedCharacterNonGreedy; break; } atom.casedCharacter.lo = lo; atom.casedCharacter.hi = hi; atom.quantityType = quantityType; atom.quantityCount = quantityCount; inputPosition = inputPos; } ByteTerm(CharacterClass* characterClass, bool invert, int inputPos) : type(ByteTerm::TypeCharacterClass) , m_capture(false) , m_invert(invert) { atom.characterClass = characterClass; atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; inputPosition = inputPos; } ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) : type(type) , m_capture(capture) , m_invert(false) { atom.subpatternId = subpatternId; atom.parenthesesDisjunction = parenthesesInfo; atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; inputPosition = inputPos; } ByteTerm(Type type, bool invert = false) : type(type) , m_capture(false) , m_invert(invert) { atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; } ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) : type(type) , m_capture(capture) , m_invert(invert) { atom.subpatternId = subpatternId; atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; inputPosition = inputPos; } static ByteTerm BOL(int inputPos) { ByteTerm term(TypeAssertionBOL); term.inputPosition = inputPos; return term; } static ByteTerm CheckInput(unsigned count) { ByteTerm term(TypeCheckInput); term.checkInputCount = count; return term; } static ByteTerm UncheckInput(unsigned count) { ByteTerm term(TypeUncheckInput); term.checkInputCount = count; return term; } static ByteTerm EOL(int inputPos) { ByteTerm term(TypeAssertionEOL); term.inputPosition = inputPos; return term; } static ByteTerm WordBoundary(bool invert, int inputPos) { ByteTerm term(TypeAssertionWordBoundary, invert); term.inputPosition = inputPos; return term; } static ByteTerm BackReference(unsigned subpatternId, int inputPos) { return ByteTerm(TypeBackReference, subpatternId, false, false, inputPos); } static ByteTerm BodyAlternativeBegin(bool onceThrough) { ByteTerm term(TypeBodyAlternativeBegin); term.alternative.next = 0; term.alternative.end = 0; term.alternative.onceThrough = onceThrough; return term; } static ByteTerm BodyAlternativeDisjunction(bool onceThrough) { ByteTerm term(TypeBodyAlternativeDisjunction); term.alternative.next = 0; term.alternative.end = 0; term.alternative.onceThrough = onceThrough; return term; } static ByteTerm BodyAlternativeEnd() { ByteTerm term(TypeBodyAlternativeEnd); term.alternative.next = 0; term.alternative.end = 0; term.alternative.onceThrough = false; return term; } static ByteTerm AlternativeBegin() { ByteTerm term(TypeAlternativeBegin); term.alternative.next = 0; term.alternative.end = 0; term.alternative.onceThrough = false; return term; } static ByteTerm AlternativeDisjunction() { ByteTerm term(TypeAlternativeDisjunction); term.alternative.next = 0; term.alternative.end = 0; term.alternative.onceThrough = false; return term; } static ByteTerm AlternativeEnd() { ByteTerm term(TypeAlternativeEnd); term.alternative.next = 0; term.alternative.end = 0; term.alternative.onceThrough = false; return term; } static ByteTerm SubpatternBegin() { return ByteTerm(TypeSubpatternBegin); } static ByteTerm SubpatternEnd() { return ByteTerm(TypeSubpatternEnd); } bool invert() { return m_invert; } bool capture() { return m_capture; } }; class ByteDisjunction { public: ByteDisjunction(unsigned numSubpatterns, unsigned frameSize) : m_numSubpatterns(numSubpatterns) , m_frameSize(frameSize) { } Vector terms; unsigned m_numSubpatterns; unsigned m_frameSize; }; struct BytecodePattern { public: BytecodePattern(PassOwnPtr body, const Vector &allParenthesesInfo, YarrPattern& pattern, BumpPointerAllocator* allocator) : m_body(body) , m_ignoreCase(pattern.m_ignoreCase) , m_multiline(pattern.m_multiline) , m_allocator(allocator) { newlineCharacterClass = pattern.newlineCharacterClass(); wordcharCharacterClass = pattern.wordcharCharacterClass(); m_allParenthesesInfo.append(allParenthesesInfo); m_userCharacterClasses.append(pattern.m_userCharacterClasses); pattern.m_userCharacterClasses.clear(); } ~BytecodePattern() { deleteAllValues(m_allParenthesesInfo); deleteAllValues(m_userCharacterClasses); } OwnPtr m_body; bool m_ignoreCase; bool m_multiline; BumpPointerAllocator* m_allocator; CharacterClass* newlineCharacterClass; CharacterClass* wordcharCharacterClass; private: Vector m_allParenthesesInfo; Vector m_userCharacterClasses; }; } } # 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 2 namespace JSC { namespace Yarr { #define YarrStackSpaceForBackTrackInfoPatternCharacter 1 #define YarrStackSpaceForBackTrackInfoCharacterClass 1 #define YarrStackSpaceForBackTrackInfoBackReference 2 #define YarrStackSpaceForBackTrackInfoAlternative 1 #define YarrStackSpaceForBackTrackInfoParentheticalAssertion 1 #define YarrStackSpaceForBackTrackInfoParenthesesOnce 1 #define YarrStackSpaceForBackTrackInfoParenthesesTerminal 1 #define YarrStackSpaceForBackTrackInfoParentheses 2 static const unsigned quantifyInfinite = (2147483647 * 2U + 1U); static const unsigned matchLimit = 1000000; enum JSRegExpResult { JSRegExpMatch = 1, JSRegExpNoMatch = 0, JSRegExpErrorNoMatch = -1, JSRegExpErrorHitLimit = -2, JSRegExpErrorNoMemory = -3, JSRegExpErrorInternal = -4 }; PassOwnPtr byteCompile(YarrPattern&, BumpPointerAllocator*); int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output); } } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" #define YarrJIT_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" #define MacroAssembler_h # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 1 # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" #define MacroAssemblerARM_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 1 # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" #define ARMAssembler_h # 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 1 # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" #define AssemblerBufferWithConstantPool_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" #define AssemblerBuffer_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 # 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" 2 namespace JSC { class AssemblerBuffer { static const int inlineCapacity = 256; public: AssemblerBuffer() : m_buffer(m_inlineBuffer) , m_capacity(inlineCapacity) , m_size(0) , m_oom(false) { } ~AssemblerBuffer() { if (m_buffer != m_inlineBuffer) free(m_buffer); } void ensureSpace(int space) { if (m_size > m_capacity - space) grow(); } bool isAligned(int alignment) const { return !(m_size & (alignment - 1)); } void putByteUnchecked(int value) { do { } while(0); m_buffer[m_size] = char(value); m_size++; } void putByte(int value) { if (m_size > m_capacity - 4) grow(); putByteUnchecked(value); } void putShortUnchecked(int value) { do { } while(0); *reinterpret_cast(&m_buffer[m_size]) = short(value); m_size += 2; } void putShort(int value) { if (m_size > m_capacity - 4) grow(); putShortUnchecked(value); } void putIntUnchecked(int value) { do { } while(0); *reinterpret_cast(&m_buffer[m_size]) = value; m_size += 4; } void putInt64Unchecked(int64_t value) { do { } while(0); *reinterpret_cast(&m_buffer[m_size]) = value; m_size += 8; } void putInt(int value) { if (m_size > m_capacity - 4) grow(); putIntUnchecked(value); } void* data() const { return m_buffer; } int size() const { return m_size; } bool oom() const { return m_oom; } void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool** poolp, CodeKind kind) { if (m_oom || m_size == 0) { *poolp = __null; return 0; } void* result = allocator->alloc(m_size, poolp, kind); if (!result) { *poolp = __null; return 0; } do { } while(0); ExecutableAllocator::makeWritable(result, m_size); return memcpy(result, m_buffer, m_size); } unsigned char *buffer() const { do { } while(0); return reinterpret_cast(m_buffer); } protected: void append(const char* data, int size) { if (m_size > m_capacity - size) grow(size); if (m_oom) return; memcpy(m_buffer + m_size, data, size); m_size += size; } # 191 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" void grow(int extraCapacity = 0) { int newCapacity = m_capacity + m_capacity + extraCapacity; char* newBuffer; if (m_buffer == m_inlineBuffer) { newBuffer = static_cast(malloc(newCapacity)); if (!newBuffer) { m_size = 0; m_oom = true; return; } memcpy(newBuffer, m_buffer, m_size); } else { newBuffer = static_cast(realloc(m_buffer, newCapacity)); if (!newBuffer) { m_size = 0; m_oom = true; return; } } m_buffer = newBuffer; m_capacity = newCapacity; } char m_inlineBuffer[inlineCapacity]; char* m_buffer; int m_capacity; int m_size; bool m_oom; }; } # 39 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/SegmentedVector.h" 1 # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/SegmentedVector.h" #define SegmentedVector_h namespace WTF { template class SegmentedVector; template class SegmentedVectorIterator { private: friend class SegmentedVector; public: typedef SegmentedVectorIterator Iterator; ~SegmentedVectorIterator() { } T& operator*() const { return (*m_vector.m_segments[m_segment])[m_index]; } T* operator->() const { return &(*m_vector.m_segments[m_segment])[m_index]; } Iterator& operator++() { do { } while(0); ++m_index; if (m_index >= m_vector.m_segments[m_segment]->length()) { if (m_segment + 1 < m_vector.m_segments.length()) { do { } while(0); ++m_segment; m_index = 0; } else { m_segment = 0; m_index = SegmentSize; } } return *this; } bool operator==(const Iterator& other) const { return (m_index == other.m_index && m_segment = other.m_segment && &m_vector == &other.m_vector); } bool operator!=(const Iterator& other) const { return (m_index != other.m_index || m_segment != other.m_segment || &m_vector != &other.m_vector); } SegmentedVectorIterator& operator=(const SegmentedVectorIterator& other) { m_vector = other.m_vector; m_segment = other.m_segment; m_index = other.m_index; return *this; } private: SegmentedVectorIterator(SegmentedVector& vector, size_t segment, size_t index) : m_vector(vector) , m_segment(segment) , m_index(index) { } SegmentedVector& m_vector; size_t m_segment; size_t m_index; }; template class SegmentedVector { friend class SegmentedVectorIterator; public: typedef SegmentedVectorIterator Iterator; SegmentedVector() : m_size(0) { m_segments.append(&m_inlineSegment); } ~SegmentedVector() { deleteAllSegments(); } size_t size() const { return m_size; } bool isEmpty() const { return !size(); } T& at(size_t index) { if (index < SegmentSize) return m_inlineSegment[index]; return segmentFor(index)->at(subscriptFor(index)); } T& operator[](size_t index) { return at(index); } T& last() { return at(size() - 1); } template void append(const U& value) { ++m_size; if (m_size <= SegmentSize) { m_inlineSegment.append(value); return; } if (!segmentExistsFor(m_size - 1)) m_segments.append(new Segment); segmentFor(m_size - 1)->append(value); } T& alloc() { append(T()); return last(); } void removeLast() { if (m_size <= SegmentSize) m_inlineSegment.removeLast(); else segmentFor(m_size - 1)->removeLast(); --m_size; } void grow(size_t size) { do { } while(0); ensureSegmentsFor(size); m_size = size; } void clear() { deleteAllSegments(); m_segments.resize(1); m_inlineSegment.clear(); m_size = 0; } Iterator begin() { return Iterator(*this, 0, m_size ? 0 : SegmentSize); } Iterator end() { return Iterator(*this, 0, SegmentSize); } private: typedef js::Vector Segment; void deleteAllSegments() { for (size_t i = 1; i < m_segments.length(); i++) delete m_segments[i]; } bool segmentExistsFor(size_t index) { return index / SegmentSize < m_segments.length(); } Segment* segmentFor(size_t index) { return m_segments[index / SegmentSize]; } size_t subscriptFor(size_t index) { return index % SegmentSize; } void ensureSegmentsFor(size_t size) { size_t segmentCount = m_size / SegmentSize; if (m_size % SegmentSize) ++segmentCount; segmentCount = segmentCount > 1 ? segmentCount : 1; size_t neededSegmentCount = size / SegmentSize; if (size % SegmentSize) ++neededSegmentCount; size_t end = neededSegmentCount - 1; for (size_t i = segmentCount - 1; i < end; ++i) ensureSegment(i, SegmentSize); ensureSegment(end, subscriptFor(size - 1) + 1); } void ensureSegment(size_t segmentIndex, size_t size) { do { } while(0); if (segmentIndex == m_segments.size()) m_segments.append(new Segment); m_segments[segmentIndex]->grow(size); } size_t m_size; Segment m_inlineSegment; js::Vector m_segments; }; } using WTF::SegmentedVector; # 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 # 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" #define jsjaeger_logging_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 1 # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" 2 namespace js { #define JSPEW_CHAN_MAP(_) _(Abort) _(Scripts) _(Prof) _(JSOps) _(Insns) _(VMFrame) _(PICs) _(SlowCalls) _(Analysis) _(Regalloc) _(Inlining) _(Recompile) # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" enum JaegerSpewChannel { #define _(name) JSpew_ ##name, JSpew_Abort, JSpew_Scripts, JSpew_Prof, JSpew_JSOps, JSpew_Insns, JSpew_VMFrame, JSpew_PICs, JSpew_SlowCalls, JSpew_Analysis, JSpew_Regalloc, JSpew_Inlining, JSpew_Recompile, #undef _ JSpew_Terminator }; # 88 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) { } } # 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 #define ASSEMBLER_HAS_CONSTANT_POOL 1 namespace JSC { # 94 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" template class AssemblerBufferWithConstantPool: public AssemblerBuffer { typedef SegmentedVector LoadOffsets; public: enum { UniqueConst, ReusableConst, UnusedEntry }; AssemblerBufferWithConstantPool() : AssemblerBuffer() , m_numConsts(0) , m_maxDistance(maxPoolSize) , m_lastConstDelta(0) , m_flushCount(0) { m_pool = static_cast(malloc(maxPoolSize)); m_mask = static_cast(malloc(maxPoolSize / sizeof(uint32_t))); } ~AssemblerBufferWithConstantPool() { free(m_mask); free(m_pool); } void ensureSpace(int space) { flushIfNoSpaceFor(space); AssemblerBuffer::ensureSpace(space); } void ensureSpace(int insnSpace, int constSpace) { flushIfNoSpaceFor(insnSpace, constSpace); AssemblerBuffer::ensureSpace(insnSpace); } bool isAligned(int alignment) { flushIfNoSpaceFor(alignment); return AssemblerBuffer::isAligned(alignment); } void putByteUnchecked(int value) { AssemblerBuffer::putByteUnchecked(value); correctDeltas(1); } void putByte(int value) { flushIfNoSpaceFor(1); AssemblerBuffer::putByte(value); correctDeltas(1); } void putShortUnchecked(int value) { AssemblerBuffer::putShortUnchecked(value); correctDeltas(2); } void putShort(int value) { flushIfNoSpaceFor(2); AssemblerBuffer::putShort(value); correctDeltas(2); } void putIntUnchecked(int value) { AssemblerBuffer::putIntUnchecked(value); correctDeltas(4); } void putInt(int value) { flushIfNoSpaceFor(4); AssemblerBuffer::putInt(value); correctDeltas(4); } void putInt64Unchecked(int64_t value) { AssemblerBuffer::putInt64Unchecked(value); correctDeltas(8); } int size() { flushIfNoSpaceFor(maxInstructionSize, sizeof(uint64_t)); return AssemblerBuffer::size(); } int uncheckedSize() { return AssemblerBuffer::size(); } void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool** poolp, CodeKind kind) { flushConstantPool(false); return AssemblerBuffer::executableAllocAndCopy(allocator, poolp, kind); } void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false) { flushIfNoSpaceFor(4, 4); m_loadOffsets.append(AssemblerBuffer::size()); if (isReusable) for (int i = 0; i < m_numConsts; ++i) { if (m_mask[i] == ReusableConst && m_pool[i] == constant) { AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, i)); correctDeltas(4); return; } } m_pool[m_numConsts] = constant; m_mask[m_numConsts] = static_cast(isReusable ? ReusableConst : UniqueConst); AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts)); ++m_numConsts; correctDeltas(4, 4); } void flushWithoutBarrier(bool isForced = false) { if (isForced || (5 * m_numConsts * sizeof(uint32_t)) > (3 * maxPoolSize)) flushConstantPool(false); } uint32_t* poolAddress() { return m_pool; } int sizeOfConstantPool() { return m_numConsts; } int flushCount() { return m_flushCount; } private: void correctDeltas(int insnSize) { m_maxDistance -= insnSize; do { } while(0); m_lastConstDelta -= insnSize; if (m_lastConstDelta < 0) m_lastConstDelta = 0; } void correctDeltas(int insnSize, int constSize) { correctDeltas(insnSize); m_maxDistance -= m_lastConstDelta; do { } while(0); m_lastConstDelta = constSize; } void flushConstantPool(bool useBarrier = true) { js::JaegerSpew(js::JSpew_Insns, " -- FLUSHING CONSTANT POOL WITH %d CONSTANTS --\n", m_numConsts); if (m_numConsts == 0) return; m_flushCount++; int alignPool = (AssemblerBuffer::size() + (useBarrier ? barrierSize : 0)) & (sizeof(uint64_t) - 1); if (alignPool) alignPool = sizeof(uint64_t) - alignPool; if (useBarrier) AssemblerBuffer::putInt(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool)); if (alignPool) { if (alignPool & 1) AssemblerBuffer::putByte(AssemblerType::padForAlign8); if (alignPool & 2) AssemblerBuffer::putShort(AssemblerType::padForAlign16); if (alignPool & 4) AssemblerBuffer::putInt(AssemblerType::padForAlign32); } int constPoolOffset = AssemblerBuffer::size(); append(reinterpret_cast(m_pool), m_numConsts * sizeof(uint32_t)); for (LoadOffsets::Iterator iter = m_loadOffsets.begin(); iter != m_loadOffsets.end(); ++iter) { void* loadAddr = reinterpret_cast(m_buffer + *iter); AssemblerType::patchConstantPoolLoad(loadAddr, reinterpret_cast(m_buffer + constPoolOffset)); } m_loadOffsets.clear(); m_numConsts = 0; m_maxDistance = maxPoolSize; do { } while(0); } void flushIfNoSpaceFor(int nextInsnSize) { if (m_numConsts == 0) { m_maxDistance = maxPoolSize; return; } int lastConstDelta = m_lastConstDelta > nextInsnSize ? m_lastConstDelta - nextInsnSize : 0; if ((m_maxDistance < nextInsnSize + lastConstDelta + barrierSize + (int)sizeof(uint32_t))) flushConstantPool(); } void flushIfNoSpaceFor(int nextInsnSize, int nextConstSize) { if (m_numConsts == 0) { m_maxDistance = maxPoolSize; return; } if ((m_maxDistance < nextInsnSize + m_lastConstDelta + nextConstSize + barrierSize + (int)sizeof(uint32_t)) || (m_numConsts * sizeof(uint32_t) + nextConstSize >= maxPoolSize)) flushConstantPool(); } uint32_t* m_pool; char* m_mask; LoadOffsets m_loadOffsets; int m_numConsts; int m_maxDistance; int m_lastConstDelta; int m_flushCount; }; } # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 # 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 2 #define IPFX " %s" #define ISPFX " " # 57 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" #define MAYBE_PAD "" #define FIXME_INSN_PRINTING ((void) 0) namespace JSC { typedef uint32_t ARMWord; namespace ARMRegisters { typedef enum { r0 = 0, r1, r2, r3, S0 = r3, r4, r5, r6, r7, r8, S1 = r8, r9, r10, r11, r12, ip = r12, r13, sp = r13, r14, lr = r14, r15, pc = r15 } RegisterID; typedef enum { d0, d1, d2, d3, SD0 = d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20, d21, d22, d23, d24, d25, d26, d27, d28, d29, d30, d31 } FPRegisterID; inline FPRegisterID floatShadow(FPRegisterID s) { return (FPRegisterID)(s*2); } inline FPRegisterID doubleShadow(FPRegisterID d) { return (FPRegisterID)(d / 2); } } class ARMAssembler { public: ARMAssembler() { } typedef ARMRegisters::RegisterID RegisterID; typedef ARMRegisters::FPRegisterID FPRegisterID; typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer; typedef SegmentedVector Jumps; unsigned char *buffer() const { return m_buffer.buffer(); } bool oom() const { return m_buffer.oom(); } typedef enum { EQ = 0x00000000, NE = 0x10000000, CS = 0x20000000, CC = 0x30000000, MI = 0x40000000, PL = 0x50000000, VS = 0x60000000, VC = 0x70000000, HI = 0x80000000, LS = 0x90000000, GE = 0xa0000000, LT = 0xb0000000, GT = 0xc0000000, LE = 0xd0000000, AL = 0xe0000000 } Condition; enum { AND = (0x0 << 21), EOR = (0x1 << 21), SUB = (0x2 << 21), RSB = (0x3 << 21), ADD = (0x4 << 21), ADC = (0x5 << 21), SBC = (0x6 << 21), RSC = (0x7 << 21), TST = (0x8 << 21), TEQ = (0x9 << 21), CMP = (0xa << 21), CMN = (0xb << 21), ORR = (0xc << 21), MOV = (0xd << 21), BIC = (0xe << 21), MVN = (0xf << 21), MUL = 0x00000090, MULL = 0x00c00090, FCPYD = 0x0eb00b40, FADDD = 0x0e300b00, FNEGD = 0x0eb10b40, FABSD = 0x0eb00bc0, FDIVD = 0x0e800b00, FSUBD = 0x0e300b40, FMULD = 0x0e200b00, FCMPD = 0x0eb40b40, FSQRTD = 0x0eb10bc0, DTR = 0x05000000, LDRH = 0x00100090, STRH = 0x00000090, DTRH = 0x00000090, STMDB = 0x09200000, LDMIA = 0x08b00000, B = 0x0a000000, BL = 0x0b000000 ,BX = 0x012fff10 ,CLZ = 0x016f0f10, BKPT = 0xe1200070, BLX = 0x012fff30 ,MOVW = 0x03000000, MOVT = 0x03400000 }; enum { OP2_IMM = (1 << 25), OP2_IMMh = (1 << 22), OP2_INV_IMM = (1 << 26), SET_CC = (1 << 20), OP2_OFSREG = (1 << 25), DT_UP = (1 << 23), DT_BYTE = (1 << 22), DT_WB = (1 << 21), DT_PRE = (1 << 24), HDT_UH = (1 << 5), HDT_IMM = (1 << 22), HDT_S = (1 << 6), DT_LOAD = (1 << 20) }; enum { BRANCH_MASK = 0x00ffffff, NONARM = 0xf0000000, SDT_MASK = 0x0c000000, SDT_OFFSET_MASK = 0xfff }; enum { BOFFSET_MIN = -0x00800000, BOFFSET_MAX = 0x007fffff, SDT = 0x04000000 }; enum { padForAlign8 = (int)0x00, padForAlign16 = (int)0x0000, padForAlign32 = (int)0xe12fff7f }; typedef enum { LSL = 0, LSR = 1, ASR = 2, ROR = 3 } Shift; static const ARMWord INVALID_IMM = 0xf0000000; static const ARMWord InvalidBranchTarget = 0xffffffff; static const int DefaultPrefetching = 2; class JmpSrc { friend class ARMAssembler; public: JmpSrc() : m_offset(-1) { } private: JmpSrc(int offset) : m_offset(offset) { } int m_offset; }; class JmpDst { friend class ARMAssembler; public: JmpDst() : m_offset(-1) , m_used(false) { } bool isUsed() const { return m_used; } void used() { m_used = true; } bool isValid() const { return m_offset != -1; } private: JmpDst(int offset) : m_offset(offset) , m_used(false) { do { } while(0); } int m_offset : 31; bool m_used : 1; }; void emitInst(ARMWord op, int rd, int rn, ARMWord op2) { do { } while(0); m_buffer.putInt(op | RN(rn) | RD(rd) | op2); } ARMWord getOp2RotLSL(int lsl) { do { } while(0); do { } while(0); return (-(lsl/2) & 0xf) << 8; } void and_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("and", cc, rd, rn, op2); emitInst(static_cast(cc) | AND, rd, rn, op2); } void ands_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("ands", cc, rd, rn, op2); emitInst(static_cast(cc) | AND | SET_CC, rd, rn, op2); } void eor_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("eor", cc, rd, rn, op2); emitInst(static_cast(cc) | EOR, rd, rn, op2); } void eors_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("eors", cc, rd, rn, op2); emitInst(static_cast(cc) | EOR | SET_CC, rd, rn, op2); } void sub_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("sub", cc, rd, rn, op2); emitInst(static_cast(cc) | SUB, rd, rn, op2); } void subs_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("subs", cc, rd, rn, op2); emitInst(static_cast(cc) | SUB | SET_CC, rd, rn, op2); } void rsb_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("rsb", cc, rd, rn, op2); emitInst(static_cast(cc) | RSB, rd, rn, op2); } void rsbs_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("rsbs", cc, rd, rn, op2); emitInst(static_cast(cc) | RSB | SET_CC, rd, rn, op2); } void add_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("add", cc, rd, rn, op2); emitInst(static_cast(cc) | ADD, rd, rn, op2); } void adds_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("adds", cc, rd, rn, op2); emitInst(static_cast(cc) | ADD | SET_CC, rd, rn, op2); } void adc_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("adc", cc, rd, rn, op2); emitInst(static_cast(cc) | ADC, rd, rn, op2); } void adcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("adcs", cc, rd, rn, op2); emitInst(static_cast(cc) | ADC | SET_CC, rd, rn, op2); } void sbc_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("sbc", cc, rd, rn, op2); emitInst(static_cast(cc) | SBC, rd, rn, op2); } void sbcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("sbcs", cc, rd, rn, op2); emitInst(static_cast(cc) | SBC | SET_CC, rd, rn, op2); } void rsc_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("rsc", cc, rd, rn, op2); emitInst(static_cast(cc) | RSC, rd, rn, op2); } void rscs_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("rscs", cc, rd, rn, op2); emitInst(static_cast(cc) | RSC | SET_CC, rd, rn, op2); } void tst_r(int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("tst", cc, rn, op2); emitInst(static_cast(cc) | TST | SET_CC, 0, rn, op2); } void teq_r(int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("teq", cc, rn, op2); emitInst(static_cast(cc) | TEQ | SET_CC, 0, rn, op2); } void cmp_r(int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("cmp", cc, rn, op2); emitInst(static_cast(cc) | CMP | SET_CC, 0, rn, op2); } void cmn_r(int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("cmn", cc, rn, op2); emitInst(static_cast(cc) | CMN | SET_CC, 0, rn, op2); } void orr_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("orr", cc, rd, rn, op2); emitInst(static_cast(cc) | ORR, rd, rn, op2); } void orrs_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("orrs", cc, rd, rn, op2); emitInst(static_cast(cc) | ORR | SET_CC, rd, rn, op2); } void mov_r(int rd, ARMWord op2, Condition cc = AL) { spewInsWithOp2("mov", cc, rd, op2); emitInst(static_cast(cc) | MOV, rd, ARMRegisters::r0, op2); } void movw_r(int rd, ARMWord op2, Condition cc = AL) { do { } while(0); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, 0x%04x\n", "", "movw", nameGpReg(rd), (op2 & 0xfff) | ((op2 >> 4) & 0xf000)); m_buffer.putInt(static_cast(cc) | MOVW | RD(rd) | op2); } void movt_r(int rd, ARMWord op2, Condition cc = AL) { do { } while(0); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, 0x%04x\n", "", "movt", nameGpReg(rd), (op2 & 0xfff) | ((op2 >> 4) & 0xf000)); m_buffer.putInt(static_cast(cc) | MOVT | RD(rd) | op2); } void movs_r(int rd, ARMWord op2, Condition cc = AL) { spewInsWithOp2("movs", cc, rd, op2); emitInst(static_cast(cc) | MOV | SET_CC, rd, ARMRegisters::r0, op2); } void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("bic", cc, rd, rn, op2); emitInst(static_cast(cc) | BIC, rd, rn, op2); } void bics_r(int rd, int rn, ARMWord op2, Condition cc = AL) { spewInsWithOp2("bics", cc, rd, rn, op2); emitInst(static_cast(cc) | BIC | SET_CC, rd, rn, op2); } void mvn_r(int rd, ARMWord op2, Condition cc = AL) { spewInsWithOp2("mvn", cc, rd, op2); emitInst(static_cast(cc) | MVN, rd, ARMRegisters::r0, op2); } void mvns_r(int rd, ARMWord op2, Condition cc = AL) { spewInsWithOp2("mvns", cc, rd, op2); emitInst(static_cast(cc) | MVN | SET_CC, rd, ARMRegisters::r0, op2); } void mul_r(int rd, int rn, int rm, Condition cc = AL) { spewInsWithOp2("mul", cc, rd, rn, static_cast(rm)); m_buffer.putInt(static_cast(cc) | MUL | RN(rd) | RS(rn) | RM(rm)); } void muls_r(int rd, int rn, int rm, Condition cc = AL) { spewInsWithOp2("muls", cc, rd, rn, static_cast(rm)); m_buffer.putInt(static_cast(cc) | MUL | SET_CC | RN(rd) | RS(rn) | RM(rm)); } void mull_r(int rdhi, int rdlo, int rn, int rm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s, %s\n", "", "mull", nameGpReg(rdlo), nameGpReg(rdhi), nameGpReg(rn), nameGpReg(rm)); m_buffer.putInt(static_cast(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); } void ldr_imm(int rd, ARMWord imm, Condition cc = AL) { char mnemonic[16]; snprintf(mnemonic, 16, "ldr%s", nameCC(cc)); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, =0x%x @ (%d) (reusable pool entry)\n", "", mnemonic, nameGpReg(rd), imm, static_cast(imm)); m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm, true); } void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL) { char mnemonic[16]; snprintf(mnemonic, 16, "ldr%s", nameCC(cc)); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, =0x%x @ (%d)\n", "", mnemonic, nameGpReg(rd), imm, static_cast(imm)); m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm); } void mem_imm_off(bool isLoad, bool isSigned, int size, bool posOffset, int rd, int rb, ARMWord offset, Condition cc = AL) { do { } while(0); char const * mnemonic_act = (isLoad) ? ("ld") : ("st"); char const * mnemonic_sign = (isSigned) ? ("s") : (""); char const * mnemonic_size = __null; switch (size / 8) { case 1: mnemonic_size = "b"; break; case 2: mnemonic_size = "h"; break; case 4: mnemonic_size = ""; break; } char const * off_sign = (posOffset) ? ("+") : ("-"); js::JaegerSpew(js::JSpew_Insns, " %s" "%sr%s%s %s, [%s, #%s%u]\n", "", mnemonic_act, mnemonic_sign, mnemonic_size, nameGpReg(rd), nameGpReg(rb), off_sign, offset); if (size == 32 || (size == 8 && !isSigned)) { emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | (size == 8 ? DT_BYTE : 0) | (posOffset ? DT_UP : 0), rd, rb, offset); } else { emitInst(static_cast(cc) | DTRH | HDT_IMM | DT_PRE | (isLoad ? DT_LOAD : 0) | (size == 16 ? HDT_UH : 0) | (isSigned ? HDT_S : 0) | (posOffset ? DT_UP : 0), rd, rb, offset); } } void mem_reg_off(bool isLoad, bool isSigned, int size, bool posOffset, int rd, int rb, int rm, Condition cc = AL) { char const * mnemonic_act = (isLoad) ? ("ld") : ("st"); char const * mnemonic_sign = (isSigned) ? ("s") : (""); char const * mnemonic_size = __null; switch (size / 8) { case 1: mnemonic_size = "b"; break; case 2: mnemonic_size = "h"; break; case 4: mnemonic_size = ""; break; } char const * off_sign = (posOffset) ? ("+") : ("-"); js::JaegerSpew(js::JSpew_Insns, " %s" "%sr%s%s %s, [%s, #%s%s]\n", "", mnemonic_act, mnemonic_sign, mnemonic_size, nameGpReg(rd), nameGpReg(rb), off_sign, nameGpReg(rm)); if (size == 32 || (size == 8 && !isSigned)) { emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | (size == 8 ? DT_BYTE : 0) | (posOffset ? DT_UP : 0) | OP2_OFSREG, rd, rb, rm); } else { emitInst(static_cast(cc) | DTRH | DT_PRE | (isLoad ? DT_LOAD : 0) | (size == 16 ? HDT_UH : 0) | (isSigned ? HDT_S : 0) | (posOffset ? DT_UP : 0), rd, rb, rm); } } void dtr_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldr") : ("str"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); } void dtr_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldr") : ("str"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, +%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); } void dtr_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldr") : ("str"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0), rd, rb, offset); } void dtr_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldr") : ("str"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, -%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); } void dtrb_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); } void dtrsb_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldrsb") : ("strb"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | DTRH | HDT_S | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); } void dtrb_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, +%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); } void dtrb_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0), rd, rb, offset); } void dtrsb_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) { do { } while(0); char const * mnemonic = (isLoad) ? ("ldrsb") : ("strb"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | DTRH | HDT_S | (isLoad ? DT_LOAD : 0), rd, rb, offset); } void dtrb_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) { char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, -%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); } void ldrh_r(int rd, int rb, int rm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, +%s]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, rm); } void ldrh_d(int rd, int rb, ARMWord offset, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #-%u]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | LDRH | HDT_UH | DT_PRE, rd, rb, offset); } void ldrh_u(int rd, int rb, ARMWord offset, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #+%u]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, offset); } void ldrsh_d(int rd, int rb, ARMWord offset, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #-%u]\n", "", "ldrsh", nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | LDRH | HDT_UH | HDT_S | DT_PRE, rd, rb, offset); } void ldrsh_u(int rd, int rb, ARMWord offset, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, #+%u]\n", "", "ldrsh", nameGpReg(rd), nameGpReg(rb), offset); emitInst(static_cast(cc) | LDRH | HDT_UH | HDT_S | DT_UP | DT_PRE, rd, rb, offset); } void strh_r(int rb, int rm, int rd, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, [%s, +%s]\n", "", "strh", nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); emitInst(static_cast(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rb, rm); } void push_r(int reg, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s {%s}\n", "", "push", nameGpReg(reg)); do { } while(0); m_buffer.putInt(cc | DTR | DT_WB | RN(ARMRegisters::sp) | RD(reg) | 0x4); } void pop_r(int reg, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s {%s}\n", "", "pop", nameGpReg(reg)); do { } while(0); m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARMRegisters::sp) | RD(reg) | 0x4); } inline void poke_r(int reg, Condition cc = AL) { dtr_d(false, ARMRegisters::sp, 0, reg, cc); } inline void peek_r(int reg, Condition cc = AL) { dtr_u(true, reg, ARMRegisters::sp, 0, cc); } void clz_r(int rd, int rm, Condition cc = AL) { spewInsWithOp2("clz", cc, rd, static_cast(rm)); m_buffer.putInt(static_cast(cc) | CLZ | RD(rd) | RM(rm)); } void bkpt(ARMWord value) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s #0x%04x\n", "", "bkpt", value); m_buffer.putInt(BKPT | ((value & 0xfff0) << 4) | (value & 0xf)); } void bx(int rm, Condition cc = AL) { js::JaegerSpew( js::JSpew_Insns, " %s" "bx%-13s %s\n", "", nameCC(cc), nameGpReg(rm)); emitInst(static_cast(cc) | BX, 0, 0, RM(rm)); } JmpSrc blx(int rm, Condition cc = AL) { int s = m_buffer.uncheckedSize(); js::JaegerSpew( js::JSpew_Insns, " %s" "blx%-12s %s\n", "", nameCC(cc), nameGpReg(rm)); emitInst(static_cast(cc) | BLX, 0, 0, RM(rm)); return JmpSrc(s); } static ARMWord lsl(int reg, ARMWord value) { do { } while(0); do { } while(0); return reg | (value << 7) | (LSL << 5); } static ARMWord lsr(int reg, ARMWord value) { do { } while(0); do { } while(0); return reg | (value << 7) | (LSR << 5); } static ARMWord asr(int reg, ARMWord value) { do { } while(0); do { } while(0); return reg | (value << 7) | (ASR << 5); } static ARMWord lsl_r(int reg, int shiftReg) { do { } while(0); do { } while(0); return reg | (shiftReg << 8) | (LSL << 5) | 0x10; } static ARMWord lsr_r(int reg, int shiftReg) { do { } while(0); do { } while(0); return reg | (shiftReg << 8) | (LSR << 5) | 0x10; } static ARMWord asr_r(int reg, int shiftReg) { do { } while(0); do { } while(0); return reg | (shiftReg << 8) | (ASR << 5) | 0x10; } void forceFlushConstantPool() { m_buffer.flushWithoutBarrier(true); } int size() { return m_buffer.size(); } void ensureSpace(int insnSpace, int constSpace) { m_buffer.ensureSpace(insnSpace, constSpace); } void ensureSpace(int space) { m_buffer.ensureSpace(space); } int sizeOfConstantPool() { return m_buffer.sizeOfConstantPool(); } int flushCount() { return m_buffer.flushCount(); } JmpDst label() { JmpDst label(m_buffer.size()); js::JaegerSpew(js::JSpew_Insns, " %s" "#label ((%d))\n", "", label.m_offset); return label; } JmpDst align(int alignment) { while (!m_buffer.isAligned(alignment)) mov_r(ARMRegisters::r0, ARMRegisters::r0); return label(); } JmpSrc loadBranchTarget(int rd, Condition cc = AL, int useConstantPool = 0) { ensureSpace(sizeof(ARMWord), sizeof(ARMWord)); int s = m_buffer.uncheckedSize(); ldr_un_imm(rd, InvalidBranchTarget, cc); m_jumps.append(s | (useConstantPool & 0x1)); return JmpSrc(s); } JmpSrc jmp(Condition cc = AL, int useConstantPool = 0) { return loadBranchTarget(ARMRegisters::pc, cc, useConstantPool); } void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool **poolp, CodeKind kind); void executableCopy(void* buffer); void fixUpOffsets(void* buffer); static ARMWord* getLdrImmAddress(ARMWord* insn) { if ((*insn & 0x0f7f0000) != 0x051f0000) { do { } while(0); insn--; } do { } while(0); ARMWord addr = reinterpret_cast(insn) + DefaultPrefetching * sizeof(ARMWord); if (*insn & DT_UP) return reinterpret_cast(addr + (*insn & SDT_OFFSET_MASK)); return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); } static ARMWord* getLdrImmAddressOnPool(ARMWord* insn, uint32_t* constPool) { do { } while(0); if (*insn & 0x1) return reinterpret_cast(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); return getLdrImmAddress(insn); } static void patchPointerInternal(intptr_t from, void* to) { ARMWord* insn = reinterpret_cast(from); ARMWord* addr = getLdrImmAddress(insn); *addr = reinterpret_cast(to); } static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value) { value = (value << 1) + 1; do { } while(0); return (load & ~0xfff) | value; } static void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr); static void linkPointer(void* code, JmpDst from, void* to) { js::JaegerSpew(js::JSpew_Insns, " " "##linkPointer ((%p + %#x)) points to ((%p))\n", code, from.m_offset, to); patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); } static void repatchInt32(void* from, int32_t to) { js::JaegerSpew(js::JSpew_Insns, " " "##repatchInt32 ((%p)) holds ((%#x))\n", from, to); patchPointerInternal(reinterpret_cast(from), reinterpret_cast(to)); } static void repatchPointer(void* from, void* to) { js::JaegerSpew(js::JSpew_Insns, " " "##repatchPointer ((%p)) points to ((%p))\n", from, to); patchPointerInternal(reinterpret_cast(from), to); } static void repatchLoadPtrToLEA(void* from) { ARMWord* insn = reinterpret_cast(from); do { } while(0); *insn = (*insn & 0xf00ff0ff) | 0x02800000; ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); } static void repatchLEAToLoadPtr(void* from) { ARMWord* insn = reinterpret_cast(from); if ((*insn & 0x0ff00f00) == 0x05900000) return; do { } while(0); do { } while(0); *insn = (*insn & 0xf00ff0ff) | 0x05900000; ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); } void linkJump(JmpSrc from, JmpDst to) { ARMWord code = reinterpret_cast(m_buffer.data()); ARMWord* insn = reinterpret_cast(code + from.m_offset); ARMWord* addr = getLdrImmAddressOnPool(insn, m_buffer.poolAddress()); js::JaegerSpew(js::JSpew_Insns, " %s" "##linkJump ((%#x)) jumps to ((%#x))\n", "", from.m_offset, to.m_offset); *addr = to.m_offset; } static void linkJump(void* code, JmpSrc from, void* to) { js::JaegerSpew(js::JSpew_Insns, " " "##linkJump ((%p + %#x)) jumps to ((%p))\n", code, from.m_offset, to); patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); } static void relinkJump(void* from, void* to) { js::JaegerSpew(js::JSpew_Insns, " " "##relinkJump ((%p)) jumps to ((%p))\n", from, to); patchPointerInternal(reinterpret_cast(from), to); } static bool canRelinkJump(void* from, void* to) { return true; } static void linkCall(void* code, JmpSrc from, void* to) { js::JaegerSpew(js::JSpew_Insns, " " "##linkCall ((%p + %#x)) jumps to ((%p))\n", code, from.m_offset, to); patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); } static void relinkCall(void* from, void* to) { js::JaegerSpew(js::JSpew_Insns, " " "##relinkCall ((%p)) jumps to ((%p))\n", from, to); patchPointerInternal(reinterpret_cast(from), to); } static void* getRelocatedAddress(void* code, JmpSrc jump) { return reinterpret_cast(reinterpret_cast(code) + jump.m_offset / sizeof(ARMWord)); } static void* getRelocatedAddress(void* code, JmpDst label) { return reinterpret_cast(reinterpret_cast(code) + label.m_offset / sizeof(ARMWord)); } static int getDifferenceBetweenLabels(JmpDst from, JmpSrc to) { return to.m_offset - from.m_offset; } static int getDifferenceBetweenLabels(JmpDst from, JmpDst to) { return to.m_offset - from.m_offset; } static unsigned getCallReturnOffset(JmpSrc call) { return call.m_offset + sizeof(ARMWord); } static ARMWord getOp2Byte(ARMWord imm) { do { } while(0); return OP2_IMMh | (imm & 0x0f) | ((imm & 0xf0) << 4) ; } static ARMWord getOp2(ARMWord imm); static ARMWord getOp2RegScale(RegisterID reg, ARMWord scale); static ARMWord getImm16Op2(ARMWord imm) { if (imm <= 0xffff) return (imm & 0xf000) << 4 | (imm & 0xfff); return INVALID_IMM; } ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false); void moveImm(ARMWord imm, int dest); ARMWord encodeComplexImm(ARMWord imm, int dest); ARMWord getOffsetForHalfwordDataTransfer(ARMWord imm, int tmpReg) { if (imm <= 0xff) return getOp2Byte(imm); return encodeComplexImm(imm, tmpReg); } void dataTransferN(bool isLoad, bool isSigned, int size, RegisterID srcDst, RegisterID base, int32_t offset); void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset); void dataTransfer8(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset, bool isSigned); void baseIndexTransferN(bool isLoad, bool isSigned, int size, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset, RegisterID index, int32_t scale); void floatTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); void baseIndexFloatTransfer(bool isLoad, bool isDouble, FPRegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); static ARMWord placeConstantPoolBarrier(int offset) { offset = (offset - sizeof(ARMWord)) >> 2; do { } while(0); return AL | B | (offset & BRANCH_MASK); } static char const * nameGpReg(int reg) { do { } while(0); do { } while(0); static char const * names[] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "ip", "sp", "lr", "pc" }; return names[reg]; } static char const * nameFpRegD(int reg) { do { } while(0); do { } while(0); static char const * names[] = { "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31" }; return names[reg]; } static char const * nameFpRegS(int reg) { do { } while(0); do { } while(0); static char const * names[] = { "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" }; return names[reg]; } static char const * nameCC(Condition cc) { do { } while(0); do { } while(0); do { } while(0); uint32_t ccIndex = cc >> 28; static char const * names[] = { "eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", "hi", "ls", "ge", "lt", "gt", "le", " " }; return names[ccIndex]; } private: inline uint32_t decOp2Imm(uint32_t op2) { do { } while(0); uint32_t imm8 = op2 & 0xff; uint32_t rot = ((op2 >> 7) & 0x1e); uint32_t imm = (imm8 >> rot); if (rot > 0) { imm |= (imm8 << (32-rot)); } return imm; } void fmtOp2(char * out, ARMWord op2) { static char const * const shifts[4] = {"LSL", "LSR", "ASR", "ROR"}; if ((op2 & OP2_IMM) || (op2 & OP2_IMMh)) { uint32_t imm = decOp2Imm(op2 & ~(OP2_IMM | OP2_IMMh)); sprintf(out, "#0x%x @ (%d)", imm, static_cast(imm)); } else { char const * rm = nameGpReg(op2 & 0xf); Shift type = static_cast((op2 >> 5) & 0x3); if (op2 & (1<<4)) { char const * rs = nameGpReg((op2 >> 8) & 0xf); sprintf(out, "%s, %s %s", rm, shifts[type], rs); } else { uint32_t imm = (op2 >> 7) & 0x1f; if ((type == LSL) && (imm == 0)) { sprintf(out, "%s", rm); return; } if ((type == ROR) && (imm == 0)) { sprintf(out, "%s, RRX", rm); return; } if (((type == LSR) || (type == ASR)) && (imm == 0)) { imm = 32; } sprintf(out, "%s, %s #%u", rm, shifts[type], imm); } } } void spewInsWithOp2(char const * ins, Condition cc, int rd, int rn, ARMWord op2) { char mnemonic[16]; snprintf(mnemonic, 16, "%s%s", ins, nameCC(cc)); char op2_fmt[48]; fmtOp2(op2_fmt, op2); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", mnemonic, nameGpReg(rd), nameGpReg(rn), op2_fmt); } void spewInsWithOp2(char const * ins, Condition cc, int r, ARMWord op2) { char mnemonic[16]; snprintf(mnemonic, 16, "%s%s", ins, nameCC(cc)); char op2_fmt[48]; fmtOp2(op2_fmt, op2); js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s\n", "", mnemonic, nameGpReg(r), op2_fmt); } ARMWord RM(int reg) { do { } while(0); return reg; } ARMWord RS(int reg) { do { } while(0); return reg << 8; } ARMWord RD(int reg) { do { } while(0); return reg << 12; } ARMWord RN(int reg) { do { } while(0); return reg << 16; } ARMWord DD(int reg) { do { } while(0); return ((reg << 12) | (reg << 18)) & 0x0040f000; } ARMWord DN(int reg) { do { } while(0); return ((reg << 16) | (reg << 3)) & 0x000f0080; } ARMWord DM(int reg) { do { } while(0); return ((reg << 1) & 0x20) | (reg & 0xf); } ARMWord SD(int reg) { do { } while(0); return ((reg << 11) | (reg << 22)) & 0x0040f000; } ARMWord SM(int reg) { do { } while(0); return ((reg << 5) & 0x20) | ((reg >> 1) & 0xf); } ARMWord SN(int reg) { do { } while(0); return ((reg << 15) & 0xf0000) | ((reg & 1) << 7); } static ARMWord getConditionalField(ARMWord i) { return i & 0xf0000000; } int genInt(int reg, ARMWord imm, bool positive); ARMBuffer m_buffer; Jumps m_jumps; public: enum { VFP_DATA = 0x0E000A00, VFP_EXT = 0x0C000A00, VFP_XFER = 0x0E000A08, VFP_DXFER = 0x0C400A00, VFP_DBL = (1<<8), VFP_ICVT = 0x00B80040, VFP_FPCVT = 0x00B700C0, VFP_DTR = 0x01000000, VFP_MOV = 0x00000010, FMSR = 0x0e000a10, FMRS = 0x0e100a10, FSITOD = 0x0eb80bc0, FUITOD = 0x0eb80b40, FTOSID = 0x0ebd0b40, FTOSIZD = 0x0ebd0bc0, FMSTAT = 0x0ef1fa10, FDTR = 0x0d000b00 }; enum RegType { SIntReg32, UIntReg32, FloatReg32, FloatReg64 }; const char * nameType(RegType t) { const char * const name[4] = {"S32", "U32", "F32", "F64"}; return name[t]; } const char * nameTypedReg(RegType t, int reg) { switch(t) { case SIntReg32: case UIntReg32: return nameGpReg(reg); case FloatReg32: return nameFpRegS(reg); case FloatReg64: return nameFpRegD(reg); } return ""; } bool isFloatType(RegType rt) { if (rt == FloatReg32 || rt == FloatReg64) return true; return false; } bool isIntType(RegType rt) { if (rt == FloatReg32 || rt == FloatReg64) return false; return true; } void emitVFPInst(ARMWord op, ARMWord rd, ARMWord rn, ARMWord op2) { m_buffer.putInt(op | rn | rd | op2); } void fmem_imm_off(bool isLoad, bool isDouble, bool isUp, int dest, int rn, ARMWord offset, Condition cc = AL) { char const * ins = isLoad ? "vldr.f" : "vstr.f"; js::JaegerSpew(js::JSpew_Insns, " %s" "%s%d %s, [%s, #%s%u]\n", "", ins, (isDouble ? 64 : 32), (isDouble ? nameFpRegD(dest) : nameFpRegS(dest)), nameGpReg(rn), (isUp ? "+" : "-"), offset); do { } while(0); emitVFPInst(static_cast(cc) | VFP_EXT | VFP_DTR | (isDouble ? VFP_DBL : 0) | (isUp ? DT_UP : 0) | (isLoad ? DT_LOAD : 0), isDouble ? DD(dest) : SD(dest), RN(rn), offset); } void vcvt(RegType srcType, RegType dstType, int src, int dest, Condition cc = AL) { do { } while(0); do { } while(0); js::JaegerSpew(js::JSpew_Insns, " %s" "vcvt.%s.%-15s, %s,%s\n", "", nameType(dstType), nameType(srcType), nameTypedReg(dstType,dest), nameTypedReg(srcType,src)); if (isFloatType(srcType) && isFloatType (dstType)) { bool dblToFloat = srcType == FloatReg64; emitVFPInst(static_cast(cc) | VFP_DATA | VFP_FPCVT | (dblToFloat ? VFP_DBL : 0), dblToFloat ? SD(dest) : DD(dest), dblToFloat ? DM(src) : SM(src), 0); } else { __builtin_unreachable(); } } void vmov64 (bool fromFP, bool isDbl, int r1, int r2, int rFP, Condition cc = AL) { if (fromFP) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", "vmov", nameGpReg(r1), nameGpReg(r2), nameFpRegD(rFP)); } else { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", "vmov", nameFpRegD(rFP), nameGpReg(r1), nameGpReg(r2)); } emitVFPInst(static_cast(cc) | VFP_DXFER | VFP_MOV | (fromFP ? DT_LOAD : 0) | (isDbl ? VFP_DBL : 0), RD(r1), RN(r2), isDbl ? DM(rFP) : SM(rFP)); } void fcpyd_r(int dd, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s\n", "", "vmov.f64", nameFpRegD(dd), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FCPYD, DD(dd), DM(dm), 0); } void faddd_r(int dd, int dn, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", "vadd.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FADDD, DD(dd), DN(dn), DM(dm)); } void fnegd_r(int dd, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s\n", "", "fnegd", nameFpRegD(dd), nameFpRegD(dm)); m_buffer.putInt(static_cast(cc) | FNEGD | DD(dd) | DM(dm)); } void fdivd_r(int dd, int dn, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", "vdiv.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FDIVD, DD(dd), DN(dn), DM(dm)); } void fsubd_r(int dd, int dn, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", "vsub.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FSUBD, DD(dd), DN(dn), DM(dm)); } void fabsd_r(int dd, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s\n", "", "fabsd", nameFpRegD(dd), nameFpRegD(dm)); m_buffer.putInt(static_cast(cc) | FABSD | DD(dd) | DM(dm)); } void fmuld_r(int dd, int dn, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s, %s\n", "", "vmul.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FMULD, DD(dd), DN(dn), DM(dm)); } void fcmpd_r(int dd, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s\n", "", "vcmp.f64", nameFpRegD(dd), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FCMPD, DD(dd), 0, DM(dm)); } void fsqrtd_r(int dd, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, " %s" "%-15s %s, %s\n", "", "vsqrt.f64", nameFpRegD(dd), nameFpRegD(dm)); emitVFPInst(static_cast(cc) | FSQRTD, DD(dd), 0, DM(dm)); } void fmsr_r(int dd, int rn, Condition cc = AL) { emitVFPInst(static_cast(cc) | FMSR, RD(rn), SN(dd), 0); } void fmrs_r(int rd, int dn, Condition cc = AL) { emitVFPInst(static_cast(cc) | FMRS, RD(rd), SN(dn), 0); } void fsitod_r(int dd, int dm, Condition cc = AL) { emitVFPInst(static_cast(cc) | FSITOD, DD(dd), 0, SM(dm)); } void fuitod_r(int dd, int dm, Condition cc = AL) { emitVFPInst(static_cast(cc) | FUITOD, DD(dd), 0, SM(dm)); } void ftosid_r(int fd, int dm, Condition cc = AL) { emitVFPInst(static_cast(cc) | FTOSID, SD(fd), 0, DM(dm)); } void ftosizd_r(int fd, int dm, Condition cc = AL) { emitVFPInst(static_cast(cc) | FTOSIZD, SD(fd), 0, DM(dm)); } void fmstat(Condition cc = AL) { m_buffer.putInt(static_cast(cc) | FMSTAT); } }; } # 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" #define AbstractMacroAssembler_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" #define MacroAssemblerCodeRef_h # 52 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" #define ASSERT_VALID_CODE_POINTER(ptr) ASSERT(ptr) #define ASSERT_VALID_CODE_OFFSET(offset) namespace JSC { class FunctionPtr { public: FunctionPtr() : m_value(0) { } template explicit FunctionPtr(FunctionType* value) : m_value(reinterpret_cast(value)) { do { } while(0); } void* value() const { return m_value; } void* executableAddress() const { return m_value; } private: void* m_value; }; class ReturnAddressPtr { public: ReturnAddressPtr() : m_value(0) { } explicit ReturnAddressPtr(void* value) : m_value(value) { do { } while(0); } explicit ReturnAddressPtr(FunctionPtr function) : m_value(function.value()) { do { } while(0); } void* value() const { return m_value; } private: void* m_value; }; class MacroAssemblerCodePtr { public: MacroAssemblerCodePtr() : m_value(0) { } explicit MacroAssemblerCodePtr(void* value) : m_value(value) { do { } while(0); } explicit MacroAssemblerCodePtr(ReturnAddressPtr ra) : m_value(ra.value()) { do { } while(0); } void* executableAddress() const { return m_value; } void* dataLocation() const { do { } while(0); return m_value; } bool operator!() { return !m_value; } ptrdiff_t operator -(const MacroAssemblerCodePtr &other) const { do { } while(0); return reinterpret_cast(m_value) - reinterpret_cast(other.m_value); } private: void* m_value; }; class MacroAssemblerCodeRef { public: MacroAssemblerCodeRef() : m_executablePool(__null), m_size(0) { } MacroAssemblerCodeRef(void* code, ExecutablePool* executablePool, size_t size) : m_code(code) , m_executablePool(executablePool) , m_size(size) { } void release() { if (!m_executablePool) return; m_executablePool->release(); m_executablePool = __null; } MacroAssemblerCodePtr m_code; ExecutablePool* m_executablePool; size_t m_size; }; } # 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" #define CodeLocation_h namespace JSC { class CodeLocationInstruction; class CodeLocationLabel; class CodeLocationJump; class CodeLocationCall; class CodeLocationNearCall; class CodeLocationDataLabel32; class CodeLocationDataLabelPtr; # 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" class CodeLocationCommon : public MacroAssemblerCodePtr { public: CodeLocationInstruction instructionAtOffset(int offset); CodeLocationLabel labelAtOffset(int offset); CodeLocationJump jumpAtOffset(int offset); CodeLocationCall callAtOffset(int offset); CodeLocationNearCall nearCallAtOffset(int offset); CodeLocationDataLabelPtr dataLabelPtrAtOffset(int offset); CodeLocationDataLabel32 dataLabel32AtOffset(int offset); protected: CodeLocationCommon() { } CodeLocationCommon(MacroAssemblerCodePtr location) : MacroAssemblerCodePtr(location) { } }; class CodeLocationInstruction : public CodeLocationCommon { public: CodeLocationInstruction() {} explicit CodeLocationInstruction(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationInstruction(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; class CodeLocationLabel : public CodeLocationCommon { public: CodeLocationLabel() {} explicit CodeLocationLabel(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationLabel(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; class CodeLocationJump : public CodeLocationCommon { public: CodeLocationJump() {} explicit CodeLocationJump(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationJump(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; class CodeLocationCall : public CodeLocationCommon { public: CodeLocationCall() {} explicit CodeLocationCall(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationCall(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; class CodeLocationNearCall : public CodeLocationCommon { public: CodeLocationNearCall() {} explicit CodeLocationNearCall(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationNearCall(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; class CodeLocationDataLabel32 : public CodeLocationCommon { public: CodeLocationDataLabel32() {} explicit CodeLocationDataLabel32(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationDataLabel32(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; class CodeLocationDataLabelPtr : public CodeLocationCommon { public: CodeLocationDataLabelPtr() {} explicit CodeLocationDataLabelPtr(MacroAssemblerCodePtr location) : CodeLocationCommon(location) {} explicit CodeLocationDataLabelPtr(void* location) : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} }; inline CodeLocationInstruction CodeLocationCommon::instructionAtOffset(int offset) { ; return CodeLocationInstruction(reinterpret_cast(dataLocation()) + offset); } inline CodeLocationLabel CodeLocationCommon::labelAtOffset(int offset) { ; return CodeLocationLabel(reinterpret_cast(dataLocation()) + offset); } inline CodeLocationJump CodeLocationCommon::jumpAtOffset(int offset) { ; return CodeLocationJump(reinterpret_cast(dataLocation()) + offset); } inline CodeLocationCall CodeLocationCommon::callAtOffset(int offset) { ; return CodeLocationCall(reinterpret_cast(dataLocation()) + offset); } inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset) { ; return CodeLocationNearCall(reinterpret_cast(dataLocation()) + offset); } inline CodeLocationDataLabelPtr CodeLocationCommon::dataLabelPtrAtOffset(int offset) { ; return CodeLocationDataLabelPtr(reinterpret_cast(dataLocation()) + offset); } inline CodeLocationDataLabel32 CodeLocationCommon::dataLabel32AtOffset(int offset) { ; return CodeLocationDataLabel32(reinterpret_cast(dataLocation()) + offset); } } # 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 2 namespace JSC { class LinkBuffer; class RepatchBuffer; template class AbstractMacroAssembler { public: typedef AssemblerType AssemblerType_T; typedef MacroAssemblerCodePtr CodePtr; typedef MacroAssemblerCodeRef CodeRef; class Jump; typedef typename AssemblerType::RegisterID RegisterID; typedef typename AssemblerType::FPRegisterID FPRegisterID; typedef typename AssemblerType::JmpSrc JmpSrc; typedef typename AssemblerType::JmpDst JmpDst; # 72 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" enum Scale { TimesOne, TimesTwo, TimesFour, TimesEight }; struct Address { explicit Address() {} explicit Address(RegisterID base, int32_t offset = 0) : base(base) , offset(offset) { } RegisterID base; int32_t offset; }; struct ExtendedAddress { explicit ExtendedAddress(RegisterID base, intptr_t offset = 0) : base(base) , offset(offset) { } RegisterID base; intptr_t offset; }; # 120 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" struct ImplicitAddress { ImplicitAddress(RegisterID base) : base(base) , offset(0) { } ImplicitAddress(Address address) : base(address.base) , offset(address.offset) { } RegisterID base; int32_t offset; }; struct BaseIndex { BaseIndex(RegisterID base, RegisterID index, Scale scale, int32_t offset = 0) : base(base) , index(index) , scale(scale) , offset(offset) { } RegisterID base; RegisterID index; Scale scale; int32_t offset; }; struct AbsoluteAddress { explicit AbsoluteAddress(void* ptr) : m_ptr(ptr) { } void* m_ptr; }; struct TrustedImmPtr { explicit TrustedImmPtr(const void* value) : m_value(value) { } intptr_t asIntptr() { return reinterpret_cast(m_value); } const void* m_value; }; struct ImmPtr : public TrustedImmPtr { explicit ImmPtr(const void* value) : TrustedImmPtr(value) { } }; struct TrustedImm32 { explicit TrustedImm32(int32_t value) : m_value(value) , m_isPointer(false) { } explicit TrustedImm32(TrustedImmPtr ptr) : m_value(ptr.asIntptr()) , m_isPointer(true) { } int32_t m_value; # 228 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" bool m_isPointer; }; struct Imm32 : public TrustedImm32 { explicit Imm32(int32_t value) : TrustedImm32(value) { } explicit Imm32(TrustedImmPtr ptr) : TrustedImm32(ptr) { } }; struct ImmDouble { union { struct { uint32_t lsb, msb; } s; uint64_t u64; double d; } u; explicit ImmDouble(double d) { u.d = d; } }; # 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" class Label { template friend class AbstractMacroAssembler; friend class Jump; friend class MacroAssemblerCodeRef; friend class LinkBuffer; public: Label() { } Label(AbstractMacroAssembler* masm) : m_label(masm->m_assembler.label()) { } bool isUsed() const { return m_label.isUsed(); } void used() { m_label.used(); } bool isSet() const { return m_label.isValid(); } private: JmpDst m_label; }; class DataLabelPtr { template friend class AbstractMacroAssembler; friend class LinkBuffer; public: DataLabelPtr() { } DataLabelPtr(AbstractMacroAssembler* masm) : m_label(masm->m_assembler.label()) { } bool isSet() const { return m_label.isValid(); } private: JmpDst m_label; }; class DataLabel32 { template friend class AbstractMacroAssembler; friend class LinkBuffer; public: DataLabel32() { } DataLabel32(AbstractMacroAssembler* masm) : m_label(masm->m_assembler.label()) { } private: JmpDst m_label; }; class Call { template friend class AbstractMacroAssembler; public: enum Flags { None = 0x0, Linkable = 0x1, Near = 0x2, LinkableNear = 0x3 }; Call() : m_flags(None) { } Call(JmpSrc jmp, Flags flags) : m_jmp(jmp) , m_flags(flags) { } bool isFlagSet(Flags flag) { return !!(m_flags & flag); } static Call fromTailJump(Jump jump) { return Call(jump.m_jmp, Linkable); } JmpSrc m_jmp; private: Flags m_flags; }; class Jump { template friend class AbstractMacroAssembler; friend class Call; friend class LinkBuffer; public: Jump() { } Jump(JmpSrc jmp) : m_jmp(jmp) { } void link(AbstractMacroAssembler* masm) { masm->m_assembler.linkJump(m_jmp, masm->m_assembler.label()); } void linkTo(Label label, AbstractMacroAssembler* masm) { masm->m_assembler.linkJump(m_jmp, label.m_label); } private: JmpSrc m_jmp; }; class JumpList { friend class LinkBuffer; public: typedef js::Vector JumpVector; JumpList() {} JumpList(const JumpList &other) { m_jumps.append(other.m_jumps); } JumpList &operator=(const JumpList &other) { m_jumps.clear(); m_jumps.append(other.m_jumps); return *this; } void link(AbstractMacroAssembler* masm) { size_t size = m_jumps.length(); for (size_t i = 0; i < size; ++i) m_jumps[i].link(masm); m_jumps.clear(); } void linkTo(Label label, AbstractMacroAssembler* masm) { size_t size = m_jumps.length(); for (size_t i = 0; i < size; ++i) m_jumps[i].linkTo(label, masm); m_jumps.clear(); } void append(Jump jump) { m_jumps.append(jump); } void append(const JumpList& other) { m_jumps.append(other.m_jumps.begin(), other.m_jumps.length()); } void clear() { m_jumps.clear(); } bool empty() { return !m_jumps.length(); } const JumpVector& jumps() const { return m_jumps; } private: JumpVector m_jumps; }; static CodePtr trampolineAt(CodeRef ref, Label label) { return CodePtr(AssemblerType::getRelocatedAddress(ref.m_code.dataLocation(), label.m_label)); } size_t size() { return m_assembler.size(); } unsigned char *buffer() { return m_assembler.buffer(); } bool oom() { return m_assembler.oom(); } void executableCopy(void* buffer) { do { } while(0); m_assembler.executableCopy(buffer); } Label label() { return Label(this); } DataLabel32 dataLabel32() { return DataLabel32(this); } Label align() { m_assembler.align(16); return Label(this); } ptrdiff_t differenceBetween(Label from, Jump to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); } ptrdiff_t differenceBetween(Label from, Call to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); } ptrdiff_t differenceBetween(Label from, Label to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); } ptrdiff_t differenceBetween(Label from, DataLabelPtr to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); } ptrdiff_t differenceBetween(Label from, DataLabel32 to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); } ptrdiff_t differenceBetween(DataLabel32 from, Label to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); } ptrdiff_t differenceBetween(DataLabelPtr from, Label to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); } ptrdiff_t differenceBetween(DataLabelPtr from, Jump to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); } ptrdiff_t differenceBetween(DataLabelPtr from, DataLabelPtr to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); } ptrdiff_t differenceBetween(DataLabelPtr from, Call to) { return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); } protected: AssemblerType m_assembler; friend class LinkBuffer; friend class RepatchBuffer; static void linkJump(void* code, Jump jump, CodeLocationLabel target) { AssemblerType::linkJump(code, jump.m_jmp, target.dataLocation()); } static void linkPointer(void* code, typename AssemblerType::JmpDst label, void* value) { AssemblerType::linkPointer(code, label, value); } static void* getLinkerAddress(void* code, typename AssemblerType::JmpSrc label) { return AssemblerType::getRelocatedAddress(code, label); } static void* getLinkerAddress(void* code, typename AssemblerType::JmpDst label) { return AssemblerType::getRelocatedAddress(code, label); } static unsigned getLinkerCallReturnOffset(Call call) { return AssemblerType::getCallReturnOffset(call.m_jmp); } static void repatchJump(CodeLocationJump jump, CodeLocationLabel destination) { AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation()); } static bool canRepatchJump(CodeLocationJump jump, CodeLocationLabel destination) { return AssemblerType::canRelinkJump(jump.dataLocation(), destination.dataLocation()); } static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination) { AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); } static void repatchInt32(CodeLocationDataLabel32 dataLabel32, int32_t value) { AssemblerType::repatchInt32(dataLabel32.dataLocation(), value); } static void repatchPointer(CodeLocationDataLabelPtr dataLabelPtr, void* value) { AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value); } static void repatchLoadPtrToLEA(CodeLocationInstruction instruction) { AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation()); } static void repatchLEAToLoadPtr(CodeLocationInstruction instruction) { AssemblerType::repatchLEAToLoadPtr(instruction.dataLocation()); } }; } # 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 2 namespace JSC { class MacroAssemblerARM : public AbstractMacroAssembler { static const int DoubleConditionMask = 0x0f; static const int DoubleConditionBitSpecial = 0x8; public: enum Condition { Equal = ARMAssembler::EQ, NotEqual = ARMAssembler::NE, Above = ARMAssembler::HI, AboveOrEqual = ARMAssembler::CS, Below = ARMAssembler::CC, BelowOrEqual = ARMAssembler::LS, GreaterThan = ARMAssembler::GT, GreaterThanOrEqual = ARMAssembler::GE, LessThan = ARMAssembler::LT, LessThanOrEqual = ARMAssembler::LE, Overflow = ARMAssembler::VS, Signed = ARMAssembler::MI, Zero = ARMAssembler::EQ, NonZero = ARMAssembler::NE }; enum DoubleCondition { DoubleEqual = ARMAssembler::EQ, DoubleNotEqual = ARMAssembler::NE | DoubleConditionBitSpecial, DoubleGreaterThan = ARMAssembler::GT, DoubleGreaterThanOrEqual = ARMAssembler::GE, DoubleLessThan = ARMAssembler::CC, DoubleLessThanOrEqual = ARMAssembler::LS, DoubleEqualOrUnordered = ARMAssembler::EQ | DoubleConditionBitSpecial, DoubleNotEqualOrUnordered = ARMAssembler::NE, DoubleGreaterThanOrUnordered = ARMAssembler::HI, DoubleGreaterThanOrEqualOrUnordered = ARMAssembler::CS, DoubleLessThanOrUnordered = ARMAssembler::LT, DoubleLessThanOrEqualOrUnordered = ARMAssembler::LE }; static const RegisterID stackPointerRegister = ARMRegisters::sp; static const RegisterID linkRegister = ARMRegisters::lr; static const Scale ScalePtr = TimesFour; static const unsigned int TotalRegisters = 16; void add32(RegisterID src, RegisterID dest) { m_assembler.adds_r(dest, dest, src); } void add32(TrustedImm32 imm, Address address) { load32(address, ARMRegisters::S1); add32(imm, ARMRegisters::S1); store32(ARMRegisters::S1, address); } void add32(TrustedImm32 imm, RegisterID dest) { m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void add32(Address src, RegisterID dest) { load32(src, ARMRegisters::S1); add32(ARMRegisters::S1, dest); } void and32(Address src, RegisterID dest) { load32(src, ARMRegisters::S1); and32(ARMRegisters::S1, dest); } void and32(RegisterID src, RegisterID dest) { m_assembler.ands_r(dest, dest, src); } void and32(Imm32 imm, RegisterID dest) { ARMWord w = m_assembler.getImm(imm.m_value, ARMRegisters::S0, true); if (w & ARMAssembler::OP2_INV_IMM) m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM); else m_assembler.ands_r(dest, dest, w); } void lshift32(RegisterID shift_amount, RegisterID dest) { ARMWord w = ARMAssembler::getOp2(0x1f); do { } while(0); m_assembler.and_r(ARMRegisters::S0, shift_amount, w); m_assembler.movs_r(dest, m_assembler.lsl_r(dest, ARMRegisters::S0)); } void lshift32(Imm32 imm, RegisterID dest) { m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); } void mul32(RegisterID src, RegisterID dest) { if (src == dest) { move(src, ARMRegisters::S0); src = ARMRegisters::S0; } m_assembler.muls_r(dest, dest, src); } void mul32(Imm32 imm, RegisterID src, RegisterID dest) { move(imm, ARMRegisters::S0); m_assembler.muls_r(dest, src, ARMRegisters::S0); } void neg32(RegisterID srcDest) { m_assembler.rsbs_r(srcDest, srcDest, ARMAssembler::getOp2(0)); } void not32(RegisterID dest) { m_assembler.mvns_r(dest, dest); } void or32(RegisterID src, RegisterID dest) { m_assembler.orrs_r(dest, dest, src); } void or32(TrustedImm32 imm, RegisterID dest) { m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void rshift32(RegisterID shift_amount, RegisterID dest) { ARMWord w = ARMAssembler::getOp2(0x1f); do { } while(0); m_assembler.and_r(ARMRegisters::S0, shift_amount, w); m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0)); } void rshift32(Imm32 imm, RegisterID dest) { m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f)); } void urshift32(RegisterID shift_amount, RegisterID dest) { ARMWord w = ARMAssembler::getOp2(0x1f); do { } while(0); m_assembler.and_r(ARMRegisters::S0, shift_amount, w); m_assembler.movs_r(dest, m_assembler.lsr_r(dest, ARMRegisters::S0)); } void urshift32(Imm32 imm, RegisterID dest) { m_assembler.movs_r(dest, m_assembler.lsr(dest, imm.m_value & 0x1f)); } void sub32(RegisterID src, RegisterID dest) { m_assembler.subs_r(dest, dest, src); } void sub32(TrustedImm32 imm, RegisterID dest) { m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void sub32(TrustedImm32 imm, Address address) { load32(address, ARMRegisters::S1); sub32(imm, ARMRegisters::S1); store32(ARMRegisters::S1, address); } void sub32(Address src, RegisterID dest) { load32(src, ARMRegisters::S1); sub32(ARMRegisters::S1, dest); } void or32(Address address, RegisterID dest) { load32(address, ARMRegisters::S1); or32(ARMRegisters::S1, dest); } void xor32(RegisterID src, RegisterID dest) { m_assembler.eors_r(dest, dest, src); } void xor32(TrustedImm32 imm, RegisterID dest) { m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void xor32(Address src, RegisterID dest) { load32(src, ARMRegisters::S1); m_assembler.eors_r(dest, dest, ARMRegisters::S1); } void load8SignExtend(ImplicitAddress address, RegisterID dest) { m_assembler.dataTransferN(true, true, 8, dest, address.base, address.offset); } void load8ZeroExtend(ImplicitAddress address, RegisterID dest) { m_assembler.dataTransferN(true, false, 8, dest, address.base, address.offset); } void load8SignExtend(BaseIndex address, RegisterID dest) { m_assembler.baseIndexTransferN(true, true, 8, dest, address.base, address.index, address.scale, address.offset); } void load8ZeroExtend(BaseIndex address, RegisterID dest) { m_assembler.baseIndexTransferN(true, false, 8, dest, address.base, address.index, address.scale, address.offset); } void load8(ImplicitAddress address, RegisterID dest) { load8ZeroExtend(address, dest); } void load16SignExtend(ImplicitAddress address, RegisterID dest) { m_assembler.dataTransferN(true, true, 16, dest, address.base, address.offset); } void load16ZeroExtend(ImplicitAddress address, RegisterID dest) { m_assembler.dataTransferN(true, false, 16, dest, address.base, address.offset); } void load16SignExtend(BaseIndex address, RegisterID dest) { m_assembler.baseIndexTransferN(true, true, 16, dest, address.base, address.index, address.scale, address.offset); } void load16ZeroExtend(BaseIndex address, RegisterID dest) { m_assembler.baseIndexTransferN(true, false, 16, dest, address.base, address.index, address.scale, address.offset); } void load32(ImplicitAddress address, RegisterID dest) { m_assembler.dataTransfer32(true, dest, address.base, address.offset); } void load32(BaseIndex address, RegisterID dest) { m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast(address.scale), address.offset); } void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) { load32(address, dest); } DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) { do { } while(0); DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(ARMRegisters::S0, 0); m_assembler.dtr_ur(true, dest, address.base, ARMRegisters::S0); return dataLabel; } DataLabel32 load64WithAddressOffsetPatch(Address address, RegisterID hi, RegisterID lo) { do { } while(0); do { } while(0); DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(ARMRegisters::S0, 0); m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); m_assembler.dtr_u(true, lo, ARMRegisters::S0, 0); m_assembler.dtr_u(true, hi, ARMRegisters::S0, 4); return dataLabel; } Label loadPtrWithPatchToLEA(Address address, RegisterID dest) { Label label(this); load32(address, dest); return label; } void load16(BaseIndex address, RegisterID dest) { m_assembler.add_r(ARMRegisters::S1, address.base, m_assembler.lsl(address.index, address.scale)); load16(Address(ARMRegisters::S1, address.offset), dest); } void load16(ImplicitAddress address, RegisterID dest) { if (address.offset >= 0) m_assembler.ldrh_u(dest, address.base, m_assembler.getOffsetForHalfwordDataTransfer(address.offset, ARMRegisters::S0)); else m_assembler.ldrh_d(dest, address.base, m_assembler.getOffsetForHalfwordDataTransfer(-address.offset, ARMRegisters::S0)); } DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) { do { } while(0); DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(ARMRegisters::S0, 0); m_assembler.dtr_ur(false, src, address.base, ARMRegisters::S0); return dataLabel; } DataLabel32 store64WithAddressOffsetPatch(RegisterID hi, RegisterID lo, Address address) { do { } while(0); do { } while(0); do { } while(0); DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); m_assembler.dtr_u(false, lo, ARMRegisters::S0, 0); m_assembler.dtr_u(false, hi, ARMRegisters::S0, 4); return dataLabel; } DataLabel32 store64WithAddressOffsetPatch(Imm32 hi, RegisterID lo, Address address) { do { } while(0); do { } while(0); do { } while(0); do { } while(0); do { } while(0); DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); m_assembler.moveImm(hi.m_value, ARMRegisters::S1); m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); m_assembler.dtr_u(false, lo, ARMRegisters::S0, 0); m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 4); return dataLabel; } DataLabel32 store64WithAddressOffsetPatch(Imm32 hi, Imm32 lo, Address address) { do { } while(0); do { } while(0); DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); m_assembler.moveImm(lo.m_value, ARMRegisters::S1); m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); m_assembler.moveImm(hi.m_value, ARMRegisters::S1); m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 4); return dataLabel; } void store32(RegisterID src, ImplicitAddress address) { m_assembler.dataTransfer32(false, src, address.base, address.offset); } void store32(RegisterID src, BaseIndex address) { m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast(address.scale), address.offset); } void store32(TrustedImm32 imm, BaseIndex address) { if (imm.m_isPointer) m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); else move(imm, ARMRegisters::S1); store32(ARMRegisters::S1, address); } void store32(TrustedImm32 imm, ImplicitAddress address) { if (imm.m_isPointer) m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); else move(imm, ARMRegisters::S1); store32(ARMRegisters::S1, address); } void store32(RegisterID src, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.dtr_u(false, src, ARMRegisters::S0, 0); } void store32(TrustedImm32 imm, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); if (imm.m_isPointer) m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); else m_assembler.moveImm(imm.m_value, ARMRegisters::S1); m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } void store16(RegisterID src, ImplicitAddress address) { m_assembler.dataTransferN(false, false, 16, src, address.base, address.offset); } void store16(RegisterID src, BaseIndex address) { m_assembler.baseIndexTransferN(false, false, 16, src, address.base, address.index, static_cast(address.scale), address.offset); } void store16(TrustedImm32 imm, BaseIndex address) { if (imm.m_isPointer) do { } while(0); else move(imm, ARMRegisters::S1); store16(ARMRegisters::S1, address); } void store16(TrustedImm32 imm, ImplicitAddress address) { if (imm.m_isPointer) do { } while(0); else move(imm, ARMRegisters::S1); store16(ARMRegisters::S1, address); } void store16(RegisterID src, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.mem_imm_off(false, false, 16, true, src, ARMRegisters::S0, 0); } void store16(TrustedImm32 imm, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); if (imm.m_isPointer) do { } while(0); else m_assembler.moveImm(imm.m_value, ARMRegisters::S1); m_assembler.mem_imm_off(false, false, 16, true, ARMRegisters::S1, ARMRegisters::S0, 0); } void store8(RegisterID src, ImplicitAddress address) { m_assembler.dataTransferN(false, false, 16, src, address.base, address.offset); } void store8(RegisterID src, BaseIndex address) { m_assembler.baseIndexTransferN(false, false, 8, src, address.base, address.index, static_cast(address.scale), address.offset); } void store8(TrustedImm32 imm, BaseIndex address) { if (imm.m_isPointer) do { } while(0); else move(imm, ARMRegisters::S1); store8(ARMRegisters::S1, address); } void store8(TrustedImm32 imm, ImplicitAddress address) { if (imm.m_isPointer) do { } while(0); else move(imm, ARMRegisters::S1); store8(ARMRegisters::S1, address); } void store8(RegisterID src, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.mem_imm_off(false, false, 8, true, src, ARMRegisters::S0, 0); } void store8(TrustedImm32 imm, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); if (imm.m_isPointer) do { } while(0); else m_assembler.moveImm(imm.m_value, ARMRegisters::S1); m_assembler.mem_imm_off(false, false, 8, true, ARMRegisters::S1, ARMRegisters::S0, 0); } void pop(RegisterID dest) { m_assembler.pop_r(dest); } void push(RegisterID src) { m_assembler.push_r(src); } void push(Address address) { load32(address, ARMRegisters::S1); push(ARMRegisters::S1); } void push(Imm32 imm) { move(imm, ARMRegisters::S0); push(ARMRegisters::S0); } void move(TrustedImm32 imm, RegisterID dest) { if (imm.m_isPointer) m_assembler.ldr_un_imm(dest, imm.m_value); else m_assembler.moveImm(imm.m_value, dest); } void move(RegisterID src, RegisterID dest) { m_assembler.mov_r(dest, src); } void move(TrustedImmPtr imm, RegisterID dest) { move(Imm32(imm), dest); } void swap(RegisterID reg1, RegisterID reg2) { m_assembler.mov_r(ARMRegisters::S0, reg1); m_assembler.mov_r(reg1, reg2); m_assembler.mov_r(reg2, ARMRegisters::S0); } void signExtend32ToPtr(RegisterID src, RegisterID dest) { if (src != dest) move(src, dest); } void zeroExtend32ToPtr(RegisterID src, RegisterID dest) { if (src != dest) move(src, dest); } Jump branch8(Condition cond, Address left, Imm32 right) { load8(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, RegisterID left, RegisterID right, int useConstantPool = 0) { m_assembler.cmp_r(left, right); return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); } Jump branch32(Condition cond, RegisterID left, TrustedImm32 right, int useConstantPool = 0) { do { } while(0); if (right.m_isPointer) { m_assembler.ldr_un_imm(ARMRegisters::S0, right.m_value); m_assembler.cmp_r(left, ARMRegisters::S0); } else { ARMWord arg = m_assembler.getOp2(right.m_value); if (arg != m_assembler.INVALID_IMM) { m_assembler.cmp_r(left, arg); } else { arg = m_assembler.getOp2(-right.m_value); if (arg != m_assembler.INVALID_IMM) { m_assembler.cmn_r(left, arg); } else { m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); } } } return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); } Jump branch32FixedLength(Condition cond, RegisterID left, TrustedImm32 right) { m_assembler.ldr_un_imm(ARMRegisters::S1, right.m_value); return branch32(cond, left, ARMRegisters::S1, true); } Jump branch32WithPatch(Condition cond, RegisterID left, TrustedImm32 right, DataLabel32 &dataLabel) { do { } while(0); dataLabel = moveWithPatch(right, ARMRegisters::S1); return branch32(cond, left, ARMRegisters::S1, true); } Jump branch32WithPatch(Condition cond, Address left, TrustedImm32 right, DataLabel32 &dataLabel) { do { } while(0); load32(left, ARMRegisters::S1); dataLabel = moveWithPatch(right, ARMRegisters::S0); return branch32(cond, ARMRegisters::S1, ARMRegisters::S0, true); } Jump branch32(Condition cond, RegisterID left, Address right) { load32(right, ARMRegisters::S1); return branch32(cond, left, ARMRegisters::S1); } Jump branch32(Condition cond, Address left, RegisterID right) { load32(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, Address left, TrustedImm32 right) { load32(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) { load32(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) { load32WithUnalignedHalfWords(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Jump branch16(Condition cond, BaseIndex left, RegisterID right) { (void)(cond); (void)(left); (void)(right); __builtin_unreachable(); return jump(); } Jump branch16(Condition cond, BaseIndex left, Imm32 right) { load16(left, ARMRegisters::S0); move(right, ARMRegisters::S1); m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S1); return m_assembler.jmp(ARMCondition(cond)); } Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) { load8(address, ARMRegisters::S1); return branchTest32(cond, ARMRegisters::S1, mask); } Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask) { do { } while(0); m_assembler.tst_r(reg, mask); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) { do { } while(0); ARMWord w = m_assembler.getImm(mask.m_value, ARMRegisters::S0, true); if (w & ARMAssembler::OP2_INV_IMM) m_assembler.bics_r(ARMRegisters::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); else m_assembler.tst_r(reg, w); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) { load32(address, ARMRegisters::S1); return branchTest32(cond, ARMRegisters::S1, mask); } Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) { load32(address, ARMRegisters::S1); return branchTest32(cond, ARMRegisters::S1, mask); } Jump jump() { return Jump(m_assembler.jmp()); } void jump(RegisterID target) { m_assembler.bx(target); } void jump(Address address) { load32(address, ARMRegisters::pc); } Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest) { do { } while(0); add32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) { do { } while(0); add32(imm, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchAdd32(Condition cond, Address src, RegisterID dest) { do { } while(0); add32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } void mull32(RegisterID src1, RegisterID src2, RegisterID dest) { if (src1 == dest) { move(src1, ARMRegisters::S0); src1 = ARMRegisters::S0; } m_assembler.mull_r(ARMRegisters::S1, dest, src2, src1); m_assembler.cmp_r(ARMRegisters::S1, m_assembler.asr(dest, 31)); } Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) { do { } while(0); if (cond == Overflow) { mull32(src, dest, dest); cond = NonZero; } else mul32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) { do { } while(0); if (cond == Overflow) { move(imm, ARMRegisters::S0); mull32(ARMRegisters::S0, src, dest); cond = NonZero; } else mul32(imm, src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchSub32(Condition cond, RegisterID src, RegisterID dest) { do { } while(0); sub32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) { do { } while(0); sub32(imm, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchSub32(Condition cond, Address src, RegisterID dest) { do { } while(0); sub32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchSub32(Condition cond, Imm32 imm, Address dest) { do { } while(0); sub32(imm, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchNeg32(Condition cond, RegisterID srcDest) { do { } while(0); neg32(srcDest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchOr32(Condition cond, RegisterID src, RegisterID dest) { do { } while(0); or32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } void nop(int tag) { do { } while(0); m_assembler.mov_r(tag, tag); } void breakpoint() { m_assembler.bkpt(0); } Call nearCall() { Call call(m_assembler.loadBranchTarget(ARMRegisters::S1, ARMAssembler::AL, true), Call::LinkableNear); m_assembler.blx(ARMRegisters::S1); return call; } Call call(RegisterID target) { m_assembler.blx(target); JmpSrc jmpSrc; return Call(jmpSrc, Call::None); } void call(Address address) { call32(address.base, address.offset); } void ret() { m_assembler.bx(linkRegister); } void set32(Condition cond, Address left, RegisterID right, RegisterID dest) { load32(left, ARMRegisters::S1); set32(cond, ARMRegisters::S1, right, dest); } void set32(Condition cond, RegisterID left, Address right, RegisterID dest) { load32(right, ARMRegisters::S1); set32(cond, left, ARMRegisters::S1, dest); } void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) { m_assembler.cmp_r(left, right); m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) { m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } void set32(Condition cond, Address left, Imm32 right, RegisterID dest) { load32(left, ARMRegisters::S1); set32(cond, ARMRegisters::S1, right, dest); } void set8(Condition cond, RegisterID left, RegisterID right, RegisterID dest) { set32(cond, left, right, dest); } void set8(Condition cond, Address left, RegisterID right, RegisterID dest) { load32(left, ARMRegisters::S1); set32(cond, ARMRegisters::S1, right, dest); } void set8(Condition cond, RegisterID left, Imm32 right, RegisterID dest) { set32(cond, left, right, dest); } void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) { load32(address, ARMRegisters::S1); if (mask.m_value == -1) m_assembler.cmp_r(0, ARMRegisters::S1); else m_assembler.tst_r(ARMRegisters::S1, m_assembler.getImm(mask.m_value, ARMRegisters::S0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } void setTest8(Condition cond, Address address, Imm32 mask, RegisterID dest) { setTest32(cond, address, mask, dest); } void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) { m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void lea(Address address, RegisterID dest) { m_assembler.add_r(dest, address.base, m_assembler.getImm(address.offset, ARMRegisters::S0)); } void lea(BaseIndex address, RegisterID dest) { move(address.index, ARMRegisters::S1); if (address.scale != 0) lshift32(Imm32(address.scale), ARMRegisters::S1); if (address.offset) add32(Imm32(address.offset), ARMRegisters::S1); add32(address.base, ARMRegisters::S1); move(ARMRegisters::S1, dest); } void add32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); add32(imm, ARMRegisters::S1); m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } void sub32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); sub32(imm, ARMRegisters::S1); m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } void load32(void* address, RegisterID dest) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.dtr_u(true, dest, ARMRegisters::S0, 0); } Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) { load32(left.m_ptr, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) { load32(left.m_ptr, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } Call call() { Call call(m_assembler.loadBranchTarget(ARMRegisters::S1, ARMAssembler::AL, true), Call::Linkable); m_assembler.blx(ARMRegisters::S1); return call; } Call tailRecursiveCall() { return Call::fromTailJump(jump()); } Call makeTailRecursiveCall(Jump oldJump) { return Call::fromTailJump(oldJump); } DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) { DataLabelPtr dataLabel(this); m_assembler.ldr_un_imm(dest, reinterpret_cast(initialValue.m_value)); return dataLabel; } DataLabel32 moveWithPatch(TrustedImm32 initialValue, RegisterID dest) { DataLabel32 dataLabel(this); m_assembler.ldr_un_imm(dest, initialValue.m_value); return dataLabel; } Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) { dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S1); Jump jump = branch32(cond, left, ARMRegisters::S1, true); return jump; } Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) { load32(left, ARMRegisters::S1); dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S0); Jump jump = branch32(cond, ARMRegisters::S0, ARMRegisters::S1, true); return jump; } DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) { DataLabelPtr dataLabel = moveWithPatch(initialValue, ARMRegisters::S1); store32(ARMRegisters::S1, address); return dataLabel; } DataLabelPtr storePtrWithPatch(ImplicitAddress address) { return storePtrWithPatch(ImmPtr(0), address); } bool supportsFloatingPoint() const { return s_isVFPPresent; } bool supportsFloatingPointTruncate() const { return true; } bool supportsFloatingPointSqrt() const { return s_isVFPPresent; } void moveDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fcpyd_r(dest, src); } void loadDouble(ImplicitAddress address, FPRegisterID dest) { m_assembler.doubleTransfer(true, dest, address.base, address.offset); } void loadDouble(BaseIndex address, FPRegisterID dest) { m_assembler.baseIndexFloatTransfer(true, true, dest, address.base, address.index, address.scale, address.offset); } DataLabelPtr loadDouble(const void* address, FPRegisterID dest) { DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0); m_assembler.doubleTransfer(true, dest, ARMRegisters::S0, 0); return label; } void fastLoadDouble(RegisterID lo, RegisterID hi, FPRegisterID fpReg) { m_assembler.vmov64(false, true, lo, hi, fpReg); } void loadFloat(ImplicitAddress address, FPRegisterID dest) { dest = (FPRegisterID) (dest * 2); do { } while(0); m_assembler.floatTransfer(true, dest, address.base, address.offset); m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); } void loadFloat(BaseIndex address, FPRegisterID dest) { m_assembler.baseIndexFloatTransfer(true, false, (FPRegisterID)(dest*2), address.base, address.index, address.scale, address.offset); m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); } DataLabelPtr loadFloat(const void* address, FPRegisterID dest) { DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0); m_assembler.fmem_imm_off(true, false, true, (FPRegisterID)(dest*2), ARMRegisters::S0, 0); m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); return label; } void storeDouble(FPRegisterID src, ImplicitAddress address) { m_assembler.doubleTransfer(false, src, address.base, address.offset); } void storeDouble(FPRegisterID src, BaseIndex address) { m_assembler.baseIndexFloatTransfer(false, true, src, address.base, address.index, address.scale, address.offset); } void storeDouble(ImmDouble imm, Address address) { store32(Imm32(imm.u.s.lsb), address); store32(Imm32(imm.u.s.msb), Address(address.base, address.offset + 4)); } void storeDouble(ImmDouble imm, BaseIndex address) { store32(Imm32(imm.u.s.lsb), address); store32(Imm32(imm.u.s.msb), BaseIndex(address.base, address.index, address.scale, address.offset + 4)); } void fastStoreDouble(FPRegisterID fpReg, RegisterID lo, RegisterID hi) { m_assembler.vmov64(true, true, lo, hi, fpReg); } void storeFloat(FPRegisterID src, ImplicitAddress address) { m_assembler.floatTransfer(false, src, address.base, address.offset); } void storeFloat(FPRegisterID src, BaseIndex address) { m_assembler.baseIndexFloatTransfer(false, false, src, address.base, address.index, address.scale, address.offset); } void storeFloat(ImmDouble imm, Address address) { union { float f; uint32_t u32; } u; u.f = imm.u.d; store32(Imm32(u.u32), address); } void storeFloat(ImmDouble imm, BaseIndex address) { union { float f; uint32_t u32; } u; u.f = imm.u.d; store32(Imm32(u.u32), address); } void addDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.faddd_r(dest, dest, src); } void addDouble(Address src, FPRegisterID dest) { loadDouble(src, ARMRegisters::SD0); addDouble(ARMRegisters::SD0, dest); } void divDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fdivd_r(dest, dest, src); } void divDouble(Address src, FPRegisterID dest) { __builtin_unreachable(); loadDouble(src, ARMRegisters::SD0); divDouble(ARMRegisters::SD0, dest); } void subDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fsubd_r(dest, dest, src); } void subDouble(Address src, FPRegisterID dest) { loadDouble(src, ARMRegisters::SD0); subDouble(ARMRegisters::SD0, dest); } void mulDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fmuld_r(dest, dest, src); } void mulDouble(Address src, FPRegisterID dest) { loadDouble(src, ARMRegisters::SD0); mulDouble(ARMRegisters::SD0, dest); } void negDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fnegd_r(dest, src); } void absDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fabsd_r(dest, src); } void sqrtDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fsqrtd_r(dest, src); } void convertInt32ToDouble(RegisterID src, FPRegisterID dest) { m_assembler.fmsr_r(floatShadow(dest), src); m_assembler.fsitod_r(dest, floatShadow(dest)); } void convertUInt32ToDouble(RegisterID src, FPRegisterID dest) { m_assembler.fmsr_r(floatShadow(dest), src); m_assembler.fuitod_r(dest, floatShadow(dest)); } void convertInt32ToDouble(Address src, FPRegisterID dest) { load32(src, ARMRegisters::S1); convertInt32ToDouble(ARMRegisters::S1, dest); } void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) { __builtin_unreachable(); m_assembler.ldr_un_imm(ARMRegisters::S1, (ARMWord)src.m_ptr); m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); convertInt32ToDouble(ARMRegisters::S1, dest); } void convertDoubleToFloat(FPRegisterID src, FPRegisterID dest) { m_assembler.vcvt(m_assembler.FloatReg64, m_assembler.FloatReg32, src, dest); } Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) { m_assembler.fcmpd_r(left, right); m_assembler.fmstat(); if (cond & DoubleConditionBitSpecial) m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::VS); return Jump(m_assembler.jmp(static_cast(cond & ~DoubleConditionMask))); } Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) { m_assembler.ftosizd_r(floatShadow(ARMRegisters::SD0), src); m_assembler.fmrs_r(dest, floatShadow(ARMRegisters::SD0)); m_assembler.cmn_r(dest, ARMAssembler::getOp2(-0x7fffffff)); m_assembler.cmp_r(dest, ARMAssembler::getOp2(0x80000000), ARMCondition(NonZero)); return Jump(m_assembler.jmp(ARMCondition(Zero))); } void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) { m_assembler.ftosid_r(floatShadow(ARMRegisters::SD0), src); m_assembler.fmrs_r(dest, floatShadow(ARMRegisters::SD0)); m_assembler.fsitod_r(ARMRegisters::SD0, floatShadow(ARMRegisters::SD0)); failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, ARMRegisters::SD0)); failureCases.append(branchTest32(Zero, dest)); } void zeroDouble(FPRegisterID srcDest) { m_assembler.mov_r(ARMRegisters::S0, ARMAssembler::getOp2(0)); convertInt32ToDouble(ARMRegisters::S0, srcDest); } void ensureSpace(int space) { m_assembler.ensureSpace(space); } void forceFlushConstantPool() { m_assembler.forceFlushConstantPool(); } int flushCount() { return m_assembler.flushCount(); } protected: ARMAssembler::Condition ARMCondition(Condition cond) { return static_cast(cond); } void ensureSpace(int insnSpace, int constSpace) { m_assembler.ensureSpace(insnSpace, constSpace); } int sizeOfConstantPool() { return m_assembler.sizeOfConstantPool(); } # 1460 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" void call32(RegisterID base, int32_t offset) { if (base == ARMRegisters::sp) offset += 4; # 1480 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" if (offset >= 0) { if (offset <= 0xfff) { m_assembler.dtr_u(true, ARMRegisters::S0, base, offset); } else if (offset <= 0xfffff) { m_assembler.add_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); m_assembler.dtr_u(true, ARMRegisters::S0, ARMRegisters::S0, offset & 0xfff); } else { m_assembler.moveImm(offset, ARMRegisters::S0); m_assembler.dtr_ur(true, ARMRegisters::S0, base, ARMRegisters::S0); } } else { offset = -offset; if (offset <= 0xfff) { m_assembler.dtr_d(true, ARMRegisters::S0, base, offset); } else if (offset <= 0xfffff) { m_assembler.sub_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); m_assembler.dtr_d(true, ARMRegisters::S0, ARMRegisters::S0, offset & 0xfff); } else { m_assembler.moveImm(offset, ARMRegisters::S0); m_assembler.dtr_dr(true, ARMRegisters::S0, base, ARMRegisters::S0); } } m_assembler.blx(ARMRegisters::S0); } private: friend class LinkBuffer; friend class RepatchBuffer; static void linkCall(void* code, Call call, FunctionPtr function) { ARMAssembler::linkCall(code, call.m_jmp, function.value()); } static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) { ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); } static void repatchCall(CodeLocationCall call, FunctionPtr destination) { ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); } static const bool s_isVFPPresent; }; } # 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" 2 namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; } # 66 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" namespace JSC { class MacroAssembler : public MacroAssemblerBase { public: using MacroAssemblerBase::pop; using MacroAssemblerBase::jump; using MacroAssemblerBase::branch32; using MacroAssemblerBase::branch16; # 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" void pop() { addPtr(Imm32(sizeof(void*)), stackPointerRegister); } void peek(RegisterID dest, int index = 0) { loadPtr(Address(stackPointerRegister, (index * sizeof(void*))), dest); } void poke(RegisterID src, int index = 0) { storePtr(src, Address(stackPointerRegister, (index * sizeof(void*)))); } void poke(TrustedImm32 value, int index = 0) { store32(value, Address(stackPointerRegister, (index * sizeof(void*)))); } void poke(TrustedImmPtr imm, int index = 0) { storePtr(imm, Address(stackPointerRegister, (index * sizeof(void*)))); } void branchPtr(Condition cond, RegisterID op1, ImmPtr imm, Label target) { branchPtr(cond, op1, imm).linkTo(target, this); } void branch32(Condition cond, RegisterID op1, RegisterID op2, Label target) { branch32(cond, op1, op2).linkTo(target, this); } void branch32(Condition cond, RegisterID op1, TrustedImm32 imm, Label target) { branch32(cond, op1, imm).linkTo(target, this); } void branch32(Condition cond, RegisterID left, Address right, Label target) { branch32(cond, left, right).linkTo(target, this); } void branch16(Condition cond, BaseIndex left, RegisterID right, Label target) { branch16(cond, left, right).linkTo(target, this); } void branchTestPtr(Condition cond, RegisterID reg, Label target) { branchTestPtr(cond, reg).linkTo(target, this); } void jump(Label target) { jump().linkTo(target, this); } void addPtr(RegisterID src, RegisterID dest) { add32(src, dest); } void addPtr(Imm32 imm32, Address address) { add32(imm32, address); } void addPtr(Imm32 imm, RegisterID srcDest) { add32(imm, srcDest); } void addPtr(ImmPtr imm, RegisterID dest) { add32(Imm32(imm), dest); } void addPtr(Imm32 imm, RegisterID src, RegisterID dest) { add32(imm, src, dest); } void andPtr(RegisterID src, RegisterID dest) { and32(src, dest); } void andPtr(Imm32 imm, RegisterID srcDest) { and32(imm, srcDest); } void andPtr(ImmPtr ptr, RegisterID srcDest) { and32(Imm32(ptr), srcDest); } void negPtr(RegisterID srcDest) { neg32(srcDest); } void notPtr(RegisterID srcDest) { not32(srcDest); } void orPtr(RegisterID src, RegisterID dest) { or32(src, dest); } void orPtr(ImmPtr imm, RegisterID dest) { or32(Imm32(imm), dest); } void orPtr(Imm32 imm, RegisterID dest) { or32(imm, dest); } void subPtr(RegisterID src, RegisterID dest) { sub32(src, dest); } void subPtr(Imm32 imm, RegisterID dest) { sub32(imm, dest); } void subPtr(ImmPtr imm, RegisterID dest) { sub32(Imm32(imm), dest); } void subPtr(ImmPtr imm, Address address) { sub32(Imm32(imm), address); } void xorPtr(RegisterID src, RegisterID dest) { xor32(src, dest); } void xorPtr(Imm32 imm, RegisterID srcDest) { xor32(imm, srcDest); } void loadPtr(ImplicitAddress address, RegisterID dest) { load32(address, dest); } void loadPtr(BaseIndex address, RegisterID dest) { load32(address, dest); } void loadPtr(void* address, RegisterID dest) { load32(address, dest); } DataLabel32 loadPtrWithAddressOffsetPatch(Address address, RegisterID dest) { return load32WithAddressOffsetPatch(address, dest); } void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) { set32(cond, left, right, dest); } void storePtr(RegisterID src, ImplicitAddress address) { store32(src, address); } void storePtr(RegisterID src, void* address) { store32(src, address); } void storePtr(TrustedImmPtr imm, ImplicitAddress address) { store32(Imm32(imm), address); } void storePtr(TrustedImmPtr imm, BaseIndex address) { store32(Imm32(imm), address); } void storePtr(TrustedImmPtr imm, void* address) { store32(Imm32(imm), address); } DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) { return store32WithAddressOffsetPatch(src, address); } Jump branchPtr(Condition cond, RegisterID left, RegisterID right) { return branch32(cond, left, right); } Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) { return branch32(cond, left, Imm32(right)); } Jump branchPtr(Condition cond, RegisterID left, Imm32 right) { return branch32(cond, left, right); } Jump branchPtr(Condition cond, RegisterID left, Address right) { return branch32(cond, left, right); } Jump branchPtr(Condition cond, Address left, RegisterID right) { return branch32(cond, left, right); } Jump branchPtr(Condition cond, AbsoluteAddress left, RegisterID right) { return branch32(cond, left, right); } Jump branchPtr(Condition cond, Address left, ImmPtr right) { return branch32(cond, left, Imm32(right)); } Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right, RegisterID scratch) { return branch32(cond, left, Imm32(right)); } Jump branchTestPtr(Condition cond, RegisterID reg, RegisterID mask) { return branchTest32(cond, reg, mask); } Jump branchTestPtr(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) { return branchTest32(cond, reg, mask); } Jump branchTestPtr(Condition cond, Address address, Imm32 mask = Imm32(-1)) { return branchTest32(cond, address, mask); } Jump branchTestPtr(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) { return branchTest32(cond, address, mask); } Jump branchAddPtr(Condition cond, RegisterID src, RegisterID dest) { return branchAdd32(cond, src, dest); } Jump branchSubPtr(Condition cond, Imm32 imm, RegisterID dest) { return branchSub32(cond, imm, dest); } using MacroAssemblerBase::branchTest8; Jump branchTest8(Condition cond, ExtendedAddress address, Imm32 mask = Imm32(-1)) { return MacroAssemblerBase::branchTest8(cond, Address(address.base, address.offset), mask); } void rshiftPtr(Imm32 imm, RegisterID dest) { rshift32(imm, dest); } void lshiftPtr(Imm32 imm, RegisterID dest) { lshift32(imm, dest); } }; } # 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" 2 #define YARR_CALL namespace JSC { class JSGlobalData; class ExecutablePool; namespace Yarr { class YarrCodeBlock { typedef int (*YarrJITCode)(const UChar* input, unsigned start, unsigned length, int* output) ; public: YarrCodeBlock() : m_needFallBack(false) { } ~YarrCodeBlock() { } void setFallBack(bool fallback) { m_needFallBack = fallback; } bool isFallBack() { return m_needFallBack; } void set(MacroAssembler::CodeRef ref) { m_ref = ref; } int execute(const UChar* input, unsigned start, unsigned length, int* output) { return __extension__((reinterpret_cast(m_ref.m_code.executableAddress()))(input, start, length, output)); } void release() { m_ref.release(); } private: MacroAssembler::CodeRef m_ref; bool m_needFallBack; }; void jitCompile(YarrPattern&, JSGlobalData*, YarrCodeBlock& jitObject); int execute(YarrCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output); } } # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" #define YarrSyntaxChecker_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" 1 # 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" #define YarrParser_h # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 1 # 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" 2 namespace JSC { namespace Yarr { #define REGEXP_ERROR_PREFIX "Invalid regular expression: " enum BuiltInCharacterClassID { DigitClassID, SpaceClassID, WordClassID, NewlineClassID }; template class Parser { private: template friend ErrorCode parse(FriendDelegate& delegate, const UString& pattern, unsigned backReferenceLimit); # 62 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" class CharacterClassParserDelegate { public: CharacterClassParserDelegate(Delegate& delegate, ErrorCode& err) : m_delegate(delegate) , m_err(err) , m_state(Empty) , m_character(0) { } void begin(bool invert) { m_delegate.atomCharacterClassBegin(invert); } # 91 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" void atomPatternCharacter(UChar ch, bool hyphenIsRange = false) { switch (m_state) { case AfterCharacterClass: if (hyphenIsRange && ch == '-') { m_delegate.atomCharacterClassAtom('-'); m_state = AfterCharacterClassHyphen; return; } case Empty: m_character = ch; m_state = CachedCharacter; return; case CachedCharacter: if (hyphenIsRange && ch == '-') m_state = CachedCharacterHyphen; else { m_delegate.atomCharacterClassAtom(m_character); m_character = ch; } return; case CachedCharacterHyphen: if (ch < m_character) { m_err = CharacterClassOutOfOrder; return; } m_delegate.atomCharacterClassRange(m_character, ch); m_state = Empty; return; case AfterCharacterClassHyphen: m_delegate.atomCharacterClassAtom(ch); m_state = Empty; return; } } void atomBuiltInCharacterClass(BuiltInCharacterClassID classID, bool invert) { switch (m_state) { case CachedCharacter: m_delegate.atomCharacterClassAtom(m_character); case Empty: case AfterCharacterClass: m_state = AfterCharacterClass; m_delegate.atomCharacterClassBuiltIn(classID, invert); return; case CachedCharacterHyphen: m_err = CharacterClassInvalidRange; return; case AfterCharacterClassHyphen: m_delegate.atomCharacterClassBuiltIn(classID, invert); m_state = Empty; return; } } void end() { if (m_state == CachedCharacter) m_delegate.atomCharacterClassAtom(m_character); else if (m_state == CachedCharacterHyphen) { m_delegate.atomCharacterClassAtom(m_character); m_delegate.atomCharacterClassAtom('-'); } m_delegate.atomCharacterClassEnd(); } void assertionWordBoundary(bool) { __builtin_unreachable(); } void atomBackReference(unsigned) { __builtin_unreachable(); } private: Delegate& m_delegate; ErrorCode& m_err; enum CharacterClassConstructionState { Empty, CachedCharacter, CachedCharacterHyphen, AfterCharacterClass, AfterCharacterClassHyphen } m_state; UChar m_character; }; Parser(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit) : m_delegate(delegate) , m_backReferenceLimit(backReferenceLimit) , m_err(NoError) , m_data(pattern.chars()) , m_size(pattern.length()) , m_index(0) , m_parenthesesNestingDepth(0) { } # 235 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" template bool parseEscape(EscapeDelegate& delegate) { do { } while(0); do { } while(0); consume(); if (atEndOfPattern()) { m_err = EscapeUnterminated; return false; } switch (peek()) { case 'b': consume(); if (inCharacterClass) delegate.atomPatternCharacter('\b'); else { delegate.assertionWordBoundary(false); return false; } break; case 'B': consume(); if (inCharacterClass) delegate.atomPatternCharacter('B'); else { delegate.assertionWordBoundary(true); return false; } break; case 'd': consume(); delegate.atomBuiltInCharacterClass(DigitClassID, false); break; case 's': consume(); delegate.atomBuiltInCharacterClass(SpaceClassID, false); break; case 'w': consume(); delegate.atomBuiltInCharacterClass(WordClassID, false); break; case 'D': consume(); delegate.atomBuiltInCharacterClass(DigitClassID, true); break; case 'S': consume(); delegate.atomBuiltInCharacterClass(SpaceClassID, true); break; case 'W': consume(); delegate.atomBuiltInCharacterClass(WordClassID, true); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { if (!inCharacterClass) { ParseState state = saveState(); unsigned backReference; if (!consumeNumber(backReference)) break; if (backReference <= m_backReferenceLimit) { delegate.atomBackReference(backReference); break; } restoreState(state); } if (peek() >= '8') { delegate.atomPatternCharacter('\\'); break; } } case '0': delegate.atomPatternCharacter(consumeOctal()); break; case 'f': consume(); delegate.atomPatternCharacter('\f'); break; case 'n': consume(); delegate.atomPatternCharacter('\n'); break; case 'r': consume(); delegate.atomPatternCharacter('\r'); break; case 't': consume(); delegate.atomPatternCharacter('\t'); break; case 'v': consume(); delegate.atomPatternCharacter('\v'); break; case 'c': { ParseState state = saveState(); consume(); if (!atEndOfPattern()) { int control = consume(); if (inCharacterClass ? WTF::isASCIIAlphanumeric(control) || (control == '_') : WTF::isASCIIAlpha(control)) { delegate.atomPatternCharacter(control & 0x1f); break; } } restoreState(state); delegate.atomPatternCharacter('\\'); break; } case 'x': { consume(); int x = tryConsumeHex(2); if (x == -1) delegate.atomPatternCharacter('x'); else delegate.atomPatternCharacter(x); break; } case 'u': { consume(); int u = tryConsumeHex(4); if (u == -1) delegate.atomPatternCharacter('u'); else delegate.atomPatternCharacter(u); break; } default: delegate.atomPatternCharacter(consume()); } return true; } bool parseAtomEscape() { return parseEscape(m_delegate); } void parseCharacterClassEscape(CharacterClassParserDelegate& delegate) { parseEscape(delegate); } # 425 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" void parseCharacterClass() { do { } while(0); do { } while(0); consume(); CharacterClassParserDelegate characterClassConstructor(m_delegate, m_err); characterClassConstructor.begin(tryConsume('^')); while (!atEndOfPattern()) { switch (peek()) { case ']': consume(); characterClassConstructor.end(); return; case '\\': parseCharacterClassEscape(characterClassConstructor); break; default: characterClassConstructor.atomPatternCharacter(consume(), true); } if (m_err) return; } m_err = CharacterClassUnmatched; } void parseParenthesesBegin() { do { } while(0); do { } while(0); consume(); if (tryConsume('?')) { if (atEndOfPattern()) { m_err = ParenthesesTypeInvalid; return; } switch (consume()) { case ':': m_delegate.atomParenthesesSubpatternBegin(false); break; case '=': m_delegate.atomParentheticalAssertionBegin(); break; case '!': m_delegate.atomParentheticalAssertionBegin(true); break; default: m_err = ParenthesesTypeInvalid; } } else m_delegate.atomParenthesesSubpatternBegin(); ++m_parenthesesNestingDepth; } void parseParenthesesEnd() { do { } while(0); do { } while(0); consume(); if (m_parenthesesNestingDepth > 0) m_delegate.atomParenthesesEnd(); else m_err = ParenthesesUnmatched; --m_parenthesesNestingDepth; } void parseQuantifier(bool lastTokenWasAnAtom, unsigned min, unsigned max) { do { } while(0); do { } while(0); if (min == unsigned(-1)) { m_err = QuantifierTooLarge; return; } if (lastTokenWasAnAtom) m_delegate.quantifyAtom(min, max, !tryConsume('?')); else m_err = QuantifierWithoutAtom; } # 545 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" void parseTokens() { bool lastTokenWasAnAtom = false; while (!atEndOfPattern()) { switch (peek()) { case '|': consume(); m_delegate.disjunction(); lastTokenWasAnAtom = false; break; case '(': parseParenthesesBegin(); lastTokenWasAnAtom = false; break; case ')': parseParenthesesEnd(); lastTokenWasAnAtom = true; break; case '^': consume(); m_delegate.assertionBOL(); lastTokenWasAnAtom = false; break; case '$': consume(); m_delegate.assertionEOL(); lastTokenWasAnAtom = false; break; case '.': consume(); m_delegate.atomBuiltInCharacterClass(NewlineClassID, true); lastTokenWasAnAtom = true; break; case '[': parseCharacterClass(); lastTokenWasAnAtom = true; break; case '\\': lastTokenWasAnAtom = parseAtomEscape(); break; case '*': consume(); parseQuantifier(lastTokenWasAnAtom, 0, quantifyInfinite); lastTokenWasAnAtom = false; break; case '+': consume(); parseQuantifier(lastTokenWasAnAtom, 1, quantifyInfinite); lastTokenWasAnAtom = false; break; case '?': consume(); parseQuantifier(lastTokenWasAnAtom, 0, 1); lastTokenWasAnAtom = false; break; case '{': { ParseState state = saveState(); consume(); if (peekIsDigit()) { unsigned min; if (!consumeNumber(min)) break; unsigned max = min; if (tryConsume(',')) { if (peekIsDigit()) { if (!consumeNumber(max)) break; } else { max = quantifyInfinite; } } if (tryConsume('}')) { if (min <= max) parseQuantifier(lastTokenWasAnAtom, min, max); else m_err = QuantifierOutOfOrder; lastTokenWasAnAtom = false; break; } } restoreState(state); } default: m_delegate.atomPatternCharacter(consume()); lastTokenWasAnAtom = true; } if (m_err) return; } if (m_parenthesesNestingDepth > 0) m_err = MissingParentheses; } ErrorCode parse() { if (m_size > MAX_PATTERN_SIZE) m_err = PatternTooLarge; else parseTokens(); do { } while(0); return m_err; } typedef unsigned ParseState; ParseState saveState() { return m_index; } void restoreState(ParseState state) { m_index = state; } bool atEndOfPattern() { do { } while(0); return m_index == m_size; } int peek() { do { } while(0); return m_data[m_index]; } bool peekIsDigit() { return !atEndOfPattern() && WTF::isASCIIDigit(peek()); } unsigned peekDigit() { do { } while(0); return peek() - '0'; } int consume() { do { } while(0); return m_data[m_index++]; } unsigned consumeDigit() { do { } while(0); return consume() - '0'; } bool consumeNumber(unsigned &accum) { accum = consumeDigit(); while (peekIsDigit()) { unsigned newValue = accum * 10 + peekDigit(); if (newValue < accum) { m_err = QuantifierTooLarge; return false; } accum = newValue; consume(); } return true; } unsigned consumeOctal() { do { } while(0); unsigned n = consumeDigit(); while (n < 32 && !atEndOfPattern() && WTF::isASCIIOctalDigit(peek())) n = n * 8 + consumeDigit(); return n; } bool tryConsume(UChar ch) { if (atEndOfPattern() || (m_data[m_index] != ch)) return false; ++m_index; return true; } int tryConsumeHex(int count) { ParseState state = saveState(); int n = 0; while (count--) { if (atEndOfPattern() || !WTF::isASCIIHexDigit(peek())) { restoreState(state); return -1; } n = (n << 4) | WTF::toASCIIHexValue(consume()); } return n; } Delegate& m_delegate; unsigned m_backReferenceLimit; ErrorCode m_err; const UChar* m_data; unsigned m_size; unsigned m_index; unsigned m_parenthesesNestingDepth; static const unsigned MAX_PATTERN_SIZE = 1024 * 1024; }; # 843 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" template ErrorCode parse(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit = quantifyInfinite) { return Parser(delegate, pattern, backReferenceLimit).parse(); } } } # 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" 2 namespace JSC { namespace Yarr { ErrorCode checkSyntax(const UString& pattern); }} # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 # 45 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" namespace js { enum RegExpRunStatus { RegExpRunStatus_Error, RegExpRunStatus_Success, RegExpRunStatus_Success_NotFound }; class RegExpObjectBuilder { JSContext *cx; Rooted reobj_; bool getOrCreate(); bool getOrCreateClone(RegExpObject *proto); public: RegExpObjectBuilder(JSContext *cx, RegExpObject *reobj = __null); RegExpObject *reobj() { return reobj_; } RegExpObject *build(HandleAtom source, RegExpFlag flags); RegExpObject *build(HandleAtom source, RegExpShared &shared); RegExpObject *clone(Handle other, Handle proto); }; JSObject * CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto); namespace detail { class RegExpCode { typedef JSC::Yarr::BytecodePattern BytecodePattern; typedef JSC::Yarr::ErrorCode ErrorCode; typedef JSC::Yarr::YarrPattern YarrPattern; typedef JSC::Yarr::JSGlobalData JSGlobalData; typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; YarrCodeBlock codeBlock; BytecodePattern *byteCode; public: RegExpCode() : codeBlock(), byteCode(__null) { } ~RegExpCode() { codeBlock.release(); if (byteCode) Foreground::delete_(byteCode); } static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { ErrorCode error = JSC::Yarr::checkSyntax(*source); if (error == JSC::Yarr::NoError) return true; reportYarrError(cx, tokenStream, error); return false; } static inline bool isJITRuntimeEnabled(JSContext *cx); static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); static size_t getOutputSize(size_t pairCount) { return pairCount * 2; } bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); RegExpRunStatus execute(JSContext *cx, const jschar *chars, size_t length, size_t start, int *output, size_t outputCount); }; } # 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" class RegExpShared { friend class RegExpCompartment; friend class RegExpGuard; detail::RegExpCode code; unsigned parenCount; RegExpFlag flags; size_t activeUseCount; uint64_t gcNumberWhenUsed; bool compile(JSContext *cx, JSAtom *source); RegExpShared(JSRuntime *rt, RegExpFlag flags); friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime; public: inline void prepareForUse(JSContext *cx); RegExpRunStatus execute(JSContext *cx, const jschar *chars, size_t length, size_t *lastIndex, MatchPairs **output); size_t getParenCount() const { return parenCount; } void incRef() { activeUseCount++; } void decRef() { do { } while(0); activeUseCount--; } size_t pairCount() const { return parenCount + 1; } RegExpFlag getFlags() const { return flags; } bool ignoreCase() const { return flags & IgnoreCaseFlag; } bool global() const { return flags & GlobalFlag; } bool multiline() const { return flags & MultilineFlag; } bool sticky() const { return flags & StickyFlag; } }; class RegExpGuard { RegExpShared *re_; RegExpGuard(const RegExpGuard &) ; void operator=(const RegExpGuard &) ; public: RegExpGuard() : re_(__null) {} RegExpGuard(RegExpShared &re) : re_(&re) { re_->incRef(); } void init(RegExpShared &re) { do { } while(0); re_ = &re; re_->incRef(); } ~RegExpGuard() { if (re_) re_->decRef(); } bool initialized() const { return !!re_; } RegExpShared *re() const { do { } while(0); return re_; } RegExpShared *operator->() { return re(); } RegExpShared &operator*() { return *re(); } }; class RegExpCompartment { enum Type { Normal = 0x0, Hack = 0x1 }; struct Key { JSAtom *atom; uint16_t flag; uint16_t type; Key() {} Key(JSAtom *atom, RegExpFlag flag, Type type) : atom(atom), flag(flag), type(type) {} typedef Key Lookup; static HashNumber hash(const Lookup &l) { return DefaultHasher::hash(l.atom) ^ (l.flag << 1) ^ l.type; } static bool match(Key l, Key r) { return l.atom == r.atom && l.flag == r.flag && l.type == r.type; } }; typedef HashMap Map; Map map_; bool get(JSContext *cx, JSAtom *key, JSAtom *source, RegExpFlag flags, Type type, RegExpGuard *g); public: RegExpCompartment(JSRuntime *rt); ~RegExpCompartment(); bool init(JSContext *cx); void sweep(JSRuntime *rt); bool get(JSContext *cx, JSAtom *source, RegExpFlag flags, RegExpGuard *g); bool get(JSContext *cx, JSAtom *source, JSString *maybeOpt, RegExpGuard *g); # 283 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" bool getHack(JSContext *cx, JSAtom *source, JSAtom *hackedSource, RegExpFlag flags, RegExpGuard *g); bool lookupHack(JSAtom *source, RegExpFlag flags, JSContext *cx, RegExpGuard *g); }; class RegExpObject : public JSObject { typedef detail::RegExpCode RegExpCode; static const unsigned LAST_INDEX_SLOT = 0; static const unsigned SOURCE_SLOT = 1; static const unsigned GLOBAL_FLAG_SLOT = 2; static const unsigned IGNORE_CASE_FLAG_SLOT = 3; static const unsigned MULTILINE_FLAG_SLOT = 4; static const unsigned STICKY_FLAG_SLOT = 5; public: static const unsigned RESERVED_SLOTS = 6; static RegExpObject * create(JSContext *cx, RegExpStatics *res, const jschar *chars, size_t length, RegExpFlag flags, TokenStream *ts); static RegExpObject * createNoStatics(JSContext *cx, const jschar *chars, size_t length, RegExpFlag flags, TokenStream *ts); static RegExpObject * createNoStatics(JSContext *cx, HandleAtom atom, RegExpFlag flags, TokenStream *ts); # 335 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" RegExpRunStatus execute(JSContext *cx, const jschar *chars, size_t length, size_t *lastIndex, MatchPairs **output); const Value &getLastIndex() const { return getSlot(LAST_INDEX_SLOT); } inline void setLastIndex(const Value &v); inline void setLastIndex(double d); inline void zeroLastIndex(); JSFlatString *toString(JSContext *cx) const; JSAtom *getSource() const { return &getSlot(SOURCE_SLOT).toString()->asAtom(); } inline void setSource(JSAtom *source); RegExpFlag getFlags() const { unsigned flags = 0; flags |= global() ? GlobalFlag : 0; flags |= ignoreCase() ? IgnoreCaseFlag : 0; flags |= multiline() ? MultilineFlag : 0; flags |= sticky() ? StickyFlag : 0; return RegExpFlag(flags); } inline void setIgnoreCase(bool enabled); inline void setGlobal(bool enabled); inline void setMultiline(bool enabled); inline void setSticky(bool enabled); bool ignoreCase() const { return getSlot(IGNORE_CASE_FLAG_SLOT).toBoolean(); } bool global() const { return getSlot(GLOBAL_FLAG_SLOT).toBoolean(); } bool multiline() const { return getSlot(MULTILINE_FLAG_SLOT).toBoolean(); } bool sticky() const { return getSlot(STICKY_FLAG_SLOT).toBoolean(); } inline void shared(RegExpGuard *g) const; inline bool getShared(JSContext *cx, RegExpGuard *g); inline void setShared(JSContext *cx, RegExpShared &shared); private: friend class RegExpObjectBuilder; Shape *assignInitialShape(JSContext *cx); inline bool init(JSContext *cx, HandleAtom source, RegExpFlag flags); bool createShared(JSContext *cx, RegExpGuard *g); RegExpShared *maybeShared() const; void setPrivate(void *priv) ; }; bool ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut); # 419 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" inline bool RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g); template bool XDRScriptRegExpObject(XDRState *xdr, HeapPtrObject *objp); extern JSObject * CloneScriptRegExpObject(JSContext *cx, RegExpObject &re); } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 2 namespace js { extern Class dummy_class; # 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" class DtoaCache { double d; int base; JSFixedString *s; public: DtoaCache() : s(__null) {} void purge() { s = __null; } JSFixedString *lookup(int base, double d) { return this->s && base == this->base && d == this->d ? this->s : __null; } void cache(int base, double d, JSFixedString *s) { this->base = base; this->d = d; this->s = s; } }; typedef int moz_static_assert103[(sizeof(HashNumber) == 4) ? 1 : -1]; struct WrapperHasher { typedef Value Lookup; static HashNumber hash(Value key) { do { } while(0); uint64_t bits = JSVAL_TO_IMPL(key).asBits; return uint32_t(bits) ^ uint32_t(bits >> 32); } static bool match(const Value &l, const Value &k) { return l == k; } }; typedef HashMap WrapperMap; } namespace JS { struct TypeInferenceSizes; } namespace js { class AutoDebugModeGC; } struct JSCompartment { JSRuntime *rt; JSPrincipals *principals; js::gc::ArenaLists arenas; private: bool needsBarrier_; public: bool needsBarrier() const { return needsBarrier_; } void setNeedsBarrier(bool needs); js::GCMarker *barrierTracer() { do { } while(0); return &rt->gcMarker; } private: enum CompartmentGCState { NoGCScheduled, GCScheduled, GCRunning }; CompartmentGCState gcState; bool gcPreserveCode; public: bool isCollecting() const { if (rt->gcRunning) { return gcState == GCRunning; } else { do { } while(0); return needsBarrier(); } } bool isPreservingCode() const { return gcPreserveCode; } bool requireGCTracer() const { return gcState == GCRunning; } void setCollecting(bool collecting) { do { } while(0); if (collecting) gcState = GCRunning; else gcState = NoGCScheduled; } void scheduleGC() { do { } while(0); do { } while(0); gcState = GCScheduled; } void unscheduleGC() { do { } while(0); do { } while(0); gcState = NoGCScheduled; } bool isGCScheduled() const { return gcState == GCScheduled; } void setPreservingCode(bool preserving) { gcPreserveCode = preserving; } size_t gcBytes; size_t gcTriggerBytes; size_t gcMaxMallocBytes; bool hold; bool isSystemCompartment; int64_t lastCodeRelease; static const size_t TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 128 * 1024; js::LifoAlloc typeLifoAlloc; bool activeAnalysis; bool activeInference; js::types::TypeCompartment types; void *data; bool active; js::WrapperMap crossCompartmentWrappers; int64_t lastAnimationTime; js::RegExpCompartment regExps; size_t sizeOfShapeTable(JSMallocSizeOfFun mallocSizeOf); void sizeOfTypeInferenceData(JS::TypeInferenceSizes *stats, JSMallocSizeOfFun mallocSizeOf); js::PropertyTree propertyTree; js::BaseShapeSet baseShapes; void sweepBaseShapeTable(); js::InitialShapeSet initialShapes; void sweepInitialShapeTable(); js::types::TypeObjectSet newTypeObjects; js::types::TypeObjectSet lazyTypeObjects; void sweepNewTypeObjectTable(js::types::TypeObjectSet &table); js::ReadBarriered emptyTypeObject; inline js::types::TypeObject *getEmptyType(JSContext *cx); js::types::TypeObject *getLazyType(JSContext *cx, JSObject *proto); size_t gcMallocAndFreeBytes; size_t gcTriggerMallocAndFreeBytes; private: ptrdiff_t gcMallocBytes; enum { DebugFromC = 1, DebugFromJS = 2 }; unsigned debugModeBits; public: JSCompartment(JSRuntime *rt); ~JSCompartment(); bool init(JSContext *cx); void markCrossCompartmentWrappers(JSTracer *trc); bool wrap(JSContext *cx, js::Value *vp); bool wrap(JSContext *cx, JSString **strp); bool wrap(JSContext *cx, js::HeapPtrString *strp); bool wrap(JSContext *cx, JSObject **objp); bool wrapId(JSContext *cx, jsid *idp); bool wrap(JSContext *cx, js::PropertyOp *op); bool wrap(JSContext *cx, js::StrictPropertyOp *op); bool wrap(JSContext *cx, js::PropertyDescriptor *desc); bool wrap(JSContext *cx, js::AutoIdVector &props); void markTypes(JSTracer *trc); void discardJitCode(js::FreeOp *fop); void sweep(js::FreeOp *fop, bool releaseTypes); void sweepCrossCompartmentWrappers(); void purge(); void setGCLastBytes(size_t lastBytes, size_t lastMallocBytes, js::JSGCInvocationKind gckind); void reduceGCTriggerBytes(size_t amount); void resetGCMallocBytes(); void setGCMaxMallocBytes(size_t value); void updateMallocCounter(size_t nbytes) { ptrdiff_t oldCount = gcMallocBytes; ptrdiff_t newCount = oldCount - ptrdiff_t(nbytes); gcMallocBytes = newCount; if ((__builtin_expect((newCount <= 0 && oldCount > 0), 0))) onTooMuchMalloc(); } bool isTooMuchMalloc() const { return gcMallocBytes <= 0; } void onTooMuchMalloc(); void mallocInCompartment(size_t nbytes) { gcMallocAndFreeBytes += nbytes; } void freeInCompartment(size_t nbytes) { do { } while(0); gcMallocAndFreeBytes -= nbytes; } js::DtoaCache dtoaCache; private: js::GlobalObjectSet debuggees; private: JSCompartment *thisForCtor() { return this; } public: bool debugMode() const { return !!debugModeBits; } bool hasScriptsOnStack(); private: void updateForDebugMode(js::FreeOp *fop, js::AutoDebugModeGC &dmgc); public: js::GlobalObjectSet &getDebuggees() { return debuggees; } bool addDebuggee(JSContext *cx, js::GlobalObject *global); void removeDebuggee(js::FreeOp *fop, js::GlobalObject *global, js::GlobalObjectSet::Enum *debuggeesEnum = __null); bool setDebugModeFromC(JSContext *cx, bool b, js::AutoDebugModeGC &dmgc); void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler); void clearTraps(js::FreeOp *fop); private: void sweepBreakpoints(js::FreeOp *fop); public: js::WatchpointMap *watchpointMap; js::ScriptCountsMap *scriptCountsMap; js::SourceMapMap *sourceMapMap; js::DebugScriptMap *debugScriptMap; }; class js::AutoDebugModeGC { JSRuntime *rt; bool needGC; public: explicit AutoDebugModeGC(JSRuntime *rt) : rt(rt), needGC(false) {} ~AutoDebugModeGC() { if (needGC) GC(rt, GC_NORMAL, gcreason::DEBUG_MODE_GC); } void scheduleGC(JSCompartment *compartment) { do { } while(0); PrepareCompartmentForGC(compartment); needGC = true; } }; inline void JSContext::setCompartment(JSCompartment *compartment) { this->compartment = compartment; this->inferenceEnabled = compartment ? compartment->types.inferenceEnabled : false; } namespace js { class PreserveCompartment { protected: JSContext *cx; private: JSCompartment *oldCompartment; bool oldInferenceEnabled; public: PreserveCompartment(JSContext *cx ) : cx(cx) { do { } while (0); oldCompartment = cx->compartment; oldInferenceEnabled = cx->inferenceEnabled; } ~PreserveCompartment() { cx->compartment = oldCompartment; cx->inferenceEnabled = oldInferenceEnabled; } }; class SwitchToCompartment : public PreserveCompartment { public: SwitchToCompartment(JSContext *cx, JSCompartment *newCompartment ) : PreserveCompartment(cx) { do { } while (0); cx->setCompartment(newCompartment); } SwitchToCompartment(JSContext *cx, JSObject *target ) : PreserveCompartment(cx) { do { } while (0); cx->setCompartment(target->compartment()); } }; class AssertCompartmentUnchanged { protected: JSContext * const cx; JSCompartment * const oldCompartment; public: AssertCompartmentUnchanged(JSContext *cx ) : cx(cx), oldCompartment(cx->compartment) { do { } while (0); } ~AssertCompartmentUnchanged() { do { } while(0); } }; class AutoCompartment { public: JSContext * const context; JSCompartment * const origin; JSObject * const target; JSCompartment * const destination; private: Maybe frame; bool entered; public: AutoCompartment(JSContext *cx, JSObject *target); ~AutoCompartment(); bool enter(); void leave(); private: AutoCompartment(const AutoCompartment &) ; AutoCompartment & operator=(const AutoCompartment &) ; }; class ErrorCopier { AutoCompartment ∾ RootedObject scope; public: ErrorCopier(AutoCompartment &ac, JSObject *scope) : ac(ac), scope(ac.context, scope) { do { } while(0); } ~ErrorCopier(); }; class CompartmentsIter { private: JSCompartment **it, **end; public: CompartmentsIter(JSRuntime *rt) { it = rt->compartments.begin(); end = rt->compartments.end(); } bool done() const { return it == end; } void next() { do { } while(0); it++; } JSCompartment *get() const { do { } while(0); return *it; } operator JSCompartment *() const { return get(); } JSCompartment *operator->() const { return get(); } }; } # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 2 # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" namespace js { namespace mjit { struct JITChunk; struct JITScript; } struct VMFrame { # 82 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" union Arguments { struct { void *ptr; void *ptr2; } x; struct { uint32_t dynamicArgc; } call; } u; static size_t offsetOfDynamicArgc() { return __builtin_offsetof (VMFrame, u.call.dynamicArgc); } VMFrame *previous; void *scratch; FrameRegs regs; static size_t offsetOfRegsSp() { return __builtin_offsetof (VMFrame, regs.sp); } static size_t offsetOfRegsPc() { return __builtin_offsetof (VMFrame, regs.pc); } JSContext *cx; Value *stackLimit; StackFrame *entryfp; FrameRegs *oldregs; JSRejoinState stubRejoin; # 162 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" void *savedR4; void *savedR5; void *savedR6; void *savedR7; void *savedR8; void *savedR9; void *savedR10; void *savedR11; void *savedLR; inline void** returnAddressLocation() { return reinterpret_cast(this) - 1; } # 202 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" JSRuntime *runtime() { return cx->runtime; } StackFrame *fp() { return regs.fp(); } mjit::JITScript *jit() { return fp()->jit(); } inline mjit::JITChunk *chunk(); inline unsigned chunkIndex(); inline JSScript *script(); inline jsbytecode *pc(); # 227 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" static const size_t offsetOfFp = 4 * sizeof(void *) + FrameRegs::offsetOfFp; static const size_t offsetOfInlined = 4 * sizeof(void *) + FrameRegs::offsetOfInlined; static void staticAssert() { typedef int moz_static_assert104[(offsetOfFp == __builtin_offsetof (VMFrame, regs) + FrameRegs::offsetOfFp) ? 1 : -1]; typedef int moz_static_assert105[(offsetOfInlined == __builtin_offsetof (VMFrame, regs) + FrameRegs::offsetOfInlined) ? 1 : -1]; } }; extern "C" void JaegerStubVeneer(void); namespace mjit { enum RejoinState { # 259 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" REJOIN_SCRIPTED = 1, REJOIN_NONE, REJOIN_RESUME, REJOIN_TRAP, REJOIN_FALLTHROUGH, REJOIN_NATIVE, REJOIN_NATIVE_LOWERED, REJOIN_NATIVE_GETTER, REJOIN_NATIVE_PATCHED, REJOIN_PUSH_BOOLEAN, REJOIN_PUSH_OBJECT, REJOIN_DEFLOCALFUN, REJOIN_THIS_PROTOTYPE, REJOIN_CHECK_ARGUMENTS, REJOIN_FUNCTION_PROLOGUE, REJOIN_CALL_PROLOGUE, REJOIN_CALL_PROLOGUE_LOWERED_CALL, REJOIN_CALL_PROLOGUE_LOWERED_APPLY, REJOIN_CALL_SPLAT, REJOIN_GETTER, REJOIN_POS, REJOIN_BINARY, REJOIN_BRANCH }; static inline JSRejoinState ScriptedRejoin(uint32_t pcOffset) { return REJOIN_SCRIPTED | (pcOffset << 1); } static inline JSRejoinState StubRejoin(RejoinState rejoin) { return rejoin << 1; } struct RecompilationMonitor { JSContext *cx; unsigned recompilations; unsigned frameExpansions; uint64_t gcNumber; RecompilationMonitor(JSContext *cx) : cx(cx), recompilations(cx->compartment->types.recompilations), frameExpansions(cx->compartment->types.frameExpansions), gcNumber(cx->runtime->gcNumber) {} bool recompiled() { return cx->compartment->types.recompilations != recompilations || cx->compartment->types.frameExpansions != frameExpansions || cx->runtime->gcNumber != gcNumber; } }; struct Trampolines { typedef void (*TrampolinePtr)(); TrampolinePtr forceReturn; JSC::ExecutablePool *forceReturnPool; }; enum JaegerStatus { Jaeger_Throwing = 0, Jaeger_Returned = 1, Jaeger_Unfinished = 2, Jaeger_UnfinishedAtTrap = 3, Jaeger_ThrowBeforeEnter = 4 }; static inline bool JaegerStatusToSuccess(JaegerStatus status) { do { } while(0); do { } while(0); return status == Jaeger_Returned; } class JaegerRuntime { Trampolines trampolines; VMFrame *activeFrame_; JaegerStatus lastUnfinished_; void finish(); public: bool init(JSContext *cx); JaegerRuntime(); ~JaegerRuntime() { finish(); } VMFrame *activeFrame() { return activeFrame_; } void pushActiveFrame(VMFrame *f) { do { } while(0); f->previous = activeFrame_; f->scratch = __null; activeFrame_ = f; } void popActiveFrame() { do { } while(0); activeFrame_ = activeFrame_->previous; } void setLastUnfinished(JaegerStatus status) { do { } while(0); lastUnfinished_ = status; } JaegerStatus lastUnfinished() { JaegerStatus result = lastUnfinished_; lastUnfinished_ = (JaegerStatus) 0; return result; } void *forceReturnFromExternC() const { return (__extension__ (void *) (size_t) (trampolines.forceReturn)); } void *forceReturnFromFastCall() const { return (__extension__ (void *) (size_t) (trampolines.forceReturn)); } Vector orphanedNativeFrames; Vector orphanedNativePools; }; # 520 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" class CompilerAllocPolicy : public TempAllocPolicy { bool *oomFlag; void *checkAlloc(void *p) { if (!p) *oomFlag = true; return p; } public: CompilerAllocPolicy(JSContext *cx, bool *oomFlag) : TempAllocPolicy(cx), oomFlag(oomFlag) {} CompilerAllocPolicy(JSContext *cx, Compiler &compiler); void *malloc_(size_t bytes) { return checkAlloc(TempAllocPolicy::malloc_(bytes)); } void *realloc_(void *p, size_t oldBytes, size_t bytes) { return checkAlloc(TempAllocPolicy::realloc_(p, oldBytes, bytes)); } }; namespace ic { struct PICInfo; struct GetElementIC; struct SetElementIC; struct GetGlobalNameIC; struct SetGlobalNameIC; struct EqualityICInfo; struct CallICInfo; } } typedef void ( *VoidStub)(VMFrame &); typedef void ( *VoidVpStub)(VMFrame &, Value *); typedef void ( *VoidStubUInt32)(VMFrame &, uint32_t); typedef void ( *VoidStubInt32)(VMFrame &, int32_t); typedef JSBool ( *BoolStub)(VMFrame &); typedef void * ( *VoidPtrStub)(VMFrame &); typedef void * ( *VoidPtrStubPC)(VMFrame &, jsbytecode *); typedef void * ( *VoidPtrStubUInt32)(VMFrame &, uint32_t); typedef JSObject * ( *JSObjStub)(VMFrame &); typedef JSObject * ( *JSObjStubUInt32)(VMFrame &, uint32_t); typedef JSObject * ( *JSObjStubFun)(VMFrame &, JSFunction *); typedef void ( *VoidStubFun)(VMFrame &, JSFunction *); typedef JSObject * ( *JSObjStubJSObj)(VMFrame &, JSObject *); typedef void ( *VoidStubName)(VMFrame &, PropertyName *); typedef JSString * ( *JSStrStub)(VMFrame &); typedef JSString * ( *JSStrStubUInt32)(VMFrame &, uint32_t); typedef void ( *VoidStubJSObj)(VMFrame &, JSObject *); typedef void ( *VoidStubPC)(VMFrame &, jsbytecode *); typedef JSBool ( *BoolStubUInt32)(VMFrame &f, uint32_t); typedef void ( *VoidStubCallIC)(VMFrame &, js::mjit::ic::CallICInfo *); typedef void * ( *VoidPtrStubCallIC)(VMFrame &, js::mjit::ic::CallICInfo *); typedef void ( *VoidStubGetGlobal)(VMFrame &, js::mjit::ic::GetGlobalNameIC *); typedef void ( *VoidStubSetGlobal)(VMFrame &, js::mjit::ic::SetGlobalNameIC *); typedef JSBool ( *BoolStubEqualityIC)(VMFrame &, js::mjit::ic::EqualityICInfo *); typedef void ( *VoidStubPIC)(VMFrame &, js::mjit::ic::PICInfo *); typedef void ( *VoidStubGetElemIC)(VMFrame &, js::mjit::ic::GetElementIC *); typedef void ( *VoidStubSetElemIC)(VMFrame &f, js::mjit::ic::SetElementIC *); namespace mjit { struct InlineFrame; struct CallSite; struct NativeMapEntry { size_t bcOff; void *ncode; }; struct PCLengthEntry { double codeLength; double picsLength; }; struct NativeCallStub { jsbytecode *pc; JSC::ExecutablePool *pool; # 624 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" JSC::CodeLocationJump jump; }; struct JITChunk { typedef JSC::MacroAssemblerCodeRef CodeRef; CodeRef code; PCLengthEntry *pcLengths; # 643 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" uint32_t nNmapPairs : 31; uint32_t nInlineFrames; uint32_t nCallSites; uint32_t nRootedTemplates; uint32_t nRootedRegExps; uint32_t nGetGlobalNames; uint32_t nSetGlobalNames; uint32_t nCallICs; uint32_t nEqualityICs; uint32_t nGetElems; uint32_t nSetElems; uint32_t nPICs; typedef Vector ExecPoolVector; ExecPoolVector execPools; Vector nativeCallStubs; NativeMapEntry *nmap() const; js::mjit::InlineFrame *inlineFrames() const; js::mjit::CallSite *callSites() const; JSObject **rootedTemplates() const; RegExpShared **rootedRegExps() const; ic::GetGlobalNameIC *getGlobalNames() const; ic::SetGlobalNameIC *setGlobalNames() const; ic::CallICInfo *callICs() const; ic::EqualityICInfo *equalityICs() const; ic::GetElementIC *getElems() const; ic::SetElementIC *setElems() const; ic::PICInfo *pics() const; bool isValidCode(void *ptr) { char *jitcode = (char *)code.m_code.executableAddress(); char *jcheck = (char *)ptr; return jcheck >= jitcode && jcheck < jitcode + code.m_size; } size_t computedSizeOfIncludingThis(); size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf); ~JITChunk(); void trace(JSTracer *trc); void purgeCaches(); private: char *commonSectionLimit() const; char *monoICSectionsLimit() const; char *polyICSectionsLimit() const; }; void SetChunkLimit(uint32_t limit); struct ChunkDescriptor { uint32_t begin; uint32_t end; uint32_t counter; JITChunk *chunk; ChunkDescriptor() { PodZero(this); } }; struct CrossChunkEdge { uint32_t source; uint32_t target; void *sourceJump1; void *sourceJump2; # 747 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" typedef Vector JumpTableEntryVector; JumpTableEntryVector *jumpTableEntries; void *targetLabel; void *shimLabel; CrossChunkEdge() { PodZero(this); } }; struct JITScript { JSScript *script; void *invokeEntry; void *fastEntry; void *arityCheckEntry; void *argsCheckEntry; JSCList callers; uint32_t nchunks; uint32_t nedges; JSC::ExecutablePool *shimPool; JSC::CodeLocationLabel argsCheckStub; JSC::CodeLocationLabel argsCheckFallthrough; JSC::CodeLocationJump argsCheckJump; JSC::ExecutablePool *argsCheckPool; void resetArgsCheck(); ChunkDescriptor &chunkDescriptor(unsigned i) { do { } while(0); ChunkDescriptor *descs = (ChunkDescriptor *) ((char *) this + sizeof(JITScript)); return descs[i]; } unsigned chunkIndex(jsbytecode *pc) { unsigned offset = pc - script->code; do { } while(0); for (unsigned i = 0; i < nchunks; i++) { const ChunkDescriptor &desc = chunkDescriptor(i); do { } while(0); if (offset < desc.end) return i; } __builtin_unreachable(); return 0; } JITChunk *chunk(jsbytecode *pc) { return chunkDescriptor(chunkIndex(pc)).chunk; } JITChunk *findCodeChunk(void *addr); CrossChunkEdge *edges() { return (CrossChunkEdge *) (&chunkDescriptor(0) + nchunks); } void patchEdge(const CrossChunkEdge &edge, void *label); jsbytecode *nativeToPC(void *returnAddress, CallSite **pinline); size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf); void destroy(FreeOp *fop); void destroyChunk(FreeOp *fop, unsigned chunkIndex, bool resetUses = true); void trace(JSTracer *trc); void purgeCaches(); }; JaegerStatus EnterMethodJIT(JSContext *cx, StackFrame *fp, void *code, Value *stackLimit, bool partial); JaegerStatus JaegerShot(JSContext *cx, bool partial); JaegerStatus JaegerShotAtSafePoint(JSContext *cx, void *safePoint, bool partial); enum CompileStatus { Compile_Okay, Compile_Abort, Compile_InlineAbort, Compile_Retry, Compile_Error, Compile_Skipped }; void ProfileStubCall(VMFrame &f); enum CompileRequest { CompileRequest_Interpreter, CompileRequest_JIT }; CompileStatus CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc, bool construct, CompileRequest request); inline void ReleaseScriptCode(FreeOp *fop, JSScript *script) { if (!script->hasJITInfo()) return; for (int constructing = 0; constructing <= 1; constructing++) { for (int barriers = 0; barriers <= 1; barriers++) { JSScript::JITScriptHandle *jith = script->jitHandle((bool) constructing, (bool) barriers); if (jith && jith->isValid()) JSScript::ReleaseCode(fop, jith); } } script->destroyJITInfo(fop); } void ExpandInlineFrames(JSCompartment *compartment); void ClearAllFrames(JSCompartment *compartment); struct InlineFrame { InlineFrame *parent; jsbytecode *parentpc; HeapPtrFunction fun; uint32_t depth; }; struct CallSite { uint32_t codeOffset; uint32_t inlineIndex; uint32_t pcOffset; RejoinState rejoin; void initialize(uint32_t codeOffset, uint32_t inlineIndex, uint32_t pcOffset, RejoinState rejoin) { this->codeOffset = codeOffset; this->inlineIndex = inlineIndex; this->pcOffset = pcOffset; this->rejoin = rejoin; } bool isTrap() const { return rejoin == REJOIN_TRAP; } }; void DumpAllProfiles(JSContext *cx); inline void * bsearch_nmap(NativeMapEntry *nmap, size_t nPairs, size_t bcOff) { size_t lo = 1, hi = nPairs; while (1) { if (lo > hi) return __null; size_t mid = (lo + hi) / 2; size_t bcOff_mid = nmap[mid-1].bcOff; if (bcOff < bcOff_mid) { hi = mid-1; continue; } if (bcOff > bcOff_mid) { lo = mid+1; continue; } return nmap[mid-1].ncode; } } static inline bool IsLowerableFunCallOrApply(jsbytecode *pc) { return (*pc == JSOP_FUNCALL && ((unsigned)(((pc)[1] << 8) | (pc)[2])) >= 1) || (*pc == JSOP_FUNAPPLY && ((unsigned)(((pc)[1] << 8) | (pc)[2])) == 2); } } inline mjit::JITChunk * VMFrame::chunk() { return jit()->chunk(regs.pc); } inline unsigned VMFrame::chunkIndex() { return jit()->chunkIndex(regs.pc); } inline JSScript * VMFrame::script() { if (regs.inlined()) return chunk()->inlineFrames()[regs.inlined()->inlineIndex].fun->script(); return fp()->script(); } inline jsbytecode * VMFrame::pc() { if (regs.inlined()) return script()->code + regs.inlined()->pcOffset; return regs.pc; } } inline void * JSScript::nativeCodeForPC(bool constructing, jsbytecode *pc) { js::mjit::JITScript *jit = getJIT(constructing, compartment()->needsBarrier()); if (!jit) return __null; js::mjit::JITChunk *chunk = jit->chunk(pc); if (!chunk) return __null; return bsearch_nmap(chunk->nmap(), chunk->nNmapPairs, (size_t)(pc - code)); } extern "C" void JaegerTrampolineReturn(); extern "C" void JaegerInterpoline(); extern "C" void JaegerInterpolineScripted(); extern "C" void JaegerThrowpoline(); # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" #define ObjectImpl_inl_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" #define jsinterp_h___ # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" namespace js { inline bool ScriptPrologue(JSContext *cx, StackFrame *fp, JSScript *script); inline bool ScriptEpilogue(JSContext *cx, StackFrame *fp, bool ok); # 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" inline bool ScriptPrologueOrGeneratorResume(JSContext *cx, StackFrame *fp); inline bool ScriptEpilogueOrGeneratorYield(JSContext *cx, StackFrame *fp, bool ok); # 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" extern JSTrapStatus ScriptDebugPrologue(JSContext *cx, StackFrame *fp); # 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" extern bool ScriptDebugEpilogue(JSContext *cx, StackFrame *fp, bool ok); extern bool BoxNonStrictThis(JSContext *cx, const CallReceiver &call); inline bool ComputeThis(JSContext *cx, StackFrame *fp); enum MaybeConstruct { NO_CONSTRUCT = INITIAL_NONE, CONSTRUCT = INITIAL_CONSTRUCT }; extern bool InvokeKernel(JSContext *cx, CallArgs args, MaybeConstruct construct = NO_CONSTRUCT); inline bool Invoke(JSContext *cx, InvokeArgsGuard &args, MaybeConstruct construct = NO_CONSTRUCT) { args.setActive(); bool ok = InvokeKernel(cx, args, construct); args.setInactive(); return ok; } extern bool Invoke(JSContext *cx, const Value &thisv, const Value &fval, unsigned argc, Value *argv, Value *rval); extern bool InvokeGetterOrSetter(JSContext *cx, JSObject *obj, const Value &fval, unsigned argc, Value *argv, Value *rval); extern bool InvokeConstructorKernel(JSContext *cx, const CallArgs &args); inline bool InvokeConstructor(JSContext *cx, InvokeArgsGuard &args) { args.setActive(); bool ok = InvokeConstructorKernel(cx, ImplicitCast(args)); args.setInactive(); return ok; } extern bool InvokeConstructor(JSContext *cx, const Value &fval, unsigned argc, Value *argv, Value *rval); extern bool ExecuteKernel(JSContext *cx, JSScript *script, JSObject &scopeChain, const Value &thisv, ExecuteType type, StackFrame *evalInFrame, Value *result); extern bool Execute(JSContext *cx, JSScript *script, JSObject &scopeChain, Value *rval); enum InterpMode { JSINTERP_NORMAL = 0, JSINTERP_REJOIN = 1, JSINTERP_SKIP_TRAP = 2 }; extern __attribute__((noinline)) bool Interpret(JSContext *cx, StackFrame *stopFp, InterpMode mode = JSINTERP_NORMAL); extern bool RunScript(JSContext *cx, JSScript *script, StackFrame *fp); extern bool StrictlyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal); extern bool LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal); extern bool SameValue(JSContext *cx, const Value &v1, const Value &v2, bool *same); extern JSType TypeOfValue(JSContext *cx, const Value &v); extern JSBool HasInstance(JSContext *cx, HandleObject obj, const js::Value *v, JSBool *bp); # 239 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" class InterpreterFrames { public: class InterruptEnablerBase { public: virtual void enableInterrupts() const = 0; }; InterpreterFrames(JSContext *cx, FrameRegs *regs, const InterruptEnablerBase &enabler); ~InterpreterFrames(); inline void enableInterruptsIfRunning(JSScript *script); InterpreterFrames *older; private: JSContext *context; FrameRegs *regs; const InterruptEnablerBase &enabler; }; extern void UnwindScope(JSContext *cx, uint32_t stackDepth); extern void UnwindForUncatchableException(JSContext *cx, const FrameRegs ®s); extern bool OnUnknownMethod(JSContext *cx, HandleObject obj, Value idval, Value *vp); inline void AssertValidFunctionScopeChainAtExit(StackFrame *fp); class TryNoteIter { const FrameRegs ®s; JSScript *script; uint32_t pcOffset; JSTryNote *tn, *tnEnd; void settle(); public: TryNoteIter(const FrameRegs ®s); bool done() const; void operator++(); JSTryNote *operator*() const { return tn; } }; # 302 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" static __attribute__((always_inline)) inline void Debug_SetValueRangeToCrashOnTouch(Value *beg, Value *end) { } static __attribute__((always_inline)) inline void Debug_SetValueRangeToCrashOnTouch(Value *vec, size_t len) { } static __attribute__((always_inline)) inline void Debug_SetValueRangeToCrashOnTouch(HeapValue *vec, size_t len) { } } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 1 #define gc_marking_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 1 # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 2 extern "C" { struct JSContext; struct JSFunction; struct JSObject; struct JSScript; } class JSAtom; class JSLinearString; namespace js { class ArgumentsObject; class BaseShape; class GlobalObject; class UnownedBaseShape; struct Shape; template class HeapPtr; namespace gc { # 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" #define DeclMarker(base,type) void Mark ##base(JSTracer *trc, HeapPtr *thing, const char *name); void Mark ##base ##Root(JSTracer *trc, type **thingp, const char *name); void Mark ##base ##Unbarriered(JSTracer *trc, type **thingp, const char *name); void Mark ##base ##Range(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void Mark ##base ##RootRange(JSTracer *trc, size_t len, type **thing, const char *name); bool Is ##base ##Marked(type **thingp); bool Is ##base ##Marked(HeapPtr *thingp); # 74 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" void MarkBaseShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkBaseShapeRoot(JSTracer *trc, BaseShape **thingp, const char *name); void MarkBaseShapeUnbarriered(JSTracer *trc, BaseShape **thingp, const char *name); void MarkBaseShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkBaseShapeRootRange(JSTracer *trc, size_t len, BaseShape **thing, const char *name); bool IsBaseShapeMarked(BaseShape **thingp); bool IsBaseShapeMarked(HeapPtr *thingp); void MarkBaseShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkBaseShapeRoot(JSTracer *trc, UnownedBaseShape **thingp, const char *name); void MarkBaseShapeUnbarriered(JSTracer *trc, UnownedBaseShape **thingp, const char *name); void MarkBaseShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkBaseShapeRootRange(JSTracer *trc, size_t len, UnownedBaseShape **thing, const char *name); bool IsBaseShapeMarked(UnownedBaseShape **thingp); bool IsBaseShapeMarked(HeapPtr *thingp); void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, ArgumentsObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, ArgumentsObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, ArgumentsObject **thing, const char *name); bool IsObjectMarked(ArgumentsObject **thingp); bool IsObjectMarked(HeapPtr *thingp); void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, DebugScopeObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, DebugScopeObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, DebugScopeObject **thing, const char *name); bool IsObjectMarked(DebugScopeObject **thingp); bool IsObjectMarked(HeapPtr *thingp); void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, GlobalObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, GlobalObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, GlobalObject **thing, const char *name); bool IsObjectMarked(GlobalObject **thingp); bool IsObjectMarked(HeapPtr *thingp); void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, JSObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, JSObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, JSObject **thing, const char *name); bool IsObjectMarked(JSObject **thingp); bool IsObjectMarked(HeapPtr *thingp); void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, JSFunction **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, JSFunction **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, JSFunction **thing, const char *name); bool IsObjectMarked(JSFunction **thingp); bool IsObjectMarked(HeapPtr *thingp); void MarkScript(JSTracer *trc, HeapPtr *thing, const char *name); void MarkScriptRoot(JSTracer *trc, JSScript **thingp, const char *name); void MarkScriptUnbarriered(JSTracer *trc, JSScript **thingp, const char *name); void MarkScriptRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkScriptRootRange(JSTracer *trc, size_t len, JSScript **thing, const char *name); bool IsScriptMarked(JSScript **thingp); bool IsScriptMarked(HeapPtr *thingp); void MarkShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkShapeRoot(JSTracer *trc, Shape **thingp, const char *name); void MarkShapeUnbarriered(JSTracer *trc, Shape **thingp, const char *name); void MarkShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkShapeRootRange(JSTracer *trc, size_t len, Shape **thing, const char *name); bool IsShapeMarked(Shape **thingp); bool IsShapeMarked(HeapPtr *thingp); void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSAtom **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSAtom **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSAtom **thing, const char *name); bool IsStringMarked(JSAtom **thingp); bool IsStringMarked(HeapPtr *thingp); void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSString **thing, const char *name); bool IsStringMarked(JSString **thingp); bool IsStringMarked(HeapPtr *thingp); void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSFlatString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSFlatString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSFlatString **thing, const char *name); bool IsStringMarked(JSFlatString **thingp); bool IsStringMarked(HeapPtr *thingp); void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSLinearString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSLinearString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSLinearString **thing, const char *name); bool IsStringMarked(JSLinearString **thingp); bool IsStringMarked(HeapPtr *thingp); void MarkTypeObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkTypeObjectRoot(JSTracer *trc, types::TypeObject **thingp, const char *name); void MarkTypeObjectUnbarriered(JSTracer *trc, types::TypeObject **thingp, const char *name); void MarkTypeObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkTypeObjectRootRange(JSTracer *trc, size_t len, types::TypeObject **thing, const char *name); bool IsTypeObjectMarked(types::TypeObject **thingp); bool IsTypeObjectMarked(HeapPtr *thingp); void MarkXML(JSTracer *trc, HeapPtr *thing, const char *name); void MarkXMLRoot(JSTracer *trc, JSXML **thingp, const char *name); void MarkXMLUnbarriered(JSTracer *trc, JSXML **thingp, const char *name); void MarkXMLRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkXMLRootRange(JSTracer *trc, size_t len, JSXML **thing, const char *name); bool IsXMLMarked(JSXML **thingp); bool IsXMLMarked(HeapPtr *thingp); #undef DeclMarker # 101 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" void MarkKind(JSTracer *trc, void **thingp, JSGCTraceKind kind); void MarkGCThingRoot(JSTracer *trc, void **thingp, const char *name); void MarkId(JSTracer *trc, EncapsulatedId *id, const char *name); void MarkIdRoot(JSTracer *trc, jsid *id, const char *name); void MarkIdUnbarriered(JSTracer *trc, jsid *id, const char *name); void MarkIdRange(JSTracer *trc, size_t len, HeapId *vec, const char *name); void MarkIdRootRange(JSTracer *trc, size_t len, jsid *vec, const char *name); void MarkValue(JSTracer *trc, EncapsulatedValue *v, const char *name); void MarkValueRange(JSTracer *trc, size_t len, EncapsulatedValue *vec, const char *name); void MarkValueRoot(JSTracer *trc, Value *v, const char *name); void MarkValueRootRange(JSTracer *trc, size_t len, Value *vec, const char *name); inline void MarkValueRootRange(JSTracer *trc, Value *begin, Value *end, const char *name) { MarkValueRootRange(trc, end - begin, begin, name); } bool IsValueMarked(Value *v); void MarkSlot(JSTracer *trc, HeapSlot *s, const char *name); void MarkArraySlots(JSTracer *trc, size_t len, HeapSlot *vec, const char *name); void MarkObjectSlots(JSTracer *trc, JSObject *obj, uint32_t start, uint32_t nslots); void MarkCrossCompartmentObjectUnbarriered(JSTracer *trc, JSObject **obj, const char *name); void MarkCrossCompartmentScriptUnbarriered(JSTracer *trc, JSScript **script, const char *name); void MarkCrossCompartmentSlot(JSTracer *trc, HeapSlot *s, const char *name); # 178 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" void MarkObject(JSTracer *trc, HeapPtr *thingp, const char *name); void MarkValueUnbarriered(JSTracer *trc, Value *v, const char *name); void MarkChildren(JSTracer *trc, JSObject *obj); void MarkCycleCollectorChildren(JSTracer *trc, Shape *shape); void PushArena(GCMarker *gcmarker, ArenaHeader *aheader); # 210 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" inline void Mark(JSTracer *trc, HeapValue *v, const char *name) { MarkValue(trc, v, name); } inline void Mark(JSTracer *trc, HeapPtr *o, const char *name) { MarkObject(trc, o, name); } inline void Mark(JSTracer *trc, HeapPtr *o, const char *name) { MarkScript(trc, o, name); } inline void Mark(JSTracer *trc, HeapPtr *xml, const char *name) { MarkXML(trc, xml, name); } bool IsCellMarked(Cell **thingp); inline bool IsMarked(EncapsulatedValue *v) { if (!v->isMarkable()) return true; return IsValueMarked(v->unsafeGet()); } inline bool IsMarked(HeapPtrObject *objp) { return IsObjectMarked(objp); } inline bool IsMarked(HeapPtrScript *scriptp) { return IsScriptMarked(scriptp); } inline Cell * ToMarkable(const Value &v) { if (v.isMarkable()) return (Cell *)v.toGCThing(); return __null; } inline Cell * ToMarkable(Cell *cell) { return cell; } inline JSGCTraceKind TraceKind(const Value &v) { do { } while(0); if (v.isObject()) return JSTRACE_OBJECT; return JSTRACE_STRING; } inline JSGCTraceKind TraceKind(JSObject *obj) { return JSTRACE_OBJECT; } inline JSGCTraceKind TraceKind(JSScript *script) { return JSTRACE_SCRIPT; } } void TraceChildren(JSTracer *trc, void *thing, JSGCTraceKind kind); void CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind); } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 1 # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 namespace js { static __attribute__((always_inline)) inline void Debug_SetSlotRangeToCrashOnTouch(HeapSlot *vec, uint32_t len) { } static __attribute__((always_inline)) inline void Debug_SetSlotRangeToCrashOnTouch(HeapSlot *begin, HeapSlot *end) { } } inline bool js::ObjectImpl::isExtensible() const { return !lastProperty()->hasObjectFlag(BaseShape::NOT_EXTENSIBLE); } inline bool js::ObjectImpl::isDenseArray() const { bool result = hasClass(&ArrayClass); do { } while (0); return result; } inline bool js::ObjectImpl::isSlowArray() const { bool result = hasClass(&SlowArrayClass); do { } while (0); return result; } inline bool js::ObjectImpl::isArray() const { return isSlowArray() || isDenseArray(); } inline uint32_t js::ObjectImpl::getDenseArrayInitializedLength() { do { } while(0); return getElementsHeader()->initializedLength; } inline js::HeapSlotArray js::ObjectImpl::getDenseArrayElements() { do { } while(0); return HeapSlotArray(elements); } inline const js::Value & js::ObjectImpl::getDenseArrayElement(uint32_t idx) { do { } while(0); return elements[idx]; } inline void js::ObjectImpl::getSlotRangeUnchecked(uint32_t start, uint32_t length, HeapSlot **fixedStart, HeapSlot **fixedEnd, HeapSlot **slotsStart, HeapSlot **slotsEnd) { do { } while(0); do { } while(0); uint32_t fixed = numFixedSlots(); if (start < fixed) { if (start + length < fixed) { *fixedStart = &fixedSlots()[start]; *fixedEnd = &fixedSlots()[start + length]; *slotsStart = *slotsEnd = __null; } else { uint32_t localCopy = fixed - start; *fixedStart = &fixedSlots()[start]; *fixedEnd = &fixedSlots()[start + localCopy]; *slotsStart = &slots[0]; *slotsEnd = &slots[length - localCopy]; } } else { *fixedStart = *fixedEnd = __null; *slotsStart = &slots[start - fixed]; *slotsEnd = &slots[start - fixed + length]; } } inline void js::ObjectImpl::getSlotRange(uint32_t start, uint32_t length, HeapSlot **fixedStart, HeapSlot **fixedEnd, HeapSlot **slotsStart, HeapSlot **slotsEnd) { do { } while(0); getSlotRangeUnchecked(start, length, fixedStart, fixedEnd, slotsStart, slotsEnd); } inline bool js::ObjectImpl::hasContiguousSlots(uint32_t start, uint32_t count) const { do { } while(0); return start + count <= numFixedSlots() || start >= numFixedSlots(); } inline void js::ObjectImpl::invalidateSlotRange(uint32_t start, uint32_t length) { # 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" } inline void js::ObjectImpl::initializeSlotRange(uint32_t start, uint32_t length) { HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; getSlotRangeUnchecked(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); JSCompartment *comp = compartment(); uint32_t offset = start; for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue()); for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue()); } inline bool js::ObjectImpl::isNative() const { return lastProperty()->isNative(); } inline js::HeapSlot & js::ObjectImpl::nativeGetSlotRef(uint32_t slot) { do { } while(0); do { } while(0); return getSlotRef(slot); } inline const js::Value & js::ObjectImpl::nativeGetSlot(uint32_t slot) const { do { } while(0); do { } while(0); return getSlot(slot); } inline void js::ObjectImpl::setSlot(uint32_t slot, const js::Value &value) { do { } while(0); getSlotRef(slot).set(this->asObjectPtr(), slot, value); } inline void js::ObjectImpl::initSlot(uint32_t slot, const js::Value &value) { do { } while(0); do { } while(0); initSlotUnchecked(slot, value); } inline void js::ObjectImpl::initSlotUnchecked(uint32_t slot, const js::Value &value) { getSlotAddressUnchecked(slot)->init(this->asObjectPtr(), slot, value); } inline void js::ObjectImpl::setFixedSlot(uint32_t slot, const js::Value &value) { do { } while(0); fixedSlots()[slot].set(this->asObjectPtr(), slot, value); } inline void js::ObjectImpl::initFixedSlot(uint32_t slot, const js::Value &value) { do { } while(0); fixedSlots()[slot].init(this->asObjectPtr(), slot, value); } inline uint32_t js::ObjectImpl::slotSpan() const { if (inDictionaryMode()) return lastProperty()->base()->slotSpan(); return lastProperty()->slotSpan(); } inline uint32_t js::ObjectImpl::numDynamicSlots() const { return dynamicSlotsCount(numFixedSlots(), slotSpan()); } inline js::Class * js::ObjectImpl::getClass() const { return lastProperty()->getObjectClass(); } inline JSClass * js::ObjectImpl::getJSClass() const { return Jsvalify(getClass()); } inline bool js::ObjectImpl::hasClass(const Class *c) const { return getClass() == c; } inline const js::ObjectOps * js::ObjectImpl::getOps() const { return &getClass()->ops; } inline bool js::ObjectImpl::isDelegate() const { return lastProperty()->hasObjectFlag(BaseShape::DELEGATE); } inline bool js::ObjectImpl::inDictionaryMode() const { return lastProperty()->inDictionary(); } inline uint32_t js::ObjectImpl::dynamicSlotsCount(uint32_t nfixed, uint32_t span) { if (span <= nfixed) return 0; span -= nfixed; if (span <= SLOT_CAPACITY_MIN) return SLOT_CAPACITY_MIN; uint32_t slots = RoundUpPow2(span); do { } while(0); return slots; } inline size_t js::ObjectImpl::sizeOfThis() const { return arenaHeader()->getThingSize(); } inline void js::ObjectImpl::readBarrier(ObjectImpl *obj) { JSCompartment *comp = obj->compartment(); if (comp->needsBarrier()) { do { } while(0); JSObject *tmp = obj->asObjectPtr(); MarkObjectUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); do { } while(0); } } inline void js::ObjectImpl::privateWriteBarrierPre(void **old) { JSCompartment *comp = compartment(); if (comp->needsBarrier()) { if (*old && getClass()->trace) getClass()->trace(comp->barrierTracer(), this->asObjectPtr()); } } inline void js::ObjectImpl::privateWriteBarrierPost(void **old) { } inline void js::ObjectImpl::writeBarrierPre(ObjectImpl *obj) { if (uintptr_t(obj) < 32) return; JSCompartment *comp = obj->compartment(); if (comp->needsBarrier()) { do { } while(0); JSObject *tmp = obj->asObjectPtr(); MarkObjectUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void js::ObjectImpl::writeBarrierPost(ObjectImpl *obj, void *addr) { } inline bool js::ObjectImpl::hasPrivate() const { return getClass()->hasPrivate(); } inline void *& js::ObjectImpl::privateRef(uint32_t nfixed) const { do { } while(0); do { } while(0); HeapSlot *end = &fixedSlots()[nfixed]; return *reinterpret_cast(end); } inline void * js::ObjectImpl::getPrivate() const { return privateRef(numFixedSlots()); } inline void * js::ObjectImpl::getPrivate(uint32_t nfixed) const { return privateRef(nfixed); } inline void js::ObjectImpl::setPrivate(void *data) { void **pprivate = &privateRef(numFixedSlots()); privateWriteBarrierPre(pprivate); *pprivate = data; privateWriteBarrierPost(pprivate); } inline void js::ObjectImpl::setPrivateUnbarriered(void *data) { void **pprivate = &privateRef(numFixedSlots()); *pprivate = data; } inline void js::ObjectImpl::initPrivate(void *data) { privateRef(numFixedSlots()) = data; } # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 2 namespace js { namespace mjit { struct NativeAddressInfo; struct JSActiveFrame; } namespace Probes { # 64 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" extern bool ProfilingActive; extern const char nullName[]; extern const char anonymousName[]; JSBool startEngine(); bool createRuntime(JSRuntime *rt); bool destroyRuntime(JSRuntime *rt); bool shutdown(); bool callTrackingActive(JSContext *); bool wantNativeAddressInfo(JSContext *); bool enterJSFun(JSContext *, JSFunction *, JSScript *, int counter = 1); bool exitJSFun(JSContext *, JSFunction *, JSScript *, int counter = 0); bool startExecution(JSContext *cx, JSScript *script); bool stopExecution(JSContext *cx, JSScript *script); bool resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize); bool createObject(JSContext *cx, JSObject *obj); bool objectResizeActive(); bool resizeObject(JSContext *cx, JSObject *obj, size_t oldSize, size_t newSize); bool finalizeObject(JSObject *obj); # 134 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" bool createString(JSContext *cx, JSString *string, size_t length); bool finalizeString(JSString *string); bool compileScriptBegin(const char *filename, int lineno); bool compileScriptEnd(const char *filename, int lineno); bool calloutBegin(JSContext *cx, JSFunction *fun); bool calloutEnd(JSContext *cx, JSFunction *fun); bool acquireMemory(JSContext *cx, void *address, size_t nbytes); bool releaseMemory(JSContext *cx, void *address, size_t nbytes); # 170 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" bool GCStart(); bool GCEnd(); bool GCStartMarkPhase(); bool GCEndMarkPhase(); bool GCStartSweepPhase(); bool GCEndSweepPhase(); # 187 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" bool CustomMark(JSString *string); bool CustomMark(const char *string); bool CustomMark(int marker); enum JITReportGranularity { JITREPORT_GRANULARITY_NONE = 0, JITREPORT_GRANULARITY_FUNCTION = 1, JITREPORT_GRANULARITY_LINE = 2, JITREPORT_GRANULARITY_OP = 3 }; class JITWatcher { public: struct NativeRegion { mjit::JSActiveFrame *frame; JSScript *script; size_t inlinedOffset; jsbytecode *pc; jsbytecode *endpc; uintptr_t mainOffset; uintptr_t stubOffset; bool enter; }; typedef Vector RegionVector; virtual JITReportGranularity granularityRequested() = 0; static bool CollectNativeRegions(RegionVector ®ions, JSRuntime *rt, mjit::JITChunk *jit, mjit::JSActiveFrame *outerFrame, mjit::JSActiveFrame **inlineFrames); virtual void registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk, mjit::JSActiveFrame *outerFrame, mjit::JSActiveFrame **inlineFrames, void *mainCodeAddress, size_t mainCodeSize, void *stubCodeAddress, size_t stubCodeSize) = 0; virtual void discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, void* address) = 0; virtual void registerICCode(JSContext *cx, js::mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc, void *start, size_t size) = 0; virtual void discardExecutableRegion(void *start, size_t size) = 0; }; bool addJITWatcher(JITWatcher *watcher); bool removeJITWatcher(JSRuntime *rt, JITWatcher *watcher); void removeAllJITWatchers(JSRuntime *rt); JITReportGranularity JITGranularityRequested(); void registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk, mjit::JSActiveFrame *outerFrame, mjit::JSActiveFrame **inlineFrames, void *mainCodeAddress, size_t mainCodeSize, void *stubCodeAddress, size_t stubCodeSize); void discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, void* address); void registerICCode(JSContext *cx, mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc, void *start, size_t size); void discardExecutableRegion(void *start, size_t size); void DTraceEnterJSFun(JSContext *cx, JSFunction *fun, JSScript *script); void DTraceExitJSFun(JSContext *cx, JSFunction *fun, JSScript *script); # 350 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" } inline bool Probes::callTrackingActive(JSContext *cx) { # 372 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return false; } inline bool Probes::wantNativeAddressInfo(JSContext *cx) { return (cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION && JITGranularityRequested() >= JITREPORT_GRANULARITY_FUNCTION); } inline bool Probes::enterJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter) { bool ok = true; # 398 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return ok; } inline bool Probes::exitJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter) { bool ok = true; # 420 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return ok; } inline bool Probes::resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize) { bool ok = true; return ok; } # 450 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" inline bool Probes::createObject(JSContext *cx, JSObject *obj) { bool ok = true; # 464 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return ok; } inline bool Probes::finalizeObject(JSObject *obj) { bool ok = true; # 485 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return ok; } inline bool Probes::objectResizeActive() { return false; } inline bool Probes::resizeObject(JSContext *cx, JSObject *obj, size_t oldSize, size_t newSize) { bool ok = true; return ok; } inline bool Probes::createString(JSContext *cx, JSString *string, size_t length) { bool ok = true; return ok; } inline bool Probes::finalizeString(JSString *string) { bool ok = true; return ok; } inline bool Probes::compileScriptBegin(const char *filename, int lineno) { bool ok = true; return ok; } inline bool Probes::compileScriptEnd(const char *filename, int lineno) { bool ok = true; return ok; } inline bool Probes::calloutBegin(JSContext *cx, JSFunction *fun) { bool ok = true; return ok; } inline bool Probes::calloutEnd(JSContext *cx, JSFunction *fun) { bool ok = true; return ok; } inline bool Probes::acquireMemory(JSContext *cx, void *address, size_t nbytes) { bool ok = true; return ok; } inline bool Probes::releaseMemory(JSContext *cx, void *address, size_t nbytes) { bool ok = true; return ok; } inline bool Probes::GCStart() { bool ok = true; return ok; } inline bool Probes::GCEnd() { bool ok = true; return ok; } inline bool Probes::GCStartMarkPhase() { bool ok = true; return ok; } inline bool Probes::GCEndMarkPhase() { bool ok = true; return ok; } inline bool Probes::GCStartSweepPhase() { bool ok = true; return ok; } inline bool Probes::GCEndSweepPhase() { bool ok = true; return ok; } inline bool Probes::CustomMark(JSString *string) { bool ok = true; return ok; } inline bool Probes::CustomMark(const char *string) { bool ok = true; return ok; } inline bool Probes::CustomMark(int marker) { bool ok = true; return ok; } inline bool Probes::startExecution(JSContext *cx, JSScript *script) { bool ok = true; # 748 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return ok; } inline bool Probes::stopExecution(JSContext *cx, JSScript *script) { bool ok = true; # 766 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" return ok; } struct AutoFunctionCallProbe { JSContext * const cx; JSFunction *fun; JSScript *script; AutoFunctionCallProbe(JSContext *cx, JSFunction *fun, JSScript *script ) : cx(cx), fun(fun), script(script) { do { } while (0); Probes::enterJSFun(cx, fun, script); } ~AutoFunctionCallProbe() { Probes::exitJSFun(cx, fun, script); } }; } # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproxy.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproxy.h" #define jsproxy_h___ namespace js { class __attribute__((visibility("default"))) BaseProxyHandler { void *mFamily; public: explicit BaseProxyHandler(void *family); virtual ~BaseProxyHandler(); virtual bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, PropertyDescriptor *desc) = 0; virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, PropertyDescriptor *desc) = 0; virtual bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, PropertyDescriptor *desc) = 0; virtual bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props) = 0; virtual bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp) = 0; virtual bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props) = 0; virtual bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp); virtual bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp); virtual bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp); virtual bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, Value *vp); virtual bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props); virtual bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp); virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); virtual JSType typeOf(JSContext *cx, JSObject *proxy); virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); virtual JSString *obj_toString(JSContext *cx, JSObject *proxy); virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); virtual void finalize(JSFreeOp *fop, JSObject *proxy); virtual bool getElementIfPresent(JSContext *cx, JSObject *obj, JSObject *receiver, uint32_t index, Value *vp, bool *present); virtual bool isOuterWindow() { return false; } inline void *family() { return mFamily; } }; class __attribute__((visibility("default"))) IndirectProxyHandler : public BaseProxyHandler { public: explicit IndirectProxyHandler(void *family); virtual bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, PropertyDescriptor *desc) ; virtual bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props) ; virtual bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp) ; virtual bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props) ; virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp) ; virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval) ; virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args) ; virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp) ; virtual JSType typeOf(JSContext *cx, JSObject *proxy) ; virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx) ; virtual JSString *obj_toString(JSContext *cx, JSObject *proxy) ; virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent) ; virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp) ; virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp) ; }; class __attribute__((visibility("default"))) DirectProxyHandler : public IndirectProxyHandler { public: explicit DirectProxyHandler(void *family); virtual bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp) ; virtual bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp) ; virtual bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp) ; virtual bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, Value *vp) ; virtual bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props) ; virtual bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp) ; }; class Proxy { public: static bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, PropertyDescriptor *desc); static bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, Value *vp); static bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, PropertyDescriptor *desc); static bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, Value *vp); static bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, PropertyDescriptor *desc); static bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, const Value &v); static bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props); static bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp); static bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props); static bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp); static bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp); static bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp); static bool getElementIfPresent(JSContext *cx, JSObject *proxy, JSObject *receiver, uint32_t index, Value *vp, bool *present); static bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, Value *vp); static bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props); static bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp); static bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); static bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); static bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); static bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); static JSType typeOf(JSContext *cx, JSObject *proxy); static bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); static JSString *obj_toString(JSContext *cx, JSObject *proxy); static JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); static bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); static bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); static bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); }; inline bool IsObjectProxyClass(const Class *clasp) { return clasp == &js::ObjectProxyClass || clasp == &js::OuterWindowProxyClass; } inline bool IsFunctionProxyClass(const Class *clasp) { return clasp == &js::FunctionProxyClass; } inline bool IsObjectProxy(const JSObject *obj) { return IsObjectProxyClass(GetObjectClass(obj)); } inline bool IsFunctionProxy(const JSObject *obj) { return IsFunctionProxyClass(GetObjectClass(obj)); } inline bool IsProxy(const JSObject *obj) { Class *clasp = GetObjectClass(obj); return IsObjectProxyClass(clasp) || IsFunctionProxyClass(clasp); } const uint32_t JSSLOT_PROXY_HANDLER = 0; const uint32_t JSSLOT_PROXY_PRIVATE = 1; const uint32_t JSSLOT_PROXY_EXTRA = 2; const uint32_t JSSLOT_PROXY_CALL = 4; const uint32_t JSSLOT_PROXY_CONSTRUCT = 5; inline BaseProxyHandler * GetProxyHandler(const JSObject *obj) { do { } while(0); return (BaseProxyHandler *) GetReservedSlot(obj, JSSLOT_PROXY_HANDLER).toPrivate(); } inline const Value & GetProxyPrivate(const JSObject *obj) { do { } while(0); return GetReservedSlot(obj, JSSLOT_PROXY_PRIVATE); } inline JSObject * GetProxyTargetObject(const JSObject *obj) { do { } while(0); return GetProxyPrivate(obj).toObjectOrNull(); } inline const Value & GetProxyCall(const JSObject *obj) { do { } while(0); return GetReservedSlot(obj, JSSLOT_PROXY_CALL); } inline const Value & GetProxyExtra(const JSObject *obj, size_t n) { do { } while(0); return GetReservedSlot(obj, JSSLOT_PROXY_EXTRA + n); } inline void SetProxyHandler(JSObject *obj, BaseProxyHandler *handler) { do { } while(0); SetReservedSlot(obj, JSSLOT_PROXY_HANDLER, PrivateValue(handler)); } inline void SetProxyPrivate(JSObject *obj, const Value &value) { do { } while(0); SetReservedSlot(obj, JSSLOT_PROXY_PRIVATE, value); } inline void SetProxyExtra(JSObject *obj, size_t n, const Value &extra) { do { } while(0); do { } while(0); SetReservedSlot(obj, JSSLOT_PROXY_EXTRA + n, extra); } __attribute__((visibility("default"))) JSObject * NewProxyObject(JSContext *cx, BaseProxyHandler *handler, const Value &priv, JSObject *proto, JSObject *parent, JSObject *call = __null, JSObject *construct = __null); } extern "C" { extern __attribute__((visibility("default"))) JSObject * js_InitProxyClass(JSContext *cx, JSObject *obj); } # 25 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" 1 #define jstypedarray_h typedef struct JSProperty JSProperty; namespace js { # 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" class ArrayBufferObject : public JSObject { public: static Class protoClass; static JSPropertySpec jsprops[]; static JSFunctionSpec jsfuncs[]; static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool fun_slice(JSContext *cx, unsigned argc, Value *vp); static JSBool class_constructor(JSContext *cx, unsigned argc, Value *vp); static JSObject *create(JSContext *cx, uint32_t nbytes, uint8_t *contents = __null); static JSObject *createSlice(JSContext *cx, ArrayBufferObject &arrayBuffer, uint32_t begin, uint32_t end); static void obj_trace(JSTracer *trc, JSObject *obj); static JSBool obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, JSProperty **propp); static JSBool obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, JSObject **objp, JSProperty **propp); static JSBool obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, JSObject **objp, JSProperty **propp); static JSBool obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, JSProperty **propp); static JSBool obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, const Value *v, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); static JSBool obj_defineProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, const Value *v, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); static JSBool obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, const Value *v, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); static JSBool obj_defineSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, const Value *v, PropertyOp getter, StrictPropertyOp setter, unsigned attrs); static JSBool obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, Value *vp); static JSBool obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name, Value *vp); static JSBool obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp); static JSBool obj_getElementIfPresent(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp, bool *present); static JSBool obj_getSpecial(JSContext *cx, HandleObject obj, HandleObject receiver, HandleSpecialId sid, Value *vp); static JSBool obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id, Value *vp, JSBool strict); static JSBool obj_setProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); static JSBool obj_setElement(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); static JSBool obj_setSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); static JSBool obj_getGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); static JSBool obj_getPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); static JSBool obj_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); static JSBool obj_getSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); static JSBool obj_setGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); static JSBool obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); static JSBool obj_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); static JSBool obj_setSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); static JSBool obj_deleteProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *rval, JSBool strict); static JSBool obj_deleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); static JSBool obj_deleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *rval, JSBool strict); static JSBool obj_enumerate(JSContext *cx, HandleObject obj, JSIterateOp enum_op, Value *statep, jsid *idp); static JSType obj_typeOf(JSContext *cx, HandleObject obj); bool allocateSlots(JSContext *cx, uint32_t size, uint8_t *contents = __null); inline uint32_t byteLength() const; inline uint8_t * dataPointer() const; inline bool hasData() const; }; # 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" struct TypedArray { enum { TYPE_INT8 = 0, TYPE_UINT8, TYPE_INT16, TYPE_UINT16, TYPE_INT32, TYPE_UINT32, TYPE_FLOAT32, TYPE_FLOAT64, TYPE_UINT8_CLAMPED, TYPE_MAX }; enum { FIELD_LENGTH = 0, FIELD_BYTEOFFSET, FIELD_BYTELENGTH, FIELD_TYPE, FIELD_BUFFER, FIELD_MAX, NUM_FIXED_SLOTS = 7 }; static Class classes[TYPE_MAX]; static Class protoClasses[TYPE_MAX]; static JSPropertySpec jsprops[]; static JSBool prop_getBuffer(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool prop_getByteOffset(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool prop_getLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, JSProperty **propp); static JSBool obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, JSObject **objp, JSProperty **propp); static JSBool obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, JSObject **objp, JSProperty **propp); static JSBool obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, JSProperty **propp); static JSBool obj_getGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); static JSBool obj_getPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); static JSBool obj_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); static JSBool obj_getSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); static JSBool obj_setGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); static JSBool obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); static JSBool obj_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); static JSBool obj_setSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); static uint32_t getLength(JSObject *obj); static uint32_t getByteOffset(JSObject *obj); static uint32_t getByteLength(JSObject *obj); static uint32_t getType(JSObject *obj); static ArrayBufferObject * getBuffer(JSObject *obj); static void * getDataOffset(JSObject *obj); public: static bool isArrayIndex(JSContext *cx, JSObject *obj, jsid id, uint32_t *ip = __null); static inline uint32_t slotWidth(int atype) { switch (atype) { case js::TypedArray::TYPE_INT8: case js::TypedArray::TYPE_UINT8: case js::TypedArray::TYPE_UINT8_CLAMPED: return 1; case js::TypedArray::TYPE_INT16: case js::TypedArray::TYPE_UINT16: return 2; case js::TypedArray::TYPE_INT32: case js::TypedArray::TYPE_UINT32: case js::TypedArray::TYPE_FLOAT32: return 4; case js::TypedArray::TYPE_FLOAT64: return 8; default: __builtin_unreachable(); return 0; } } static inline int slotWidth(JSObject *obj) { return slotWidth(getType(obj)); } static int lengthOffset(); static int dataOffset(); }; inline bool IsTypedArrayClass(const Class *clasp) { return &TypedArray::classes[0] <= clasp && clasp < &TypedArray::classes[TypedArray::TYPE_MAX]; } inline bool IsTypedArrayProtoClass(const Class *clasp) { return &TypedArray::protoClasses[0] <= clasp && clasp < &TypedArray::protoClasses[TypedArray::TYPE_MAX]; } inline bool IsTypedArray(JSObject *obj) { return IsTypedArrayClass(obj->getClass()); } inline bool IsTypedArrayProto(JSObject *obj) { return IsTypedArrayProtoClass(obj->getClass()); } class DataViewObject : public JSObject { static Class protoClass; static const size_t BYTEOFFSET_SLOT = 0; static const size_t BYTELENGTH_SLOT = 1; static const size_t BUFFER_SLOT = 2; public: static const size_t RESERVED_SLOTS = 3; static JSBool prop_getBuffer(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool prop_getByteOffset(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool class_constructor(JSContext *cx, unsigned argc, Value *vp); static JSBool constructWithProto(JSContext *cx, unsigned argc, Value *vp); static JSBool construct(JSContext *cx, JSObject *bufobj, const CallArgs &args, JSObject *proto); static inline DataViewObject * create(JSContext *cx, uint32_t byteOffset, uint32_t byteLength, Handle arrayBuffer, JSObject *proto); static JSBool fun_getInt8(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getUint8(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getInt16(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getUint16(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getInt32(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getUint32(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getFloat32(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_getFloat64(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setInt8(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setUint8(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setInt16(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setUint16(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setInt32(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setUint32(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setFloat32(JSContext *cx, unsigned argc, Value *vp); static JSBool fun_setFloat64(JSContext *cx, unsigned argc, Value *vp); inline uint32_t byteLength(); inline uint32_t byteOffset(); inline JSObject & arrayBuffer(); inline void *dataPointer(); inline bool hasBuffer() const; static JSObject *initClass(JSContext *cx, GlobalObject *global); bool getDataPointer(JSContext *cx, CallArgs args, size_t typeSize, uint8_t **data); template bool read(JSContext *cx, CallArgs &args, NativeType *val, const char *method); template bool write(JSContext *cx, CallArgs &args, const char *method); private: static JSPropertySpec jsprops[]; static JSFunctionSpec jsfuncs[]; }; bool IsDataView(JSObject *obj); } # 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsxml.h" 1 #define jsxml_h___ # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsxml.h" extern const char js_AnyName_str[]; extern const char js_AttributeName_str[]; extern const char js_isXMLName_str[]; extern const char js_XMLList_str[]; extern const char js_amp_entity_str[]; extern const char js_gt_entity_str[]; extern const char js_lt_entity_str[]; extern const char js_quot_entity_str[]; template struct JSXMLArrayCursor; template struct JSXMLArray { uint32_t length; uint32_t capacity; js::HeapPtr *vector; JSXMLArrayCursor *cursors; void init() { length = capacity = 0; vector = __null; cursors = __null; } void finish(js::FreeOp *fop); bool setCapacity(JSContext *cx, uint32_t capacity); void trim(); }; template struct JSXMLArrayCursor { typedef js::HeapPtr HeapPtrT; JSXMLArray *array; uint32_t index; JSXMLArrayCursor *next; JSXMLArrayCursor **prevp; HeapPtrT root; JSXMLArrayCursor(JSXMLArray *array) : array(array), index(0), next(array->cursors), prevp(&array->cursors), root(__null) { if (next) next->prevp = &next; array->cursors = this; } ~JSXMLArrayCursor() { disconnect(); } void disconnect() { if (!array) return; if (next) next->prevp = prevp; *prevp = next; array = __null; root.~HeapPtrT(); } T *getNext() { if (!array || index >= array->length) return __null; return root = array->vector[index++]; } T *getCurrent() { if (!array || index >= array->length) return __null; return root = array->vector[index]; } }; void js_XMLArrayCursorTrace(JSTracer *trc, JSXMLArrayCursor *cursor); void js_XMLArrayCursorTrace(JSTracer *trc, JSXMLArrayCursor *cursor); #define JSXML_PRESET_CAPACITY JS_BIT(31) #define JSXML_CAPACITY_MASK JS_BITMASK(31) #define JSXML_CAPACITY(array) ((array)->capacity & JSXML_CAPACITY_MASK) typedef enum JSXMLClass { JSXML_CLASS_LIST, JSXML_CLASS_ELEMENT, JSXML_CLASS_ATTRIBUTE, JSXML_CLASS_PROCESSING_INSTRUCTION, JSXML_CLASS_TEXT, JSXML_CLASS_COMMENT, JSXML_CLASS_LIMIT } JSXMLClass; #define JSXML_CLASS_HAS_KIDS(class_) ((class_) < JSXML_CLASS_ATTRIBUTE) #define JSXML_CLASS_HAS_VALUE(class_) ((class_) >= JSXML_CLASS_ATTRIBUTE) #define JSXML_CLASS_HAS_NAME(class_) ((unsigned)((class_) - JSXML_CLASS_ELEMENT) <= (unsigned)(JSXML_CLASS_PROCESSING_INSTRUCTION - JSXML_CLASS_ELEMENT)) typedef struct JSXMLListVar { JSXMLArray kids; js::HeapPtrXML target; js::HeapPtrObject targetprop; } JSXMLListVar; typedef struct JSXMLElemVar { JSXMLArray kids; JSXMLArray namespaces; JSXMLArray attrs; } JSXMLElemVar; #define xml_kids list.kids #define xml_target list.target #define xml_targetprop list.targetprop #define xml_namespaces elem.namespaces #define xml_attrs elem.attrs #define xml_value value #define JSXML_HAS_KIDS(xml) JSXML_CLASS_HAS_KIDS((xml)->xml_class) #define JSXML_HAS_VALUE(xml) JSXML_CLASS_HAS_VALUE((xml)->xml_class) #define JSXML_HAS_NAME(xml) JSXML_CLASS_HAS_NAME((xml)->xml_class) #define JSXML_LENGTH(xml) (JSXML_CLASS_HAS_KIDS((xml)->xml_class) ? (xml)->xml_kids.length : 0) struct JSXML : js::gc::Cell { js::HeapPtrObject object; void *domnode; js::HeapPtrXML parent; js::HeapPtrObject name; uint32_t xml_class; uint32_t xml_flags; JSXMLListVar list; JSXMLElemVar elem; js::HeapPtrString value; void *pad; void finalize(js::FreeOp *fop); static void writeBarrierPre(JSXML *xml); static void writeBarrierPost(JSXML *xml, void *addr); }; #define XMLF_WHITESPACE_TEXT 0x1 extern JSXML * js_NewXML(JSContext *cx, JSXMLClass xml_class); extern void js_TraceXML(JSTracer *trc, JSXML *xml); extern JSObject * js_NewXMLObject(JSContext *cx, JSXMLClass xml_class); extern JSObject * js_GetXMLObject(JSContext *cx, JSXML *xml); extern JSObject * js_InitNamespaceClass(JSContext *cx, JSObject *obj); extern JSObject * js_InitQNameClass(JSContext *cx, JSObject *obj); extern JSObject * js_InitXMLClass(JSContext *cx, JSObject *obj); extern JSObject * js_InitXMLClasses(JSContext *cx, JSObject *obj); extern bool js_GetLocalNameFromFunctionQName(JSObject *obj, jsid *funidp, JSContext *cx); extern JSBool js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp); extern JSBool js_SetDefaultXMLNamespace(JSContext *cx, const js::Value &v); extern JSBool js_IsXMLName(JSContext *cx, jsval v); extern JSBool js_ToAttributeName(JSContext *cx, js::Value *vp); extern JSFlatString * js_EscapeAttributeValue(JSContext *cx, JSString *str, JSBool quote); extern JSString * js_AddAttributePart(JSContext *cx, JSBool isName, JSString *str, JSString *str2); extern JSFlatString * js_EscapeElementValue(JSContext *cx, JSString *str); extern JSString * js_ValueToXMLString(JSContext *cx, const js::Value &v); extern JSObject * js_ConstructXMLQNameObject(JSContext *cx, const js::Value & nsval, const js::Value & lnval); extern JSBool js_GetAnyName(JSContext *cx, jsid *idp); extern JSBool js_FindXMLProperty(JSContext *cx, const js::Value &nameval, JSObject **objp, jsid *idp); extern JSBool js_GetXMLMethod(JSContext *cx, js::HandleObject obj, jsid id, js::Value *vp); extern JSBool js_GetXMLDescendants(JSContext *cx, JSObject *obj, jsval id, jsval *vp); extern JSBool js_DeleteXMLListElements(JSContext *cx, JSObject *listobj); extern JSBool js_StepXMLListFilter(JSContext *cx, JSBool initialized); extern JSObject * js_ValueToXMLObject(JSContext *cx, const js::Value &v); extern JSObject * js_ValueToXMLListObject(JSContext *cx, const js::Value &v); extern JSObject * js_NewXMLSpecialObject(JSContext *cx, JSXMLClass xml_class, JSString *name, JSString *value); extern JSString * js_MakeXMLCDATAString(JSContext *cx, JSString *str); extern JSString * js_MakeXMLCommentString(JSContext *cx, JSString *str); extern JSString * js_MakeXMLPIString(JSContext *cx, JSString *name, JSString *str); extern JSBool js_TestXMLEquality(JSContext *cx, const js::Value &v1, const js::Value &v2, JSBool *bp); extern JSBool js_ConcatenateXML(JSContext *cx, JSObject *obj1, JSObject *obj2, js::Value *vp); namespace js { extern bool GetLocalNameFromFunctionQName(JSObject *qn, JSAtom **namep, JSContext *cx); } # 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" #define jswrapper_h___ namespace js { class DummyFrameGuard; class __attribute__((visibility("default"))) AbstractWrapper : public IndirectProxyHandler { unsigned mFlags; public: unsigned flags() const { return mFlags; } explicit AbstractWrapper(unsigned flags); virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, PropertyDescriptor *desc) ; virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; # 72 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" enum Action { GET, SET, CALL, PUNCTURE }; virtual bool enter(JSContext *cx, JSObject *wrapper, jsid id, Action act, bool *bp); virtual void leave(JSContext *cx, JSObject *wrapper); static JSObject *wrappedObject(const JSObject *wrapper); static AbstractWrapper *wrapperHandler(const JSObject *wrapper); }; class __attribute__((visibility("default"))) DirectWrapper : public AbstractWrapper { public: explicit DirectWrapper(unsigned flags); typedef enum { PermitObjectAccess, PermitPropertyAccess, DenyAccess } Permission; virtual ~DirectWrapper(); virtual bool has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp) ; virtual bool set(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, bool strict, Value *vp) ; virtual bool keys(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool iterate(JSContext *cx, JSObject *wrapper, unsigned flags, Value *vp) ; virtual bool call(JSContext *cx, JSObject *wrapper, unsigned argc, Value *vp) ; virtual bool construct(JSContext *cx, JSObject *wrapper, unsigned argc, Value *argv, Value *rval) ; virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; virtual bool hasInstance(JSContext *cx, JSObject *wrapper, const Value *vp, bool *bp) ; virtual JSString *obj_toString(JSContext *cx, JSObject *wrapper) ; virtual JSString *fun_toString(JSContext *cx, JSObject *wrapper, unsigned indent) ; using AbstractWrapper::Action; static DirectWrapper singleton; static JSObject *New(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent, DirectWrapper *handler); using AbstractWrapper::wrappedObject; using AbstractWrapper::wrapperHandler; enum { CROSS_COMPARTMENT = 1 << 0, LAST_USED_FLAG = CROSS_COMPARTMENT }; static void *getWrapperFamily(); }; typedef DirectWrapper Wrapper; class __attribute__((visibility("default"))) CrossCompartmentWrapper : public DirectWrapper { public: CrossCompartmentWrapper(unsigned flags); virtual ~CrossCompartmentWrapper(); virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, PropertyDescriptor *desc) ; virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp) ; virtual bool set(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, bool strict, Value *vp) ; virtual bool keys(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool iterate(JSContext *cx, JSObject *wrapper, unsigned flags, Value *vp) ; virtual bool call(JSContext *cx, JSObject *wrapper, unsigned argc, Value *vp) ; virtual bool construct(JSContext *cx, JSObject *wrapper, unsigned argc, Value *argv, Value *rval) ; virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; virtual bool hasInstance(JSContext *cx, JSObject *wrapper, const Value *vp, bool *bp) ; virtual JSString *obj_toString(JSContext *cx, JSObject *wrapper) ; virtual JSString *fun_toString(JSContext *cx, JSObject *wrapper, unsigned indent) ; virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; virtual bool defaultValue(JSContext *cx, JSObject *wrapper, JSType hint, Value *vp) ; virtual bool iteratorNext(JSContext *cx, JSObject *wrapper, Value *vp); static CrossCompartmentWrapper singleton; }; # 182 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" template class __attribute__((visibility("default"))) SecurityWrapper : public Base { public: SecurityWrapper(unsigned flags); virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx) ; virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; }; typedef SecurityWrapper SameCompartmentSecurityWrapper; typedef SecurityWrapper CrossCompartmentSecurityWrapper; class __attribute__((visibility("default"))) ForceFrame { public: JSContext * const context; JSObject * const target; private: DummyFrameGuard *frame; public: ForceFrame(JSContext *cx, JSObject *target); ~ForceFrame(); bool enter(); }; class __attribute__((visibility("default"))) DeadObjectProxy : public BaseProxyHandler { public: static int sDeadObjectFamily; explicit DeadObjectProxy(); virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, PropertyDescriptor *desc) ; virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, PropertyDescriptor *desc) ; virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); virtual JSString *obj_toString(JSContext *cx, JSObject *proxy); virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); virtual bool getElementIfPresent(JSContext *cx, JSObject *obj, JSObject *receiver, uint32_t index, Value *vp, bool *present); static DeadObjectProxy singleton; }; extern JSObject * TransparentObjectWrapper(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSObject *parent, unsigned flags); extern __attribute__((visibility("default"))) int sWrapperFamily; inline bool IsWrapper(const JSObject *obj) { return IsProxy(obj) && GetProxyHandler(obj)->family() == &sWrapperFamily; } __attribute__((visibility("default"))) JSObject * UnwrapObject(JSObject *obj, bool stopAtOuter = true, unsigned *flagsp = __null); __attribute__((visibility("default"))) JSObject * UnwrapObjectChecked(JSContext *cx, JSObject *obj); __attribute__((visibility("default"))) bool IsCrossCompartmentWrapper(const JSObject *obj); JSObject * NewDeadProxyObject(JSContext *cx, JSObject *parent); void NukeCrossCompartmentWrapper(JSObject *wrapper); } # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 1 # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/BooleanObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/BooleanObject.h" #define BooleanObject_h___ namespace js { class BooleanObject : public JSObject { static const unsigned PRIMITIVE_VALUE_SLOT = 0; public: static const unsigned RESERVED_SLOTS = 1; static inline BooleanObject *create(JSContext *cx, bool b); static inline BooleanObject *createWithProto(JSContext *cx, bool b, JSObject &proto); bool unbox() const { return getFixedSlot(PRIMITIVE_VALUE_SLOT).toBoolean(); } private: inline void setPrimitiveValue(bool b) { setFixedSlot(PRIMITIVE_VALUE_SLOT, BooleanValue(b)); } friend JSObject * ::js_InitBooleanClass(JSContext *cx, JSObject *global); }; } # 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumberObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumberObject.h" #define NumberObject_h___ namespace js { class NumberObject : public JSObject { static const unsigned PRIMITIVE_VALUE_SLOT = 0; public: static const unsigned RESERVED_SLOTS = 1; static inline NumberObject *create(JSContext *cx, double d); static inline NumberObject *createWithProto(JSContext *cx, double d, JSObject &proto); double unbox() const { return getFixedSlot(PRIMITIVE_VALUE_SLOT).toNumber(); } private: inline void setPrimitiveValue(double d) { setFixedSlot(PRIMITIVE_VALUE_SLOT, NumberValue(d)); } friend JSObject * ::js_InitNumberClass(JSContext *cx, JSObject *global); }; } # 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" #define RegExpStatics_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" #define MatchPairs_h__ # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" namespace js { struct MatchPair { int start; int limit; MatchPair(int start, int limit) : start(start), limit(limit) {} size_t length() const { do { } while(0); return limit - start; } bool isUndefined() const { return start == -1; } void check() const { do { } while(0); do { } while (0); } }; class MatchPairs { size_t pairCount_; int buffer_[1]; explicit MatchPairs(size_t pairCount) : pairCount_(pairCount) { initPairValues(); } void initPairValues() { for (int *it = buffer_; it < buffer_ + 2 * pairCount_; ++it) *it = -1; } static size_t calculateSize(size_t backingPairCount) { return sizeof(MatchPairs) - sizeof(int) + sizeof(int) * backingPairCount; } int *buffer() { return buffer_; } friend class RegExpShared; public: static MatchPairs *create(LifoAlloc &alloc, size_t pairCount, size_t backingPairCount); size_t pairCount() const { return pairCount_; } MatchPair pair(size_t i) { do { } while(0); return MatchPair(buffer_[2 * i], buffer_[2 * i + 1]); } void displace(size_t amount) { if (!amount) return; for (int *it = buffer_; it < buffer_ + 2 * pairCount_; ++it) *it = (*it < 0) ? -1 : *it + amount; } inline void checkAgainst(size_t length); }; } # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 2 namespace js { class RegExpStatics { typedef Vector Pairs; Pairs matchPairs; HeapPtr matchPairsInput; HeapPtr pendingInput; RegExpFlag flags; RegExpStatics *bufferLink; bool copied; bool createDependent(JSContext *cx, size_t start, size_t end, Value *out) const; inline void copyTo(RegExpStatics &dst); inline void aboutToWrite(); bool save(JSContext *cx, RegExpStatics *buffer) { do { } while(0); buffer->bufferLink = bufferLink; bufferLink = buffer; if (!buffer->matchPairs.reserve(matchPairs.length())) { js_ReportOutOfMemory(cx); return false; } return true; } inline void restore(); void checkInvariants() { # 76 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" } void checkParenNum(size_t pairNum) const { do { } while(0); do { } while(0); } size_t getParenLength(size_t pairNum) const { checkParenNum(pairNum); do { } while(0); return get(pairNum, 1) - get(pairNum, 0); } int get(size_t pairNum, bool which) const { do { } while(0); return matchPairs[2 * pairNum + which]; } bool makeMatch(JSContext *cx, size_t checkValidIndex, size_t pairNum, Value *out) const; void markFlagsSet(JSContext *cx); struct InitBuffer {}; explicit RegExpStatics(InitBuffer) : bufferLink(__null), copied(false) {} friend class PreserveRegExpStatics; public: inline RegExpStatics(); static JSObject *create(JSContext *cx, GlobalObject *parent); inline bool updateFromMatchPairs(JSContext *cx, JSLinearString *input, MatchPairs *newPairs); inline void setMultiline(JSContext *cx, bool enabled); inline void clear(); inline void reset(JSContext *cx, JSString *newInput, bool newMultiline); inline void setPendingInput(JSString *newInput); # 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" private: size_t pairCount() const { do { } while(0); return matchPairs.length() / 2; } public: size_t parenCount() const { size_t pc = pairCount(); do { } while(0); return pc - 1; } JSString *getPendingInput() const { return pendingInput; } RegExpFlag getFlags() const { return flags; } bool multiline() const { return flags & MultilineFlag; } size_t matchStart() const { int start = get(0, 0); do { } while(0); return size_t(start); } size_t matchLimit() const { int limit = get(0, 1); do { } while(0); return size_t(limit); } bool matched() const { do { } while(0); do { } while (0); return get(0, 1) - get(0, 0) > 0; } void mark(JSTracer *trc) { if (pendingInput) MarkString(trc, &pendingInput, "res->pendingInput"); if (matchPairsInput) MarkString(trc, &matchPairsInput, "res->matchPairsInput"); } bool pairIsPresent(size_t pairNum) const { return get(pairNum, 0) >= 0; } bool createPendingInput(JSContext *cx, Value *out) const; bool createLastMatch(JSContext *cx, Value *out) const { return makeMatch(cx, 0, 0, out); } bool createLastParen(JSContext *cx, Value *out) const; bool createLeftContext(JSContext *cx, Value *out) const; bool createRightContext(JSContext *cx, Value *out) const; bool createParen(JSContext *cx, size_t pairNum, Value *out) const { do { } while(0); if (pairNum >= pairCount()) { out->setString(cx->runtime->emptyString); return true; } return makeMatch(cx, pairNum * 2, pairNum, out); } void getParen(size_t pairNum, JSSubString *out) const; void getLastMatch(JSSubString *out) const; void getLastParen(JSSubString *out) const; void getLeftContext(JSSubString *out) const; void getRightContext(JSSubString *out) const; class AutoRooter : private AutoGCRooter { public: explicit AutoRooter(JSContext *cx, RegExpStatics *statics_ ) : AutoGCRooter(cx, REGEXPSTATICS), statics(statics_), skip(cx, statics_) { do { } while (0); } friend void AutoGCRooter::trace(JSTracer *trc); void trace(JSTracer *trc); private: RegExpStatics *statics; SkipRoot skip; }; }; class PreserveRegExpStatics { RegExpStatics * const original; RegExpStatics buffer; RegExpStatics::AutoRooter bufferRoot; public: explicit PreserveRegExpStatics(JSContext *cx, RegExpStatics *original) : original(original), buffer(RegExpStatics::InitBuffer()), bufferRoot(cx, &buffer) {} bool init(JSContext *cx) { return original->save(cx, &buffer); } inline ~PreserveRegExpStatics(); }; size_t SizeOfRegExpStaticsData(const JSObject *obj, JSMallocSizeOfFun mallocSizeOf); } # 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/StringObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/StringObject.h" #define StringObject_h___ namespace js { class StringObject : public JSObject { static const unsigned PRIMITIVE_VALUE_SLOT = 0; static const unsigned LENGTH_SLOT = 1; public: static const unsigned RESERVED_SLOTS = 2; static inline StringObject *create(JSContext *cx, HandleString str); static inline StringObject *createWithProto(JSContext *cx, HandleString str, JSObject &proto); JSString *unbox() const { return getFixedSlot(PRIMITIVE_VALUE_SLOT).toString(); } inline size_t length() const { return size_t(getFixedSlot(LENGTH_SLOT).toInt32()); } static size_t getPrimitiveValueOffset() { return getFixedSlotOffset(PRIMITIVE_VALUE_SLOT); } private: inline bool init(JSContext *cx, HandleString str); void setStringThis(JSString *str) { do { } while(0); setFixedSlot(PRIMITIVE_VALUE_SLOT, StringValue(str)); setFixedSlot(LENGTH_SLOT, Int32Value(int32_t(str->length()))); } friend JSObject * ::js_InitStringClass(JSContext *cx, JSObject *global); Shape *assignInitialShape(JSContext *cx); }; } # 39 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" 1 #define jsatominlines_h___ # 1 "./../../dist/include/mozilla/RangedPtr.h" 1 # 14 "./../../dist/include/mozilla/RangedPtr.h" #define mozilla_RangedPtr_h_ namespace mozilla { # 41 "./../../dist/include/mozilla/RangedPtr.h" template class RangedPtr { T* ptr; void checkSanity() { do { } while(0); do { } while(0); } RangedPtr create(T *ptr) const { return RangedPtr(ptr, __null, size_t(0)); } public: RangedPtr(T* p, T* start, T* end) : ptr(p) { do { } while(0); checkSanity(); } RangedPtr(T* p, T* start, size_t length) : ptr(p) { do { } while(0); do { } while(0); checkSanity(); } RangedPtr(T* p, size_t length) : ptr(p) { do { } while(0); do { } while(0); checkSanity(); } template RangedPtr(T arr[N]) : ptr(arr) { checkSanity(); } T* get() const { return ptr; } # 123 "./../../dist/include/mozilla/RangedPtr.h" RangedPtr& operator=(const RangedPtr& other) { do { } while(0); do { } while(0); ptr = other.ptr; checkSanity(); return *this; } RangedPtr operator+(size_t inc) { do { } while(0); do { } while(0); return create(ptr + inc); } RangedPtr operator-(size_t dec) { do { } while(0); do { } while(0); return create(ptr - dec); } template RangedPtr& operator=(U* p) { *this = create(p); return *this; } template RangedPtr& operator=(const RangedPtr& p) { do { } while(0); do { } while(0); ptr = p.ptr; checkSanity(); return *this; } RangedPtr& operator++() { return (*this += 1); } RangedPtr operator++(int) { RangedPtr rcp = *this; ++*this; return rcp; } RangedPtr& operator--() { return (*this -= 1); } RangedPtr operator--(int) { RangedPtr rcp = *this; --*this; return rcp; } RangedPtr& operator+=(size_t inc) { this->operator=(*this + inc); return *this; } RangedPtr& operator-=(size_t dec) { this->operator=(*this - dec); return *this; } T& operator[](int index) const { do { } while(0); return *create(ptr + index); } T& operator*() const { return *ptr; } template bool operator==(const RangedPtr& other) const { return ptr == other.ptr; } template bool operator!=(const RangedPtr& other) const { return !(*this == other); } template bool operator==(const U* u) const { return ptr == u; } template bool operator!=(const U* u) const { return !(*this == u); } template bool operator<(const RangedPtr& other) const { return ptr < other.ptr; } template bool operator<=(const RangedPtr& other) const { return ptr <= other.ptr; } template bool operator>(const RangedPtr& other) const { return ptr > other.ptr; } template bool operator>=(const RangedPtr& other) const { return ptr >= other.ptr; } size_t operator-(const RangedPtr& other) const { do { } while(0); return PointerRangeSize(other.ptr, ptr); } private: RangedPtr() ; T* operator&() ; operator T*() const ; }; } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" 2 inline JSAtom * js::AtomStateEntry::asPtr() const { do { } while(0); JSAtom *atom = reinterpret_cast(bits & NO_TAG_MASK); JSString::readBarrier(atom); return atom; } inline bool js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp) { if (!v.isString()) { JSString *str = js::ToStringSlow(cx, v); if (!str) return false; JS::Anchor anchor(str); *atomp = js_AtomizeString(cx, str); return !!*atomp; } JSString *str = v.toString(); if (str->isAtom()) { *atomp = &str->asAtom(); return true; } *atomp = js_AtomizeString(cx, str); return !!*atomp; } namespace js { inline bool ValueToId(JSContext* cx, JSObject *obj, const Value &v, jsid *idp) { int32_t i; if (ValueFitsInInt32(v, &i) && INT_FITS_IN_JSID(i)) { *idp = INT_TO_JSID(i); return true; } return InternNonIntElementId(cx, obj, v, idp); } inline bool ValueToId(JSContext* cx, const Value &v, jsid *idp) { return ValueToId(cx, __null, v, idp); } # 76 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" template inline mozilla::RangedPtr BackfillIndexInCharBuffer(uint32_t index, mozilla::RangedPtr end) { # 89 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" do { uint32_t next = index / 10, digit = index % 10; *--end = '0' + digit; index = next; } while (index > 0); return end; } inline bool IndexToId(JSContext *cx, uint32_t index, jsid *idp) { MaybeCheckStackRoots(cx); if (index <= (2147483647)) { *idp = INT_TO_JSID(index); return true; } extern bool IndexToIdSlow(JSContext *cx, uint32_t index, jsid *idp); return IndexToIdSlow(cx, index, idp); } inline jsid AtomToId(JSAtom *atom) { typedef int moz_static_assert106[(0 == 0) ? 1 : -1]; uint32_t index; if (atom->isIndex(&index) && index <= (2147483647)) return INT_TO_JSID((int32_t) index); return JSID_FROM_BITS((size_t)atom); } static __attribute__((always_inline)) inline JSFlatString * IdToString(JSContext *cx, jsid id) { if (JSID_IS_STRING(id)) return JSID_TO_ATOM(id); if ((__builtin_expect((JSID_IS_INT(id)), 1))) return Int32ToString(cx, JSID_TO_INT(id)); JSString *str = ToStringSlow(cx, IdToValue(id)); if (!str) return __null; return str->ensureFlat(cx); } inline AtomHasher::Lookup::Lookup(const JSAtom *atom) : chars(atom->chars()), length(atom->length()), atom(atom) {} inline bool AtomHasher::match(const AtomStateEntry &entry, const Lookup &lookup) { JSAtom *key = entry.asPtr(); if (lookup.atom) return lookup.atom == key; if (key->length() != lookup.length) return false; return PodEqual(key->chars(), lookup.chars, lookup.length); } } # 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" #define jsfuninlines_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" #define ScopeObject_inl_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" #define ScopeObject_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" #define jsweakmap_h___ # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" namespace js { # 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" static WeakMapBase * const WeakMapNotInList = reinterpret_cast(1); typedef Vector WeakMapVector; class WeakMapBase { public: WeakMapBase(JSObject *memOf) : memberOf(memOf), next(WeakMapNotInList) { } virtual ~WeakMapBase() { } void trace(JSTracer *tracer) { if (((tracer)->callback == __null || (tracer)->callback == GCMarker::GrayCallback)) { do { } while(0); if (next == WeakMapNotInList) { JSRuntime *rt = tracer->runtime; next = rt->gcWeakMapList; rt->gcWeakMapList = this; } } else { if (tracer->eagerlyTraceWeakMaps) nonMarkingTrace(tracer); } } static bool markAllIteratively(JSTracer *tracer); static void sweepAll(JSTracer *tracer); static void traceAllMappings(WeakMapTracer *tracer); void check() { do { } while(0); } static void resetWeakMapList(JSRuntime *rt); static bool saveWeakMapList(JSRuntime *rt, WeakMapVector &vector); static void restoreWeakMapList(JSRuntime *rt, WeakMapVector &vector); protected: virtual void nonMarkingTrace(JSTracer *tracer) = 0; virtual bool markIteratively(JSTracer *tracer) = 0; virtual void sweep(JSTracer *tracer) = 0; virtual void traceMappings(WeakMapTracer *tracer) = 0; JSObject *memberOf; private: WeakMapBase *next; }; template > class WeakMap : public HashMap, public WeakMapBase { private: typedef HashMap Base; typedef typename Base::Enum Enum; public: typedef typename Base::Range Range; explicit WeakMap(JSRuntime *rt, JSObject *memOf=__null) : Base(rt), WeakMapBase(memOf) { } explicit WeakMap(JSContext *cx, JSObject *memOf=__null) : Base(cx), WeakMapBase(memOf) { } Range nondeterministicAll() { return Base::all(); } private: bool markValue(JSTracer *trc, Value *x) { if (gc::IsMarked(x)) return false; gc::Mark(trc, x, "WeakMap entry"); return true; } void nonMarkingTrace(JSTracer *trc) { for (Range r = Base::all(); !r.empty(); r.popFront()) markValue(trc, &r.front().value); } bool markIteratively(JSTracer *trc) { bool markedAny = false; for (Enum e(*this); !e.empty(); e.popFront()) { Key k(e.front().key); bool keyIsMarked = gc::IsMarked(&k); if (keyIsMarked) { if (markValue(trc, &e.front().value)) markedAny = true; e.rekeyFront(k); } } return markedAny; } void sweep(JSTracer *trc) { for (Enum e(*this); !e.empty(); e.popFront()) { Key k(e.front().key); if (!gc::IsMarked(&k)) e.removeFront(); } # 216 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" } void traceMappings(WeakMapTracer *tracer) { for (Range r = Base::all(); !r.empty(); r.popFront()) { gc::Cell *key = gc::ToMarkable(r.front().key); gc::Cell *value = gc::ToMarkable(r.front().value); if (key && value) { tracer->callback(tracer, memberOf, key, gc::TraceKind(r.front().key), value, gc::TraceKind(r.front().value)); } } } }; } extern JSObject * js_InitWeakMapClass(JSContext *cx, JSObject *obj); # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 2 namespace js { # 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" struct ScopeCoordinate { uint16_t hops; uint16_t binding; inline ScopeCoordinate(jsbytecode *pc); }; inline JSAtom * ScopeCoordinateAtom(JSScript *script, jsbytecode *pc); # 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" class ScopeObject : public JSObject { void *getPrivate() const; protected: static const uint32_t SCOPE_CHAIN_SLOT = 0; public: inline JSObject &enclosingScope() const; inline bool setEnclosingScope(JSContext *cx, HandleObject obj); inline StackFrame *maybeStackFrame() const; inline void setStackFrame(StackFrame *frame); static inline size_t offsetOfEnclosingScope(); }; class CallObject : public ScopeObject { static const uint32_t CALLEE_SLOT = 1; static CallObject * create(JSContext *cx, JSScript *script, HandleObject enclosing, HandleObject callee); public: static const uint32_t RESERVED_SLOTS = 3; static CallObject *createForFunction(JSContext *cx, StackFrame *fp); static CallObject *createForStrictEval(JSContext *cx, StackFrame *fp); inline bool isForEval() const; inline JSObject *getCallee() const; inline JSFunction *getCalleeFunction() const; inline void setCallee(JSObject *callee); inline const Value &arg(unsigned i) const; inline void setArg(unsigned i, const Value &v); inline void initArgUnchecked(unsigned i, const Value &v); inline const Value &var(unsigned i) const; inline void setVar(unsigned i, const Value &v); inline void initVarUnchecked(unsigned i, const Value &v); inline HeapSlotArray argArray(); inline HeapSlotArray varArray(); inline void copyValues(unsigned nargs, Value *argv, unsigned nvars, Value *slots); static JSBool getArgOp(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool getVarOp(JSContext *cx, HandleObject obj, HandleId id, Value *vp); static JSBool setArgOp(JSContext *cx, HandleObject obj, HandleId id, JSBool strict, Value *vp); static JSBool setVarOp(JSContext *cx, HandleObject obj, HandleId id, JSBool strict, Value *vp); bool containsVarOrArg(PropertyName *name, Value *vp, JSContext *cx); }; class DeclEnvObject : public ScopeObject { public: static const uint32_t RESERVED_SLOTS = 1; static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT2; static DeclEnvObject *create(JSContext *cx, StackFrame *fp); }; class NestedScopeObject : public ScopeObject { protected: static const unsigned DEPTH_SLOT = 1; public: uint32_t stackDepth() const; }; class WithObject : public NestedScopeObject { js::StackFrame *maybeStackFrame() const; void setStackFrame(StackFrame *frame); static const unsigned THIS_SLOT = 2; JSObject *getProto() const; public: static const unsigned RESERVED_SLOTS = 3; static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; static WithObject * create(JSContext *cx, HandleObject proto, HandleObject enclosing, uint32_t depth); JSObject &withThis() const; JSObject &object() const; }; class BlockObject : public NestedScopeObject { public: static const unsigned RESERVED_SLOTS = 2; static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; inline uint32_t slotCount() const; protected: inline HeapSlot &slotValue(unsigned i); }; class StaticBlockObject : public BlockObject { StackFrame *maybeStackFrame() const; void setStackFrame(StackFrame *frame); public: static StaticBlockObject *create(JSContext *cx); inline StaticBlockObject *enclosingBlock() const; inline void setEnclosingBlock(StaticBlockObject *blockObj); void setStackDepth(uint32_t depth); bool containsVarAtDepth(uint32_t depth); void setDefinitionParseNode(unsigned i, Definition *def); Definition *maybeDefinitionParseNode(unsigned i); void setAliased(unsigned i, bool aliased); bool isAliased(unsigned i); bool needsClone() const; const Shape *addVar(JSContext *cx, jsid id, int index, bool *redeclared); }; class ClonedBlockObject : public BlockObject { public: static ClonedBlockObject *create(JSContext *cx, Handle block, StackFrame *fp); StaticBlockObject &staticBlock() const; void put(StackFrame *fp); const Value &closedSlot(unsigned i); bool containsVar(PropertyName *name, Value *vp, JSContext *cx); }; template bool XDRStaticBlockObject(XDRState *xdr, JSScript *script, StaticBlockObject **objp); extern JSObject * CloneStaticBlockObject(JSContext *cx, StaticBlockObject &srcBlock, const AutoObjectVector &objects, JSScript *src); # 307 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" class ScopeIter { public: enum Type { Call, Block, With, StrictEvalScope }; private: StackFrame *fp_; JSObject *cur_; StaticBlockObject *block_; Type type_; bool hasScopeObject_; void settle(); public: explicit ScopeIter(); explicit ScopeIter(StackFrame *fp); explicit ScopeIter(JSObject &enclosingScope); ScopeIter(ScopeIter si, StackFrame *fp); ScopeIter(StackFrame *fp, ScopeObject &scope); bool done() const { return !fp_; } JSObject &enclosingScope() const { do { } while(0); return *cur_; } ScopeIter enclosing() const; StackFrame *fp() const { do { } while(0); return fp_; } Type type() const { do { } while(0); return type_; } bool hasScopeObject() const { do { } while(0); return hasScopeObject_; } ScopeObject &scope() const; StaticBlockObject &staticBlock() const { do { } while(0); return *block_; } typedef ScopeIter Lookup; static HashNumber hash(ScopeIter si); static bool match(ScopeIter si1, ScopeIter si2); }; # 393 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" extern JSObject * GetDebugScopeForFunction(JSContext *cx, JSFunction *fun); extern JSObject * GetDebugScopeForFrame(JSContext *cx, StackFrame *fp); class DebugScopeObject : public JSObject { static const unsigned ENCLOSING_EXTRA = 0; public: static DebugScopeObject *create(JSContext *cx, ScopeObject &scope, JSObject &enclosing); ScopeObject &scope() const; JSObject &enclosingScope() const; bool isForDeclarative() const; }; class DebugScopes { typedef WeakMap ObjectWeakMap; ObjectWeakMap proxiedScopes; typedef HashMap MissingScopeMap; MissingScopeMap missingScopes; public: DebugScopes(JSRuntime *rt); ~DebugScopes(); bool init(); void mark(JSTracer *trc); void sweep(); DebugScopeObject *hasDebugScope(JSContext *cx, ScopeObject &scope) const; bool addDebugScope(JSContext *cx, ScopeObject &scope, DebugScopeObject &debugScope); DebugScopeObject *hasDebugScope(JSContext *cx, ScopeIter si) const; bool addDebugScope(JSContext *cx, ScopeIter si, DebugScopeObject &debugScope); void onPopCall(StackFrame *fp); void onPopBlock(JSContext *cx, StackFrame *fp); void onGeneratorFrameChange(StackFrame *from, StackFrame *to); void onCompartmentLeaveDebugMode(JSCompartment *c); }; } # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 2 namespace js { inline ScopeCoordinate::ScopeCoordinate(jsbytecode *pc) : hops(((unsigned)(((pc)[1] << 8) | (pc)[2]))), binding(((unsigned)(((pc + 2)[1] << 8) | (pc + 2)[2]))) { do { } while(0); } inline JSAtom * ScopeCoordinateAtom(JSScript *script, jsbytecode *pc) { do { } while(0); return script->getAtom(GET_UINT32_INDEX(pc + 2 * sizeof(uint16_t))); } inline JSObject & ScopeObject::enclosingScope() const { return getReservedSlot(SCOPE_CHAIN_SLOT).toObject(); } inline bool ScopeObject::setEnclosingScope(JSContext *cx, HandleObject obj) { RootedObject self(cx, this); if (!obj->setDelegate(cx)) return false; self->setFixedSlot(SCOPE_CHAIN_SLOT, ObjectValue(*obj)); return true; } inline StackFrame * ScopeObject::maybeStackFrame() const { do { } while(0); return reinterpret_cast(JSObject::getPrivate()); } inline void ScopeObject::setStackFrame(StackFrame *frame) { return setPrivate(frame); } inline size_t ScopeObject::offsetOfEnclosingScope() { return getFixedSlotOffset(SCOPE_CHAIN_SLOT); } inline bool CallObject::isForEval() const { do { } while(0); do { } while (0) ; return getReservedSlot(CALLEE_SLOT).isNull(); } inline void CallObject::setCallee(JSObject *callee) { do { } while (0); setFixedSlot(CALLEE_SLOT, ObjectOrNullValue(callee)); } inline JSObject * CallObject::getCallee() const { return getReservedSlot(CALLEE_SLOT).toObjectOrNull(); } inline JSFunction * CallObject::getCalleeFunction() const { return getReservedSlot(CALLEE_SLOT).toObject().toFunction(); } inline const Value & CallObject::arg(unsigned i) const { do { } while(0); return getSlot(RESERVED_SLOTS + i); } inline void CallObject::setArg(unsigned i, const Value &v) { do { } while(0); setSlot(RESERVED_SLOTS + i, v); } inline void CallObject::initArgUnchecked(unsigned i, const Value &v) { do { } while(0); initSlotUnchecked(RESERVED_SLOTS + i, v); } inline const Value & CallObject::var(unsigned i) const { JSFunction *fun = getCalleeFunction(); do { } while(0); do { } while(0); return getSlot(RESERVED_SLOTS + fun->nargs + i); } inline void CallObject::setVar(unsigned i, const Value &v) { JSFunction *fun = getCalleeFunction(); do { } while(0); do { } while(0); setSlot(RESERVED_SLOTS + fun->nargs + i, v); } inline void CallObject::initVarUnchecked(unsigned i, const Value &v) { JSFunction *fun = getCalleeFunction(); do { } while(0); do { } while(0); initSlotUnchecked(RESERVED_SLOTS + fun->nargs + i, v); } inline void CallObject::copyValues(unsigned nargs, Value *argv, unsigned nvars, Value *slots) { do { } while(0); copySlotRange(RESERVED_SLOTS, argv, nargs); copySlotRange(RESERVED_SLOTS + nargs, slots, nvars); } inline HeapSlotArray CallObject::argArray() { DebugOnly fun = getCalleeFunction(); do { } while(0); return HeapSlotArray(getSlotAddress(RESERVED_SLOTS)); } inline HeapSlotArray CallObject::varArray() { JSFunction *fun = getCalleeFunction(); do { } while(0) ; return HeapSlotArray(getSlotAddress(RESERVED_SLOTS + fun->nargs)); } inline uint32_t NestedScopeObject::stackDepth() const { return getReservedSlot(DEPTH_SLOT).toPrivateUint32(); } inline JSObject & WithObject::withThis() const { return getReservedSlot(THIS_SLOT).toObject(); } inline JSObject & WithObject::object() const { return *JSObject::getProto(); } inline uint32_t BlockObject::slotCount() const { return propertyCount(); } inline HeapSlot & BlockObject::slotValue(unsigned i) { do { } while(0); return getSlotRef(RESERVED_SLOTS + i); } inline StaticBlockObject * StaticBlockObject::enclosingBlock() const { JSObject *obj = getReservedSlot(SCOPE_CHAIN_SLOT).toObjectOrNull(); return obj ? &obj->asStaticBlock() : __null; } inline void StaticBlockObject::setEnclosingBlock(StaticBlockObject *blockObj) { setFixedSlot(SCOPE_CHAIN_SLOT, ObjectOrNullValue(blockObj)); } inline void StaticBlockObject::setStackDepth(uint32_t depth) { do { } while(0); initReservedSlot(DEPTH_SLOT, PrivateUint32Value(depth)); } inline void StaticBlockObject::setDefinitionParseNode(unsigned i, Definition *def) { do { } while(0); slotValue(i).init(this, i, PrivateValue(def)); } inline Definition * StaticBlockObject::maybeDefinitionParseNode(unsigned i) { Value v = slotValue(i); return v.isUndefined() ? __null : reinterpret_cast(v.toPrivate()); } inline void StaticBlockObject::setAliased(unsigned i, bool aliased) { slotValue(i).init(this, i, BooleanValue(aliased)); if (aliased) JSObject::setPrivate(reinterpret_cast(1)); } inline bool StaticBlockObject::isAliased(unsigned i) { return slotValue(i).isTrue(); } inline bool StaticBlockObject::needsClone() const { return JSObject::getPrivate() != __null; } inline bool StaticBlockObject::containsVarAtDepth(uint32_t depth) { return depth >= stackDepth() && depth < stackDepth() + slotCount(); } inline StaticBlockObject & ClonedBlockObject::staticBlock() const { return getProto()->asStaticBlock(); } inline const Value & ClonedBlockObject::closedSlot(unsigned i) { do { } while(0); return slotValue(i); } } inline js::ScopeObject & JSObject::asScope() { do { } while(0); return *static_cast(this); } inline js::CallObject & JSObject::asCall() { do { } while(0); return *static_cast(this); } inline js::DeclEnvObject & JSObject::asDeclEnv() { do { } while(0); return *static_cast(this); } inline js::NestedScopeObject & JSObject::asNestedScope() { do { } while(0); return *static_cast(this); } inline js::WithObject & JSObject::asWith() { do { } while(0); return *static_cast(this); } inline js::BlockObject & JSObject::asBlock() { do { } while(0); return *static_cast(this); } inline js::StaticBlockObject & JSObject::asStaticBlock() { do { } while(0); return *static_cast(this); } inline js::ClonedBlockObject & JSObject::asClonedBlock() { do { } while(0); return *static_cast(this); } inline js::DebugScopeObject & JSObject::asDebugScope() { do { } while(0); return *static_cast(this); } # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" 2 inline bool JSFunction::inStrictMode() const { return script()->strictModeCode; } inline JSObject * JSFunction::environment() const { do { } while(0); return u.i.env_; } inline void JSFunction::setEnvironment(JSObject *obj) { do { } while(0); *(js::HeapPtrObject *)&u.i.env_ = obj; } inline void JSFunction::initEnvironment(JSObject *obj) { do { } while(0); ((js::HeapPtrObject *)&u.i.env_)->init(obj); } inline void JSFunction::initializeExtended() { do { } while(0); do { } while(0); toExtended()->extendedSlots[0].init(js::UndefinedValue()); toExtended()->extendedSlots[1].init(js::UndefinedValue()); } inline void JSFunction::setExtendedSlot(size_t which, const js::Value &val) { do { } while(0); toExtended()->extendedSlots[which] = val; } inline const js::Value & JSFunction::getExtendedSlot(size_t which) const { do { } while(0); return toExtended()->extendedSlots[which]; } namespace js { static __attribute__((always_inline)) inline bool IsFunctionObject(const js::Value &v) { return v.isObject() && v.toObject().isFunction(); } static __attribute__((always_inline)) inline bool IsFunctionObject(const js::Value &v, JSFunction **fun) { if (v.isObject() && v.toObject().isFunction()) { *fun = v.toObject().toFunction(); return true; } return false; } static __attribute__((always_inline)) inline bool IsNativeFunction(const js::Value &v) { JSFunction *fun; return IsFunctionObject(v, &fun) && fun->isNative(); } static __attribute__((always_inline)) inline bool IsNativeFunction(const js::Value &v, JSFunction **fun) { return IsFunctionObject(v, fun) && (*fun)->isNative(); } static __attribute__((always_inline)) inline bool IsNativeFunction(const js::Value &v, JSNative native) { JSFunction *fun; return IsFunctionObject(v, &fun) && fun->maybeNative() == native; } # 115 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" static __attribute__((always_inline)) inline bool ClassMethodIsNative(JSContext *cx, HandleObject obj, Class *clasp, HandleId methodid, JSNative native) { do { } while(0); Value v; if (!HasDataProperty(cx, obj, methodid, &v)) { RootedObject proto(cx, obj->getProto()); if (!proto || proto->getClass() != clasp || !HasDataProperty(cx, proto, methodid, &v)) return false; } return js::IsNativeFunction(v, native); } extern __attribute__((always_inline)) inline bool SameTraceType(const Value &lhs, const Value &rhs) { return SameType(lhs, rhs) && (lhs.isPrimitive() || lhs.toObject().isFunction() == rhs.toObject().isFunction()); } static __attribute__((always_inline)) inline bool IsConstructing(const Value *vp) { # 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" return vp[1].isMagic(); } inline bool IsConstructing(CallReceiver call) { return IsConstructing(call.base()); } inline const char * GetFunctionNameBytes(JSContext *cx, JSFunction *fun, JSAutoByteString *bytes) { if (fun->atom) return bytes->encode(cx, fun->atom); return js_anonymous_str; } extern JSFunctionSpec function_methods[]; extern JSBool Function(JSContext *cx, unsigned argc, Value *vp); extern bool IsBuiltinFunctionConstructor(JSFunction *fun); static inline JSObject * SkipScopeParent(JSObject *parent) { if (!parent) return __null; while (parent->isScope()) parent = &parent->asScope().enclosingScope(); return parent; } inline JSFunction * CloneFunctionObject(JSContext *cx, HandleFunction fun, HandleObject parent, gc::AllocKind kind = JSFunction::FinalizeKind) { do { } while(0); RootedObject proto(cx, parent->global().getOrCreateFunctionPrototype(cx)); if (!proto) return __null; return js_CloneFunctionObject(cx, fun, parent, proto, kind); } inline JSFunction * CloneFunctionObjectIfNotSingleton(JSContext *cx, HandleFunction fun, HandleObject parent) { if (fun->hasSingletonType()) { if (!JSObject::setParent(cx, fun, RootedObject(cx, SkipScopeParent(parent)))) return __null; fun->setEnvironment(parent); return fun; } return CloneFunctionObject(cx, fun, parent); } inline JSFunction * CloneFunctionObject(JSContext *cx, HandleFunction fun) { do { } while(0); if (fun->hasSingletonType()) return fun; return js_CloneFunctionObject(cx, fun, RootedObject(cx, fun->environment()), RootedObject(cx, fun->getProto()), JSFunction::ExtendedFinalizeKind); } } inline void JSFunction::setScript(JSScript *script_) { do { } while(0); mutableScript() = script_; } inline void JSFunction::initScript(JSScript *script_) { do { } while(0); mutableScript().init(script_); } # 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 1 #define jsgcinlines_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 1 # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 2 namespace js { struct Shape; namespace gc { inline JSGCTraceKind GetGCThingTraceKind(const void *thing) { do { } while(0); const Cell *cell = reinterpret_cast(thing); return MapAllocToTraceKind(cell->getAllocKind()); } const size_t SLOTS_TO_THING_KIND_LIMIT = 17; static inline AllocKind GetGCObjectKind(size_t numSlots) { extern AllocKind slotsToThingKind[]; if (numSlots >= SLOTS_TO_THING_KIND_LIMIT) return FINALIZE_OBJECT16; return slotsToThingKind[numSlots]; } static inline AllocKind GetGCObjectKind(Class *clasp) { if (clasp == &FunctionClass) return JSFunction::FinalizeKind; uint32_t nslots = (((clasp)->flags >> 8) & (((uint32_t)1 << (8)) - 1)); if (clasp->flags & (1<<0)) nslots++; return GetGCObjectKind(nslots); } static inline AllocKind GetGCArrayKind(size_t numSlots) { extern AllocKind slotsToThingKind[]; typedef int moz_static_assert107[(ObjectElements::VALUES_PER_HEADER == 2) ? 1 : -1]; if (numSlots > JSObject::NELEMENTS_LIMIT || numSlots + 2 >= SLOTS_TO_THING_KIND_LIMIT) return FINALIZE_OBJECT2; return slotsToThingKind[numSlots + 2]; } static inline AllocKind GetGCObjectFixedSlotsKind(size_t numFixedSlots) { extern AllocKind slotsToThingKind[]; do { } while(0); return slotsToThingKind[numFixedSlots]; } static inline bool IsBackgroundAllocKind(AllocKind kind) { do { } while(0); return kind <= FINALIZE_OBJECT_LAST && kind % 2 == 1; } static inline AllocKind GetBackgroundAllocKind(AllocKind kind) { do { } while(0); return (AllocKind) (kind + 1); } static inline bool TryIncrementAllocKind(AllocKind *kindp) { size_t next = size_t(*kindp) + 2; if (next >= size_t(FINALIZE_OBJECT_LIMIT)) return false; *kindp = AllocKind(next); return true; } static inline size_t GetGCKindSlots(AllocKind thingKind) { switch (thingKind) { case FINALIZE_OBJECT0: case FINALIZE_OBJECT0_BACKGROUND: return 0; case FINALIZE_OBJECT2: case FINALIZE_OBJECT2_BACKGROUND: return 2; case FINALIZE_OBJECT4: case FINALIZE_OBJECT4_BACKGROUND: return 4; case FINALIZE_OBJECT8: case FINALIZE_OBJECT8_BACKGROUND: return 8; case FINALIZE_OBJECT12: case FINALIZE_OBJECT12_BACKGROUND: return 12; case FINALIZE_OBJECT16: case FINALIZE_OBJECT16_BACKGROUND: return 16; default: __builtin_unreachable(); return 0; } } static inline size_t GetGCKindSlots(AllocKind thingKind, Class *clasp) { size_t nslots = GetGCKindSlots(thingKind); if (clasp->flags & (1<<0)) { do { } while(0); nslots--; } if (clasp == &FunctionClass) nslots = 0; return nslots; } static inline void GCPoke(JSRuntime *rt, Value oldval) { rt->gcPoke = true; # 183 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" } template void ForEachArenaAndCell(JSCompartment *compartment, AllocKind thingKind, ArenaOp arenaOp, CellOp cellOp) { size_t thingSize = Arena::thingSize(thingKind); ArenaHeader *aheader = compartment->arenas.getFirstArena(thingKind); for (; aheader; aheader = aheader->next) { Arena *arena = aheader->getArena(); arenaOp(arena); FreeSpan firstSpan(aheader->getFirstFreeSpan()); const FreeSpan *span = &firstSpan; for (uintptr_t thing = arena->thingsStart(thingKind); ; thing += thingSize) { do { } while(0); if (thing == span->first) { if (!span->hasNext()) break; thing = span->last; span = span->nextSpan(); } else { Cell *t = reinterpret_cast(thing); cellOp(t); } } } } class CellIterImpl { size_t firstThingOffset; size_t thingSize; ArenaHeader *aheader; FreeSpan firstSpan; const FreeSpan *span; uintptr_t thing; Cell *cell; protected: CellIterImpl() { } void initSpan(JSCompartment *comp, AllocKind kind) { do { } while(0); firstThingOffset = Arena::firstThingOffset(kind); thingSize = Arena::thingSize(kind); firstSpan.initAsEmpty(); span = &firstSpan; thing = span->first; } void init(ArenaHeader *singleAheader) { aheader = singleAheader; initSpan(aheader->compartment, aheader->getAllocKind()); next(); aheader = __null; } void init(JSCompartment *comp, AllocKind kind) { initSpan(comp, kind); aheader = comp->arenas.getFirstArena(kind); next(); } public: bool done() const { return !cell; } template T *get() const { do { } while(0); return static_cast(cell); } Cell *getCell() const { do { } while(0); return cell; } void next() { for (;;) { if (thing != span->first) break; if ((__builtin_expect((span->hasNext()), 1))) { thing = span->last + thingSize; span = span->nextSpan(); break; } if (!aheader) { cell = __null; return; } firstSpan = aheader->getFirstFreeSpan(); span = &firstSpan; thing = aheader->arenaAddress() | firstThingOffset; aheader = aheader->next; } cell = reinterpret_cast(thing); thing += thingSize; } }; class CellIterUnderGC : public CellIterImpl { public: CellIterUnderGC(JSCompartment *comp, AllocKind kind) { do { } while(0); init(comp, kind); } CellIterUnderGC(ArenaHeader *aheader) { do { } while(0); init(aheader); } }; class CellIter : public CellIterImpl { ArenaLists *lists; AllocKind kind; public: CellIter(JSCompartment *comp, AllocKind kind) : lists(&comp->arenas), kind(kind) { do { } while(0); if (lists->isSynchronizedFreeList(kind)) { lists = __null; } else { do { } while(0); lists->copyFreeListToArena(kind); } init(comp, kind); } ~CellIter() { if (lists) lists->clearFreeListInArena(kind); } }; inline void EmptyArenaOp(Arena *arena) {} inline void EmptyCellOp(Cell *t) {} class GCCompartmentsIter { private: JSCompartment **it, **end; public: GCCompartmentsIter(JSRuntime *rt) { do { } while(0); it = rt->compartments.begin(); end = rt->compartments.end(); if (!(*it)->isCollecting()) next(); } bool done() const { return it == end; } void next() { do { } while(0); do { it++; } while (it != end && !(*it)->isCollecting()); } JSCompartment *get() const { do { } while(0); return *it; } operator JSCompartment *() const { return get(); } JSCompartment *operator->() const { return get(); } }; # 396 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" template inline T * NewGCThing(JSContext *cx, js::gc::AllocKind kind, size_t thingSize) { do { } while(0); do { } while (0) ; do { } while(0); do { } while(0); do {} while(0); MaybeCheckStackRoots(cx); JSCompartment *comp = cx->compartment; void *t = comp->arenas.allocateFromFreeList(kind, thingSize); if (!t) t = js::gc::ArenaLists::refillFreeList(cx, kind); do { } while (0) ; return static_cast(t); } template inline T * TryNewGCThing(JSContext *cx, js::gc::AllocKind kind, size_t thingSize) { do { } while(0); do { } while (0) ; do { } while(0); do { } while(0); void *t = cx->compartment->arenas.allocateFromFreeList(kind, thingSize); do { } while (0) ; return static_cast(t); } } } inline JSObject * js_NewGCObject(JSContext *cx, js::gc::AllocKind kind) { do { } while(0); return js::gc::NewGCThing(cx, kind, js::gc::Arena::thingSize(kind)); } inline JSObject * js_TryNewGCObject(JSContext *cx, js::gc::AllocKind kind) { do { } while(0); return js::gc::TryNewGCThing(cx, kind, js::gc::Arena::thingSize(kind)); } inline JSString * js_NewGCString(JSContext *cx) { return js::gc::NewGCThing(cx, js::gc::FINALIZE_STRING, sizeof(JSString)); } inline JSShortString * js_NewGCShortString(JSContext *cx) { return js::gc::NewGCThing(cx, js::gc::FINALIZE_SHORT_STRING, sizeof(JSShortString)); } inline JSExternalString * js_NewGCExternalString(JSContext *cx) { return js::gc::NewGCThing(cx, js::gc::FINALIZE_EXTERNAL_STRING, sizeof(JSExternalString)); } inline JSScript * js_NewGCScript(JSContext *cx) { return js::gc::NewGCThing(cx, js::gc::FINALIZE_SCRIPT, sizeof(JSScript)); } inline js::Shape * js_NewGCShape(JSContext *cx) { return js::gc::NewGCThing(cx, js::gc::FINALIZE_SHAPE, sizeof(js::Shape)); } inline js::BaseShape * js_NewGCBaseShape(JSContext *cx) { return js::gc::NewGCThing(cx, js::gc::FINALIZE_BASE_SHAPE, sizeof(js::BaseShape)); } extern JSXML * js_NewGCXML(JSContext *cx); # 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 1 # 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 1 # 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" #define jsanalyze_h___ # 1 "./jsautooplen.h" 1 #define JSOP_NOP_LENGTH 1 #define JSOP_UNDEFINED_LENGTH 1 #define JSOP_POPV_LENGTH 1 #define JSOP_ENTERWITH_LENGTH 1 #define JSOP_LEAVEWITH_LENGTH 1 #define JSOP_RETURN_LENGTH 1 #define JSOP_GOTO_LENGTH 5 #define JSOP_IFEQ_LENGTH 5 #define JSOP_IFNE_LENGTH 5 #define JSOP_ARGUMENTS_LENGTH 1 #define JSOP_SWAP_LENGTH 1 #define JSOP_POPN_LENGTH 3 #define JSOP_DUP_LENGTH 1 #define JSOP_DUP2_LENGTH 1 #define JSOP_SETCONST_LENGTH 5 #define JSOP_BITOR_LENGTH 1 #define JSOP_BITXOR_LENGTH 1 #define JSOP_BITAND_LENGTH 1 #define JSOP_EQ_LENGTH 1 #define JSOP_NE_LENGTH 1 #define JSOP_LT_LENGTH 1 #define JSOP_LE_LENGTH 1 #define JSOP_GT_LENGTH 1 #define JSOP_GE_LENGTH 1 #define JSOP_LSH_LENGTH 1 #define JSOP_RSH_LENGTH 1 #define JSOP_URSH_LENGTH 1 #define JSOP_ADD_LENGTH 1 #define JSOP_SUB_LENGTH 1 #define JSOP_MUL_LENGTH 1 #define JSOP_DIV_LENGTH 1 #define JSOP_MOD_LENGTH 1 #define JSOP_NOT_LENGTH 1 #define JSOP_BITNOT_LENGTH 1 #define JSOP_NEG_LENGTH 1 #define JSOP_POS_LENGTH 1 #define JSOP_DELNAME_LENGTH 5 #define JSOP_DELPROP_LENGTH 5 #define JSOP_DELELEM_LENGTH 1 #define JSOP_TYPEOF_LENGTH 1 #define JSOP_VOID_LENGTH 1 #define JSOP_INCNAME_LENGTH 6 #define JSOP_INCPROP_LENGTH 6 #define JSOP_INCELEM_LENGTH 2 #define JSOP_DECNAME_LENGTH 6 #define JSOP_DECPROP_LENGTH 6 #define JSOP_DECELEM_LENGTH 2 #define JSOP_NAMEINC_LENGTH 6 #define JSOP_PROPINC_LENGTH 6 #define JSOP_ELEMINC_LENGTH 2 #define JSOP_NAMEDEC_LENGTH 6 #define JSOP_PROPDEC_LENGTH 6 #define JSOP_ELEMDEC_LENGTH 2 #define JSOP_GETPROP_LENGTH 5 #define JSOP_SETPROP_LENGTH 5 #define JSOP_GETELEM_LENGTH 1 #define JSOP_SETELEM_LENGTH 1 #define JSOP_CALLNAME_LENGTH 5 #define JSOP_CALL_LENGTH 3 #define JSOP_NAME_LENGTH 5 #define JSOP_DOUBLE_LENGTH 5 #define JSOP_STRING_LENGTH 5 #define JSOP_ZERO_LENGTH 1 #define JSOP_ONE_LENGTH 1 #define JSOP_NULL_LENGTH 1 #define JSOP_THIS_LENGTH 1 #define JSOP_FALSE_LENGTH 1 #define JSOP_TRUE_LENGTH 1 #define JSOP_OR_LENGTH 5 #define JSOP_AND_LENGTH 5 #define JSOP_TABLESWITCH_LENGTH -1 #define JSOP_LOOKUPSWITCH_LENGTH -1 #define JSOP_STRICTEQ_LENGTH 1 #define JSOP_STRICTNE_LENGTH 1 #define JSOP_SETCALL_LENGTH 1 #define JSOP_ITER_LENGTH 2 #define JSOP_MOREITER_LENGTH 1 #define JSOP_ITERNEXT_LENGTH 2 #define JSOP_ENDITER_LENGTH 1 #define JSOP_FUNAPPLY_LENGTH 3 #define JSOP_OBJECT_LENGTH 5 #define JSOP_POP_LENGTH 1 #define JSOP_NEW_LENGTH 3 #define JSOP_UNUSED0_LENGTH 1 #define JSOP_GETARG_LENGTH 3 #define JSOP_SETARG_LENGTH 3 #define JSOP_GETLOCAL_LENGTH 3 #define JSOP_SETLOCAL_LENGTH 3 #define JSOP_UINT16_LENGTH 3 #define JSOP_NEWINIT_LENGTH 5 #define JSOP_NEWARRAY_LENGTH 4 #define JSOP_NEWOBJECT_LENGTH 5 #define JSOP_ENDINIT_LENGTH 1 #define JSOP_INITPROP_LENGTH 5 #define JSOP_INITELEM_LENGTH 1 #define JSOP_UNUSED14_LENGTH 1 #define JSOP_UNUSED15_LENGTH 1 #define JSOP_INCARG_LENGTH 3 #define JSOP_DECARG_LENGTH 3 #define JSOP_ARGINC_LENGTH 3 #define JSOP_ARGDEC_LENGTH 3 #define JSOP_INCLOCAL_LENGTH 3 #define JSOP_DECLOCAL_LENGTH 3 #define JSOP_LOCALINC_LENGTH 3 #define JSOP_LOCALDEC_LENGTH 3 #define JSOP_LEAVEFORLETIN_LENGTH 1 #define JSOP_LABEL_LENGTH 5 #define JSOP_UNUSED3_LENGTH 1 #define JSOP_FUNCALL_LENGTH 3 #define JSOP_LOOPHEAD_LENGTH 1 #define JSOP_BINDNAME_LENGTH 5 #define JSOP_SETNAME_LENGTH 5 #define JSOP_THROW_LENGTH 1 #define JSOP_IN_LENGTH 1 #define JSOP_INSTANCEOF_LENGTH 1 #define JSOP_DEBUGGER_LENGTH 1 #define JSOP_GOSUB_LENGTH 5 #define JSOP_RETSUB_LENGTH 1 #define JSOP_EXCEPTION_LENGTH 1 #define JSOP_LINENO_LENGTH 3 #define JSOP_CONDSWITCH_LENGTH 1 #define JSOP_CASE_LENGTH 5 #define JSOP_DEFAULT_LENGTH 5 #define JSOP_EVAL_LENGTH 3 #define JSOP_ENUMELEM_LENGTH 1 #define JSOP_GETTER_LENGTH 1 #define JSOP_SETTER_LENGTH 1 #define JSOP_DEFFUN_LENGTH 5 #define JSOP_DEFCONST_LENGTH 5 #define JSOP_DEFVAR_LENGTH 5 #define JSOP_LAMBDA_LENGTH 5 #define JSOP_CALLEE_LENGTH 1 #define JSOP_UNUSED31_LENGTH 1 #define JSOP_PICK_LENGTH 2 #define JSOP_TRY_LENGTH 1 #define JSOP_FINALLY_LENGTH 1 #define JSOP_GETALIASEDVAR_LENGTH 9 #define JSOP_CALLALIASEDVAR_LENGTH 9 #define JSOP_SETALIASEDVAR_LENGTH 9 #define JSOP_INCALIASEDVAR_LENGTH 10 #define JSOP_DECALIASEDVAR_LENGTH 10 #define JSOP_ALIASEDVARINC_LENGTH 10 #define JSOP_ALIASEDVARDEC_LENGTH 10 #define JSOP_UNUSED8_LENGTH 1 #define JSOP_UNUSED9_LENGTH 1 #define JSOP_UNUSED10_LENGTH 1 #define JSOP_UNUSED11_LENGTH 1 #define JSOP_UNUSED12_LENGTH 1 #define JSOP_UNUSED13_LENGTH 1 #define JSOP_BACKPATCH_LENGTH 5 #define JSOP_BACKPATCH_POP_LENGTH 5 #define JSOP_THROWING_LENGTH 1 #define JSOP_SETRVAL_LENGTH 1 #define JSOP_RETRVAL_LENGTH 1 #define JSOP_GETGNAME_LENGTH 5 #define JSOP_SETGNAME_LENGTH 5 #define JSOP_INCGNAME_LENGTH 6 #define JSOP_DECGNAME_LENGTH 6 #define JSOP_GNAMEINC_LENGTH 6 #define JSOP_GNAMEDEC_LENGTH 6 #define JSOP_REGEXP_LENGTH 5 #define JSOP_DEFXMLNS_LENGTH 1 #define JSOP_ANYNAME_LENGTH 1 #define JSOP_QNAMEPART_LENGTH 5 #define JSOP_QNAMECONST_LENGTH 5 #define JSOP_QNAME_LENGTH 1 #define JSOP_TOATTRNAME_LENGTH 1 #define JSOP_TOATTRVAL_LENGTH 1 #define JSOP_ADDATTRNAME_LENGTH 1 #define JSOP_ADDATTRVAL_LENGTH 1 #define JSOP_BINDXMLNAME_LENGTH 1 #define JSOP_SETXMLNAME_LENGTH 1 #define JSOP_XMLNAME_LENGTH 1 #define JSOP_DESCENDANTS_LENGTH 1 #define JSOP_FILTER_LENGTH 5 #define JSOP_ENDFILTER_LENGTH 5 #define JSOP_TOXML_LENGTH 1 #define JSOP_TOXMLLIST_LENGTH 1 #define JSOP_XMLTAGEXPR_LENGTH 1 #define JSOP_XMLELTEXPR_LENGTH 1 #define JSOP_XMLCDATA_LENGTH 5 #define JSOP_XMLCOMMENT_LENGTH 5 #define JSOP_XMLPI_LENGTH 5 #define JSOP_DELDESC_LENGTH 1 #define JSOP_CALLPROP_LENGTH 5 #define JSOP_ENTERLET0_LENGTH 5 #define JSOP_ENTERLET1_LENGTH 5 #define JSOP_UINT24_LENGTH 4 #define JSOP_UNUSED18_LENGTH 1 #define JSOP_UNUSED19_LENGTH 1 #define JSOP_UNUSED20_LENGTH 1 #define JSOP_STARTXML_LENGTH 1 #define JSOP_STARTXMLEXPR_LENGTH 1 #define JSOP_CALLELEM_LENGTH 1 #define JSOP_STOP_LENGTH 1 #define JSOP_GETXPROP_LENGTH 5 #define JSOP_CALLXMLNAME_LENGTH 1 #define JSOP_TYPEOFEXPR_LENGTH 1 #define JSOP_ENTERBLOCK_LENGTH 5 #define JSOP_LEAVEBLOCK_LENGTH 3 #define JSOP_UNUSED1_LENGTH 1 #define JSOP_UNUSED2_LENGTH 1 #define JSOP_GENERATOR_LENGTH 1 #define JSOP_YIELD_LENGTH 1 #define JSOP_ARRAYPUSH_LENGTH 3 #define JSOP_GETFUNNS_LENGTH 1 #define JSOP_ENUMCONSTELEM_LENGTH 1 #define JSOP_LEAVEBLOCKEXPR_LENGTH 3 #define JSOP_UNUSED21_LENGTH 1 #define JSOP_UNUSED22_LENGTH 1 #define JSOP_UNUSED23_LENGTH 1 #define JSOP_CALLGNAME_LENGTH 5 #define JSOP_CALLLOCAL_LENGTH 3 #define JSOP_CALLARG_LENGTH 3 #define JSOP_BINDGNAME_LENGTH 5 #define JSOP_INT8_LENGTH 2 #define JSOP_INT32_LENGTH 5 #define JSOP_LENGTH_LENGTH 5 #define JSOP_HOLE_LENGTH 1 #define JSOP_UNUSED17_LENGTH 1 #define JSOP_UNUSED24_LENGTH 1 #define JSOP_UNUSED25_LENGTH 1 #define JSOP_UNUSED29_LENGTH 1 #define JSOP_UNUSED30_LENGTH 1 #define JSOP_REST_LENGTH 1 #define JSOP_TOID_LENGTH 1 #define JSOP_IMPLICITTHIS_LENGTH 5 #define JSOP_LOOPENTRY_LENGTH 1 #define JSOP_ACTUALSFILLED_LENGTH 3 # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 1 # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 2 struct JSScript; namespace js { namespace mjit { struct RegisterAllocation; } } namespace js { namespace analyze { # 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" class Bytecode { friend class ScriptAnalysis; public: Bytecode() { PodZero(this); } bool jumpTarget : 1; bool fallthrough : 1; bool jumpFallthrough : 1; bool switchTarget : 1; bool unconditional : 1; bool analyzed : 1; bool exceptionEntry : 1; bool inTryBlock : 1; bool inLoop : 1; bool safePoint : 1; bool monitoredTypes : 1; bool monitoredTypesReturn : 1; bool arrayWriteHole: 1; bool getStringElement:1; bool accessGetter: 1; uint32_t stackDepth; private: union { types::TypeSet *observedTypes; LoopAnalysis *loop; }; mjit::RegisterAllocation *allocation; SSAValue *poppedValues; SSAUseChain **pushedUses; union { SlotValue *newValues; # 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" Vector *pendingValues; }; types::TypeSet *pushedTypes; types::TypeBarrier *typeBarriers; }; static inline unsigned GetDefCount(JSScript *script, unsigned offset) { do { } while(0); jsbytecode *pc = script->code + offset; switch (JSOp(*pc)) { case JSOP_OR: case JSOP_AND: return 1; case JSOP_FILTER: return 2; case JSOP_PICK: return (pc[1] + 1); default: return StackDefs(script, pc); } } static inline unsigned GetUseCount(JSScript *script, unsigned offset) { do { } while(0); jsbytecode *pc = script->code + offset; if (JSOp(*pc) == JSOP_PICK) return (pc[1] + 1); if (js_CodeSpec[*pc].nuses == -1) return StackUses(script, pc); return js_CodeSpec[*pc].nuses; } static inline bool ExtendedDef(jsbytecode *pc) { switch ((JSOp)*pc) { case JSOP_SETARG: case JSOP_INCARG: case JSOP_DECARG: case JSOP_ARGINC: case JSOP_ARGDEC: case JSOP_SETLOCAL: case JSOP_INCLOCAL: case JSOP_DECLOCAL: case JSOP_LOCALINC: case JSOP_LOCALDEC: return true; default: return false; } } static inline bool BytecodeNoFallThrough(JSOp op) { switch (op) { case JSOP_GOTO: case JSOP_DEFAULT: case JSOP_RETURN: case JSOP_STOP: case JSOP_RETRVAL: case JSOP_THROW: case JSOP_TABLESWITCH: case JSOP_LOOKUPSWITCH: case JSOP_FILTER: return true; case JSOP_GOSUB: return false; default: return false; } } static inline bool ExtendedUse(jsbytecode *pc) { if (ExtendedDef(pc)) return true; switch ((JSOp)*pc) { case JSOP_GETARG: case JSOP_CALLARG: case JSOP_GETLOCAL: case JSOP_CALLLOCAL: return true; default: return false; } } static inline JSOp ReverseCompareOp(JSOp op) { switch (op) { case JSOP_GT: return JSOP_LT; case JSOP_GE: return JSOP_LE; case JSOP_LT: return JSOP_GT; case JSOP_LE: return JSOP_GE; default: __builtin_unreachable(); return op; } } static inline unsigned FollowBranch(JSContext *cx, JSScript *script, unsigned offset) { jsbytecode *pc = script->code + offset; unsigned targetOffset = offset + GET_JUMP_OFFSET(pc); if (targetOffset < offset) { jsbytecode *target = script->code + targetOffset; JSOp nop = JSOp(*target); if (nop == JSOP_GOTO) return targetOffset + GET_JUMP_OFFSET(target); } return targetOffset; } static inline uint32_t CalleeSlot() { return 0; } static inline uint32_t ThisSlot() { return 1; } static inline uint32_t ArgSlot(uint32_t arg) { return 2 + arg; } static inline uint32_t LocalSlot(JSScript *script, uint32_t local) { return 2 + (script->function() ? script->function()->nargs : 0) + local; } static inline uint32_t TotalSlots(JSScript *script) { return LocalSlot(script, 0) + script->nfixed; } static inline uint32_t StackSlot(JSScript *script, uint32_t index) { return TotalSlots(script) + index; } static inline uint32_t GetBytecodeSlot(JSScript *script, jsbytecode *pc) { switch (JSOp(*pc)) { case JSOP_GETARG: case JSOP_CALLARG: case JSOP_SETARG: case JSOP_INCARG: case JSOP_DECARG: case JSOP_ARGINC: case JSOP_ARGDEC: return ArgSlot(((unsigned)(((pc)[1] << 8) | (pc)[2]))); case JSOP_GETLOCAL: case JSOP_CALLLOCAL: case JSOP_SETLOCAL: case JSOP_INCLOCAL: case JSOP_DECLOCAL: case JSOP_LOCALINC: case JSOP_LOCALDEC: return LocalSlot(script, ((unsigned)(((pc)[1] << 8) | (pc)[2]))); case JSOP_GETALIASEDVAR: case JSOP_CALLALIASEDVAR: case JSOP_SETALIASEDVAR: { ScopeCoordinate sc = ScopeCoordinate(pc); return script->bindings.bindingIsArg(sc.binding) ? ArgSlot(script->bindings.bindingToArg(sc.binding)) : LocalSlot(script, script->bindings.bindingToLocal(sc.binding)); } case JSOP_THIS: return ThisSlot(); default: __builtin_unreachable(); return 0; } } static inline bool BytecodeUpdatesSlot(JSOp op) { switch (op) { case JSOP_SETARG: case JSOP_SETLOCAL: case JSOP_INCARG: case JSOP_DECARG: case JSOP_ARGINC: case JSOP_ARGDEC: case JSOP_INCLOCAL: case JSOP_DECLOCAL: case JSOP_LOCALINC: case JSOP_LOCALDEC: return true; default: return false; } } static inline int32_t GetBytecodeInteger(jsbytecode *pc) { switch (JSOp(*pc)) { case JSOP_ZERO: return 0; case JSOP_ONE: return 1; case JSOP_UINT16: return ((unsigned)(((pc)[1] << 8) | (pc)[2])); case JSOP_UINT24: return ((jsatomid)(((pc)[1] << 16) | ((pc)[2] << 8) | (pc)[3])); case JSOP_INT8: return (int8_t((pc)[1])); case JSOP_INT32: return (((uint32_t((pc)[1]) << 24) | (uint32_t((pc)[2]) << 16) | (uint32_t((pc)[3]) << 8) | uint32_t((pc)[4]))); default: __builtin_unreachable(); return 0; } } # 426 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" struct Lifetime { uint32_t start; uint32_t end; uint32_t savedEnd; bool loopTail; bool write; Lifetime *next; Lifetime(uint32_t offset, uint32_t savedEnd, Lifetime *next) : start(offset), end(offset), savedEnd(savedEnd), loopTail(false), write(false), next(next) {} }; class LoopAnalysis { public: LoopAnalysis *parent; uint32_t head; uint32_t backedge; uint32_t entry; uint32_t lastBlock; bool hasSafePoints; bool hasCallsLoops; }; struct LifetimeVariable { Lifetime *lifetime; Lifetime *saved; uint32_t savedEnd : 31; bool ensured : 1; Lifetime * live(uint32_t offset) const { if (lifetime && lifetime->end >= offset) return lifetime; Lifetime *segment = lifetime ? lifetime : saved; while (segment && segment->start <= offset) { if (segment->end >= offset) return segment; segment = segment->next; } return __null; } uint32_t firstWrite(uint32_t start, uint32_t end) const { Lifetime *segment = lifetime ? lifetime : saved; while (segment && segment->start <= end) { if (segment->start >= start && segment->write) return segment->start; segment = segment->next; } return (4294967295U); } uint32_t firstWrite(LoopAnalysis *loop) const { return firstWrite(loop->head, loop->backedge); } bool nonDecreasing(JSScript *script, LoopAnalysis *loop) const { Lifetime *segment = lifetime ? lifetime : saved; while (segment && segment->start <= loop->backedge) { if (segment->start >= loop->head && segment->write) { switch (JSOp(script->code[segment->start])) { case JSOP_INCLOCAL: case JSOP_LOCALINC: case JSOP_INCARG: case JSOP_ARGINC: break; default: return false; } } segment = segment->next; } return true; } uint32_t onlyWrite(LoopAnalysis *loop) const { uint32_t offset = (4294967295U); Lifetime *segment = lifetime ? lifetime : saved; while (segment && segment->start <= loop->backedge) { if (segment->start >= loop->head && segment->write) { if (offset != (4294967295U)) return (4294967295U); offset = segment->start; } segment = segment->next; } return offset; } }; struct SSAPhiNode; class SSAValue { friend class ScriptAnalysis; public: enum Kind { EMPTY = 0, PUSHED = 1, VAR = 2, PHI = 3 }; Kind kind() const { do { } while(0); return (Kind) (u.pushed.kind & 0x3); } bool operator==(const SSAValue &o) const { return !memcmp(this, &o, sizeof(SSAValue)); } uint32_t pushedOffset() const { do { } while(0); return u.pushed.offset; } uint32_t pushedIndex() const { do { } while(0); return u.pushed.index; } bool varInitial() const { do { } while(0); return u.var.initial; } uint32_t varSlot() const { do { } while(0); return u.var.slot; } uint32_t varOffset() const { do { } while(0); return u.var.offset; } uint32_t phiSlot() const; uint32_t phiLength() const; const SSAValue &phiValue(uint32_t i) const; types::TypeSet *phiTypes() const; uint32_t phiOffset() const { do { } while(0); return u.phi.offset; } SSAPhiNode *phiNode() const { do { } while(0); return u.phi.node; } void clear() { PodZero(this); do { } while(0); } void initPushed(uint32_t offset, uint32_t index) { clear(); u.pushed.kind = PUSHED; u.pushed.offset = offset; u.pushed.index = index; } static SSAValue PushedValue(uint32_t offset, uint32_t index) { SSAValue v; v.initPushed(offset, index); return v; } void initInitial(uint32_t slot) { clear(); u.var.kind = VAR; u.var.initial = true; u.var.slot = slot; } void initWritten(uint32_t slot, uint32_t offset) { clear(); u.var.kind = VAR; u.var.initial = false; u.var.slot = slot; u.var.offset = offset; } static SSAValue WrittenVar(uint32_t slot, uint32_t offset) { SSAValue v; v.initWritten(slot, offset); return v; } void initPhi(uint32_t offset, SSAPhiNode *node) { clear(); u.phi.kind = PHI; u.phi.offset = offset; u.phi.node = node; } static SSAValue PhiValue(uint32_t offset, SSAPhiNode *node) { SSAValue v; v.initPhi(offset, node); return v; } private: union { struct { Kind kind : 2; uint32_t offset : 30; uint32_t index; } pushed; struct { Kind kind : 2; bool initial : 1; uint32_t slot : 29; uint32_t offset; } var; struct { Kind kind : 2; uint32_t offset : 30; SSAPhiNode *node; } phi; } u; }; struct SSAPhiNode { types::TypeSet types; uint32_t slot; uint32_t length; SSAValue *options; SSAUseChain *uses; SSAPhiNode() { PodZero(this); } }; inline uint32_t SSAValue::phiSlot() const { return u.phi.node->slot; } inline uint32_t SSAValue::phiLength() const { do { } while(0); return u.phi.node->length; } inline const SSAValue & SSAValue::phiValue(uint32_t i) const { do { } while(0); return u.phi.node->options[i]; } inline types::TypeSet * SSAValue::phiTypes() const { do { } while(0); return &u.phi.node->types; } class SSAUseChain { public: bool popped : 1; uint32_t offset : 31; union { uint32_t which; SSAPhiNode *phi; } u; SSAUseChain *next; SSAUseChain() { PodZero(this); } }; class SlotValue { public: uint32_t slot; SSAValue value; SlotValue(uint32_t slot, const SSAValue &value) : slot(slot), value(value) {} }; struct NeedsArgsObjState; class ScriptAnalysis { friend class Bytecode; JSScript *script; Bytecode **codeArray; uint32_t numSlots; bool outOfMemory; bool hadFailure; bool *escapedSlots; bool ranBytecode_; bool ranSSA_; bool ranLifetimes_; bool ranInference_; # 842 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" bool usesReturnValue_:1; bool usesScopeChain_:1; bool usesThisValue_:1; bool hasFunctionCalls_:1; bool modifiesArguments_:1; bool extendsScope_:1; bool addsScopeObjects_:1; bool localsAliasStack_:1; bool isInlineable:1; bool isJaegerCompileable:1; bool canTrackVars:1; uint32_t numReturnSites_; LifetimeVariable *lifetimes; public: ScriptAnalysis(JSScript *script) { PodZero(this); this->script = script; } bool ranBytecode() { return ranBytecode_; } bool ranSSA() { return ranSSA_; } bool ranLifetimes() { return ranLifetimes_; } bool ranInference() { return ranInference_; } void analyzeBytecode(JSContext *cx); void analyzeSSA(JSContext *cx); void analyzeLifetimes(JSContext *cx); void analyzeTypes(JSContext *cx); void analyzeTypesNew(JSContext *cx); bool OOM() { return outOfMemory; } bool failed() { return hadFailure; } bool inlineable(uint32_t argc) { return isInlineable && argc == script->function()->nargs; } bool jaegerCompileable() { return isJaegerCompileable; } bool usesReturnValue() const { return usesReturnValue_; } bool usesScopeChain() const { return usesScopeChain_; } bool usesThisValue() const { return usesThisValue_; } bool hasFunctionCalls() const { return hasFunctionCalls_; } uint32_t numReturnSites() const { return numReturnSites_; } bool modifiesArguments() { return modifiesArguments_; } bool extendsScope() { return extendsScope_; } bool addsScopeObjects() { return addsScopeObjects_; } bool localsAliasStack() { return localsAliasStack_; } Bytecode& getCode(uint32_t offset) { do { } while(0); do { } while(0); return *codeArray[offset]; } Bytecode& getCode(const jsbytecode *pc) { return getCode(pc - script->code); } Bytecode* maybeCode(uint32_t offset) { do { } while(0); return codeArray[offset]; } Bytecode* maybeCode(const jsbytecode *pc) { return maybeCode(pc - script->code); } bool jumpTarget(uint32_t offset) { do { } while(0); return codeArray[offset] && codeArray[offset]->jumpTarget; } bool jumpTarget(const jsbytecode *pc) { return jumpTarget(pc - script->code); } bool popGuaranteed(jsbytecode *pc) { jsbytecode *next = pc + GetBytecodeLength(pc); return JSOp(*next) == JSOP_POP && !jumpTarget(next); } bool incrementInitialValueObserved(jsbytecode *pc) { const JSCodeSpec *cs = &js_CodeSpec[*pc]; return (cs->format & (1U<<12)) && !popGuaranteed(pc); } types::TypeSet *bytecodeTypes(const jsbytecode *pc) { do { } while(0); return getCode(pc).observedTypes; } const SSAValue &poppedValue(uint32_t offset, uint32_t which) { do { } while(0); do { } while(0) ; return getCode(offset).poppedValues[which]; } const SSAValue &poppedValue(const jsbytecode *pc, uint32_t which) { return poppedValue(pc - script->code, which); } const SlotValue *newValues(uint32_t offset) { do { } while(0); return getCode(offset).newValues; } const SlotValue *newValues(const jsbytecode *pc) { return newValues(pc - script->code); } types::TypeSet *pushedTypes(uint32_t offset, uint32_t which = 0) { do { } while(0); do { } while(0) ; types::TypeSet *array = getCode(offset).pushedTypes; do { } while(0); return array + which; } types::TypeSet *pushedTypes(const jsbytecode *pc, uint32_t which) { return pushedTypes(pc - script->code, which); } bool hasPushedTypes(const jsbytecode *pc) { return getCode(pc).pushedTypes != __null; } types::TypeBarrier *typeBarriers(JSContext *cx, uint32_t offset) { if (getCode(offset).typeBarriers) pruneTypeBarriers(cx, offset); return getCode(offset).typeBarriers; } types::TypeBarrier *typeBarriers(JSContext *cx, const jsbytecode *pc) { return typeBarriers(cx, pc - script->code); } void addTypeBarrier(JSContext *cx, const jsbytecode *pc, types::TypeSet *target, types::Type type); void addSingletonTypeBarrier(JSContext *cx, const jsbytecode *pc, types::TypeSet *target, JSObject *singleton, jsid singletonId); void pruneTypeBarriers(JSContext *cx, uint32_t offset); void breakTypeBarriers(JSContext *cx, uint32_t offset, bool all); void breakTypeBarriersSSA(JSContext *cx, const SSAValue &v); inline void addPushedType(JSContext *cx, uint32_t offset, uint32_t which, types::Type type); types::TypeSet *getValueTypes(const SSAValue &v) { switch (v.kind()) { case SSAValue::PUSHED: return pushedTypes(v.pushedOffset(), v.pushedIndex()); case SSAValue::VAR: do { } while(0); if (v.varInitial()) { return types::TypeScript::SlotTypes(script, v.varSlot()); } else { return pushedTypes(v.varOffset(), 0); } case SSAValue::PHI: return &v.phiNode()->types; default: __builtin_unreachable(); return __null; } } types::TypeSet *poppedTypes(uint32_t offset, uint32_t which) { return getValueTypes(poppedValue(offset, which)); } types::TypeSet *poppedTypes(const jsbytecode *pc, uint32_t which) { return getValueTypes(poppedValue(pc, which)); } bool integerOperation(JSContext *cx, jsbytecode *pc); bool trackUseChain(const SSAValue &v) { do { } while (0); return v.kind() != SSAValue::EMPTY && (v.kind() != SSAValue::VAR || !v.varInitial()); } SSAUseChain *& useChain(const SSAValue &v) { do { } while(0); if (v.kind() == SSAValue::PUSHED) return getCode(v.pushedOffset()).pushedUses[v.pushedIndex()]; if (v.kind() == SSAValue::VAR) return getCode(v.varOffset()).pushedUses[GetDefCount(script, v.varOffset())]; return v.phiNode()->uses; } mjit::RegisterAllocation *&getAllocation(uint32_t offset) { do { } while(0); return getCode(offset).allocation; } mjit::RegisterAllocation *&getAllocation(const jsbytecode *pc) { return getAllocation(pc - script->code); } LoopAnalysis *getLoop(uint32_t offset) { do { } while(0); return getCode(offset).loop; } LoopAnalysis *getLoop(const jsbytecode *pc) { return getLoop(pc - script->code); } jsbytecode *getCallPC(jsbytecode *pc) { SSAUseChain *uses = useChain(SSAValue::PushedValue(pc - script->code, 0)); do { } while(0); do { } while(0); return script->code + uses->offset; } # 1100 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" bool slotEscapes(uint32_t slot) { do { } while(0); if (slot >= numSlots) return true; return escapedSlots[slot]; } bool trackSlot(uint32_t slot) { return !slotEscapes(slot) && canTrackVars && slot < 1000; } const LifetimeVariable & liveness(uint32_t slot) { do { } while(0); do { } while(0); return lifetimes[slot]; } struct NameAccess { JSScript *script; types::TypeScriptNesting *nesting; uint32_t slot; bool arg; uint32_t index; const Value **basePointer() const { return arg ? &nesting->argArray : &nesting->varArray; } }; NameAccess resolveNameAccess(JSContext *cx, jsid id, bool addDependency = false); void printSSA(JSContext *cx); void printTypes(JSContext *cx); void clearAllocations(); private: void setOOM(JSContext *cx) { if (!outOfMemory) js_ReportOutOfMemory(cx); outOfMemory = true; hadFailure = true; } inline bool addJump(JSContext *cx, unsigned offset, unsigned *currentOffset, unsigned *forwardJump, unsigned *forwardLoop, unsigned stackDepth); inline void addVariable(JSContext *cx, LifetimeVariable &var, unsigned offset, LifetimeVariable **&saved, unsigned &savedCount); inline void killVariable(JSContext *cx, LifetimeVariable &var, unsigned offset, LifetimeVariable **&saved, unsigned &savedCount); inline void extendVariable(JSContext *cx, LifetimeVariable &var, unsigned start, unsigned end); inline void ensureVariable(LifetimeVariable &var, unsigned until); struct SSAValueInfo { SSAValue v; int32_t branchSize; }; bool makePhi(JSContext *cx, uint32_t slot, uint32_t offset, SSAValue *pv); void insertPhi(JSContext *cx, SSAValue &phi, const SSAValue &v); void mergeValue(JSContext *cx, uint32_t offset, const SSAValue &v, SlotValue *pv); void checkPendingValue(JSContext *cx, const SSAValue &v, uint32_t slot, Vector *pending); void checkBranchTarget(JSContext *cx, uint32_t targetOffset, Vector &branchTargets, SSAValueInfo *values, uint32_t stackDepth); void checkExceptionTarget(JSContext *cx, uint32_t catchOffset, Vector &exceptionTargets); void mergeBranchTarget(JSContext *cx, SSAValueInfo &value, uint32_t slot, const Vector &branchTargets, uint32_t currentOffset); void mergeExceptionTarget(JSContext *cx, const SSAValue &value, uint32_t slot, const Vector &exceptionTargets); void mergeAllExceptionTargets(JSContext *cx, SSAValueInfo *values, const Vector &exceptionTargets); void freezeNewValues(JSContext *cx, uint32_t offset); struct TypeInferenceState { Vector phiNodes; bool hasGetSet; bool hasHole; types::TypeSet *forTypes; TypeInferenceState(JSContext *cx) : phiNodes(cx), hasGetSet(false), hasHole(false), forTypes(__null) {} }; bool analyzeTypesBytecode(JSContext *cx, unsigned offset, TypeInferenceState &state); bool needsArgsObj(NeedsArgsObjState &state, const SSAValue &v); bool needsArgsObj(NeedsArgsObjState &state, SSAUseChain *use); bool needsArgsObj(JSContext *cx); public: void assertMatchingDebugMode() { } }; class AutoEnterAnalysis { JSCompartment *compartment; bool oldActiveAnalysis; bool left; void construct(JSCompartment *compartment) { this->compartment = compartment; oldActiveAnalysis = compartment->activeAnalysis; compartment->activeAnalysis = true; left = false; } public: AutoEnterAnalysis(JSContext *cx) { construct(cx->compartment); } AutoEnterAnalysis(JSCompartment *compartment) { construct(compartment); } void leave() { if (!left) { left = true; compartment->activeAnalysis = oldActiveAnalysis; } } ~AutoEnterAnalysis() { leave(); } }; struct CrossSSAValue { unsigned frame; SSAValue v; CrossSSAValue(unsigned frame, const SSAValue &v) : frame(frame), v(v) {} }; class CrossScriptSSA { public: static const uint32_t OUTER_FRAME = (4294967295U); static const unsigned INVALID_FRAME = uint32_t(-2); struct Frame { uint32_t index; JSScript *script; uint32_t depth; uint32_t parent; jsbytecode *parentpc; Frame(uint32_t index, JSScript *script, uint32_t depth, uint32_t parent, jsbytecode *parentpc) : index(index), script(script), depth(depth), parent(parent), parentpc(parentpc) {} }; const Frame &getFrame(uint32_t index) { if (index == OUTER_FRAME) return outerFrame; return inlineFrames[index]; } unsigned numFrames() { return 1 + inlineFrames.length(); } const Frame &iterFrame(unsigned i) { if (i == 0) return outerFrame; return inlineFrames[i - 1]; } JSScript *outerScript() { return outerFrame.script; } size_t frameLength(uint32_t index) { if (index == OUTER_FRAME) return 0; size_t res = outerFrame.script->length; for (unsigned i = 0; i < index; i++) res += inlineFrames[i].script->length; return res; } types::TypeSet *getValueTypes(const CrossSSAValue &cv) { return getFrame(cv.frame).script->analysis()->getValueTypes(cv.v); } bool addInlineFrame(JSScript *script, uint32_t depth, uint32_t parent, jsbytecode *parentpc) { uint32_t index = inlineFrames.length(); return inlineFrames.append(Frame(index, script, depth, parent, parentpc)); } CrossScriptSSA(JSContext *cx, JSScript *outer) : cx(cx), outerFrame(OUTER_FRAME, outer, 0, INVALID_FRAME, __null), inlineFrames(cx) {} CrossSSAValue foldValue(const CrossSSAValue &cv); private: JSContext *cx; Frame outerFrame; Vector inlineFrames; }; } } namespace js { namespace tl { template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; } } # 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" 1 #define jsprf_h___ # 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" # 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 1 3 4 # 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 #define _STDARG_H #define _ANSI_STDARG_H_ #undef __need___va_list # 47 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 #define va_start(v,l) __builtin_va_start(v,l) #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) #define va_copy(d,s) __builtin_va_copy(d,s) #define __va_copy(d,s) __builtin_va_copy(d,s) # 108 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 #define _VA_LIST_ #define _VA_LIST #define _VA_LIST_T_H #define __va_list__ # 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" 2 extern "C" { extern __attribute__((visibility("default"))) uint32_t JS_snprintf(char *out, uint32_t outlen, const char *fmt, ...); extern __attribute__((visibility("default"))) char* JS_smprintf(const char *fmt, ...); extern __attribute__((visibility("default"))) void JS_smprintf_free(char *mem); # 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" extern __attribute__((visibility("default"))) char* JS_sprintf_append(char *last, const char *fmt, ...); # 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" typedef int (*JSStuffFunc)(void *arg, const char *s, uint32_t slen); extern __attribute__((visibility("default"))) uint32_t JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...); extern __attribute__((visibility("default"))) uint32_t JS_vsnprintf(char *out, uint32_t outlen, const char *fmt, va_list ap); extern __attribute__((visibility("default"))) char* JS_vsmprintf(const char *fmt, va_list ap); extern __attribute__((visibility("default"))) char* JS_vsprintf_append(char *last, const char *fmt, va_list ap); extern __attribute__((visibility("default"))) uint32_t JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap); } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" #define Stack_inl_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 1 # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" #define jsscriptinlines_h___ # 1 "./jsautooplen.h" 1 #define JSOP_NOP_LENGTH 1 #define JSOP_UNDEFINED_LENGTH 1 #define JSOP_POPV_LENGTH 1 #define JSOP_ENTERWITH_LENGTH 1 #define JSOP_LEAVEWITH_LENGTH 1 #define JSOP_RETURN_LENGTH 1 #define JSOP_GOTO_LENGTH 5 #define JSOP_IFEQ_LENGTH 5 #define JSOP_IFNE_LENGTH 5 #define JSOP_ARGUMENTS_LENGTH 1 #define JSOP_SWAP_LENGTH 1 #define JSOP_POPN_LENGTH 3 #define JSOP_DUP_LENGTH 1 #define JSOP_DUP2_LENGTH 1 #define JSOP_SETCONST_LENGTH 5 #define JSOP_BITOR_LENGTH 1 #define JSOP_BITXOR_LENGTH 1 #define JSOP_BITAND_LENGTH 1 #define JSOP_EQ_LENGTH 1 #define JSOP_NE_LENGTH 1 #define JSOP_LT_LENGTH 1 #define JSOP_LE_LENGTH 1 #define JSOP_GT_LENGTH 1 #define JSOP_GE_LENGTH 1 #define JSOP_LSH_LENGTH 1 #define JSOP_RSH_LENGTH 1 #define JSOP_URSH_LENGTH 1 #define JSOP_ADD_LENGTH 1 #define JSOP_SUB_LENGTH 1 #define JSOP_MUL_LENGTH 1 #define JSOP_DIV_LENGTH 1 #define JSOP_MOD_LENGTH 1 #define JSOP_NOT_LENGTH 1 #define JSOP_BITNOT_LENGTH 1 #define JSOP_NEG_LENGTH 1 #define JSOP_POS_LENGTH 1 #define JSOP_DELNAME_LENGTH 5 #define JSOP_DELPROP_LENGTH 5 #define JSOP_DELELEM_LENGTH 1 #define JSOP_TYPEOF_LENGTH 1 #define JSOP_VOID_LENGTH 1 #define JSOP_INCNAME_LENGTH 6 #define JSOP_INCPROP_LENGTH 6 #define JSOP_INCELEM_LENGTH 2 #define JSOP_DECNAME_LENGTH 6 #define JSOP_DECPROP_LENGTH 6 #define JSOP_DECELEM_LENGTH 2 #define JSOP_NAMEINC_LENGTH 6 #define JSOP_PROPINC_LENGTH 6 #define JSOP_ELEMINC_LENGTH 2 #define JSOP_NAMEDEC_LENGTH 6 #define JSOP_PROPDEC_LENGTH 6 #define JSOP_ELEMDEC_LENGTH 2 #define JSOP_GETPROP_LENGTH 5 #define JSOP_SETPROP_LENGTH 5 #define JSOP_GETELEM_LENGTH 1 #define JSOP_SETELEM_LENGTH 1 #define JSOP_CALLNAME_LENGTH 5 #define JSOP_CALL_LENGTH 3 #define JSOP_NAME_LENGTH 5 #define JSOP_DOUBLE_LENGTH 5 #define JSOP_STRING_LENGTH 5 #define JSOP_ZERO_LENGTH 1 #define JSOP_ONE_LENGTH 1 #define JSOP_NULL_LENGTH 1 #define JSOP_THIS_LENGTH 1 #define JSOP_FALSE_LENGTH 1 #define JSOP_TRUE_LENGTH 1 #define JSOP_OR_LENGTH 5 #define JSOP_AND_LENGTH 5 #define JSOP_TABLESWITCH_LENGTH -1 #define JSOP_LOOKUPSWITCH_LENGTH -1 #define JSOP_STRICTEQ_LENGTH 1 #define JSOP_STRICTNE_LENGTH 1 #define JSOP_SETCALL_LENGTH 1 #define JSOP_ITER_LENGTH 2 #define JSOP_MOREITER_LENGTH 1 #define JSOP_ITERNEXT_LENGTH 2 #define JSOP_ENDITER_LENGTH 1 #define JSOP_FUNAPPLY_LENGTH 3 #define JSOP_OBJECT_LENGTH 5 #define JSOP_POP_LENGTH 1 #define JSOP_NEW_LENGTH 3 #define JSOP_UNUSED0_LENGTH 1 #define JSOP_GETARG_LENGTH 3 #define JSOP_SETARG_LENGTH 3 #define JSOP_GETLOCAL_LENGTH 3 #define JSOP_SETLOCAL_LENGTH 3 #define JSOP_UINT16_LENGTH 3 #define JSOP_NEWINIT_LENGTH 5 #define JSOP_NEWARRAY_LENGTH 4 #define JSOP_NEWOBJECT_LENGTH 5 #define JSOP_ENDINIT_LENGTH 1 #define JSOP_INITPROP_LENGTH 5 #define JSOP_INITELEM_LENGTH 1 #define JSOP_UNUSED14_LENGTH 1 #define JSOP_UNUSED15_LENGTH 1 #define JSOP_INCARG_LENGTH 3 #define JSOP_DECARG_LENGTH 3 #define JSOP_ARGINC_LENGTH 3 #define JSOP_ARGDEC_LENGTH 3 #define JSOP_INCLOCAL_LENGTH 3 #define JSOP_DECLOCAL_LENGTH 3 #define JSOP_LOCALINC_LENGTH 3 #define JSOP_LOCALDEC_LENGTH 3 #define JSOP_LEAVEFORLETIN_LENGTH 1 #define JSOP_LABEL_LENGTH 5 #define JSOP_UNUSED3_LENGTH 1 #define JSOP_FUNCALL_LENGTH 3 #define JSOP_LOOPHEAD_LENGTH 1 #define JSOP_BINDNAME_LENGTH 5 #define JSOP_SETNAME_LENGTH 5 #define JSOP_THROW_LENGTH 1 #define JSOP_IN_LENGTH 1 #define JSOP_INSTANCEOF_LENGTH 1 #define JSOP_DEBUGGER_LENGTH 1 #define JSOP_GOSUB_LENGTH 5 #define JSOP_RETSUB_LENGTH 1 #define JSOP_EXCEPTION_LENGTH 1 #define JSOP_LINENO_LENGTH 3 #define JSOP_CONDSWITCH_LENGTH 1 #define JSOP_CASE_LENGTH 5 #define JSOP_DEFAULT_LENGTH 5 #define JSOP_EVAL_LENGTH 3 #define JSOP_ENUMELEM_LENGTH 1 #define JSOP_GETTER_LENGTH 1 #define JSOP_SETTER_LENGTH 1 #define JSOP_DEFFUN_LENGTH 5 #define JSOP_DEFCONST_LENGTH 5 #define JSOP_DEFVAR_LENGTH 5 #define JSOP_LAMBDA_LENGTH 5 #define JSOP_CALLEE_LENGTH 1 #define JSOP_UNUSED31_LENGTH 1 #define JSOP_PICK_LENGTH 2 #define JSOP_TRY_LENGTH 1 #define JSOP_FINALLY_LENGTH 1 #define JSOP_GETALIASEDVAR_LENGTH 9 #define JSOP_CALLALIASEDVAR_LENGTH 9 #define JSOP_SETALIASEDVAR_LENGTH 9 #define JSOP_INCALIASEDVAR_LENGTH 10 #define JSOP_DECALIASEDVAR_LENGTH 10 #define JSOP_ALIASEDVARINC_LENGTH 10 #define JSOP_ALIASEDVARDEC_LENGTH 10 #define JSOP_UNUSED8_LENGTH 1 #define JSOP_UNUSED9_LENGTH 1 #define JSOP_UNUSED10_LENGTH 1 #define JSOP_UNUSED11_LENGTH 1 #define JSOP_UNUSED12_LENGTH 1 #define JSOP_UNUSED13_LENGTH 1 #define JSOP_BACKPATCH_LENGTH 5 #define JSOP_BACKPATCH_POP_LENGTH 5 #define JSOP_THROWING_LENGTH 1 #define JSOP_SETRVAL_LENGTH 1 #define JSOP_RETRVAL_LENGTH 1 #define JSOP_GETGNAME_LENGTH 5 #define JSOP_SETGNAME_LENGTH 5 #define JSOP_INCGNAME_LENGTH 6 #define JSOP_DECGNAME_LENGTH 6 #define JSOP_GNAMEINC_LENGTH 6 #define JSOP_GNAMEDEC_LENGTH 6 #define JSOP_REGEXP_LENGTH 5 #define JSOP_DEFXMLNS_LENGTH 1 #define JSOP_ANYNAME_LENGTH 1 #define JSOP_QNAMEPART_LENGTH 5 #define JSOP_QNAMECONST_LENGTH 5 #define JSOP_QNAME_LENGTH 1 #define JSOP_TOATTRNAME_LENGTH 1 #define JSOP_TOATTRVAL_LENGTH 1 #define JSOP_ADDATTRNAME_LENGTH 1 #define JSOP_ADDATTRVAL_LENGTH 1 #define JSOP_BINDXMLNAME_LENGTH 1 #define JSOP_SETXMLNAME_LENGTH 1 #define JSOP_XMLNAME_LENGTH 1 #define JSOP_DESCENDANTS_LENGTH 1 #define JSOP_FILTER_LENGTH 5 #define JSOP_ENDFILTER_LENGTH 5 #define JSOP_TOXML_LENGTH 1 #define JSOP_TOXMLLIST_LENGTH 1 #define JSOP_XMLTAGEXPR_LENGTH 1 #define JSOP_XMLELTEXPR_LENGTH 1 #define JSOP_XMLCDATA_LENGTH 5 #define JSOP_XMLCOMMENT_LENGTH 5 #define JSOP_XMLPI_LENGTH 5 #define JSOP_DELDESC_LENGTH 1 #define JSOP_CALLPROP_LENGTH 5 #define JSOP_ENTERLET0_LENGTH 5 #define JSOP_ENTERLET1_LENGTH 5 #define JSOP_UINT24_LENGTH 4 #define JSOP_UNUSED18_LENGTH 1 #define JSOP_UNUSED19_LENGTH 1 #define JSOP_UNUSED20_LENGTH 1 #define JSOP_STARTXML_LENGTH 1 #define JSOP_STARTXMLEXPR_LENGTH 1 #define JSOP_CALLELEM_LENGTH 1 #define JSOP_STOP_LENGTH 1 #define JSOP_GETXPROP_LENGTH 5 #define JSOP_CALLXMLNAME_LENGTH 1 #define JSOP_TYPEOFEXPR_LENGTH 1 #define JSOP_ENTERBLOCK_LENGTH 5 #define JSOP_LEAVEBLOCK_LENGTH 3 #define JSOP_UNUSED1_LENGTH 1 #define JSOP_UNUSED2_LENGTH 1 #define JSOP_GENERATOR_LENGTH 1 #define JSOP_YIELD_LENGTH 1 #define JSOP_ARRAYPUSH_LENGTH 3 #define JSOP_GETFUNNS_LENGTH 1 #define JSOP_ENUMCONSTELEM_LENGTH 1 #define JSOP_LEAVEBLOCKEXPR_LENGTH 3 #define JSOP_UNUSED21_LENGTH 1 #define JSOP_UNUSED22_LENGTH 1 #define JSOP_UNUSED23_LENGTH 1 #define JSOP_CALLGNAME_LENGTH 5 #define JSOP_CALLLOCAL_LENGTH 3 #define JSOP_CALLARG_LENGTH 3 #define JSOP_BINDGNAME_LENGTH 5 #define JSOP_INT8_LENGTH 2 #define JSOP_INT32_LENGTH 5 #define JSOP_LENGTH_LENGTH 5 #define JSOP_HOLE_LENGTH 1 #define JSOP_UNUSED17_LENGTH 1 #define JSOP_UNUSED24_LENGTH 1 #define JSOP_UNUSED25_LENGTH 1 #define JSOP_UNUSED29_LENGTH 1 #define JSOP_UNUSED30_LENGTH 1 #define JSOP_REST_LENGTH 1 #define JSOP_TOID_LENGTH 1 #define JSOP_IMPLICITTHIS_LENGTH 5 #define JSOP_LOOPENTRY_LENGTH 1 #define JSOP_ACTUALSFILLED_LENGTH 3 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 2 # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 1 #define jsscopeinlines_h___ # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" #define ArgumentsObject_h___ namespace js { # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" struct ArgumentsData { HeapValue callee; size_t *deletedBits; HeapValue slots[1]; }; # 95 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" class ArgumentsObject : public JSObject { static const uint32_t INITIAL_LENGTH_SLOT = 0; static const uint32_t DATA_SLOT = 1; static const uint32_t STACK_FRAME_SLOT = 2; static const uint32_t LENGTH_OVERRIDDEN_BIT = 0x1; static const uint32_t PACKED_BITS_COUNT = 1; void initInitialLength(uint32_t length); void initData(ArgumentsData *data); static ArgumentsObject *create(JSContext *cx, uint32_t argc, HandleObject callee); public: static const uint32_t RESERVED_SLOTS = 3; static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; static ArgumentsObject *create(JSContext *cx, StackFrame *fp); static ArgumentsObject *createUnexpected(JSContext *cx, StackFrame *fp); inline uint32_t initialLength() const; inline bool hasOverriddenLength() const; inline void markLengthOverridden(); # 142 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" inline bool getElement(uint32_t i, js::Value *vp); # 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" inline bool getElements(uint32_t start, uint32_t count, js::Value *vp); inline js::ArgumentsData *data() const; # 171 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" inline bool isElementDeleted(uint32_t i) const; inline bool isAnyElementDeleted() const; inline void markElementDeleted(uint32_t i); inline const js::Value &element(uint32_t i) const; inline void setElement(uint32_t i, const js::Value &v); inline js::StackFrame *maybeStackFrame() const; inline void setStackFrame(js::StackFrame *frame); inline size_t sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const; }; class NormalArgumentsObject : public ArgumentsObject { public: inline const js::Value &callee() const; inline void clearCallee(); static bool optimizedGetElem(JSContext *cx, StackFrame *fp, const Value &elem, Value *vp); }; class StrictArgumentsObject : public ArgumentsObject {}; } js::NormalArgumentsObject & JSObject::asNormalArguments() { do { } while(0); return *static_cast(this); } js::StrictArgumentsObject & JSObject::asStrictArguments() { do { } while(0); return *static_cast(this); } js::ArgumentsObject & JSObject::asArguments() { do { } while(0); return *static_cast(this); } const js::ArgumentsObject & JSObject::asArguments() const { do { } while(0); return *static_cast(this); } # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" #define jscntxtinlines_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" #define ParseMaps_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/InlineMap.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/InlineMap.h" #define InlineMap_h__ namespace js { template struct ZeroIsReserved { static const bool result = false; }; template struct ZeroIsReserved { static const bool result = true; }; template class InlineMap { public: typedef HashMap, TempAllocPolicy> WordMap; struct InlineElem { K key; V value; }; private: typedef typename WordMap::Ptr WordMapPtr; typedef typename WordMap::AddPtr WordMapAddPtr; typedef typename WordMap::Range WordMapRange; size_t inlNext; size_t inlCount; InlineElem inl[InlineElems]; WordMap map; void checkStaticInvariants() { typedef int moz_static_assert108[(ZeroIsReserved::result) ? 1 : -1]; } bool usingMap() const { return inlNext > InlineElems; } bool switchToMap() { do { } while(0); if (map.initialized()) { map.clear(); } else { if (!map.init(count())) return false; do { } while(0); } for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { if (it->key && !map.putNew(it->key, it->value)) return false; } inlNext = InlineElems + 1; do { } while(0); do { } while(0); return true; } __attribute__((noinline)) bool switchAndAdd(const K &key, const V &value) { if (!switchToMap()) return false; return map.putNew(key, value); } public: explicit InlineMap(JSContext *cx) : inlNext(0), inlCount(0), map(cx) { checkStaticInvariants(); } class Entry { friend class InlineMap; const K &key_; const V &value_; Entry(const K &key, const V &value) : key_(key), value_(value) {} public: const K &key() { return key_; } const V &value() { return value_; } }; class Ptr { friend class InlineMap; WordMapPtr mapPtr; InlineElem *inlPtr; bool isInlinePtr; typedef Ptr ******* ConvertibleToBool; explicit Ptr(WordMapPtr p) : mapPtr(p), isInlinePtr(false) {} explicit Ptr(InlineElem *ie) : inlPtr(ie), isInlinePtr(true) {} void operator==(const Ptr &other); public: Ptr() { } bool found() const { return isInlinePtr ? bool(inlPtr) : mapPtr.found(); } operator ConvertibleToBool() const { return ConvertibleToBool(found()); } K &key() { do { } while(0); return isInlinePtr ? inlPtr->key : mapPtr->key; } V &value() { do { } while(0); return isInlinePtr ? inlPtr->value : mapPtr->value; } }; class AddPtr { friend class InlineMap; WordMapAddPtr mapAddPtr; InlineElem *inlAddPtr; bool isInlinePtr; bool inlPtrFound; AddPtr(InlineElem *ptr, bool found) : inlAddPtr(ptr), isInlinePtr(true), inlPtrFound(found) {} AddPtr(const WordMapAddPtr &p) : mapAddPtr(p), isInlinePtr(false) {} void operator==(const AddPtr &other); typedef AddPtr ******* ConvertibleToBool; public: AddPtr() {} bool found() const { return isInlinePtr ? inlPtrFound : mapAddPtr.found(); } operator ConvertibleToBool() const { return found() ? ConvertibleToBool(1) : ConvertibleToBool(0); } V &value() { do { } while(0); if (isInlinePtr) return inlAddPtr->value; return mapAddPtr->value; } }; size_t count() { return usingMap() ? map.count() : inlCount; } bool empty() const { return usingMap() ? map.empty() : !inlCount; } void clear() { inlNext = 0; inlCount = 0; } bool isMap() const { return usingMap(); } const WordMap &asMap() const { do { } while(0); return map; } const InlineElem *asInline() const { do { } while(0); return inl; } const InlineElem *inlineEnd() const { do { } while(0); return inl + inlNext; } __attribute__((always_inline)) inline Ptr lookup(const K &key) { if (usingMap()) return Ptr(map.lookup(key)); for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { if (it->key == key) return Ptr(it); } return Ptr(__null); } __attribute__((always_inline)) inline AddPtr lookupForAdd(const K &key) { if (usingMap()) return AddPtr(map.lookupForAdd(key)); for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { if (it->key == key) return AddPtr(it, true); } return AddPtr(inl + inlNext, false); } __attribute__((always_inline)) inline bool add(AddPtr &p, const K &key, const V &value) { do { } while(0); if (p.isInlinePtr) { InlineElem *addPtr = p.inlAddPtr; do { } while(0); if (addPtr == inl + InlineElems) return switchAndAdd(key, value); do { } while(0); do { } while(0); p.inlAddPtr->key = key; p.inlAddPtr->value = value; ++inlCount; ++inlNext; return true; } return map.add(p.mapAddPtr, key, value); } __attribute__((always_inline)) inline bool put(const K &key, const V &value) { AddPtr p = lookupForAdd(key); if (p) { p.value() = value; return true; } return add(p, key, value); } void remove(Ptr p) { do { } while(0); if (p.isInlinePtr) { do { } while(0); do { } while(0); p.inlPtr->key = __null; --inlCount; return; } do { } while(0); map.remove(p.mapPtr); } void remove(const K &key) { if (Ptr p = lookup(key)) remove(p); } class Range { friend class InlineMap; WordMapRange mapRange; InlineElem *cur; InlineElem *end; bool isInline; explicit Range(WordMapRange r) : cur(__null), end(__null), isInline(false) { mapRange = r; do { } while(0); } Range(const InlineElem *begin, const InlineElem *end_) : cur(const_cast(begin)), end(const_cast(end_)), isInline(true) { advancePastNulls(cur); do { } while(0); } bool checkInlineRangeInvariants() const { do { } while(0); do { } while (0); return true; } bool isInlineRange() const { do { } while (0); return isInline; } void advancePastNulls(InlineElem *begin) { InlineElem *newCur = begin; while (newCur < end && __null == newCur->key) ++newCur; do { } while(0); cur = newCur; } void bumpCurPtr() { do { } while(0); advancePastNulls(cur + 1); } void operator==(const Range &other); public: bool empty() const { return isInlineRange() ? cur == end : mapRange.empty(); } Entry front() { do { } while(0); if (isInlineRange()) return Entry(cur->key, cur->value); return Entry(mapRange.front().key, mapRange.front().value); } void popFront() { do { } while(0); if (isInlineRange()) bumpCurPtr(); else mapRange.popFront(); } }; Range all() const { return usingMap() ? Range(map.all()) : Range(inl, inl + inlNext); } }; } # 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" 2 namespace js { struct Definition; # 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" class ParseMapPool { typedef Vector RecyclableMaps; RecyclableMaps all; RecyclableMaps recyclable; JSContext *cx; void checkInvariants(); void recycle(void *map) { do { } while(0); # 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" do { } while(0); recyclable.infallibleAppend(map); } void *allocateFresh(); void *allocate(); typedef AtomIndexMap AtomMapT; static AtomMapT *asAtomMap(void *ptr) { return reinterpret_cast(ptr); } public: explicit ParseMapPool(JSContext *cx) : cx(cx) {} ~ParseMapPool() { purgeAll(); } void purgeAll(); bool empty() const { return all.empty(); } template T *acquire(); void release(AtomIndexMap *map) { recycle((void *) map); } void release(AtomDefnMap *map) { recycle((void *) map); } void release(AtomDOHMap *map) { recycle((void *) map); } }; template struct AtomThingMapPtr { Map *map_; void init() { clearMap(); } bool ensureMap(JSContext *cx); void releaseMap(JSContext *cx); bool hasMap() const { return map_; } Map *getMap() { return map_; } void setMap(Map *newMap) { do { } while(0); map_ = newMap; } void clearMap() { map_ = __null; } Map *operator->() { return map_; } const Map *operator->() const { return map_; } Map &operator*() const { return *map_; } }; struct AtomDefnMapPtr : public AtomThingMapPtr { __attribute__((always_inline)) inline Definition *lookupDefn(JSAtom *atom) { AtomDefnMap::Ptr p = map_->lookup(atom); return p ? p.value() : __null; } }; typedef AtomThingMapPtr AtomIndexMapPtr; template class OwnedAtomThingMapPtr : public AtomThingMapPtrT { JSContext *cx; public: explicit OwnedAtomThingMapPtr(JSContext *cx) : cx(cx) { AtomThingMapPtrT::init(); } ~OwnedAtomThingMapPtr() { AtomThingMapPtrT::releaseMap(cx); } }; typedef OwnedAtomThingMapPtr OwnedAtomDefnMapPtr; typedef OwnedAtomThingMapPtr OwnedAtomIndexMapPtr; struct AtomDeclNode { Definition *defn; AtomDeclNode *next; explicit AtomDeclNode(Definition *defn) : defn(defn), next(__null) {} }; class DefnOrHeader { union { Definition *defn; AtomDeclNode *head; uintptr_t bits; } u; public: DefnOrHeader() { u.bits = 0; } explicit DefnOrHeader(Definition *defn) { u.defn = defn; do { } while(0); } explicit DefnOrHeader(AtomDeclNode *node) { u.head = node; u.bits |= 0x1; do { } while(0); } bool isHeader() const { return u.bits & 0x1; } Definition *defn() const { do { } while(0); return u.defn; } AtomDeclNode *header() const { do { } while(0); return (AtomDeclNode *) (u.bits & ~0x1); } }; namespace tl { template <> struct IsPodType { static const bool result = true; }; } # 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" class AtomDecls { friend class AtomDeclsIter; JSContext *cx; AtomDOHMap *map; AtomDecls(const AtomDecls &other) ; void operator=(const AtomDecls &other) ; AtomDeclNode *allocNode(Definition *defn); AtomDeclNode *lastAsNode(DefnOrHeader *doh); public: explicit AtomDecls(JSContext *cx) : cx(cx), map(__null) {} ~AtomDecls(); bool init(); void clear() { map->clear(); } inline Definition *lookupFirst(JSAtom *atom); inline MultiDeclRange lookupMulti(JSAtom *atom); inline bool addUnique(JSAtom *atom, Definition *defn); bool addShadow(JSAtom *atom, Definition *defn); bool addHoist(JSAtom *atom, Definition *defn); void updateFirst(JSAtom *atom, Definition *defn) { do { } while(0); AtomDOHMap::Ptr p = map->lookup(atom); do { } while(0); if (p.value().isHeader()) p.value().header()->defn = defn; else p.value() = DefnOrHeader(defn); } void remove(JSAtom *atom) { do { } while(0); AtomDOHMap::Ptr p = map->lookup(atom); if (!p) return; DefnOrHeader &doh = p.value(); if (!doh.isHeader()) { map->remove(p); return; } AtomDeclNode *node = doh.header(); AtomDeclNode *newHead = node->next; if (newHead) p.value() = DefnOrHeader(newHead); else map->remove(p); } AtomDOHMap::Range all() { do { } while(0); return map->all(); } }; class MultiDeclRange { friend class AtomDecls; AtomDeclNode *node; Definition *defn; explicit MultiDeclRange(Definition *defn) : node(__null), defn(defn) {} explicit MultiDeclRange(AtomDeclNode *node) : node(node), defn(node->defn) {} public: void popFront() { do { } while(0); if (!node) { defn = __null; return; } node = node->next; defn = node ? node->defn : __null; } Definition *front() { do { } while(0); return defn; } bool empty() const { do { } while (0); return !defn; } }; class AtomDeclsIter { AtomDOHMap::Range r; AtomDeclNode *link; public: explicit AtomDeclsIter(AtomDecls *decls) : r(decls->all()), link(__null) {} Definition *next() { if (link) { do { } while(0); Definition *result = link->defn; link = link->next; do { } while(0); return result; } if (r.empty()) return __null; const DefnOrHeader &doh = r.front().value(); r.popFront(); if (!doh.isHeader()) return doh.defn(); do { } while(0); AtomDeclNode *node = doh.header(); link = node->next; return node->defn; } }; typedef AtomDefnMap::Range AtomDefnRange; typedef AtomDefnMap::AddPtr AtomDefnAddPtr; typedef AtomDefnMap::Ptr AtomDefnPtr; typedef AtomIndexMap::AddPtr AtomIndexAddPtr; typedef AtomIndexMap::Ptr AtomIndexPtr; typedef AtomDOHMap::Ptr AtomDOHPtr; typedef AtomDOHMap::AddPtr AtomDOHAddPtr; typedef AtomDOHMap::Range AtomDOHRange; } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 2 namespace js { inline void NewObjectCache::staticAsserts() { typedef int moz_static_assert109[(NewObjectCache::MAX_OBJ_SIZE == sizeof(JSObject_Slots16)) ? 1 : -1]; typedef int moz_static_assert110[(gc::FINALIZE_OBJECT_LAST == gc::FINALIZE_OBJECT16_BACKGROUND) ? 1 : -1]; } inline bool NewObjectCache::lookup(Class *clasp, gc::Cell *key, gc::AllocKind kind, EntryIndex *pentry) { uintptr_t hash = (uintptr_t(clasp) ^ uintptr_t(key)) + kind; *pentry = hash % js::ArrayLength(entries); Entry *entry = &entries[*pentry]; return (entry->clasp == clasp && entry->key == key); } inline bool NewObjectCache::lookupProto(Class *clasp, JSObject *proto, gc::AllocKind kind, EntryIndex *pentry) { do { } while(0); return lookup(clasp, proto, kind, pentry); } inline bool NewObjectCache::lookupGlobal(Class *clasp, js::GlobalObject *global, gc::AllocKind kind, EntryIndex *pentry) { return lookup(clasp, global, kind, pentry); } inline bool NewObjectCache::lookupType(Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, EntryIndex *pentry) { return lookup(clasp, type, kind, pentry); } inline void NewObjectCache::fill(EntryIndex entry_, Class *clasp, gc::Cell *key, gc::AllocKind kind, JSObject *obj) { do { } while(0); Entry *entry = &entries[entry_]; do { } while(0); entry->clasp = clasp; entry->key = key; entry->kind = kind; entry->nbytes = obj->sizeOfThis(); js_memcpy(&entry->templateObject, obj, entry->nbytes); } inline void NewObjectCache::fillProto(EntryIndex entry, Class *clasp, JSObject *proto, gc::AllocKind kind, JSObject *obj) { do { } while(0); do { } while(0); return fill(entry, clasp, proto, kind, obj); } inline void NewObjectCache::fillGlobal(EntryIndex entry, Class *clasp, js::GlobalObject *global, gc::AllocKind kind, JSObject *obj) { return fill(entry, clasp, global, kind, obj); } inline void NewObjectCache::fillType(EntryIndex entry, Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, JSObject *obj) { do { } while(0); return fill(entry, clasp, type, kind, obj); } inline JSObject * NewObjectCache::newObjectFromHit(JSContext *cx, EntryIndex entry_) { do { } while(0); Entry *entry = &entries[entry_]; JSObject *obj = js_TryNewGCObject(cx, entry->kind); if (obj) { copyCachedToObject(obj, reinterpret_cast(&entry->templateObject)); Probes::createObject(cx, obj); return obj; } size_t nbytes = entry->nbytes; char stackObject[sizeof(JSObject_Slots16)]; do { } while(0); js_memcpy(&stackObject, &entry->templateObject, nbytes); JSObject *baseobj = (JSObject *) stackObject; obj = js_NewGCObject(cx, entry->kind); if (obj) { copyCachedToObject(obj, baseobj); Probes::createObject(cx, obj); return obj; } return __null; } struct PreserveRegsGuard { PreserveRegsGuard(JSContext *cx, FrameRegs ®s) : prevContextRegs(cx->maybeRegs()), cx(cx), regs_(regs) { cx->stack.repointRegs(®s_); } ~PreserveRegsGuard() { do { } while(0); *prevContextRegs = regs_; cx->stack.repointRegs(prevContextRegs); } FrameRegs *prevContextRegs; private: JSContext *cx; FrameRegs ®s_; }; static inline GlobalObject * GetGlobalForScopeChain(JSContext *cx) { if (cx->hasfp()) return &cx->fp()->global(); JSObject *scope = JS_ObjectToInnerObject(cx, cx->globalObject); if (!scope) return __null; return &scope->asGlobal(); } inline GSNCache * GetGSNCache(JSContext *cx) { return &cx->runtime->gsnCache; } class AutoNamespaceArray : protected AutoGCRooter { public: AutoNamespaceArray(JSContext *cx) : AutoGCRooter(cx, NAMESPACES), context(cx) { array.init(); } ~AutoNamespaceArray() { array.finish(context->runtime->defaultFreeOp()); } uint32_t length() const { return array.length; } private: JSContext *context; friend void AutoGCRooter::trace(JSTracer *trc); public: JSXMLArray array; }; template class AutoPtr { JSContext *cx; T *value; AutoPtr(const AutoPtr &other) ; public: explicit AutoPtr(JSContext *cx) : cx(cx), value(__null) {} ~AutoPtr() { cx->delete_(value); } void operator=(T *ptr) { value = ptr; } typedef void ***** ConvertibleToBool; operator ConvertibleToBool() const { return (ConvertibleToBool) value; } const T *operator->() const { return value; } T *operator->() { return value; } T *get() { return value; } }; # 325 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" #define START_ASSERT_SAME_COMPARTMENT() if (cx->runtime->gcRunning) return; CompartmentChecker c(cx) template inline void assertSameCompartment(JSContext *cx, const T1 &t1) { } template inline void assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2) { } template inline void assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3) { } template inline void assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) { } template inline void assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5) { # 383 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" } #undef START_ASSERT_SAME_COMPARTMENT __attribute__((always_inline)) inline bool CallJSNative(JSContext *cx, Native native, const CallArgs &args) { assertSameCompartment(cx, args); bool ok = native(cx, args.length(), args.base()); if (ok) { assertSameCompartment(cx, args.rval()); do { } while (0); } return ok; } extern JSBool CallOrConstructBoundFunction(JSContext *, unsigned, js::Value *); __attribute__((always_inline)) inline bool CallJSNativeConstructor(JSContext *cx, Native native, const CallArgs &args) { do { } while(0); if (!CallJSNative(cx, native, args)) return false; # 432 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" do { } while (0) ; return true; } __attribute__((always_inline)) inline bool CallJSPropertyOp(JSContext *cx, PropertyOp op, HandleObject receiver, HandleId id, Value *vp) { assertSameCompartment(cx, receiver, id, *vp); JSBool ok = op(cx, receiver, id, vp); if (ok) assertSameCompartment(cx, *vp); return ok; } __attribute__((always_inline)) inline bool CallJSPropertyOpSetter(JSContext *cx, StrictPropertyOp op, HandleObject obj, HandleId id, JSBool strict, Value *vp) { assertSameCompartment(cx, obj, id, *vp); return op(cx, obj, id, strict, vp); } inline bool CallSetter(JSContext *cx, HandleObject obj, HandleId id, StrictPropertyOp op, unsigned attrs, unsigned shortid, JSBool strict, Value *vp) { if (attrs & 0x20) return InvokeGetterOrSetter(cx, obj, CastAsObjectJsval(op), 1, vp, vp); if (attrs & 0x10) return js_ReportGetterOnlyAssignment(cx); if (!(attrs & 0x100)) return CallJSPropertyOpSetter(cx, op, obj, id, strict, vp); RootedId nid(cx, INT_TO_JSID(shortid)); return CallJSPropertyOpSetter(cx, op, obj, nid, strict, vp); } static inline HeapPtrAtom * FrameAtomBase(JSContext *cx, js::StackFrame *fp) { return fp->script()->atoms; } } inline JSVersion JSContext::findVersion() const { if (hasVersionOverride) return versionOverride; if (stack.hasfp()) { js::StackFrame *f = fp(); while (f && !f->isScriptFrame()) f = f->prev(); if (f) return f->script()->getVersion(); } return defaultVersion; } inline bool JSContext::canSetDefaultVersion() const { return !stack.hasfp() && !hasVersionOverride; } inline void JSContext::overrideVersion(JSVersion newVersion) { do { } while(0); versionOverride = newVersion; hasVersionOverride = true; } inline bool JSContext::maybeOverrideVersion(JSVersion newVersion) { if (canSetDefaultVersion()) { setDefaultVersion(newVersion); return false; } overrideVersion(newVersion); return true; } inline unsigned JSContext::getCompileOptions() const { return js::VersionFlagsToOptions(findVersion()); } inline unsigned JSContext::allOptions() const { return getRunOptions() | getCompileOptions(); } inline void JSContext::setCompileOptions(unsigned newcopts) { do { } while(0); if ((__builtin_expect((getCompileOptions() == newcopts), 1))) return; JSVersion version = findVersion(); JSVersion newVersion = js::OptionFlagsToVersion(newcopts, version); maybeOverrideVersion(newVersion); } inline void JSContext::assertValidStackDepth(unsigned depth) { } inline js::LifoAlloc & JSContext::typeLifoAlloc() { return compartment->typeLifoAlloc; } inline bool JSContext::ensureGeneratorStackSpace() { bool ok = genStack.reserve(genStack.length() + 1); if (!ok) js_ReportOutOfMemory(this); return ok; } inline void JSContext::setPendingException(js::Value v) { do { } while(0); this->throwing = true; this->exception = v; js::assertSameCompartment(this, v); } inline bool JSContext::ensureParseMapPool() { if (parseMapPool_) return true; parseMapPool_ = js::OffTheBooks::new_(this); return parseMapPool_; } inline js::PropertyTree& JSContext::propertyTree() { return compartment->propertyTree; } static inline js::StackFrame * js_GetTopStackFrame(JSContext *cx, FrameExpandKind expand) { if (expand) js::mjit::ExpandInlineFrames(cx->compartment); return cx->maybefp(); } # 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 # 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 namespace js { inline BaseShape::BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags) { do { } while(0); PodZero(this); this->clasp = clasp; this->parent = parent; this->flags = objectFlags; } inline BaseShape::BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags, uint8_t attrs, js::PropertyOp rawGetter, js::StrictPropertyOp rawSetter) { do { } while(0); PodZero(this); this->clasp = clasp; this->parent = parent; this->flags = objectFlags; this->rawGetter = rawGetter; this->rawSetter = rawSetter; if ((attrs & 0x10) && rawGetter) { this->flags |= HAS_GETTER_OBJECT; JSObject::writeBarrierPost(this->getterObj, &this->getterObj); } if ((attrs & 0x20) && rawSetter) { this->flags |= HAS_SETTER_OBJECT; JSObject::writeBarrierPost(this->setterObj, &this->setterObj); } } inline BaseShape::BaseShape(const StackBaseShape &base) { PodZero(this); this->clasp = base.clasp; this->parent = base.parent; this->flags = base.flags; this->rawGetter = base.rawGetter; this->rawSetter = base.rawSetter; if ((base.flags & HAS_GETTER_OBJECT) && base.rawGetter) { JSObject::writeBarrierPost(this->getterObj, &this->getterObj); } if ((base.flags & HAS_SETTER_OBJECT) && base.rawSetter) { JSObject::writeBarrierPost(this->setterObj, &this->setterObj); } } inline BaseShape & BaseShape::operator=(const BaseShape &other) { clasp = other.clasp; parent = other.parent; flags = other.flags; slotSpan_ = other.slotSpan_; if (flags & HAS_GETTER_OBJECT) { getterObj = other.getterObj; JSObject::writeBarrierPost(getterObj, &getterObj); } else { rawGetter = other.rawGetter; } if (flags & HAS_SETTER_OBJECT) { setterObj = other.setterObj; JSObject::writeBarrierPost(setterObj, &setterObj); } else { rawSetter = other.rawSetter; } return *this; } inline bool BaseShape::matchesGetterSetter(PropertyOp rawGetter, StrictPropertyOp rawSetter) const { return rawGetter == this->rawGetter && rawSetter == this->rawSetter; } inline StackBaseShape::StackBaseShape(Shape *shape) : flags(shape->getObjectFlags()), clasp(shape->getObjectClass()), parent(shape->getObjectParent()) { updateGetterSetter(shape->attrs, shape->getter(), shape->setter()); } inline void StackBaseShape::updateGetterSetter(uint8_t attrs, PropertyOp rawGetter, StrictPropertyOp rawSetter) { flags &= ~(BaseShape::HAS_GETTER_OBJECT | BaseShape::HAS_SETTER_OBJECT); if ((attrs & 0x10) && rawGetter) flags |= BaseShape::HAS_GETTER_OBJECT; if ((attrs & 0x20) && rawSetter) flags |= BaseShape::HAS_SETTER_OBJECT; this->rawGetter = rawGetter; this->rawSetter = rawSetter; } inline void BaseShape::adoptUnowned(UnownedBaseShape *other) { do { } while(0); DebugOnly flags = getObjectFlags(); do { } while(0); uint32_t span = slotSpan(); ShapeTable *table = &this->table(); *this = *other; setOwned(other); setTable(table); setSlotSpan(span); assertConsistency(); } inline void BaseShape::setOwned(UnownedBaseShape *unowned) { flags |= OWNED_SHAPE; this->unowned_ = unowned; } inline void BaseShape::assertConsistency() { # 177 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" } inline Shape::Shape(const StackShape &other, uint32_t nfixed) : base_(other.base), propid_(other.propid), slotInfo(other.maybeSlot() | (nfixed << FIXED_SLOTS_SHIFT)), attrs(other.attrs), flags(other.flags), shortid_(other.shortid), parent(__null) { kids.setNull(); } inline Shape::Shape(UnownedBaseShape *base, uint32_t nfixed) : base_(base), propid_(((jsid)0x4)), slotInfo(SHAPE_INVALID_SLOT | (nfixed << FIXED_SLOTS_SHIFT)), attrs(0x40), flags(0), shortid_(0), parent(__null) { do { } while(0); kids.setNull(); } inline HashNumber StackShape::hash() const { HashNumber hash = uintptr_t(base); hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ (flags & Shape::PUBLIC_FLAGS); hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ attrs; hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ shortid; hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ slot_; hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ (propid); return hash; } inline bool Shape::matches(const js::Shape *other) const { return propid_.get() == other->propid_.get() && matchesParamsAfterId(other->base(), other->maybeSlot(), other->attrs, other->flags, other->shortid_); } inline bool Shape::matches(const StackShape &other) const { return propid_.get() == other.propid && matchesParamsAfterId(other.base, other.slot_, other.attrs, other.flags, other.shortid); } inline bool Shape::matchesParamsAfterId(BaseShape *base, uint32_t aslot, unsigned aattrs, unsigned aflags, int ashortid) const { return base->unowned() == this->base()->unowned() && maybeSlot() == aslot && attrs == aattrs && ((flags ^ aflags) & PUBLIC_FLAGS) == 0 && shortid_ == ashortid; } inline bool Shape::getUserId(JSContext *cx, jsid *idp) const { const Shape *self = this; if (self->hasShortID()) { int16_t id = self->shortid(); if (id < 0) return ValueToId(cx, Int32Value(id), idp); *idp = INT_TO_JSID(id); } else { *idp = propid(); } return true; } inline bool Shape::get(JSContext* cx, HandleObject receiver, JSObject* obj, JSObject *pobj, Value* vp) const { do { } while(0); if (hasGetterValue()) { Value fval = getterValue(); return InvokeGetterOrSetter(cx, receiver, fval, 0, 0, vp); } RootedId id(cx); if (!getUserId(cx, id.address())) return false; return CallJSPropertyOp(cx, getterOp(), receiver, id, vp); } inline bool Shape::set(JSContext* cx, HandleObject obj, bool strict, Value* vp) const { do { } while (0); if (attrs & 0x20) { Value fval = setterValue(); return InvokeGetterOrSetter(cx, obj, fval, 1, vp, vp); } if (attrs & 0x10) return js_ReportGetterOnlyAssignment(cx); RootedId id(cx); if (!getUserId(cx, id.address())) return false; if (obj->isWith()) { RootedObject nobj(cx, &obj->asWith().object()); return CallJSPropertyOpSetter(cx, setterOp(), nobj, id, strict, vp); } return CallJSPropertyOpSetter(cx, setterOp(), obj, id, strict, vp); } inline void Shape::setParent(js::Shape *p) { do { } while (0) ; do { } while (0) ; parent = p; } inline void Shape::removeFromDictionary(JSObject *obj) { do { } while(0); do { } while(0); do { } while(0); do { } while(0); do { } while(0); if (parent) parent->listp = listp; *listp = parent; listp = __null; } inline void Shape::insertIntoDictionary(HeapPtrShape *dictp) { do { } while(0); do { } while(0); do { } while (0); do { } while (0); do { } while (0); setParent(*dictp); if (parent) parent->listp = &parent; listp = (HeapPtrShape *) dictp; *dictp = this; } void Shape::initDictionaryShape(const StackShape &child, uint32_t nfixed, HeapPtrShape *dictp) { new (this) Shape(child, nfixed); this->flags |= IN_DICTIONARY; this->listp = __null; insertIntoDictionary(dictp); } inline EmptyShape::EmptyShape(UnownedBaseShape *base, uint32_t nfixed) : js::Shape(base, nfixed) { if (!getObjectClass()->isNative()) flags |= NON_NATIVE; } inline void Shape::writeBarrierPre(const js::Shape *shape) { if (!shape) return; JSCompartment *comp = shape->compartment(); if (comp->needsBarrier()) { Shape *tmp = const_cast(shape); MarkShapeUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void Shape::writeBarrierPost(const js::Shape *shape, void *addr) { } inline void Shape::readBarrier(const Shape *shape) { JSCompartment *comp = shape->compartment(); if (comp->needsBarrier()) { Shape *tmp = const_cast(shape); MarkShapeUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); do { } while(0); } } inline void Shape::markChildren(JSTracer *trc) { MarkBaseShape(trc, &base_, "base"); gc::MarkId(trc, &propidRef(), "propid"); if (parent) MarkShape(trc, &parent, "parent"); } inline void BaseShape::writeBarrierPre(BaseShape *base) { if (!base) return; JSCompartment *comp = base->compartment(); if (comp->needsBarrier()) { BaseShape *tmp = base; MarkBaseShapeUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void BaseShape::writeBarrierPost(BaseShape *shape, void *addr) { } inline void BaseShape::readBarrier(BaseShape *base) { JSCompartment *comp = base->compartment(); if (comp->needsBarrier()) { BaseShape *tmp = base; MarkBaseShapeUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); do { } while(0); } } inline void BaseShape::markChildren(JSTracer *trc) { if (hasGetterObject()) MarkObjectUnbarriered(trc, &getterObj, "getter"); if (hasSetterObject()) MarkObjectUnbarriered(trc, &setterObj, "setter"); if (isOwned()) MarkBaseShape(trc, &unowned_, "base"); if (parent) MarkObject(trc, &parent, "parent"); } } # 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 2 namespace js { inline Bindings::Bindings(JSContext *cx) : lastBinding(__null), nargs(0), nvars(0), hasDup_(false) {} inline void Bindings::transfer(JSContext *cx, Bindings *bindings) { do { } while(0); do { } while(0); *this = *bindings; } inline void Bindings::clone(JSContext *cx, Bindings *bindings) { do { } while(0); do { } while(0); *this = *bindings; } Shape * Bindings::lastShape() const { do { } while(0); do { } while(0); return lastBinding; } Shape * Bindings::initialShape(JSContext *cx) const { gc::AllocKind kind = gc::FINALIZE_OBJECT4; do { } while(0); return EmptyShape::getInitialShape(cx, &CallClass, __null, __null, kind, BaseShape::VAROBJ); } bool Bindings::ensureShape(JSContext *cx) { if (!lastBinding) { lastBinding = initialShape(cx); if (!lastBinding) return false; } return true; } bool Bindings::extensibleParents() { return lastBinding && lastBinding->extensibleParents(); } extern void CurrentScriptFileLineOriginSlow(JSContext *cx, const char **file, unsigned *linenop, JSPrincipals **origin); inline void CurrentScriptFileLineOrigin(JSContext *cx, const char **file, unsigned *linenop, JSPrincipals **origin, LineOption opt = NOT_CALLED_FROM_JSOP_EVAL) { if (opt == CALLED_FROM_JSOP_EVAL) { do { } while(0); do { } while(0); JSScript *script = cx->fp()->script(); *file = script->filename; *linenop = ((unsigned)(((cx->regs().pc + 3)[1] << 8) | (cx->regs().pc + 3)[2])); *origin = script->originPrincipals; return; } CurrentScriptFileLineOriginSlow(cx, file, linenop, origin); } inline void ScriptCounts::destroy(FreeOp *fop) { fop->free_(pcCountsVector); } inline void MarkScriptFilename(JSRuntime *rt, const char *filename) { if (rt->gcIsFull) ScriptFilenameEntry::fromFilename(filename)->marked = true; } } inline void JSScript::setFunction(JSFunction *fun) { function_ = fun; } inline JSFunction * JSScript::getFunction(size_t index) { JSObject *funobj = getObject(index); do { } while(0); return funobj->toFunction(); } inline JSFunction * JSScript::getCallerFunction() { do { } while(0); return getFunction(0); } inline JSObject * JSScript::getRegExp(size_t index) { js::ObjectArray *arr = regexps(); do { } while(0); JSObject *obj = arr->vector[index]; do { } while(0); return obj; } inline bool JSScript::isEmpty() const { if (length > 3) return false; jsbytecode *pc = code; if (noScriptRval && JSOp(*pc) == JSOP_FALSE) ++pc; return JSOp(*pc) == JSOP_STOP; } inline bool JSScript::hasGlobal() const { do { } while(0); js::GlobalObject *obj = types->global; return obj && !obj->isCleared(); } inline js::GlobalObject * JSScript::global() const { do { } while(0); return types->global; } inline bool JSScript::hasClearedGlobal() const { do { } while(0); js::GlobalObject *obj = types->global; return obj && obj->isCleared(); } inline js::types::TypeScriptNesting * JSScript::nesting() const { do { } while(0); return types->nesting; } inline void JSScript::clearNesting() { js::types::TypeScriptNesting *nesting = this->nesting(); if (nesting) { js::Foreground::delete_(nesting); types->nesting = __null; } } inline bool JSScript::ensureHasJITInfo(JSContext *cx) { if (jitInfo) return true; jitInfo = cx->new_(); return jitInfo != __null; } inline void JSScript::destroyJITInfo(js::FreeOp *fop) { fop->delete_(jitInfo); jitInfo = __null; } inline void JSScript::writeBarrierPre(JSScript *script) { if (!script) return; JSCompartment *comp = script->compartment(); if (comp->needsBarrier()) { do { } while(0); JSScript *tmp = script; MarkScriptUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void JSScript::writeBarrierPost(JSScript *script, void *addr) { } # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" #define ArgumentsObject_inl_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" 2 namespace js { inline void ArgumentsObject::initInitialLength(uint32_t length) { do { } while(0); initFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(length << PACKED_BITS_COUNT)); do { } while(0); do { } while(0); } inline uint32_t ArgumentsObject::initialLength() const { uint32_t argc = uint32_t(getFixedSlot(INITIAL_LENGTH_SLOT).toInt32()) >> PACKED_BITS_COUNT; do { } while(0); return argc; } inline void ArgumentsObject::markLengthOverridden() { uint32_t v = getFixedSlot(INITIAL_LENGTH_SLOT).toInt32() | LENGTH_OVERRIDDEN_BIT; setFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(v)); } inline bool ArgumentsObject::hasOverriddenLength() const { const js::Value &v = getFixedSlot(INITIAL_LENGTH_SLOT); return v.toInt32() & LENGTH_OVERRIDDEN_BIT; } inline void ArgumentsObject::initData(ArgumentsData *data) { do { } while(0); initFixedSlot(DATA_SLOT, PrivateValue(data)); } inline ArgumentsData * ArgumentsObject::data() const { return reinterpret_cast(getFixedSlot(DATA_SLOT).toPrivate()); } inline bool ArgumentsObject::isElementDeleted(uint32_t i) const { return IsBitArrayElementSet(data()->deletedBits, initialLength(), i); } inline bool ArgumentsObject::isAnyElementDeleted() const { return IsAnyBitArrayElementSet(data()->deletedBits, initialLength()); } inline void ArgumentsObject::markElementDeleted(uint32_t i) { SetBitArrayElement(data()->deletedBits, initialLength(), i); } inline const js::Value & ArgumentsObject::element(uint32_t i) const { do { } while(0); return data()->slots[i]; } inline void ArgumentsObject::setElement(uint32_t i, const js::Value &v) { do { } while(0); data()->slots[i] = v; } inline bool ArgumentsObject::getElement(uint32_t i, Value *vp) { if (i >= initialLength() || isElementDeleted(i)) return false; StackFrame *fp = maybeStackFrame(); do { } while (0); if (fp) *vp = fp->canonicalActualArg(i); else *vp = element(i); return true; } namespace detail { struct CopyNonHoleArgsTo { CopyNonHoleArgsTo(ArgumentsObject *argsobj, Value *dst) : argsobj(*argsobj), dst(dst) {} ArgumentsObject &argsobj; Value *dst; bool operator()(uint32_t argi, Value *src) { *dst++ = *src; return true; } }; } inline bool ArgumentsObject::getElements(uint32_t start, uint32_t count, Value *vp) { do { } while(0); uint32_t length = initialLength(); if (start > length || start + count > length || isAnyElementDeleted()) return false; StackFrame *fp = maybeStackFrame(); if (!fp) { const Value *srcbeg = Valueify(data()->slots) + start; const Value *srcend = srcbeg + count; const Value *src = srcbeg; for (Value *dst = vp; src < srcend; ++dst, ++src) *dst = *src; return true; } do { } while(0); return fp->forEachCanonicalActualArg(detail::CopyNonHoleArgsTo(this, vp), start, count); } inline js::StackFrame * ArgumentsObject::maybeStackFrame() const { return reinterpret_cast(getFixedSlot(STACK_FRAME_SLOT).toPrivate()); } inline void ArgumentsObject::setStackFrame(StackFrame *frame) { setFixedSlot(STACK_FRAME_SLOT, PrivateValue(frame)); } inline size_t ArgumentsObject::sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const { return mallocSizeOf(data()); } inline const js::Value & NormalArgumentsObject::callee() const { return data()->callee; } inline void NormalArgumentsObject::clearCallee() { data()->callee.set(compartment(), MagicValue(JS_OVERWRITTEN_CALLEE)); } } # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 1 # 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 namespace js { static inline bool IsCacheableNonGlobalScope(JSObject *obj) { bool cacheable = (obj->isCall() || obj->isBlock() || obj->isDeclEnv()); do { } while (0); return cacheable; } inline HandleObject StackFrame::scopeChain() const { do { } while (0); if (!(flags_ & HAS_SCOPECHAIN)) { scopeChain_ = callee().environment(); flags_ |= HAS_SCOPECHAIN; } return HandleObject::fromMarkedLocation(&scopeChain_); } inline GlobalObject & StackFrame::global() const { return scopeChain()->global(); } inline JSObject & StackFrame::varObj() { JSObject *obj = scopeChain(); while (!obj->isVarObj()) obj = obj->enclosingScope(); return *obj; } inline JSCompartment * StackFrame::compartment() const { do { } while (0); return scopeChain()->compartment(); } inline mjit::JITScript * StackFrame::jit() { JSScript *script_ = script(); return script_->getJIT(isConstructing(), script_->compartment()->needsBarrier()); } inline void StackFrame::initPrev(JSContext *cx) { do { } while(0); if (FrameRegs *regs = cx->maybeRegs()) { prev_ = regs->fp(); prevpc_ = regs->pc; prevInline_ = regs->inlined(); do { } while (0) ; } else { prev_ = __null; } } inline void StackFrame::resetGeneratorPrev(JSContext *cx) { flags_ |= HAS_PREVPC; initPrev(cx); } inline void StackFrame::initInlineFrame(JSFunction *fun, StackFrame *prevfp, jsbytecode *prevpc) { flags_ = StackFrame::FUNCTION; exec.fun = fun; resetInlinePrev(prevfp, prevpc); } inline void StackFrame::resetInlinePrev(StackFrame *prevfp, jsbytecode *prevpc) { do { } while (0); flags_ |= StackFrame::HAS_PREVPC; prev_ = prevfp; prevpc_ = prevpc; prevInline_ = __null; } inline void StackFrame::initCallFrame(JSContext *cx, JSFunction &callee, JSScript *script, uint32_t nactual, StackFrame::Flags flagsArg) { do { } while(0) ; do { } while(0); flags_ = FUNCTION | HAS_PREVPC | HAS_SCOPECHAIN | HAS_BLOCKCHAIN | flagsArg; exec.fun = &callee; u.nactual = nactual; scopeChain_ = callee.environment(); ncode_ = __null; initPrev(cx); blockChain_= __null; do { } while(0); do { } while(0); do { } while(0); do { } while(0); SetValueRangeToUndefined(slots(), script->nfixed); } inline void StackFrame::initFixupFrame(StackFrame *prev, StackFrame::Flags flags, void *ncode, unsigned nactual) { do { } while(0) ; flags_ = FUNCTION | flags; prev_ = prev; ncode_ = ncode; u.nactual = nactual; } inline JSObject * StackFrame::createRestParameter(JSContext *cx) { do { } while(0); unsigned nformal = fun()->nargs - 1, nactual = numActualArgs(); unsigned nrest = (nactual > nformal) ? nactual - nformal : 0; return NewDenseCopiedArray(cx, nrest, actualArgs() + nformal); } inline Value & StackFrame::canonicalActualArg(unsigned i) const { if (i < numFormalArgs()) return formalArg(i); do { } while(0); return actualArgs()[i]; } template inline bool StackFrame::forEachCanonicalActualArg(Op op, unsigned start , unsigned count ) { unsigned nformal = fun()->nargs; do { } while(0); Value *formals = formalArgsEnd() - nformal; unsigned nactual = numActualArgs(); if (count == unsigned(-1)) count = nactual - start; unsigned end = start + count; do { } while(0); do { } while(0); if (end <= nformal) { Value *p = formals + start; for (; start < end; ++p, ++start) { if (!op(start, p)) return false; } } else { for (Value *p = formals + start; start < nformal; ++p, ++start) { if (!op(start, p)) return false; } do { } while(0); Value *actuals = formals - (nactual + 2) + start; for (Value *p = actuals; start < end; ++p, ++start) { if (!op(start, p)) return false; } } return true; } template inline bool StackFrame::forEachFormalArg(Op op) { Value *formals = formalArgsEnd() - fun()->nargs; Value *formalsEnd = formalArgsEnd(); unsigned i = 0; for (Value *p = formals; p != formalsEnd; ++p, ++i) { if (!op(i, p)) return false; } return true; } struct CopyTo { Value *dst; CopyTo(Value *dst) : dst(dst) {} bool operator()(unsigned, Value *src) { *dst++ = *src; return true; } }; inline unsigned StackFrame::numActualArgs() const { # 264 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" do { } while(0); if ((__builtin_expect((flags_ & (OVERFLOW_ARGS | UNDERFLOW_ARGS)), 0))) return u.nactual; return numFormalArgs(); } inline Value * StackFrame::actualArgs() const { do { } while(0); Value *argv = formalArgs(); if ((__builtin_expect((flags_ & OVERFLOW_ARGS), 0))) return argv - (2 + u.nactual); return argv; } inline Value * StackFrame::actualArgsEnd() const { do { } while(0); if ((__builtin_expect((flags_ & OVERFLOW_ARGS), 0))) return formalArgs() - 2; return formalArgs() + numActualArgs(); } inline void StackFrame::setScopeChain(JSObject &obj) { # 304 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" scopeChain_ = &obj; flags_ |= HAS_SCOPECHAIN; } inline void StackFrame::initScopeChain(CallObject &obj) { do { } while(0); do { } while(0); scopeChain_ = &obj; flags_ |= HAS_SCOPECHAIN | HAS_CALL_OBJ; } inline CallObject & StackFrame::callObj() const { do { } while (0); JSObject *pobj = scopeChain(); while ((__builtin_expect((!pobj->isCall()), 0))) pobj = pobj->enclosingScope(); return pobj->asCall(); } inline bool StackFrame::maintainNestingState() const { return isNonEvalFunctionFrame() && !isGeneratorFrame() && script()->nesting(); } inline bool StackFrame::functionPrologue(JSContext *cx) { do { } while(0); do { } while(0); if (fun()->isHeavyweight()) { CallObject *callobj = CallObject::createForFunction(cx, this); if (!callobj) return false; initScopeChain(*callobj); } else { scopeChain(); } if (script()->nesting()) { do { } while(0); types::NestingPrologue(cx, this); } return true; } inline void StackFrame::functionEpilogue(JSContext *cx) { do { } while(0); if (cx->compartment->debugMode()) cx->runtime->debugScopes->onPopCall(this); if (flags_ & (HAS_ARGS_OBJ | HAS_CALL_OBJ)) { if (hasCallObj()) js_PutCallObject(this, scopeChain_->asCall()); if (hasArgsObj()) js_PutArgsObject(this); } if (maintainNestingState()) types::NestingEpilogue(this); } inline void StackFrame::updateEpilogueFlags() { if (flags_ & (HAS_ARGS_OBJ | HAS_CALL_OBJ)) { if (hasArgsObj() && !argsObj().maybeStackFrame()) flags_ &= ~HAS_ARGS_OBJ; if (hasCallObj() && !callObj().maybeStackFrame()) { scopeChain_ = isFunctionFrame() ? callee().environment() : &scopeChain_->asScope().enclosingScope(); flags_ &= ~HAS_CALL_OBJ; } } if (maintainNestingState()) script()->nesting()->activeFrames++; } __attribute__((always_inline)) inline bool StackSpace::ensureSpace(JSContext *cx, MaybeReportError report, Value *from, ptrdiff_t nvals, JSCompartment *dest) const { assertInvariants(); do { } while(0); if ((__builtin_expect((conservativeEnd_ - from < nvals), 0))) return ensureSpaceSlow(cx, report, from, nvals, dest); return true; } inline Value * StackSpace::getStackLimit(JSContext *cx, MaybeReportError report) { FrameRegs ®s = cx->regs(); unsigned nvals = regs.fp()->numSlots() + STACK_JIT_EXTRA; return ensureSpace(cx, report, regs.sp, nvals) ? conservativeEnd_ : __null; } __attribute__((always_inline)) inline StackFrame * ContextStack::getCallFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, JSFunction *fun, JSScript *script, StackFrame::Flags *flags) const { do { } while(0); unsigned nformal = fun->nargs; Value *firstUnused = args.end(); do { } while(0); unsigned nvals = VALUES_PER_STACK_FRAME + script->nslots + StackSpace::STACK_JIT_EXTRA; if (args.length() == nformal) { if (!space().ensureSpace(cx, report, firstUnused, nvals)) return __null; return reinterpret_cast(firstUnused); } if (args.length() < nformal) { *flags = StackFrame::Flags(*flags | StackFrame::UNDERFLOW_ARGS); unsigned nmissing = nformal - args.length(); if (!space().ensureSpace(cx, report, firstUnused, nmissing + nvals)) return __null; SetValueRangeToUndefined(firstUnused, nmissing); return reinterpret_cast(firstUnused + nmissing); } *flags = StackFrame::Flags(*flags | StackFrame::OVERFLOW_ARGS); unsigned ncopy = 2 + nformal; if (!space().ensureSpace(cx, report, firstUnused, ncopy + nvals)) return __null; Value *dst = firstUnused; Value *src = args.base(); PodCopy(dst, src, ncopy); return reinterpret_cast(firstUnused + ncopy); } __attribute__((always_inline)) inline bool ContextStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, JSFunction &callee, JSScript *script, InitialFrameFlags initial) { do { } while(0); do { } while(0); do { } while(0); StackFrame::Flags flags = ToFrameFlags(initial); StackFrame *fp = getCallFrame(cx, REPORT_ERROR, args, &callee, script, &flags); if (!fp) return false; fp->initCallFrame(cx, callee, script, args.length(), flags); regs.prepareToRun(*fp, script); return true; } __attribute__((always_inline)) inline bool ContextStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, JSFunction &callee, JSScript *script, InitialFrameFlags initial, Value **stackLimit) { if (!pushInlineFrame(cx, regs, args, callee, script, initial)) return false; *stackLimit = space().conservativeEnd_; return true; } __attribute__((always_inline)) inline StackFrame * ContextStack::getFixupFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, JSFunction *fun, JSScript *script, void *ncode, InitialFrameFlags initial, Value **stackLimit) { do { } while(0); do { } while(0); do { } while(0); StackFrame::Flags flags = ToFrameFlags(initial); StackFrame *fp = getCallFrame(cx, report, args, fun, script, &flags); if (!fp) return __null; fp->initFixupFrame(cx->fp(), flags, ncode, args.length()); *stackLimit = space().conservativeEnd_; return fp; } __attribute__((always_inline)) inline void ContextStack::popInlineFrame(FrameRegs ®s) { do { } while(0); do { } while(0); StackFrame *fp = regs.fp(); fp->functionEpilogue(cx_); Value *newsp = fp->actualArgs() - 1; do { } while(0); newsp[-1] = fp->returnValue(); regs.popFrame(newsp); } inline void ContextStack::popFrameAfterOverflow() { FrameRegs ®s = seg_->regs(); StackFrame *fp = regs.fp(); regs.popFrame(fp->actualArgsEnd()); } inline JSScript * ContextStack::currentScript(jsbytecode **ppc) const { if (ppc) *ppc = __null; FrameRegs *regs = maybeRegs(); StackFrame *fp = regs ? regs->fp() : __null; while (fp && fp->isDummyFrame()) fp = fp->prev(); if (!fp) return __null; mjit::CallSite *inlined = regs->inlined(); if (inlined) { mjit::JITChunk *chunk = fp->jit()->chunk(regs->pc); do { } while(0); mjit::InlineFrame *frame = &chunk->inlineFrames()[inlined->inlineIndex]; JSScript *script = frame->fun->script(); if (script->compartment() != cx_->compartment) return __null; if (ppc) *ppc = script->code + inlined->pcOffset; return script; } JSScript *script = fp->script(); if (script->compartment() != cx_->compartment) return __null; if (ppc) *ppc = fp->pcQuadratic(*this); return script; } inline JSScript * ContextStack::currentScriptWithDiagnostics(jsbytecode **ppc) const { if (ppc) *ppc = __null; FrameRegs *regs = maybeRegs(); StackFrame *fp = regs ? regs->fp() : __null; while (fp && fp->isDummyFrame()) fp = fp->prev(); if (!fp) *(int *) 0x10 = 0; mjit::CallSite *inlined = regs->inlined(); if (inlined) { mjit::JITChunk *chunk = fp->jit()->chunk(regs->pc); do { } while(0); mjit::InlineFrame *frame = &chunk->inlineFrames()[inlined->inlineIndex]; JSScript *script = frame->fun->script(); if (script->compartment() != cx_->compartment) *(int *) 0x20 = 0; if (ppc) *ppc = script->code + inlined->pcOffset; return script; } JSScript *script = fp->script(); if (script->compartment() != cx_->compartment) *(int *) 0x30 = 0; if (ppc) *ppc = fp->pcQuadratic(*this); if (!script) *(int *) 0x40 = 0; return script; } inline HandleObject ContextStack::currentScriptedScopeChain() const { return fp()->scopeChain(); } } # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 #define jsinferinlines_h___ namespace js { namespace types { inline Type Type::ObjectType(JSObject *obj) { if (obj->hasSingletonType()) return Type(uintptr_t(obj) | 1); return Type(uintptr_t(obj->type())); } inline Type Type::ObjectType(TypeObject *obj) { if (obj->singleton) return Type(uintptr_t(obj->singleton.get()) | 1); return Type(uintptr_t(obj)); } inline Type Type::ObjectType(TypeObjectKey *obj) { return Type(uintptr_t(obj)); } inline Type GetValueType(JSContext *cx, const Value &val) { do { } while(0); if (val.isDouble()) return Type::DoubleType(); if (val.isObject()) return Type::ObjectType(&val.toObject()); return Type::PrimitiveType(val.extractNonDoubleType()); } inline TypeFlags PrimitiveTypeFlag(JSValueType type) { switch (type) { case JSVAL_TYPE_UNDEFINED: return TYPE_FLAG_UNDEFINED; case JSVAL_TYPE_NULL: return TYPE_FLAG_NULL; case JSVAL_TYPE_BOOLEAN: return TYPE_FLAG_BOOLEAN; case JSVAL_TYPE_INT32: return TYPE_FLAG_INT32; case JSVAL_TYPE_DOUBLE: return TYPE_FLAG_DOUBLE; case JSVAL_TYPE_STRING: return TYPE_FLAG_STRING; case JSVAL_TYPE_MAGIC: return TYPE_FLAG_LAZYARGS; default: __builtin_unreachable(); return 0; } } inline JSValueType TypeFlagPrimitive(TypeFlags flags) { switch (flags) { case TYPE_FLAG_UNDEFINED: return JSVAL_TYPE_UNDEFINED; case TYPE_FLAG_NULL: return JSVAL_TYPE_NULL; case TYPE_FLAG_BOOLEAN: return JSVAL_TYPE_BOOLEAN; case TYPE_FLAG_INT32: return JSVAL_TYPE_INT32; case TYPE_FLAG_DOUBLE: return JSVAL_TYPE_DOUBLE; case TYPE_FLAG_STRING: return JSVAL_TYPE_STRING; case TYPE_FLAG_LAZYARGS: return JSVAL_TYPE_MAGIC; default: __builtin_unreachable(); return (JSValueType) 0; } } inline jsid MakeTypeId(JSContext *cx, jsid id) { do { } while(0); if (JSID_IS_INT(id)) return ((jsid)0x2); if (JSID_IS_STRING(id)) { JSFlatString *str = JSID_TO_FLAT_STRING(id); const jschar *cp = str->getCharsZ(cx); if (((((unsigned)(*cp)) - '0') <= 9) || *cp == '-') { cp++; while (((((unsigned)(*cp)) - '0') <= 9)) cp++; if (*cp == 0) return ((jsid)0x2); } return id; } return ((jsid)0x2); } const char * TypeIdStringImpl(jsid id); static inline const char * TypeIdString(jsid id) { return "(missing)"; } # 171 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" struct AutoEnterTypeInference { FreeOp *freeOp; JSCompartment *compartment; bool oldActiveAnalysis; bool oldActiveInference; AutoEnterTypeInference(JSContext *cx, bool compiling = false) { do { } while (0); init(cx->runtime->defaultFreeOp(), cx->compartment); } AutoEnterTypeInference(FreeOp *fop, JSCompartment *comp) { init(fop, comp); } ~AutoEnterTypeInference() { compartment->activeAnalysis = oldActiveAnalysis; compartment->activeInference = oldActiveInference; if (!compartment->activeInference) { TypeCompartment *types = &compartment->types; if (types->pendingNukeTypes) types->nukeTypes(freeOp); else if (types->pendingRecompiles) types->processPendingRecompiles(freeOp); } } private: void init(FreeOp *fop, JSCompartment *comp) { freeOp = fop; compartment = comp; oldActiveAnalysis = compartment->activeAnalysis; oldActiveInference = compartment->activeInference; compartment->activeAnalysis = true; compartment->activeInference = true; } }; struct AutoEnterCompilation { RecompileInfo &info; AutoEnterCompilation(JSContext *cx, JSScript *script, bool constructing, unsigned chunkIndex) : info(cx->compartment->types.compiledInfo) { do { } while(0); info.script = script; info.constructing = constructing; info.barriers = cx->compartment->needsBarrier(); info.chunkIndex = chunkIndex; } ~AutoEnterCompilation() { do { } while(0); info.script = __null; info.constructing = false; info.barriers = false; info.chunkIndex = 0; } }; # 263 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" inline TypeObject * GetTypeNewObject(JSContext *cx, JSProtoKey key) { JSObject *proto; if (!js_GetClassPrototype(cx, __null, key, &proto, __null)) return __null; return proto->getNewType(cx); } inline TypeObject * GetTypeCallerInitObject(JSContext *cx, JSProtoKey key) { if (cx->typeInferenceEnabled()) { jsbytecode *pc; JSScript *script = cx->stack.currentScript(&pc); if (script) return TypeScript::InitObject(cx, script, pc, key); } return GetTypeNewObject(cx, key); } inline void MarkIteratorUnknown(JSContext *cx) { extern void MarkIteratorUnknownSlow(JSContext *cx); if (cx->typeInferenceEnabled()) MarkIteratorUnknownSlow(cx); } inline bool TypeMonitorCall(JSContext *cx, const js::CallArgs &args, bool constructing) { extern void TypeMonitorCallSlow(JSContext *cx, JSObject *callee, const CallArgs &args, bool constructing); JSObject *callee = &args.callee(); if (callee->isFunction()) { JSFunction *fun = callee->toFunction(); if (fun->isInterpreted()) { JSScript *script = fun->script(); if (!script->ensureRanAnalysis(cx, fun->environment())) return false; if (cx->typeInferenceEnabled()) TypeMonitorCallSlow(cx, callee, args, constructing); } } return true; } inline bool TrackPropertyTypes(JSContext *cx, JSObject *obj, jsid id) { if (!cx->typeInferenceEnabled() || obj->hasLazyType() || obj->type()->unknownProperties()) return false; if (obj->hasSingletonType() && !obj->type()->maybeGetProperty(cx, id)) return false; return true; } inline void AddTypePropertyId(JSContext *cx, JSObject *obj, jsid id, Type type) { if (cx->typeInferenceEnabled()) id = MakeTypeId(cx, id); if (TrackPropertyTypes(cx, obj, id)) obj->type()->addPropertyType(cx, id, type); } inline void AddTypePropertyId(JSContext *cx, JSObject *obj, jsid id, const Value &value) { if (cx->typeInferenceEnabled()) id = MakeTypeId(cx, id); if (TrackPropertyTypes(cx, obj, id)) obj->type()->addPropertyType(cx, id, value); } inline void AddTypeProperty(JSContext *cx, TypeObject *obj, const char *name, Type type) { if (cx->typeInferenceEnabled() && !obj->unknownProperties()) obj->addPropertyType(cx, name, type); } inline void AddTypeProperty(JSContext *cx, TypeObject *obj, const char *name, const Value &value) { if (cx->typeInferenceEnabled() && !obj->unknownProperties()) obj->addPropertyType(cx, name, value); } inline void MarkTypeObjectFlags(JSContext *cx, JSObject *obj, TypeObjectFlags flags) { if (cx->typeInferenceEnabled() && !obj->hasLazyType() && !obj->type()->hasAllFlags(flags)) obj->type()->setFlags(cx, flags); } inline void MarkTypeObjectUnknownProperties(JSContext *cx, TypeObject *obj, bool markSetsUnknown = false) { if (cx->typeInferenceEnabled()) { if (!obj->unknownProperties()) obj->markUnknown(cx); if (markSetsUnknown && !(obj->flags & OBJECT_FLAG_SETS_MARKED_UNKNOWN)) cx->compartment->types.markSetsUnknown(cx, obj); } } inline void MarkTypePropertyConfigured(JSContext *cx, JSObject *obj, jsid id) { if (cx->typeInferenceEnabled()) id = MakeTypeId(cx, id); if (TrackPropertyTypes(cx, obj, id)) obj->type()->markPropertyConfigured(cx, id); } inline void MarkObjectStateChange(JSContext *cx, JSObject *obj) { if (cx->typeInferenceEnabled() && !obj->hasLazyType() && !obj->type()->unknownProperties()) obj->type()->markStateChange(cx); } inline void FixArrayType(JSContext *cx, JSObject *obj) { if (cx->typeInferenceEnabled()) cx->compartment->types.fixArrayType(cx, obj); } inline void FixObjectType(JSContext *cx, JSObject *obj) { if (cx->typeInferenceEnabled()) cx->compartment->types.fixObjectType(cx, obj); } extern void TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval); extern void TypeDynamicResult(JSContext *cx, JSScript *script, jsbytecode *pc, js::types::Type type); inline bool UseNewTypeAtEntry(JSContext *cx, StackFrame *fp) { return fp->isConstructing() && cx->typeInferenceEnabled() && fp->prev() && fp->prev()->isScriptFrame() && UseNewType(cx, fp->prev()->script(), fp->prev()->pcQuadratic(cx->stack, fp)); } inline TypeScript::TypeScript() { this->global = (js::GlobalObject *) GLOBAL_MISSING_SCOPE; } inline unsigned TypeScript::NumTypeSets(JSScript *script) { return script->nTypeSets + analyze::TotalSlots(script); } inline TypeSet * TypeScript::ReturnTypes(JSScript *script) { return script->types->typeArray() + script->nTypeSets + js::analyze::CalleeSlot(); } inline TypeSet * TypeScript::ThisTypes(JSScript *script) { return script->types->typeArray() + script->nTypeSets + js::analyze::ThisSlot(); } inline TypeSet * TypeScript::ArgTypes(JSScript *script, unsigned i) { do { } while(0); return script->types->typeArray() + script->nTypeSets + js::analyze::ArgSlot(i); } inline TypeSet * TypeScript::LocalTypes(JSScript *script, unsigned i) { do { } while(0); return script->types->typeArray() + script->nTypeSets + js::analyze::LocalSlot(script, i); } inline TypeSet * TypeScript::SlotTypes(JSScript *script, unsigned slot) { do { } while(0); return script->types->typeArray() + script->nTypeSets + slot; } inline TypeObject * TypeScript::StandardType(JSContext *cx, JSScript *script, JSProtoKey key) { JSObject *proto; if (!js_GetClassPrototype(cx, script->global(), key, &proto, __null)) return __null; return proto->getNewType(cx); } struct AllocationSiteKey { JSScript *script; uint32_t offset : 24; JSProtoKey kind : 8; static const uint32_t OFFSET_LIMIT = (1 << 23); AllocationSiteKey() { PodZero(this); } typedef AllocationSiteKey Lookup; static inline uint32_t hash(AllocationSiteKey key) { return uint32_t(size_t(key.script->code + key.offset)) ^ key.kind; } static inline bool match(const AllocationSiteKey &a, const AllocationSiteKey &b) { return a.script == b.script && a.offset == b.offset && a.kind == b.kind; } }; inline TypeObject * TypeScript::InitObject(JSContext *cx, JSScript *script, jsbytecode *pc, JSProtoKey kind) { do { } while(0); uint32_t offset = pc - script->code; if (!cx->typeInferenceEnabled() || !script->hasGlobal() || offset >= AllocationSiteKey::OFFSET_LIMIT) return GetTypeNewObject(cx, kind); AllocationSiteKey key; key.script = script; key.offset = offset; key.kind = kind; if (!cx->compartment->types.allocationSiteTable) return cx->compartment->types.newAllocationSiteTypeObject(cx, key); AllocationSiteTable::Ptr p = cx->compartment->types.allocationSiteTable->lookup(key); if (p) return p->value; return cx->compartment->types.newAllocationSiteTypeObject(cx, key); } static inline bool SetInitializerObjectType(JSContext *cx, JSScript *script, jsbytecode *pc, JSObject *obj) { if (!cx->typeInferenceEnabled()) return true; if (UseNewTypeForInitializer(cx, script, pc)) { if (!obj->setSingletonType(cx)) return false; TypeScript::Monitor(cx, script, pc, ObjectValue(*obj)); } else { JSProtoKey key = obj->isDenseArray() ? JSProto_Array : JSProto_Object; types::TypeObject *type = TypeScript::InitObject(cx, script, pc, key); if (!type) return false; obj->setType(type); } return true; } inline void TypeScript::Monitor(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval) { if (cx->typeInferenceEnabled()) TypeMonitorResult(cx, script, pc, rval); } inline void TypeScript::MonitorOverflow(JSContext *cx, JSScript *script, jsbytecode *pc) { if (cx->typeInferenceEnabled()) TypeDynamicResult(cx, script, pc, Type::DoubleType()); } inline void TypeScript::MonitorString(JSContext *cx, JSScript *script, jsbytecode *pc) { if (cx->typeInferenceEnabled()) TypeDynamicResult(cx, script, pc, Type::StringType()); } inline void TypeScript::MonitorUnknown(JSContext *cx, JSScript *script, jsbytecode *pc) { if (cx->typeInferenceEnabled()) TypeDynamicResult(cx, script, pc, Type::UnknownType()); } inline void TypeScript::GetPcScript(JSContext *cx, JSScript **script, jsbytecode **pc) { *script = cx->fp()->script(); *pc = cx->regs().pc; } inline void TypeScript::MonitorOverflow(JSContext *cx) { JSScript *script; jsbytecode *pc; GetPcScript(cx, &script, &pc); MonitorOverflow(cx, script, pc); } inline void TypeScript::MonitorString(JSContext *cx) { JSScript *script; jsbytecode *pc; GetPcScript(cx, &script, &pc); MonitorString(cx, script, pc); } inline void TypeScript::MonitorUnknown(JSContext *cx) { JSScript *script; jsbytecode *pc; GetPcScript(cx, &script, &pc); MonitorUnknown(cx, script, pc); } inline void TypeScript::Monitor(JSContext *cx, const js::Value &rval) { JSScript *script; jsbytecode *pc; GetPcScript(cx, &script, &pc); Monitor(cx, script, pc, rval); } inline void TypeScript::MonitorAssign(JSContext *cx, JSObject *obj, jsid id) { if (cx->typeInferenceEnabled() && !obj->hasSingletonType()) { # 668 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" uint32_t i; if (js_IdIsIndex(id, &i)) return; MarkTypeObjectUnknownProperties(cx, obj->type()); } } inline void TypeScript::SetThis(JSContext *cx, JSScript *script, Type type) { if (!cx->typeInferenceEnabled()) return; do { } while(0); bool analyze = cx->hasRunOption(((uint32_t)1 << (16))); if (!ThisTypes(script)->hasType(type) || analyze) { AutoEnterTypeInference enter(cx); InferSpew(ISpewOps, "externalType: setThis #%u: %s", script->id(), TypeString(type)); ThisTypes(script)->addType(cx, type); if (analyze && script->types->hasScope()) script->ensureRanInference(cx); } } inline void TypeScript::SetThis(JSContext *cx, JSScript *script, const js::Value &value) { if (cx->typeInferenceEnabled()) SetThis(cx, script, GetValueType(cx, value)); } inline void TypeScript::SetLocal(JSContext *cx, JSScript *script, unsigned local, Type type) { if (!cx->typeInferenceEnabled()) return; do { } while(0); if (!LocalTypes(script, local)->hasType(type)) { AutoEnterTypeInference enter(cx); InferSpew(ISpewOps, "externalType: setLocal #%u %u: %s", script->id(), local, TypeString(type)); LocalTypes(script, local)->addType(cx, type); } } inline void TypeScript::SetLocal(JSContext *cx, JSScript *script, unsigned local, const js::Value &value) { if (cx->typeInferenceEnabled()) { Type type = GetValueType(cx, value); SetLocal(cx, script, local, type); } } inline void TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type) { if (!cx->typeInferenceEnabled()) return; do { } while(0); if (!ArgTypes(script, arg)->hasType(type)) { AutoEnterTypeInference enter(cx); InferSpew(ISpewOps, "externalType: setArg #%u %u: %s", script->id(), arg, TypeString(type)); ArgTypes(script, arg)->addType(cx, type); } } inline void TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value) { if (cx->typeInferenceEnabled()) { Type type = GetValueType(cx, value); SetArgument(cx, script, arg, type); } } void TypeScript::trace(JSTracer *trc) { if (hasScope() && global) gc::MarkObject(trc, &global, "script_global"); } inline JSCompartment * TypeCompartment::compartment() { return (JSCompartment *)((char *)this - __builtin_offsetof (JSCompartment, types)); } inline void TypeCompartment::addPending(JSContext *cx, TypeConstraint *constraint, TypeSet *source, Type type) { do { } while(0); do { } while(0); InferSpew(ISpewOps, "pending: %sC%p%s %s", InferSpewColor(constraint), constraint, InferSpewColorReset(), TypeString(type)); if ((pendingCount == pendingCapacity) && !growPendingArray(cx)) return; PendingWork &pending = pendingArray[pendingCount++]; pending.constraint = constraint; pending.source = source; pending.type = type; } inline void TypeCompartment::resolvePending(JSContext *cx) { do { } while(0); if (resolving) { return; } resolving = true; while (pendingCount) { const PendingWork &pending = pendingArray[--pendingCount]; InferSpew(ISpewOps, "resolve: %sC%p%s %s", InferSpewColor(pending.constraint), pending.constraint, InferSpewColorReset(), TypeString(pending.type)); pending.constraint->newType(cx, pending.source, pending.type); } resolving = false; } # 828 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" const unsigned SET_ARRAY_SIZE = 8; static inline unsigned HashSetCapacity(unsigned count) { do { } while(0); if (count <= SET_ARRAY_SIZE) return SET_ARRAY_SIZE; unsigned log2; do { (log2) = 31 - __builtin_clz(((unsigned int)(count)) | 1); } while (0); return 1 << (log2 + 2); } template static inline uint32_t HashKey(T v) { uint32_t nv = KEY::keyBits(v); uint32_t hash = 84696351 ^ (nv & 0xff); hash = (hash * 16777619) ^ ((nv >> 8) & 0xff); hash = (hash * 16777619) ^ ((nv >> 16) & 0xff); return (hash * 16777619) ^ ((nv >> 24) & 0xff); } template static U ** HashSetInsertTry(JSCompartment *compartment, U **&values, unsigned &count, T key) { unsigned capacity = HashSetCapacity(count); unsigned insertpos = HashKey(key) & (capacity - 1); bool converting = (count == SET_ARRAY_SIZE); if (!converting) { while (values[insertpos] != __null) { if (KEY::getKey(values[insertpos]) == key) return &values[insertpos]; insertpos = (insertpos + 1) & (capacity - 1); } } count++; unsigned newCapacity = HashSetCapacity(count); if (newCapacity == capacity) { do { } while(0); return &values[insertpos]; } U **newValues = compartment->typeLifoAlloc.newArray(newCapacity); if (!newValues) return __null; PodZero(newValues, newCapacity); for (unsigned i = 0; i < capacity; i++) { if (values[i]) { unsigned pos = HashKey(KEY::getKey(values[i])) & (newCapacity - 1); while (newValues[pos] != __null) pos = (pos + 1) & (newCapacity - 1); newValues[pos] = values[i]; } } values = newValues; insertpos = HashKey(key) & (newCapacity - 1); while (values[insertpos] != __null) insertpos = (insertpos + 1) & (newCapacity - 1); return &values[insertpos]; } template static inline U ** HashSetInsert(JSCompartment *compartment, U **&values, unsigned &count, T key) { if (count == 0) { do { } while(0); count++; return (U **) &values; } if (count == 1) { U *oldData = (U*) values; if (KEY::getKey(oldData) == key) return (U **) &values; values = compartment->typeLifoAlloc.newArray(SET_ARRAY_SIZE); if (!values) { values = (U **) oldData; return __null; } PodZero(values, SET_ARRAY_SIZE); count++; values[0] = oldData; return &values[1]; } if (count <= SET_ARRAY_SIZE) { for (unsigned i = 0; i < count; i++) { if (KEY::getKey(values[i]) == key) return &values[i]; } if (count < SET_ARRAY_SIZE) { count++; return &values[count - 1]; } } return HashSetInsertTry(compartment, values, count, key); } template static inline U * HashSetLookup(U **values, unsigned count, T key) { if (count == 0) return __null; if (count == 1) return (KEY::getKey((U *) values) == key) ? (U *) values : __null; if (count <= SET_ARRAY_SIZE) { for (unsigned i = 0; i < count; i++) { if (KEY::getKey(values[i]) == key) return values[i]; } return __null; } unsigned capacity = HashSetCapacity(count); unsigned pos = HashKey(key) & (capacity - 1); while (values[pos] != __null) { if (KEY::getKey(values[pos]) == key) return values[pos]; pos = (pos + 1) & (capacity - 1); } return __null; } inline TypeObjectKey * Type::objectKey() const { do { } while(0); if (isTypeObject()) TypeObject::readBarrier((TypeObject *) data); else JSObject::readBarrier((JSObject *) (data ^ 1)); return (TypeObjectKey *) data; } inline JSObject * Type::singleObject() const { do { } while(0); JSObject::readBarrier((JSObject *) (data ^ 1)); return (JSObject *) (data ^ 1); } inline TypeObject * Type::typeObject() const { do { } while(0); TypeObject::readBarrier((TypeObject *) data); return (TypeObject *) data; } inline bool TypeSet::hasType(Type type) { if (unknown()) return true; if (type.isUnknown()) { return false; } else if (type.isPrimitive()) { return !!(flags & PrimitiveTypeFlag(type.primitive())); } else if (type.isAnyObject()) { return !!(flags & TYPE_FLAG_ANYOBJECT); } else { return !!(flags & TYPE_FLAG_ANYOBJECT) || HashSetLookup (objectSet, baseObjectCount(), type.objectKey()) != __null; } } inline void TypeSet::setBaseObjectCount(uint32_t count) { do { } while(0); flags = (flags & ~TYPE_FLAG_OBJECT_COUNT_MASK) | (count << TYPE_FLAG_OBJECT_COUNT_SHIFT); } inline void TypeSet::clearObjects() { setBaseObjectCount(0); objectSet = __null; } inline void TypeSet::addType(JSContext *cx, Type type) { do { } while(0); if (unknown()) return; if (type.isUnknown()) { flags |= TYPE_FLAG_BASE_MASK; clearObjects(); do { } while(0); } else if (type.isPrimitive()) { TypeFlags flag = PrimitiveTypeFlag(type.primitive()); if (flags & flag) return; if (flag == TYPE_FLAG_DOUBLE) flag |= TYPE_FLAG_INT32; flags |= flag; } else { if (flags & TYPE_FLAG_ANYOBJECT) return; if (type.isAnyObject()) goto unknownObject; uint32_t objectCount = baseObjectCount(); TypeObjectKey *object = type.objectKey(); TypeObjectKey **pentry = HashSetInsert (cx->compartment, objectSet, objectCount, object); if (!pentry) { cx->compartment->types.setPendingNukeTypes(cx); return; } if (*pentry) return; *pentry = object; setBaseObjectCount(objectCount); if (objectCount == TYPE_FLAG_OBJECT_COUNT_LIMIT) goto unknownObject; if (type.isTypeObject()) { TypeObject *nobject = type.typeObject(); do { } while(0); if (nobject->unknownProperties()) goto unknownObject; if (objectCount > 1) { nobject->contribution += (objectCount - 1) * (objectCount - 1); if (nobject->contribution >= TypeObject::CONTRIBUTION_LIMIT) { InferSpew(ISpewOps, "limitUnknown: %sT%p%s", InferSpewColor(this), this, InferSpewColorReset()); goto unknownObject; } } } } if (false) { unknownObject: type = Type::AnyObjectType(); flags |= TYPE_FLAG_ANYOBJECT; clearObjects(); } InferSpew(ISpewOps, "addType: %sT%p%s %s", InferSpewColor(this), this, InferSpewColorReset(), TypeString(type)); TypeConstraint *constraint = constraintList; while (constraint) { cx->compartment->types.addPending(cx, constraint, this, type); constraint = constraint->next; } cx->compartment->types.resolvePending(cx); } inline void TypeSet::setOwnProperty(JSContext *cx, bool configured) { TypeFlags nflags = TYPE_FLAG_OWN_PROPERTY | (configured ? TYPE_FLAG_CONFIGURED_PROPERTY : 0); if ((flags & nflags) == nflags) return; flags |= nflags; TypeConstraint *constraint = constraintList; while (constraint) { constraint->newPropertyState(cx, this); constraint = constraint->next; } } inline unsigned TypeSet::getObjectCount() { do { } while(0); uint32_t count = baseObjectCount(); if (count > SET_ARRAY_SIZE) return HashSetCapacity(count); return count; } inline TypeObjectKey * TypeSet::getObject(unsigned i) { do { } while(0); if (baseObjectCount() == 1) { do { } while(0); return (TypeObjectKey *) objectSet; } return objectSet[i]; } inline JSObject * TypeSet::getSingleObject(unsigned i) { TypeObjectKey *key = getObject(i); return (uintptr_t(key) & 1) ? (JSObject *)(uintptr_t(key) ^ 1) : __null; } inline TypeObject * TypeSet::getTypeObject(unsigned i) { TypeObjectKey *key = getObject(i); return (key && !(uintptr_t(key) & 1)) ? (TypeObject *) key : __null; } inline TypeCallsite::TypeCallsite(JSContext *cx, JSScript *script, jsbytecode *pc, bool isNew, unsigned argumentCount) : script(script), pc(pc), isNew(isNew), argumentCount(argumentCount), thisTypes(__null), returnTypes(__null) { argumentTypes = cx->typeLifoAlloc().newArray(argumentCount); } inline TypeObject::TypeObject(JSObject *proto, bool function, bool unknown) { PodZero(this); do { } while (0); this->proto = proto; if (function) flags |= OBJECT_FLAG_FUNCTION; if (unknown) flags |= OBJECT_FLAG_UNKNOWN_MASK; InferSpew(ISpewOps, "newObject: %s", TypeObjectString(this)); } inline uint32_t TypeObject::basePropertyCount() const { return (flags & OBJECT_FLAG_PROPERTY_COUNT_MASK) >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT; } inline void TypeObject::setBasePropertyCount(uint32_t count) { do { } while(0); flags = (flags & ~OBJECT_FLAG_PROPERTY_COUNT_MASK) | (count << OBJECT_FLAG_PROPERTY_COUNT_SHIFT); } inline TypeSet * TypeObject::getProperty(JSContext *cx, jsid id, bool assign) { do { } while(0); do { } while(0); do { } while (0); do { } while(0); uint32_t propertyCount = basePropertyCount(); Property **pprop = HashSetInsert (cx->compartment, propertySet, propertyCount, id); if (!pprop) { cx->compartment->types.setPendingNukeTypes(cx); return __null; } if (!*pprop) { setBasePropertyCount(propertyCount); if (!addProperty(cx, id, pprop)) { setBasePropertyCount(0); propertySet = __null; return __null; } if (propertyCount == OBJECT_FLAG_PROPERTY_COUNT_LIMIT) { markUnknown(cx); TypeSet *types = TypeSet::make(cx, "propertyOverflow"); types->addType(cx, Type::UnknownType()); return types; } } TypeSet *types = &(*pprop)->types; if (assign) types->setOwnProperty(cx, false); return types; } inline TypeSet * TypeObject::maybeGetProperty(JSContext *cx, jsid id) { do { } while(0); do { } while (0); do { } while(0); Property *prop = HashSetLookup (propertySet, basePropertyCount(), id); return prop ? &prop->types : __null; } inline unsigned TypeObject::getPropertyCount() { uint32_t count = basePropertyCount(); if (count > SET_ARRAY_SIZE) return HashSetCapacity(count); return count; } inline Property * TypeObject::getProperty(unsigned i) { do { } while(0); if (basePropertyCount() == 1) { do { } while(0); return (Property *) propertySet; } return propertySet[i]; } inline void TypeObject::setFlagsFromKey(JSContext *cx, JSProtoKey key) { TypeObjectFlags flags = 0; switch (key) { case JSProto_Function: do { } while(0); case JSProto_Object: flags = OBJECT_FLAG_NON_DENSE_ARRAY | OBJECT_FLAG_NON_PACKED_ARRAY | OBJECT_FLAG_NON_TYPED_ARRAY; break; case JSProto_Array: flags = OBJECT_FLAG_NON_TYPED_ARRAY; break; default: do { } while(0) # 1333 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" ; flags = OBJECT_FLAG_NON_DENSE_ARRAY | OBJECT_FLAG_NON_PACKED_ARRAY; break; } if (!hasAllFlags(flags)) setFlags(cx, flags); } inline JSObject * TypeObject::getGlobal() { if (singleton) return &singleton->global(); if (interpretedFunction && interpretedFunction->script()->compileAndGo) return &interpretedFunction->global(); return __null; } inline void TypeObject::writeBarrierPre(TypeObject *type) { if (!type) return; JSCompartment *comp = type->compartment(); if (comp->needsBarrier()) { TypeObject *tmp = type; MarkTypeObjectUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void TypeObject::writeBarrierPost(TypeObject *type, void *addr) { } inline void TypeObject::readBarrier(TypeObject *type) { JSCompartment *comp = type->compartment(); if (comp->needsBarrier()) { TypeObject *tmp = type; MarkTypeObjectUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); do { } while(0); } } inline void TypeNewScript::writeBarrierPre(TypeNewScript *newScript) { if (!newScript) return; JSCompartment *comp = newScript->fun->compartment(); if (comp->needsBarrier()) { MarkObject(comp->barrierTracer(), &newScript->fun, "write barrier"); MarkShape(comp->barrierTracer(), &newScript->shape, "write barrier"); } } inline void TypeNewScript::writeBarrierPost(TypeNewScript *newScript, void *addr) { } inline Property::Property(jsid id) : id(id) { } inline Property::Property(const Property &o) : id(o.id.get()), types(o.types) { } } } inline bool JSScript::ensureHasTypes(JSContext *cx) { return types || makeTypes(cx); } inline bool JSScript::ensureRanAnalysis(JSContext *cx, JSObject *scope) { JSScript *self = this; JS::SkipRoot root(cx, &self); if (!self->ensureHasTypes(cx)) return false; if (!self->types->hasScope()) { js::RootedObject scopeRoot(cx, scope); if (!js::types::TypeScript::SetScope(cx, self, scope)) return false; scope = scopeRoot; } if (!self->hasAnalysis() && !self->makeAnalysis(cx)) return false; do { } while(0); return true; } inline bool JSScript::ensureRanInference(JSContext *cx) { if (!ensureRanAnalysis(cx, __null)) return false; if (!analysis()->ranInference()) { js::types::AutoEnterTypeInference enter(cx); analysis()->analyzeTypes(cx); } return !analysis()->OOM() && !cx->compartment->types.pendingNukeTypes; } inline bool JSScript::hasAnalysis() { return types && types->analysis; } inline js::analyze::ScriptAnalysis * JSScript::analysis() { do { } while(0); return types->analysis; } inline void JSScript::clearAnalysis() { if (types) types->analysis = __null; } inline void js::analyze::ScriptAnalysis::addPushedType(JSContext *cx, uint32_t offset, uint32_t which, js::types::Type type) { js::types::TypeSet *pushed = pushedTypes(offset, which); pushed->addType(cx, type); } inline js::types::TypeObject * JSCompartment::getEmptyType(JSContext *cx) { if (!emptyTypeObject) emptyTypeObject = types.newTypeObject(cx, __null, JSProto_Object, __null, true); return emptyTypeObject; } # 44 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 1 # 46 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" #define jsgc_barrier_inl_h___ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" #define String_inl_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 1 # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 1 # 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 # 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 1 # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 inline void JSString::writeBarrierPre(JSString *str) { if (!str) return; JSCompartment *comp = str->compartment(); if (comp->needsBarrier()) { JSString *tmp = str; MarkStringUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void JSString::writeBarrierPost(JSString *str, void *addr) { } inline bool JSString::needWriteBarrierPre(JSCompartment *comp) { return comp->needsBarrier(); } inline void JSString::readBarrier(JSString *str) { JSCompartment *comp = str->compartment(); if (comp->needsBarrier()) { JSString *tmp = str; MarkStringUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); do { } while(0); } } __attribute__((always_inline)) inline bool JSString::validateLength(JSContext *cx, size_t length) { if ((__builtin_expect((length > JSString::MAX_LENGTH), 0))) { js_ReportAllocationOverflow(cx); return false; } return true; } __attribute__((always_inline)) inline void JSRope::init(JSString *left, JSString *right, size_t length) { d.lengthAndFlags = buildLengthAndFlags(length, ROPE_BIT); d.u1.left = left; d.s.u2.right = right; JSString::writeBarrierPost(d.u1.left, &d.u1.left); JSString::writeBarrierPost(d.s.u2.right, &d.s.u2.right); } __attribute__((always_inline)) inline JSRope * JSRope::new_(JSContext *cx, js::HandleString left, js::HandleString right, size_t length) { if (!validateLength(cx, length)) return __null; JSRope *str = (JSRope *)js_NewGCString(cx); if (!str) return __null; str->init(left, right, length); return str; } inline void JSRope::markChildren(JSTracer *trc) { js::gc::MarkStringUnbarriered(trc, &d.u1.left, "left child"); js::gc::MarkStringUnbarriered(trc, &d.s.u2.right, "right child"); } __attribute__((always_inline)) inline void JSDependentString::init(JSLinearString *base, const jschar *chars, size_t length) { do { } while(0); d.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS); d.u1.chars = chars; d.s.u2.base = base; JSString::writeBarrierPost(d.s.u2.base, &d.s.u2.base); } __attribute__((always_inline)) inline JSDependentString * JSDependentString::new_(JSContext *cx, JSLinearString *base_, const jschar *chars, size_t length) { JS::Rooted base(cx, base_); while (base->isDependent()) base = base->asDependent().base(); do { } while(0); do { } while(0); do { } while(0); JS::SkipRoot charsRoot(cx, &chars); JSDependentString *str = (JSDependentString *)js_NewGCString(cx); if (!str) return __null; str->init(base, chars, length); return str; } inline void JSString::markBase(JSTracer *trc) { do { } while(0); js::gc::MarkStringUnbarriered(trc, &d.s.u2.base, "base"); } inline js::PropertyName * JSFlatString::toPropertyName(JSContext *cx) { if (isAtom()) return asAtom().asPropertyName(); JSAtom *atom = js_AtomizeString(cx, this); if (!atom) return __null; return atom->asPropertyName(); } __attribute__((always_inline)) inline void JSFixedString::init(const jschar *chars, size_t length) { d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); d.u1.chars = chars; } __attribute__((always_inline)) inline JSFixedString * JSFixedString::new_(JSContext *cx, const jschar *chars, size_t length) { do { } while(0); if (!validateLength(cx, length)) return __null; JSFixedString *str = (JSFixedString *)js_NewGCString(cx); if (!str) return __null; str->init(chars, length); return str; } __attribute__((always_inline)) inline JSAtom * JSFixedString::morphAtomizedStringIntoAtom() { d.lengthAndFlags = buildLengthAndFlags(length(), NON_STATIC_ATOM_FLAGS); return &asAtom(); } __attribute__((always_inline)) inline JSInlineString * JSInlineString::new_(JSContext *cx) { return (JSInlineString *)js_NewGCString(cx); } __attribute__((always_inline)) inline jschar * JSInlineString::init(size_t length) { d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); d.u1.chars = d.inlineStorage; do { } while(0); return d.inlineStorage; } __attribute__((always_inline)) inline void JSInlineString::resetLength(size_t length) { d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); do { } while(0); } __attribute__((always_inline)) inline JSShortString * JSShortString::new_(JSContext *cx) { return js_NewGCShortString(cx); } __attribute__((always_inline)) inline void JSShortString::initAtOffsetInBuffer(const jschar *chars, size_t length) { do { } while(0); do { } while(0); d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); d.u1.chars = chars; } __attribute__((always_inline)) inline void JSExternalString::init(const jschar *chars, size_t length, const JSStringFinalizer *fin) { do { } while(0); do { } while(0); d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); d.u1.chars = chars; d.s.u2.externalFinalizer = fin; } __attribute__((always_inline)) inline JSExternalString * JSExternalString::new_(JSContext *cx, const jschar *chars, size_t length, const JSStringFinalizer *fin) { do { } while(0); if (!validateLength(cx, length)) return __null; JSExternalString *str = js_NewGCExternalString(cx); if (!str) return __null; str->init(chars, length, fin); cx->runtime->updateMallocCounter(cx, (length + 1) * sizeof(jschar)); return str; } inline bool js::StaticStrings::fitsInSmallChar(jschar c) { return c < SMALL_CHAR_LIMIT && toSmallChar[c] != INVALID_SMALL_CHAR; } inline bool js::StaticStrings::hasUnit(jschar c) { return c < UNIT_STATIC_LIMIT; } inline JSAtom * js::StaticStrings::getUnit(jschar c) { do { } while(0); return unitStaticTable[c]; } inline bool js::StaticStrings::hasUint(uint32_t u) { return u < INT_STATIC_LIMIT; } inline JSAtom * js::StaticStrings::getUint(uint32_t u) { do { } while(0); return intStaticTable[u]; } inline bool js::StaticStrings::hasInt(int32_t i) { return uint32_t(i) < INT_STATIC_LIMIT; } inline JSAtom * js::StaticStrings::getInt(int32_t i) { do { } while(0); return getUint(uint32_t(i)); } inline JSLinearString * js::StaticStrings::getUnitStringForElement(JSContext *cx, JSString *str, size_t index) { do { } while(0); const jschar *chars = str->getChars(cx); if (!chars) return __null; jschar c = chars[index]; if (c < UNIT_STATIC_LIMIT) return getUnit(c); return js_NewDependentString(cx, str, index, 1); } inline JSAtom * js::StaticStrings::getLength2(jschar c1, jschar c2) { do { } while(0); do { } while(0); size_t index = (((size_t)toSmallChar[c1]) << 6) + toSmallChar[c2]; return length2StaticTable[index]; } inline JSAtom * js::StaticStrings::getLength2(uint32_t i) { do { } while(0); return getLength2('0' + i / 10, '0' + i % 10); } inline JSAtom * js::StaticStrings::lookup(const jschar *chars, size_t length) { switch (length) { case 1: if (chars[0] < UNIT_STATIC_LIMIT) return getUnit(chars[0]); return __null; case 2: if (fitsInSmallChar(chars[0]) && fitsInSmallChar(chars[1])) return getLength2(chars[0], chars[1]); return __null; case 3: typedef int moz_static_assert111[(INT_STATIC_LIMIT <= 999) ? 1 : -1]; if ('1' <= chars[0] && chars[0] <= '9' && '0' <= chars[1] && chars[1] <= '9' && '0' <= chars[2] && chars[2] <= '9') { int i = (chars[0] - '0') * 100 + (chars[1] - '0') * 10 + (chars[2] - '0'); if (unsigned(i) < INT_STATIC_LIMIT) return getInt(i); } return __null; } return __null; } __attribute__((always_inline)) inline void JSString::finalize(js::FreeOp *fop) { do { } while(0); if (isFlat()) asFlat().finalize(fop); else do { } while(0); } inline void JSFlatString::finalize(js::FreeOp *fop) { do { } while(0); if (chars() != d.inlineStorage) fop->free_(const_cast(chars())); } inline void JSShortString::finalize(js::FreeOp *fop) { do { } while(0); } inline void JSAtom::finalize(js::FreeOp *fop) { do { } while(0); if (getAllocKind() == js::gc::FINALIZE_STRING) JSFlatString::finalize(fop); else do { } while(0); } inline void JSExternalString::finalize(js::FreeOp *fop) { const JSStringFinalizer *fin = externalFinalizer(); fin->finalize(fin, const_cast(chars())); } namespace js { static __attribute__((always_inline)) inline JSFixedString * NewShortString(JSContext *cx, const jschar *chars, size_t length) { SkipRoot skip(cx, &chars); do { } while(0); JSInlineString *str = JSInlineString::lengthFits(length) ? JSInlineString::new_(cx) : JSShortString::new_(cx); if (!str) return __null; jschar *storage = str->init(length); PodCopy(storage, chars, length); storage[length] = 0; Probes::createString(cx, str, length); return str; } } # 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 2 namespace js { inline void EncapsulatedValue::writeBarrierPre(const Value &value) { if (value.isMarkable()) { js::gc::Cell *cell = (js::gc::Cell *)value.toGCThing(); writeBarrierPre(cell->compartment(), value); } } inline void EncapsulatedValue::writeBarrierPre(JSCompartment *comp, const Value &value) { if (comp->needsBarrier()) { Value tmp(value); js::gc::MarkValueUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); do { } while(0); } } inline void EncapsulatedValue::pre() { writeBarrierPre(value); } inline void EncapsulatedValue::pre(JSCompartment *comp) { writeBarrierPre(comp, value); } inline HeapValue::HeapValue() : EncapsulatedValue(UndefinedValue()) { post(); } inline HeapValue::HeapValue(const Value &v) : EncapsulatedValue(v) { do { } while(0); post(); } inline HeapValue::HeapValue(const HeapValue &v) : EncapsulatedValue(v.value) { do { } while(0); post(); } inline HeapValue::~HeapValue() { pre(); } inline void HeapValue::init(const Value &v) { do { } while(0); value = v; post(); } inline void HeapValue::init(JSCompartment *comp, const Value &v) { do { } while(0); value = v; post(comp); } inline HeapValue & HeapValue::operator=(const Value &v) { pre(); do { } while(0); value = v; post(); return *this; } inline HeapValue & HeapValue::operator=(const HeapValue &v) { pre(); do { } while(0); value = v.value; post(); return *this; } inline void HeapValue::set(JSCompartment *comp, const Value &v) { # 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" pre(comp); do { } while(0); value = v; post(comp); } inline void HeapValue::writeBarrierPost(const Value &value, Value *addr) { } inline void HeapValue::writeBarrierPost(JSCompartment *comp, const Value &value, Value *addr) { } inline void HeapValue::post() { writeBarrierPost(value, &value); } inline void HeapValue::post(JSCompartment *comp) { writeBarrierPost(comp, value, &value); } inline RelocatableValue::RelocatableValue() : EncapsulatedValue(UndefinedValue()) { } inline RelocatableValue::RelocatableValue(const Value &v) : EncapsulatedValue(v) { do { } while(0); post(); } inline RelocatableValue::RelocatableValue(const RelocatableValue &v) : EncapsulatedValue(v.value) { do { } while(0); post(); } inline RelocatableValue::~RelocatableValue() { pre(); relocate(); } inline RelocatableValue & RelocatableValue::operator=(const Value &v) { pre(); do { } while(0); value = v; post(); return *this; } inline RelocatableValue & RelocatableValue::operator=(const RelocatableValue &v) { pre(); do { } while(0); value = v.value; post(); return *this; } inline void RelocatableValue::post() { } inline void RelocatableValue::post(JSCompartment *comp) { } inline void RelocatableValue::relocate() { } inline HeapSlot::HeapSlot(JSObject *obj, uint32_t slot, const Value &v) : EncapsulatedValue(v) { do { } while(0); post(obj, slot); } inline HeapSlot::HeapSlot(JSObject *obj, uint32_t slot, const HeapSlot &s) : EncapsulatedValue(s.value) { do { } while(0); post(obj, slot); } inline HeapSlot::~HeapSlot() { pre(); } inline void HeapSlot::init(JSObject *obj, uint32_t slot, const Value &v) { value = v; post(obj, slot); } inline void HeapSlot::init(JSCompartment *comp, JSObject *obj, uint32_t slot, const Value &v) { value = v; post(comp, obj, slot); } inline void HeapSlot::set(JSObject *obj, uint32_t slot, const Value &v) { do { } while (0); do { } while (0); pre(); do { } while(0); value = v; post(obj, slot); } inline void HeapSlot::set(JSCompartment *comp, JSObject *obj, uint32_t slot, const Value &v) { do { } while (0); do { } while (0); do { } while(0); pre(comp); do { } while(0); value = v; post(comp, obj, slot); } inline void HeapSlot::writeBarrierPost(JSObject *obj, uint32_t slot) { } inline void HeapSlot::writeBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t slotno) { } inline void HeapSlot::post(JSObject *owner, uint32_t slot) { HeapSlot::writeBarrierPost(owner, slot); } inline void HeapSlot::post(JSCompartment *comp, JSObject *owner, uint32_t slot) { HeapSlot::writeBarrierPost(comp, owner, slot); } inline void EncapsulatedId::pre() { if (JSID_IS_OBJECT(value)) { JSObject *obj = JSID_TO_OBJECT(value); JSCompartment *comp = obj->compartment(); if (comp->needsBarrier()) { js::gc::MarkObjectUnbarriered(comp->barrierTracer(), &obj, "write barrier"); do { } while(0); } } else if (JSID_IS_STRING(value)) { JSString *str = JSID_TO_STRING(value); JSCompartment *comp = str->compartment(); if (comp->needsBarrier()) { js::gc::MarkStringUnbarriered(comp->barrierTracer(), &str, "write barrier"); do { } while(0); } } } inline RelocatableId::~RelocatableId() { pre(); } inline RelocatableId & RelocatableId::operator=(jsid id) { if (id != value) pre(); do { } while(0); value = id; return *this; } inline RelocatableId & RelocatableId::operator=(const RelocatableId &v) { if (v.value != value) pre(); do { } while(0); value = v.value; return *this; } inline HeapId::HeapId(jsid id) : EncapsulatedId(id) { do { } while(0); post(); } inline HeapId::~HeapId() { pre(); } inline void HeapId::init(jsid id) { do { } while(0); value = id; post(); } inline void HeapId::post() { } inline HeapId & HeapId::operator=(jsid id) { if (id != value) pre(); do { } while(0); value = id; post(); return *this; } inline HeapId & HeapId::operator=(const HeapId &v) { if (v.value != value) pre(); do { } while(0); value = v.value; post(); return *this; } inline const Value & ReadBarrieredValue::get() const { if (value.isObject()) JSObject::readBarrier(&value.toObject()); else if (value.isString()) JSString::readBarrier(value.toString()); else do { } while(0); return value; } inline ReadBarrieredValue::operator const Value &() const { return get(); } inline JSObject & ReadBarrieredValue::toObject() const { return get().toObject(); } } # 48 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" #define RegExpStatics_inl_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 1 # 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" 2 namespace js { inline js::RegExpStatics * js::GlobalObject::getRegExpStatics() const { JSObject &resObj = getSlot(REGEXP_STATICS).toObject(); return static_cast(resObj.getPrivate()); } inline size_t SizeOfRegExpStaticsData(const JSObject *obj, JSMallocSizeOfFun mallocSizeOf) { return mallocSizeOf(obj->getPrivate()); } inline RegExpStatics::RegExpStatics() : bufferLink(__null), copied(false) { clear(); } inline bool RegExpStatics::createDependent(JSContext *cx, size_t start, size_t end, Value *out) const { do { } while(0); do { } while(0); JSString *str = js_NewDependentString(cx, matchPairsInput, start, end - start); if (!str) return false; *out = StringValue(str); return true; } inline bool RegExpStatics::createPendingInput(JSContext *cx, Value *out) const { out->setString(pendingInput ? pendingInput.get() : cx->runtime->emptyString); return true; } inline bool RegExpStatics::makeMatch(JSContext *cx, size_t checkValidIndex, size_t pairNum, Value *out) const { if (checkValidIndex / 2 >= pairCount() || matchPairs[checkValidIndex] < 0) { out->setString(cx->runtime->emptyString); return true; } return createDependent(cx, get(pairNum, 0), get(pairNum, 1), out); } inline bool RegExpStatics::createLastParen(JSContext *cx, Value *out) const { if (pairCount() <= 1) { out->setString(cx->runtime->emptyString); return true; } size_t num = pairCount() - 1; int start = get(num, 0); int end = get(num, 1); if (start == -1) { out->setString(cx->runtime->emptyString); return true; } do { } while(0); do { } while(0); return createDependent(cx, start, end, out); } inline bool RegExpStatics::createLeftContext(JSContext *cx, Value *out) const { if (!pairCount()) { out->setString(cx->runtime->emptyString); return true; } if (matchPairs[0] < 0) { *out = UndefinedValue(); return true; } return createDependent(cx, 0, matchPairs[0], out); } inline bool RegExpStatics::createRightContext(JSContext *cx, Value *out) const { if (!pairCount()) { out->setString(cx->runtime->emptyString); return true; } if (matchPairs[1] < 0) { *out = UndefinedValue(); return true; } return createDependent(cx, matchPairs[1], matchPairsInput->length(), out); } inline void RegExpStatics::getParen(size_t pairNum, JSSubString *out) const { checkParenNum(pairNum); if (!pairIsPresent(pairNum)) { *out = js_EmptySubString; return; } out->chars = matchPairsInput->chars() + get(pairNum, 0); out->length = getParenLength(pairNum); } inline void RegExpStatics::getLastMatch(JSSubString *out) const { if (!pairCount()) { *out = js_EmptySubString; return; } do { } while(0); out->chars = matchPairsInput->chars() + get(0, 0); do { } while(0); out->length = get(0, 1) - get(0, 0); } inline void RegExpStatics::getLastParen(JSSubString *out) const { size_t pc = pairCount(); if (pc <= 1) { *out = js_EmptySubString; return; } getParen(pc - 1, out); } inline void RegExpStatics::getLeftContext(JSSubString *out) const { if (!pairCount()) { *out = js_EmptySubString; return; } out->chars = matchPairsInput->chars(); out->length = get(0, 0); } inline void RegExpStatics::getRightContext(JSSubString *out) const { if (!pairCount()) { *out = js_EmptySubString; return; } out->chars = matchPairsInput->chars() + get(0, 1); do { } while(0); out->length = matchPairsInput->length() - get(0, 1); } inline void RegExpStatics::copyTo(RegExpStatics &dst) { dst.matchPairs.clear(); dst.matchPairs.infallibleAppend(matchPairs); dst.matchPairsInput = matchPairsInput; dst.pendingInput = pendingInput; dst.flags = flags; } inline void RegExpStatics::aboutToWrite() { if (bufferLink && !bufferLink->copied) { copyTo(*bufferLink); bufferLink->copied = true; } } inline void RegExpStatics::restore() { if (bufferLink->copied) bufferLink->copyTo(*this); bufferLink = bufferLink->bufferLink; } inline bool RegExpStatics::updateFromMatchPairs(JSContext *cx, JSLinearString *input, MatchPairs *newPairs) { do { } while(0); aboutToWrite(); BarrieredSetPair(cx->compartment, pendingInput, input, matchPairsInput, input); if (!matchPairs.resizeUninitialized(2 * newPairs->pairCount())) { js_ReportOutOfMemory(cx); return false; } for (size_t i = 0; i < newPairs->pairCount(); ++i) { matchPairs[2 * i] = newPairs->pair(i).start; matchPairs[2 * i + 1] = newPairs->pair(i).limit; } return true; } inline void RegExpStatics::clear() { aboutToWrite(); flags = RegExpFlag(0); pendingInput = __null; matchPairsInput = __null; matchPairs.clear(); } inline void RegExpStatics::setPendingInput(JSString *newInput) { aboutToWrite(); pendingInput = newInput; } PreserveRegExpStatics::~PreserveRegExpStatics() { original->restore(); } inline void RegExpStatics::setMultiline(JSContext *cx, bool enabled) { aboutToWrite(); if (enabled) { flags = RegExpFlag(flags | MultilineFlag); markFlagsSet(cx); } else { flags = RegExpFlag(flags & ~MultilineFlag); } } inline void RegExpStatics::markFlagsSet(JSContext *cx) { # 269 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" GlobalObject *global = GetGlobalForScopeChain(cx); do { } while(0); types::MarkTypeObjectFlags(cx, global, types::OBJECT_FLAG_REGEXP_FLAGS_SET); } inline void RegExpStatics::reset(JSContext *cx, JSString *newInput, bool newMultiline) { aboutToWrite(); clear(); pendingInput = newInput; setMultiline(cx, newMultiline); checkInvariants(); } } inline js::RegExpStatics * JSContext::regExpStatics() { return js::GetGlobalForScopeChain(this)->getRegExpStatics(); } # 51 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 1 # 52 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 inline bool JSObject::enumerate(JSContext *cx, JSIterateOp iterop, js::Value *statep, jsid *idp) { JSNewEnumerateOp op = getOps()->enumerate; return (op ? op : JS_EnumerateState)(cx, js::RootedObject(cx, this), iterop, statep, idp); } inline bool JSObject::defaultValue(JSContext *cx, JSType hint, js::Value *vp) { js::RootedObject self(cx, this); JSConvertOp op = getClass()->convert; bool ok; if (op == JS_ConvertStub) ok = js::DefaultValue(cx, self, hint, vp); else ok = op(cx, self, hint, vp); do { } while (0); return ok; } inline JSType JSObject::typeOf(JSContext *cx) { js::TypeOfOp op = getOps()->typeOf; return (op ? op : js::baseops::TypeOf)(cx, js::RootedObject(cx, this)); } inline JSObject * JSObject::thisObject(JSContext *cx) { JSObjectOp op = getOps()->thisObject; return op ? op(cx, js::RootedObject(cx, this)) : this; } inline JSBool JSObject::setGeneric(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict) { if (getOps()->setGeneric) return nonNativeSetProperty(cx, id, vp, strict); return js::baseops::SetPropertyHelper(cx, js::RootedObject(cx, this), id, 0, vp, strict); } inline JSBool JSObject::setProperty(JSContext *cx, js::PropertyName *name, js::Value *vp, JSBool strict) { return setGeneric(cx, js::RootedId(cx, js::NameToId(name)), vp, strict); } inline JSBool JSObject::setElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict) { if (getOps()->setElement) return nonNativeSetElement(cx, index, vp, strict); return js::baseops::SetElementHelper(cx, js::RootedObject(cx, this), index, 0, vp, strict); } inline JSBool JSObject::setSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp, JSBool strict) { return setGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), vp, strict); } inline JSBool JSObject::setGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp) { js::types::MarkTypePropertyConfigured(cx, this, id); js::GenericAttributesOp op = getOps()->setGenericAttributes; return (op ? op : js::baseops::SetAttributes)(cx, js::RootedObject(cx, this), id, attrsp); } inline JSBool JSObject::setPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp) { return setGenericAttributes(cx, js::RootedId(cx, js::NameToId(name)), attrsp); } inline JSBool JSObject::setElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp) { js::ElementAttributesOp op = getOps()->setElementAttributes; return (op ? op : js::baseops::SetElementAttributes)(cx, js::RootedObject(cx, this), index, attrsp); } inline JSBool JSObject::setSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp) { return setGenericAttributes(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), attrsp); } inline bool JSObject::changePropertyAttributes(JSContext *cx, js::Shape *shape, unsigned attrs) { return !!changeProperty(cx, shape, attrs, 0, shape->getter(), shape->setter()); } inline JSBool JSObject::getGeneric(JSContext *cx, js::HandleObject receiver, js::HandleId id, js::Value *vp) { js::RootedObject self(cx, this); js::GenericIdOp op = getOps()->getGeneric; if (op) { if (!op(cx, self, receiver, id, vp)) return false; } else { if (!js::baseops::GetProperty(cx, self, receiver, id, vp)) return false; } return true; } inline JSBool JSObject::getProperty(JSContext *cx, js::HandleObject receiver, js::PropertyName *name, js::Value *vp) { return getGeneric(cx, receiver, js::RootedId(cx, js::NameToId(name)), vp); } inline JSBool JSObject::getGeneric(JSContext *cx, js::HandleId id, js::Value *vp) { return getGeneric(cx, js::RootedObject(cx, this), id, vp); } inline JSBool JSObject::getProperty(JSContext *cx, js::PropertyName *name, js::Value *vp) { return getGeneric(cx, js::RootedId(cx, js::NameToId(name)), vp); } inline bool JSObject::deleteProperty(JSContext *cx, js::HandlePropertyName name, js::Value *rval, bool strict) { jsid id = js::NameToId(name); js::types::AddTypePropertyId(cx, this, id, js::types::Type::UndefinedType()); js::types::MarkTypePropertyConfigured(cx, this, id); js::DeletePropertyOp op = getOps()->deleteProperty; return (op ? op : js::baseops::DeleteProperty)(cx, js::RootedObject(cx, this), name, rval, strict); } inline bool JSObject::deleteElement(JSContext *cx, uint32_t index, js::Value *rval, bool strict) { js::RootedObject self(cx, this); jsid id; if (!js::IndexToId(cx, index, &id)) return false; js::types::AddTypePropertyId(cx, self, id, js::types::Type::UndefinedType()); js::types::MarkTypePropertyConfigured(cx, self, id); js::DeleteElementOp op = self->getOps()->deleteElement; return (op ? op : js::baseops::DeleteElement)(cx, self, index, rval, strict); } inline bool JSObject::deleteSpecial(JSContext *cx, js::HandleSpecialId sid, js::Value *rval, bool strict) { jsid id = SPECIALID_TO_JSID(sid); js::types::AddTypePropertyId(cx, this, id, js::types::Type::UndefinedType()); js::types::MarkTypePropertyConfigured(cx, this, id); js::DeleteSpecialOp op = getOps()->deleteSpecial; return (op ? op : js::baseops::DeleteSpecial)(cx, js::RootedObject(cx, this), sid, rval, strict); } inline void JSObject::finalize(js::FreeOp *fop) { js::Probes::finalizeObject(this); if (!fop->onBackgroundThread()) { js::Class *clasp = getClass(); if (clasp->finalize) clasp->finalize(fop, this); } finish(fop); } inline JSObject * JSObject::getParent() const { return lastProperty()->getObjectParent(); } inline JSObject * JSObject::enclosingScope() { return isScope() ? &asScope().enclosingScope() : isDebugScope() ? &asDebugScope().enclosingScope() : getParent(); } inline bool JSObject::isFixedSlot(size_t slot) { do { } while(0); return slot < numFixedSlots(); } inline size_t JSObject::dynamicSlotIndex(size_t slot) { do { } while(0); return slot - numFixedSlots(); } inline void JSObject::setLastPropertyInfallible(const js::Shape *shape) { do { } while(0); do { } while(0); do { } while(0); do { } while(0); do { } while(0); shape_ = const_cast(shape); } inline void JSObject::removeLastProperty(JSContext *cx) { do { } while(0); ((void)(setLastProperty(cx, lastProperty()->previous()))); } inline bool JSObject::canRemoveLastProperty() { do { } while(0); const js::Shape *previous = lastProperty()->previous(); return previous->getObjectParent() == lastProperty()->getObjectParent() && previous->getObjectFlags() == lastProperty()->getObjectFlags(); } inline const js::HeapSlot * JSObject::getRawSlots() { do { } while(0); return slots; } inline const js::Value & JSObject::getReservedSlot(unsigned index) const { do { } while(0); return getSlot(index); } inline js::HeapSlot & JSObject::getReservedSlotRef(unsigned index) { do { } while(0); return getSlotRef(index); } inline void JSObject::setReservedSlot(unsigned index, const js::Value &v) { do { } while(0); setSlot(index, v); } inline void JSObject::initReservedSlot(unsigned index, const js::Value &v) { do { } while(0); initSlot(index, v); } inline void JSObject::prepareSlotRangeForOverwrite(size_t start, size_t end) { for (size_t i = start; i < end; i++) getSlotAddressUnchecked(i)->js::HeapSlot::~HeapSlot(); } inline void JSObject::prepareElementRangeForOverwrite(size_t start, size_t end) { do { } while(0); do { } while(0); for (size_t i = start; i < end; i++) elements[i].js::HeapSlot::~HeapSlot(); } inline uint32_t JSObject::getArrayLength() const { do { } while(0); return getElementsHeader()->length; } inline void JSObject::setArrayLength(JSContext *cx, uint32_t length) { do { } while(0); if (length > (2147483647)) { js::types::MarkTypeObjectFlags(cx, this, js::types::OBJECT_FLAG_NON_PACKED_ARRAY | js::types::OBJECT_FLAG_NON_DENSE_ARRAY); jsid lengthId = js::NameToId(cx->runtime->atomState.lengthAtom); js::types::AddTypePropertyId(cx, this, lengthId, js::types::Type::DoubleType()); } getElementsHeader()->length = length; } inline void JSObject::setDenseArrayLength(uint32_t length) { do { } while(0); do { } while(0); getElementsHeader()->length = length; } inline void JSObject::setDenseArrayInitializedLength(uint32_t length) { do { } while(0); do { } while(0); prepareElementRangeForOverwrite(length, getElementsHeader()->initializedLength); getElementsHeader()->initializedLength = length; } inline uint32_t JSObject::getDenseArrayCapacity() { do { } while(0); return getElementsHeader()->capacity; } inline bool JSObject::ensureElements(JSContext *cx, uint32_t capacity) { if (capacity > getDenseArrayCapacity()) return growElements(cx, capacity); return true; } inline void JSObject::setDenseArrayElement(unsigned idx, const js::Value &val) { do { } while(0); elements[idx].set(this, idx, val); } inline void JSObject::initDenseArrayElement(unsigned idx, const js::Value &val) { do { } while(0); elements[idx].init(this, idx, val); } inline void JSObject::setDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val) { js::types::AddTypePropertyId(cx, this, ((jsid)0x2), val); setDenseArrayElement(idx, val); } inline void JSObject::initDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val) { js::types::AddTypePropertyId(cx, this, ((jsid)0x2), val); initDenseArrayElement(idx, val); } inline void JSObject::copyDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count) { do { } while(0); JSCompartment *comp = compartment(); for (unsigned i = 0; i < count; ++i) elements[dstStart + i].set(comp, this, dstStart + i, src[i]); } inline void JSObject::initDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count) { do { } while(0); JSCompartment *comp = compartment(); for (unsigned i = 0; i < count; ++i) elements[dstStart + i].init(comp, this, dstStart + i, src[i]); } inline void JSObject::moveDenseArrayElements(unsigned dstStart, unsigned srcStart, unsigned count) { do { } while(0); do { } while(0); # 480 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" JSCompartment *comp = compartment(); if (comp->needsBarrier()) { if (dstStart < srcStart) { js::HeapSlot *dst = elements + dstStart; js::HeapSlot *src = elements + srcStart; for (unsigned i = 0; i < count; i++, dst++, src++) dst->set(comp, this, dst - elements, *src); } else { js::HeapSlot *dst = elements + dstStart + count - 1; js::HeapSlot *src = elements + srcStart + count - 1; for (unsigned i = 0; i < count; i++, dst--, src--) dst->set(comp, this, dst - elements, *src); } } else { memmove(elements + dstStart, elements + srcStart, count * sizeof(js::HeapSlot)); SlotRangeWriteBarrierPost(comp, this, dstStart, count); } } inline void JSObject::moveDenseArrayElementsUnbarriered(unsigned dstStart, unsigned srcStart, unsigned count) { do { } while(0); do { } while(0); do { } while(0); memmove(elements + dstStart, elements + srcStart, count * sizeof(js::Value)); } inline bool JSObject::denseArrayHasInlineSlots() const { do { } while(0); return elements == fixedElements(); } namespace js { static inline JSAtom * CallObjectLambdaName(JSFunction *fun) { return (fun->flags & 0x08) ? fun->atom.get() : __null; } } inline const js::Value & JSObject::getDateUTCTime() const { do { } while(0); return getFixedSlot(JSSLOT_DATE_UTC_TIME); } inline void JSObject::setDateUTCTime(const js::Value &time) { do { } while(0); setFixedSlot(JSSLOT_DATE_UTC_TIME, time); } inline js::NativeIterator * JSObject::getNativeIterator() const { return (js::NativeIterator *) getPrivate(); } inline void JSObject::setNativeIterator(js::NativeIterator *ni) { setPrivate(ni); } inline JSLinearString * JSObject::getNamePrefix() const { do { } while(0); const js::Value &v = getSlot(JSSLOT_NAME_PREFIX); return !v.isUndefined() ? &v.toString()->asLinear() : __null; } inline jsval JSObject::getNamePrefixVal() const { do { } while(0); return getSlot(JSSLOT_NAME_PREFIX); } inline void JSObject::setNamePrefix(JSLinearString *prefix) { do { } while(0); setSlot(JSSLOT_NAME_PREFIX, prefix ? js::StringValue(prefix) : js::UndefinedValue()); } inline void JSObject::clearNamePrefix() { do { } while(0); setSlot(JSSLOT_NAME_PREFIX, js::UndefinedValue()); } inline JSLinearString * JSObject::getNameURI() const { do { } while(0); const js::Value &v = getSlot(JSSLOT_NAME_URI); return !v.isUndefined() ? &v.toString()->asLinear() : __null; } inline jsval JSObject::getNameURIVal() const { do { } while(0); return getSlot(JSSLOT_NAME_URI); } inline void JSObject::setNameURI(JSLinearString *uri) { do { } while(0); setSlot(JSSLOT_NAME_URI, uri ? js::StringValue(uri) : js::UndefinedValue()); } inline jsval JSObject::getNamespaceDeclared() const { do { } while(0); return getSlot(JSSLOT_NAMESPACE_DECLARED); } inline void JSObject::setNamespaceDeclared(jsval decl) { do { } while(0); setSlot(JSSLOT_NAMESPACE_DECLARED, decl); } inline JSAtom * JSObject::getQNameLocalName() const { do { } while(0); const js::Value &v = getSlot(JSSLOT_QNAME_LOCAL_NAME); return !v.isUndefined() ? &v.toString()->asAtom() : __null; } inline jsval JSObject::getQNameLocalNameVal() const { do { } while(0); return getSlot(JSSLOT_QNAME_LOCAL_NAME); } inline void JSObject::setQNameLocalName(JSAtom *name) { do { } while(0); setSlot(JSSLOT_QNAME_LOCAL_NAME, name ? js::StringValue(name) : js::UndefinedValue()); } inline bool JSObject::setSingletonType(JSContext *cx) { if (!cx->typeInferenceEnabled()) return true; do { } while(0); do { } while (0); js::types::TypeObject *type = cx->compartment->getLazyType(cx, getProto()); if (!type) return false; type_ = type; return true; } inline js::types::TypeObject * JSObject::getType(JSContext *cx) { if (hasLazyType()) makeLazyType(cx); return type_; } inline bool JSObject::clearType(JSContext *cx) { do { } while(0); js::types::TypeObject *type = cx->compartment->getEmptyType(cx); if (!type) return false; type_ = type; return true; } inline void JSObject::setType(js::types::TypeObject *newType) { do { } while (0) ; do { } while(0); type_ = newType; } inline bool JSObject::setIteratedSingleton(JSContext *cx) { return setFlag(cx, js::BaseShape::ITERATED_SINGLETON); } inline bool JSObject::isSystem() const { return lastProperty()->hasObjectFlag(js::BaseShape::SYSTEM); } inline bool JSObject::setSystem(JSContext *cx) { return setFlag(cx, js::BaseShape::SYSTEM); } inline bool JSObject::setDelegate(JSContext *cx) { return setFlag(cx, js::BaseShape::DELEGATE, GENERATE_SHAPE); } inline bool JSObject::isVarObj() { if (isDebugScope()) return asDebugScope().scope().isVarObj(); return lastProperty()->hasObjectFlag(js::BaseShape::VAROBJ); } inline bool JSObject::setVarObj(JSContext *cx) { return setFlag(cx, js::BaseShape::VAROBJ); } inline bool JSObject::setWatched(JSContext *cx) { return setFlag(cx, js::BaseShape::WATCHED, GENERATE_SHAPE); } inline bool JSObject::hasUncacheableProto() const { return lastProperty()->hasObjectFlag(js::BaseShape::UNCACHEABLE_PROTO); } inline bool JSObject::setUncacheableProto(JSContext *cx) { return setFlag(cx, js::BaseShape::UNCACHEABLE_PROTO, GENERATE_SHAPE); } inline bool JSObject::isBoundFunction() const { return lastProperty()->hasObjectFlag(js::BaseShape::BOUND_FUNCTION); } inline bool JSObject::isIndexed() const { return lastProperty()->hasObjectFlag(js::BaseShape::INDEXED); } inline bool JSObject::watched() const { return lastProperty()->hasObjectFlag(js::BaseShape::WATCHED); } inline bool JSObject::hasSpecialEquality() const { return !!getClass()->ext.equality; } inline bool JSObject::isArguments() const { return isNormalArguments() || isStrictArguments(); } inline bool JSObject::isArrayBuffer() const { return hasClass(&js::ArrayBufferClass); } inline bool JSObject::isBlock() const { return hasClass(&js::BlockClass); } inline bool JSObject::isBoolean() const { return hasClass(&js::BooleanClass); } inline bool JSObject::isCall() const { return hasClass(&js::CallClass); } inline bool JSObject::isClonedBlock() const { return isBlock() && !!getProto(); } inline bool JSObject::isDataView() const { return hasClass(&js::DataViewClass); } inline bool JSObject::isDate() const { return hasClass(&js::DateClass); } inline bool JSObject::isDeclEnv() const { return hasClass(&js::DeclEnvClass); } inline bool JSObject::isElementIterator() const { return hasClass(&js::ElementIteratorClass); } inline bool JSObject::isError() const { return hasClass(&js::ErrorClass); } inline bool JSObject::isFunction() const { return hasClass(&js::FunctionClass); } inline bool JSObject::isFunctionProxy() const { return hasClass(&js::FunctionProxyClass); } inline bool JSObject::isGenerator() const { return hasClass(&js::GeneratorClass); } inline bool JSObject::isIterator() const { return hasClass(&js::IteratorClass); } inline bool JSObject::isNestedScope() const { return isBlock() || isWith(); } inline bool JSObject::isNormalArguments() const { return hasClass(&js::NormalArgumentsObjectClass); } inline bool JSObject::isNumber() const { return hasClass(&js::NumberClass); } inline bool JSObject::isObject() const { return hasClass(&js::ObjectClass); } inline bool JSObject::isPrimitive() const { return isNumber() || isString() || isBoolean(); } inline bool JSObject::isRegExp() const { return hasClass(&js::RegExpClass); } inline bool JSObject::isRegExpStatics() const { return hasClass(&js::RegExpStaticsClass); } inline bool JSObject::isScope() const { return isCall() || isDeclEnv() || isNestedScope(); } inline bool JSObject::isStaticBlock() const { return isBlock() && !getProto(); } inline bool JSObject::isStopIteration() const { return hasClass(&js::StopIterationClass); } inline bool JSObject::isStrictArguments() const { return hasClass(&js::StrictArgumentsObjectClass); } inline bool JSObject::isString() const { return hasClass(&js::StringClass); } inline bool JSObject::isTypedArray() const { return IsTypedArrayClass(getClass()); } inline bool JSObject::isWeakMap() const { return hasClass(&js::WeakMapClass); } inline bool JSObject::isWith() const { return hasClass(&js::WithClass); } inline bool JSObject::isDebugScope() const { extern bool js_IsDebugScopeSlow(const JSObject *obj); return getClass() == &js::ObjectProxyClass && js_IsDebugScopeSlow(this); } inline bool JSObject::isNamespace() const { return hasClass(&js::NamespaceClass); } inline bool JSObject::isXML() const { return hasClass(&js::XMLClass); } inline bool JSObject::isXMLId() const { return hasClass(&js::QNameClass) || hasClass(&js::AttributeNameClass) || hasClass(&js::AnyNameClass); } inline bool JSObject::isQName() const { return hasClass(&js::QNameClass) || hasClass(&js::AttributeNameClass) || hasClass(&js::AnyNameClass); } inline JSObject * JSObject::create(JSContext *cx, js::gc::AllocKind kind, js::HandleShape shape, js::HandleTypeObject type, js::HeapSlot *slots) { do { } while(0); do { } while(0); do { } while(0); JSObject *obj = js_NewGCObject(cx, kind); if (!obj) return __null; obj->shape_.init(shape); obj->type_.init(type); obj->slots = slots; obj->elements = js::emptyObjectElements; const js::Class *clasp = shape->getObjectClass(); if (clasp->hasPrivate()) obj->privateRef(shape->numFixedSlots()) = __null; size_t span = shape->slotSpan(); if (span && clasp != &js::ArrayBufferClass) obj->initializeSlotRange(0, span); return obj; } inline JSObject * JSObject::createDenseArray(JSContext *cx, js::gc::AllocKind kind, js::HandleShape shape, js::HandleTypeObject type, uint32_t length) { do { } while(0); do { } while(0); do { } while(0); do { } while(0); uint32_t capacity = js::gc::GetGCKindSlots(kind) - js::ObjectElements::VALUES_PER_HEADER; JSObject *obj = js_NewGCObject(cx, kind); if (!obj) { js_ReportOutOfMemory(cx); return __null; } obj->shape_.init(shape); obj->type_.init(type); obj->slots = __null; obj->setFixedElements(); new (obj->getElementsHeader()) js::ObjectElements(capacity, length); return obj; } inline void JSObject::finish(js::FreeOp *fop) { if (hasDynamicSlots()) fop->free_(slots); if (hasDynamicElements()) fop->free_(getElementsHeader()); } inline bool JSObject::hasProperty(JSContext *cx, js::HandleId id, bool *foundp, unsigned flags) { JSObject *pobj; JSProperty *prop; JSAutoResolveFlags rf(cx, flags); if (!lookupGeneric(cx, id, &pobj, &prop)) return false; *foundp = !!prop; return true; } inline bool JSObject::isCallable() { return isFunction() || getClass()->call; } inline JSPrincipals * JSObject::principals(JSContext *cx) { if (JSObjectPrincipalsFinder find = cx->runtime->securityCallbacks->findObjectPrincipals) return find(this); return cx->compartment ? cx->compartment->principals : __null; } inline void JSObject::nativeSetSlot(unsigned slot, const js::Value &value) { do { } while(0); do { } while(0); return setSlot(slot, value); } inline void JSObject::nativeSetSlotWithType(JSContext *cx, const js::Shape *shape, const js::Value &value) { nativeSetSlot(shape->slot(), value); js::types::AddTypePropertyId(cx, this, shape->propid(), value); } inline bool JSObject::nativeContains(JSContext *cx, jsid id) { return nativeLookup(cx, id) != __null; } inline bool JSObject::nativeContains(JSContext *cx, const js::Shape &shape) { return nativeLookup(cx, shape.propid()) == &shape; } inline bool JSObject::nativeEmpty() const { return lastProperty()->isEmptyShape(); } inline uint32_t JSObject::propertyCount() const { return lastProperty()->entryCount(); } inline bool JSObject::hasShapeTable() const { return lastProperty()->hasTable(); } inline size_t JSObject::computedSizeOfThisSlotsElements() const { size_t n = sizeOfThis(); if (hasDynamicSlots()) n += numDynamicSlots() * sizeof(js::Value); if (hasDynamicElements()) n += (js::ObjectElements::VALUES_PER_HEADER + getElementsHeader()->capacity) * sizeof(js::Value); return n; } inline void JSObject::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *slotsSize, size_t *elementsSize, size_t *miscSize) const { *slotsSize = 0; if (hasDynamicSlots()) { *slotsSize += mallocSizeOf(slots); } *elementsSize = 0; if (hasDynamicElements()) { *elementsSize += mallocSizeOf(getElementsHeader()); } *miscSize = 0; if (isArguments()) { *miscSize += asArguments().sizeOfMisc(mallocSizeOf); } else if (isRegExpStatics()) { *miscSize += js::SizeOfRegExpStaticsData(this, mallocSizeOf); } } inline JSBool JSObject::lookupGeneric(JSContext *cx, js::HandleId id, JSObject **objp, JSProperty **propp) { js::RootedObject self(cx, this); js::LookupGenericOp op = getOps()->lookupGeneric; if (op) return op(cx, self, id, objp, propp); return js::baseops::LookupProperty(cx, self, id, objp, propp); } inline JSBool JSObject::lookupProperty(JSContext *cx, js::PropertyName *name, JSObject **objp, JSProperty **propp) { return lookupGeneric(cx, js::RootedId(cx, js::NameToId(name)), objp, propp); } inline JSBool JSObject::defineGeneric(JSContext *cx, js::HandleId id, const js::Value &value, JSPropertyOp getter , JSStrictPropertyOp setter , unsigned attrs ) { js::RootedObject self(cx, this); do { } while(0); js::DefineGenericOp op = getOps()->defineGeneric; return (op ? op : js::baseops::DefineProperty)(cx, self, id, &value, getter, setter, attrs); } inline JSBool JSObject::defineProperty(JSContext *cx, js::PropertyName *name, const js::Value &value, JSPropertyOp getter , JSStrictPropertyOp setter , unsigned attrs ) { return defineGeneric(cx, js::RootedId(cx, js::NameToId(name)), value, getter, setter, attrs); } inline JSBool JSObject::defineElement(JSContext *cx, uint32_t index, const js::Value &value, JSPropertyOp getter , JSStrictPropertyOp setter , unsigned attrs ) { js::RootedObject self(cx, this); js::DefineElementOp op = getOps()->defineElement; return (op ? op : js::baseops::DefineElement)(cx, self, index, &value, getter, setter, attrs); } inline JSBool JSObject::defineSpecial(JSContext *cx, js::SpecialId sid, const js::Value &value, JSPropertyOp getter , JSStrictPropertyOp setter , unsigned attrs ) { return defineGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), value, getter, setter, attrs); } inline JSBool JSObject::lookupElement(JSContext *cx, uint32_t index, JSObject **objp, JSProperty **propp) { js::RootedObject self(cx, this); js::LookupElementOp op = getOps()->lookupElement; return (op ? op : js::baseops::LookupElement)(cx, self, index, objp, propp); } inline JSBool JSObject::lookupSpecial(JSContext *cx, js::SpecialId sid, JSObject **objp, JSProperty **propp) { return lookupGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), objp, propp); } inline JSBool JSObject::getElement(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp) { js::RootedObject self(cx, this); js::ElementIdOp op = getOps()->getElement; if (op) return op(cx, self, receiver, index, vp); js::RootedId id(cx); if (!js::IndexToId(cx, index, id.address())) return false; return self->getGeneric(cx, receiver, id, vp); } inline JSBool JSObject::getElement(JSContext *cx, uint32_t index, js::Value *vp) { return getElement(cx, js::RootedObject(cx, this), index, vp); } inline JSBool JSObject::getElementIfPresent(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp, bool *present) { js::RootedObject self(cx, this); js::ElementIfPresentOp op = getOps()->getElementIfPresent; if (op) return op(cx, self, receiver, index, vp, present); js::RootedId id(cx); if (!js::IndexToId(cx, index, id.address())) return false; JSObject *obj2; JSProperty *prop; if (!self->lookupGeneric(cx, id, &obj2, &prop)) return false; if (!prop) { *present = false; js::Debug_SetValueRangeToCrashOnTouch(vp, 1); return true; } *present = true; return self->getGeneric(cx, receiver, id, vp); } inline JSBool JSObject::getSpecial(JSContext *cx, js::HandleObject receiver, js::SpecialId sid, js::Value *vp) { return getGeneric(cx, receiver, js::RootedId(cx, SPECIALID_TO_JSID(sid)), vp); } inline JSBool JSObject::getGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp) { js::GenericAttributesOp op = getOps()->getGenericAttributes; return (op ? op : js::baseops::GetAttributes)(cx, js::RootedObject(cx, this), id, attrsp); } inline JSBool JSObject::getPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp) { return getGenericAttributes(cx, js::RootedId(cx, js::NameToId(name)), attrsp); } inline JSBool JSObject::getElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp) { js::RootedId id(cx); if (!js::IndexToId(cx, index, id.address())) return false; return getGenericAttributes(cx, id, attrsp); } inline JSBool JSObject::getSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp) { return getGenericAttributes(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), attrsp); } inline bool JSObject::isProxy() const { return js::IsProxy(this); } inline bool JSObject::isCrossCompartmentWrapper() const { return js::IsCrossCompartmentWrapper(this); } inline bool JSObject::isWrapper() const { return js::IsWrapper(this); } inline js::GlobalObject & JSObject::global() const { JSObject *obj = const_cast(this); while (JSObject *parent = obj->getParent()) obj = parent; return obj->asGlobal(); } static inline bool js_IsCallable(const js::Value &v) { return v.isObject() && v.toObject().isCallable(); } namespace js { inline JSObject * GetInnerObject(JSContext *cx, HandleObject obj) { if (JSObjectOp op = obj->getClass()->ext.innerObject) return op(cx, obj); return obj; } inline JSObject * GetOuterObject(JSContext *cx, HandleObject obj) { if (JSObjectOp op = obj->getClass()->ext.outerObject) return op(cx, obj); return obj; } #define VALUE_IS_XML(v) ((v).isObject() && (v).toObject().isXML()) static inline bool IsXML(const js::Value &v) { return v.isObject() && v.toObject().isXML(); } static inline bool IsStopIteration(const js::Value &v) { return v.isObject() && v.toObject().isStopIteration(); } static __attribute__((always_inline)) inline bool ToPrimitive(JSContext *cx, Value *vp) { if (vp->isPrimitive()) return true; return vp->toObject().defaultValue(cx, JSTYPE_VOID, vp); } static __attribute__((always_inline)) inline bool ToPrimitive(JSContext *cx, JSType preferredType, Value *vp) { do { } while(0); if (vp->isPrimitive()) return true; return vp->toObject().defaultValue(cx, preferredType, vp); } inline bool IsInternalFunctionObject(JSObject *funobj) { JSFunction *fun = funobj->toFunction(); return (fun->flags & 0x08) && !funobj->getParent(); } class AutoPropDescArrayRooter : private AutoGCRooter { public: AutoPropDescArrayRooter(JSContext *cx) : AutoGCRooter(cx, DESCRIPTORS), descriptors(cx), skip(cx, &descriptors) { } PropDesc *append() { if (!descriptors.append(PropDesc())) return __null; return &descriptors.back(); } bool reserve(size_t n) { return descriptors.reserve(n); } PropDesc& operator[](size_t i) { do { } while(0); return descriptors[i]; } friend void AutoGCRooter::trace(JSTracer *trc); private: PropDescArray descriptors; SkipRoot skip; }; class AutoPropertyDescriptorRooter : private AutoGCRooter, public PropertyDescriptor { SkipRoot skip; AutoPropertyDescriptorRooter *thisDuringConstruction() { return this; } public: AutoPropertyDescriptorRooter(JSContext *cx) : AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction()) { obj = __null; attrs = 0; getter = (PropertyOp) __null; setter = (StrictPropertyOp) __null; value.setUndefined(); } AutoPropertyDescriptorRooter(JSContext *cx, PropertyDescriptor *desc) : AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction()) { obj = desc->obj; attrs = desc->attrs; getter = desc->getter; setter = desc->setter; value = desc->value; } friend void AutoGCRooter::trace(JSTracer *trc); }; inline void NewObjectCache::copyCachedToObject(JSObject *dst, JSObject *src) { js_memcpy(dst, src, dst->sizeOfThis()); } static inline bool CanBeFinalizedInBackground(gc::AllocKind kind, Class *clasp) { do { } while(0); if (!gc::IsBackgroundAllocKind(kind) && !clasp->finalize) return true; return false; } JSObject * NewObjectWithGivenProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent, gc::AllocKind kind); inline JSObject * NewObjectWithGivenProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent) { gc::AllocKind kind = gc::GetGCObjectKind(clasp); return NewObjectWithGivenProto(cx, clasp, proto, parent, kind); } inline JSProtoKey GetClassProtoKey(js::Class *clasp) { JSProtoKey key = ((JSProtoKey) (((clasp)->flags >> ((8 + 8) + 10)) & (((uint32_t)1 << (6)) - 1))); if (key != JSProto_Null) return key; if (clasp->flags & (1<<((8 + 8)+1))) return JSProto_Object; return JSProto_Null; } inline bool FindProto(JSContext *cx, js::Class *clasp, HandleObject parent, JSObject **proto) { JSProtoKey protoKey = GetClassProtoKey(clasp); if (!js_GetClassPrototype(cx, parent, protoKey, proto, clasp)) return false; if (!(*proto) && !js_GetClassPrototype(cx, parent, JSProto_Object, proto)) return false; return true; } # 1427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" JSObject * NewObjectWithClassProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent, gc::AllocKind kind); inline JSObject * NewObjectWithClassProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent) { gc::AllocKind kind = gc::GetGCObjectKind(clasp); return NewObjectWithClassProto(cx, clasp, proto, parent, kind); } inline JSObject * NewBuiltinClassInstance(JSContext *cx, Class *clasp, gc::AllocKind kind) { return NewObjectWithClassProto(cx, clasp, __null, __null, kind); } inline JSObject * NewBuiltinClassInstance(JSContext *cx, Class *clasp) { gc::AllocKind kind = gc::GetGCObjectKind(clasp); return NewBuiltinClassInstance(cx, clasp, kind); } inline GlobalObject * GetCurrentGlobal(JSContext *cx) { JSObject *scopeChain = (cx->hasfp()) ? cx->fp()->scopeChain() : cx->globalObject; return scopeChain ? &scopeChain->global() : __null; } bool FindClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, JSObject **protop, Class *clasp); JSObject * NewObjectWithType(JSContext *cx, HandleTypeObject type, JSObject *parent, gc::AllocKind kind); static inline JSObject * CopyInitializerObject(JSContext *cx, HandleObject baseobj) { do { } while(0); do { } while(0); gc::AllocKind kind = gc::GetGCObjectFixedSlotsKind(baseobj->numFixedSlots()); kind = gc::GetBackgroundAllocKind(kind); do { } while(0); JSObject *obj = NewBuiltinClassInstance(cx, &ObjectClass, kind); if (!obj) return __null; if (!obj->setLastProperty(cx, baseobj->lastProperty())) return __null; return obj; } JSObject * NewReshapedObject(JSContext *cx, HandleTypeObject type, JSObject *parent, gc::AllocKind kind, const Shape *shape); static inline gc::AllocKind GuessObjectGCKind(size_t numSlots) { if (numSlots) return gc::GetGCObjectKind(numSlots); return gc::FINALIZE_OBJECT4; } static inline gc::AllocKind GuessArrayGCKind(size_t numSlots) { if (numSlots) return gc::GetGCArrayKind(numSlots); return gc::FINALIZE_OBJECT8; } static inline gc::AllocKind NewObjectGCKind(JSContext *cx, js::Class *clasp) { if (clasp == &ArrayClass || clasp == &SlowArrayClass) return gc::FINALIZE_OBJECT8; if (clasp == &FunctionClass) return gc::FINALIZE_OBJECT2; return gc::FINALIZE_OBJECT4; } inline bool PreallocateObjectDynamicSlots(JSContext *cx, Shape *shape, HeapSlot **slots) { if (size_t count = JSObject::dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan())) { *slots = (HeapSlot *) cx->malloc_(count * sizeof(HeapSlot)); if (!*slots) return false; Debug_SetSlotRangeToCrashOnTouch(*slots, count); return true; } *slots = __null; return true; } inline bool DefineConstructorAndPrototype(JSContext *cx, GlobalObject *global, JSProtoKey key, JSObject *ctor, JSObject *proto) { do { } while(0); do { } while(0); do { } while(0); jsid id = NameToId(cx->runtime->atomState.classAtoms[key]); do { } while(0); global->setSlot(key, ObjectValue(*ctor)); global->setSlot(key + JSProto_LIMIT, ObjectValue(*proto)); global->setSlot(key + JSProto_LIMIT * 2, ObjectValue(*ctor)); types::AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); if (!global->addDataProperty(cx, id, key + JSProto_LIMIT * 2, 0)) { global->setSlot(key, UndefinedValue()); global->setSlot(key + JSProto_LIMIT, UndefinedValue()); global->setSlot(key + JSProto_LIMIT * 2, UndefinedValue()); return false; } return true; } inline bool ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx) { if ((__builtin_expect((obj.isProxy()), 0))) return Proxy::objectClassIs(&obj, classValue, cx); switch (classValue) { case ESClass_Array: return obj.isArray(); case ESClass_Number: return obj.isNumber(); case ESClass_String: return obj.isString(); case ESClass_Boolean: return obj.isBoolean(); case ESClass_RegExp: return obj.isRegExp(); case ESClass_ArrayBuffer: return obj.isArrayBuffer(); } __builtin_unreachable(); return false; } inline bool IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx) { if (!v.isObject()) return false; return ObjectClassIs(v.toObject(), classValue, cx); } static __attribute__((always_inline)) inline bool ValueIsSpecial(JSObject *obj, Value *propval, SpecialId *sidp, JSContext *cx) { if (!propval->isObject()) return false; if (obj->isXML()) { *sidp = SpecialId(propval->toObject()); return true; } JSObject &propobj = propval->toObject(); JSAtom *name; if (propobj.isQName() && GetLocalNameFromFunctionQName(&propobj, &name, cx)) { propval->setString(name); return false; } return false; } JSObject * DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, HandleAtom atom, JSObject *protoProto, Class *clasp, Native constructor, unsigned nargs, JSPropertySpec *ps, JSFunctionSpec *fs, JSPropertySpec *static_ps, JSFunctionSpec *static_fs, JSObject **ctorp = __null, gc::AllocKind ctorKind = JSFunction::FinalizeKind); } extern JSObject * js_InitClass(JSContext *cx, js::HandleObject obj, JSObject *parent_proto, js::Class *clasp, JSNative constructor, unsigned nargs, JSPropertySpec *ps, JSFunctionSpec *fs, JSPropertySpec *static_ps, JSFunctionSpec *static_fs, JSObject **ctorp = __null, js::gc::AllocKind ctorKind = JSFunction::FinalizeKind); extern bool js_PurgeScopeChainHelper(JSContext *cx, JSObject *obj, jsid id); inline bool js_PurgeScopeChain(JSContext *cx, JSObject *obj, jsid id) { if (obj->isDelegate()) return js_PurgeScopeChainHelper(cx, obj, id); return true; } inline void js::DestroyIdArray(FreeOp *fop, JSIdArray *ida) { fop->free_(ida); } # 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 1 # 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" #define Debugger_h__ # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" 1 # 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" 1 # 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 1 # 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 namespace js { class Debugger { friend class Breakpoint; friend JSBool (::JS_DefineDebuggerObject)(JSContext *cx, JSObject *obj); public: enum Hook { OnDebuggerStatement, OnExceptionUnwind, OnNewScript, OnEnterFrame, HookCount }; enum { JSSLOT_DEBUG_PROTO_START, JSSLOT_DEBUG_FRAME_PROTO = JSSLOT_DEBUG_PROTO_START, JSSLOT_DEBUG_ENV_PROTO, JSSLOT_DEBUG_OBJECT_PROTO, JSSLOT_DEBUG_SCRIPT_PROTO, JSSLOT_DEBUG_PROTO_STOP, JSSLOT_DEBUG_HOOK_START = JSSLOT_DEBUG_PROTO_STOP, JSSLOT_DEBUG_HOOK_STOP = JSSLOT_DEBUG_HOOK_START + HookCount, JSSLOT_DEBUG_COUNT = JSSLOT_DEBUG_HOOK_STOP }; private: JSCList link; HeapPtrObject object; GlobalObjectSet debuggees; js::HeapPtrObject uncaughtExceptionHook; bool enabled; JSCList breakpoints; # 73 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" typedef HashMap, RuntimeAllocPolicy> FrameMap; FrameMap frames; typedef WeakMap ScriptWeakMap; ScriptWeakMap scripts; typedef WeakMap ObjectWeakMap; ObjectWeakMap objects; ObjectWeakMap environments; class FrameRange; class ScriptQuery; bool addDebuggeeGlobal(JSContext *cx, Handle obj); void removeDebuggeeGlobal(FreeOp *fop, GlobalObject *global, GlobalObjectSet::Enum *compartmentEnum, GlobalObjectSet::Enum *debugEnum); # 110 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" JSTrapStatus handleUncaughtException(AutoCompartment &ac, Value *vp, bool callHook); # 137 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" JSTrapStatus parseResumptionValue(AutoCompartment &ac, bool ok, const Value &rv, Value *vp, bool callHook = true); JSObject *unwrapDebuggeeArgument(JSContext *cx, const Value &v); static void traceObject(JSTracer *trc, JSObject *obj); void trace(JSTracer *trc); static void finalize(FreeOp *fop, JSObject *obj); void markKeysInCompartment(JSTracer *tracer); static Class jsclass; static Debugger *fromThisValue(JSContext *cx, const CallArgs &ca, const char *fnname); static JSBool getEnabled(JSContext *cx, unsigned argc, Value *vp); static JSBool setEnabled(JSContext *cx, unsigned argc, Value *vp); static JSBool getHookImpl(JSContext *cx, unsigned argc, Value *vp, Hook which); static JSBool setHookImpl(JSContext *cx, unsigned argc, Value *vp, Hook which); static JSBool getOnDebuggerStatement(JSContext *cx, unsigned argc, Value *vp); static JSBool setOnDebuggerStatement(JSContext *cx, unsigned argc, Value *vp); static JSBool getOnExceptionUnwind(JSContext *cx, unsigned argc, Value *vp); static JSBool setOnExceptionUnwind(JSContext *cx, unsigned argc, Value *vp); static JSBool getOnNewScript(JSContext *cx, unsigned argc, Value *vp); static JSBool setOnNewScript(JSContext *cx, unsigned argc, Value *vp); static JSBool getOnEnterFrame(JSContext *cx, unsigned argc, Value *vp); static JSBool setOnEnterFrame(JSContext *cx, unsigned argc, Value *vp); static JSBool getUncaughtExceptionHook(JSContext *cx, unsigned argc, Value *vp); static JSBool setUncaughtExceptionHook(JSContext *cx, unsigned argc, Value *vp); static JSBool addDebuggee(JSContext *cx, unsigned argc, Value *vp); static JSBool removeDebuggee(JSContext *cx, unsigned argc, Value *vp); static JSBool hasDebuggee(JSContext *cx, unsigned argc, Value *vp); static JSBool getDebuggees(JSContext *cx, unsigned argc, Value *vp); static JSBool getNewestFrame(JSContext *cx, unsigned argc, Value *vp); static JSBool clearAllBreakpoints(JSContext *cx, unsigned argc, Value *vp); static JSBool findScripts(JSContext *cx, unsigned argc, Value *vp); static JSBool wrap(JSContext *cx, unsigned argc, Value *vp); static JSBool construct(JSContext *cx, unsigned argc, Value *vp); static JSPropertySpec properties[]; static JSFunctionSpec methods[]; JSObject *getHook(Hook hook) const; bool hasAnyLiveHooks() const; static JSTrapStatus slowPathOnEnterFrame(JSContext *cx, Value *vp); static bool slowPathOnLeaveFrame(JSContext *cx, bool ok); static void slowPathOnNewScript(JSContext *cx, JSScript *script, GlobalObject *compileAndGoGlobal); static JSTrapStatus dispatchHook(JSContext *cx, Value *vp, Hook which); JSTrapStatus fireDebuggerStatement(JSContext *cx, Value *vp); JSTrapStatus fireExceptionUnwind(JSContext *cx, Value *vp); JSTrapStatus fireEnterFrame(JSContext *cx, Value *vp); JSObject *newDebuggerScript(JSContext *cx, Handle script); void fireNewScript(JSContext *cx, Handle script); static inline Debugger *fromLinks(JSCList *links); inline Breakpoint *firstBreakpoint() const; public: Debugger(JSContext *cx, JSObject *dbg); ~Debugger(); bool init(JSContext *cx); inline const js::HeapPtrObject &toJSObject() const; inline js::HeapPtrObject &toJSObjectRef(); static inline Debugger *fromJSObject(JSObject *obj); static Debugger *fromChildJSObject(JSObject *obj); # 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" static void markCrossCompartmentDebuggerObjectReferents(JSTracer *tracer); static bool markAllIteratively(GCMarker *trc); static void sweepAll(FreeOp *fop); static void detachAllDebuggersFromGlobal(FreeOp *fop, GlobalObject *global, GlobalObjectSet::Enum *compartmentEnum); static inline JSTrapStatus onEnterFrame(JSContext *cx, Value *vp); static inline bool onLeaveFrame(JSContext *cx, bool ok); static inline JSTrapStatus onDebuggerStatement(JSContext *cx, Value *vp); static inline JSTrapStatus onExceptionUnwind(JSContext *cx, Value *vp); static inline void onNewScript(JSContext *cx, JSScript *script, GlobalObject *compileAndGoGlobal); static JSTrapStatus onTrap(JSContext *cx, Value *vp); static JSTrapStatus onSingleStep(JSContext *cx, Value *vp); inline bool observesEnterFrame() const; inline bool observesNewScript() const; inline bool observesGlobal(GlobalObject *global) const; inline bool observesFrame(StackFrame *fp) const; bool observesScript(JSScript *script) const; bool wrapEnvironment(JSContext *cx, Handle env, Value *vp); # 270 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" bool wrapDebuggeeValue(JSContext *cx, Value *vp); # 299 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" bool unwrapDebuggeeValue(JSContext *cx, Value *vp); bool getScriptFrame(JSContext *cx, StackFrame *fp, Value *vp); # 311 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" static void resultToCompletion(JSContext *cx, bool ok, const Value &rv, JSTrapStatus *status, Value *value); bool newCompletionValue(JSContext *cx, JSTrapStatus status, Value value, Value *result); # 333 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" bool receiveCompletionValue(AutoCompartment &ac, bool ok, Value val, Value *vp); JSObject *wrapScript(JSContext *cx, Handle script); private: Debugger(const Debugger &) ; Debugger & operator=(const Debugger &) ; }; class BreakpointSite { friend class Breakpoint; friend struct ::JSCompartment; friend struct ::JSScript; friend class Debugger; public: JSScript *script; jsbytecode * const pc; private: GlobalObject *scriptGlobal; JSCList breakpoints; size_t enabledCount; JSTrapHandler trapHandler; HeapValue trapClosure; void recompile(FreeOp *fop); public: BreakpointSite(JSScript *script, jsbytecode *pc); Breakpoint *firstBreakpoint() const; bool hasBreakpoint(Breakpoint *bp); bool hasTrap() const { return !!trapHandler; } GlobalObject *getScriptGlobal() const { return scriptGlobal; } void inc(FreeOp *fop); void dec(FreeOp *fop); void setTrap(FreeOp *fop, JSTrapHandler handler, const Value &closure); void clearTrap(FreeOp *fop, JSTrapHandler *handlerp = __null, Value *closurep = __null); void destroyIfEmpty(FreeOp *fop); }; # 404 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" class Breakpoint { friend struct ::JSCompartment; friend class Debugger; public: Debugger * const debugger; BreakpointSite * const site; private: js::HeapPtrObject handler; JSCList debuggerLinks; JSCList siteLinks; public: static Breakpoint *fromDebuggerLinks(JSCList *links); static Breakpoint *fromSiteLinks(JSCList *links); Breakpoint(Debugger *debugger, BreakpointSite *site, JSObject *handler); void destroy(FreeOp *fop); Breakpoint *nextInDebugger(); Breakpoint *nextInSite(); const HeapPtrObject &getHandler() const { return handler; } HeapPtrObject &getHandlerRef() { return handler; } }; Debugger * Debugger::fromLinks(JSCList *links) { unsigned char *p = reinterpret_cast(links); return reinterpret_cast(p - __builtin_offsetof (Debugger, link)); } Breakpoint * Debugger::firstBreakpoint() const { if (((&breakpoints)->next == (&breakpoints))) return __null; return Breakpoint::fromDebuggerLinks(((&breakpoints)->next)); } const js::HeapPtrObject & Debugger::toJSObject() const { do { } while(0); return object; } js::HeapPtrObject & Debugger::toJSObjectRef() { do { } while(0); return object; } Debugger * Debugger::fromJSObject(JSObject *obj) { do { } while(0); return (Debugger *) obj->getPrivate(); } bool Debugger::observesEnterFrame() const { return enabled && getHook(OnEnterFrame); } bool Debugger::observesNewScript() const { return enabled && getHook(OnNewScript); } bool Debugger::observesGlobal(GlobalObject *global) const { return debuggees.has(global); } bool Debugger::observesFrame(StackFrame *fp) const { return !fp->isDummyFrame() && observesGlobal(&fp->global()); } JSTrapStatus Debugger::onEnterFrame(JSContext *cx, Value *vp) { if (cx->compartment->getDebuggees().empty()) return JSTRAP_CONTINUE; return slowPathOnEnterFrame(cx, vp); } bool Debugger::onLeaveFrame(JSContext *cx, bool ok) { bool evalTraps = cx->fp()->isEvalFrame() && cx->fp()->script()->hasAnyBreakpointsOrStepMode(); if (!cx->compartment->getDebuggees().empty() || evalTraps) ok = slowPathOnLeaveFrame(cx, ok); return ok; } JSTrapStatus Debugger::onDebuggerStatement(JSContext *cx, Value *vp) { return cx->compartment->getDebuggees().empty() ? JSTRAP_CONTINUE : dispatchHook(cx, vp, OnDebuggerStatement); } JSTrapStatus Debugger::onExceptionUnwind(JSContext *cx, Value *vp) { return cx->compartment->getDebuggees().empty() ? JSTRAP_CONTINUE : dispatchHook(cx, vp, OnExceptionUnwind); } void Debugger::onNewScript(JSContext *cx, JSScript *script, GlobalObject *compileAndGoGlobal) { do { } while (0); do { } while (0); if (!script->compartment()->getDebuggees().empty()) slowPathOnNewScript(cx, script, compileAndGoGlobal); } extern JSBool EvaluateInEnv(JSContext *cx, Handle env, StackFrame *fp, const jschar *chars, unsigned length, const char *filename, unsigned lineno, Value *rval); } # 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 # 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 # 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 using namespace js; PropDesc::PropDesc() : pd_(UndefinedValue()), value_(UndefinedValue()), get_(UndefinedValue()), set_(UndefinedValue()), attrs(0), hasGet_(false), hasSet_(false), hasValue_(false), hasWritable_(false), hasEnumerable_(false), hasConfigurable_(false), isUndefined_(true) { } bool PropDesc::checkGetter(JSContext *cx) { if (hasGet_) { if (!js_IsCallable(get_) && !get_.isUndefined()) { JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_BAD_GET_SET_FIELD, js_getter_str); return false; } } return true; } bool PropDesc::checkSetter(JSContext *cx) { if (hasSet_) { if (!js_IsCallable(set_) && !set_.isUndefined()) { JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_BAD_GET_SET_FIELD, js_setter_str); return false; } } return true; } static bool CheckArgCompartment(JSContext *cx, JSObject *obj, const Value &v, const char *methodname, const char *propname) { if (v.isObject() && v.toObject().compartment() != obj->compartment()) { JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_DEBUG_COMPARTMENT_MISMATCH, methodname, propname); return false; } return true; } bool PropDesc::unwrapDebuggerObjectsInto(JSContext *cx, Debugger *dbg, JSObject *obj, PropDesc *unwrapped) const { do { } while(0); *unwrapped = *this; if (unwrapped->hasValue()) { if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->value_) || !CheckArgCompartment(cx, obj, unwrapped->value_, "defineProperty", "value")) { return false; } } if (unwrapped->hasGet()) { if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->get_) || !CheckArgCompartment(cx, obj, unwrapped->get_, "defineProperty", "get")) { return false; } } if (unwrapped->hasSet()) { if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->set_) || !CheckArgCompartment(cx, obj, unwrapped->set_, "defineProperty", "set")) { return false; } } return true; } bool PropDesc::wrapInto(JSContext *cx, JSObject *obj, const jsid &id, jsid *wrappedId, PropDesc *desc) const { do { } while(0); JSCompartment *comp = cx->compartment; *wrappedId = id; if (!comp->wrapId(cx, wrappedId)) return false; *desc = *this; if (!comp->wrap(cx, &desc->value_)) return false; if (!comp->wrap(cx, &desc->get_)) return false; if (!comp->wrap(cx, &desc->set_)) return false; return !obj->isProxy() || desc->makeObject(cx); } static ObjectElements emptyElementsHeader(0, 0); HeapSlot *js::emptyObjectElements = reinterpret_cast(uintptr_t(&emptyElementsHeader) + sizeof(ObjectElements)); # 217 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" void js::ObjectImpl::initSlotRange(uint32_t start, const Value *vector, uint32_t length) { JSCompartment *comp = compartment(); HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; getSlotRange(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) sp->init(comp, this->asObjectPtr(), start++, *vector++); for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) sp->init(comp, this->asObjectPtr(), start++, *vector++); } void js::ObjectImpl::copySlotRange(uint32_t start, const Value *vector, uint32_t length) { JSCompartment *comp = compartment(); HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; getSlotRange(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) sp->set(comp, this->asObjectPtr(), start++, *vector++); for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) sp->set(comp, this->asObjectPtr(), start++, *vector++); } # 260 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" const Shape * js::ObjectImpl::nativeLookup(JSContext *cx, jsid id) { do { } while(0); Shape **spp; return Shape::search(cx, lastProperty(), id, &spp); } # 277 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" void js::ObjectImpl::markChildren(JSTracer *trc) { MarkTypeObject(trc, &type_, "type"); MarkShape(trc, &shape_, "shape"); Class *clasp = shape_->getObjectClass(); JSObject *obj = asObjectPtr(); if (clasp->trace) clasp->trace(trc, obj); if (shape_->isNative()) MarkObjectSlots(trc, obj, 0, obj->slotSpan()); } bool DenseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) { do { } while(0); uint32_t len = initializedLength(); if (index >= len) { *desc = PropDesc::undefined(); return true; } HeapSlot &slot = obj->elements[index]; if (slot.isMagic(JS_ARRAY_HOLE)) { *desc = PropDesc::undefined(); return true; } *desc = PropDesc(slot, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); return true; } bool SparseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) { do { } while(0); __builtin_unreachable(); return false; } template static Value ElementToValue(const T &t) { return NumberValue(t); } template<> Value ElementToValue(const uint8_clamped &u) { return NumberValue(uint8_t(u)); } template bool TypedElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) { do { } while(0); if (index >= length()) { *desc = PropDesc::undefined(); return true; } *desc = PropDesc(ElementToValue(getElement(index)), PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); return false; } bool ArrayBufferElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) { do { } while(0); __builtin_unreachable(); return false; } bool SparseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded) { do { } while(0); __builtin_unreachable(); return false; } bool DenseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded) { do { } while(0); do { } while (0); do { } while (0); if (desc.hasGet() || desc.hasSet() || (desc.hasEnumerable() && !desc.enumerable()) || (desc.hasConfigurable() && !desc.configurable()) || (desc.hasWritable() && !desc.writable())) { if (!obj->makeElementsSparse(cx)) return false; SparseElementsHeader &elts = obj->elementsHeader().asSparseElements(); return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded); } uint32_t initLen = initializedLength(); if (index < initLen) { HeapSlot &slot = obj->elements[index]; if (!slot.isMagic(JS_ARRAY_HOLE)) { } } if (!obj->isExtensible()) { *succeeded = false; if (!shouldThrow) return true; ((void)(js_ReportValueErrorFlags(cx, 0x0, JSMSG_OBJECT_NOT_EXTENSIBLE, 0, ObjectValue(*obj), __null, __null, __null))) ; return false; } ObjectImpl::DenseElementsResult res = obj->ensureDenseElementsInitialized(cx, index, 0); if (res == ObjectImpl::Failure) return false; if (res == ObjectImpl::ConvertToSparse) { if (!obj->makeElementsSparse(cx)) return false; SparseElementsHeader &elts = obj->elementsHeader().asSparseElements(); return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded); } do { } while(0); obj->elements[index].set(obj->asObjectPtr(), index, desc.value()); *succeeded = true; return true; } static JSObject * ArrayBufferDelegate(JSContext *cx, ObjectImpl *obj) { do { } while(0); if (obj->getPrivate()) return static_cast(obj->getPrivate()); JSObject *delegate = NewObjectWithGivenProto(cx, &ObjectClass, obj->getProto(), __null); obj->setPrivate(delegate); return delegate; } template bool TypedElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded) { *succeeded = false; js_ReportValueErrorFlags(cx, 0x0, JSMSG_OBJECT_NOT_EXTENSIBLE, 0, ObjectValue(*obj), __null, __null, __null); return false; } bool ArrayBufferElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded) { do { } while(0); JSObject *delegate = ArrayBufferDelegate(cx, obj); if (!delegate) return false; return DefineElement(cx, delegate, index, desc, shouldThrow, succeeded); } bool js::GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) { ElementsHeader &header = obj->elementsHeader(); switch (header.kind()) { case DenseElements: return header.asDenseElements().getOwnElement(cx, obj, index, desc); case SparseElements: return header.asSparseElements().getOwnElement(cx, obj, index, desc); case Uint8Elements: return header.asUint8Elements().getOwnElement(cx, obj, index, desc); case Int8Elements: return header.asInt8Elements().getOwnElement(cx, obj, index, desc); case Uint16Elements: return header.asUint16Elements().getOwnElement(cx, obj, index, desc); case Int16Elements: return header.asInt16Elements().getOwnElement(cx, obj, index, desc); case Uint32Elements: return header.asUint32Elements().getOwnElement(cx, obj, index, desc); case Int32Elements: return header.asInt32Elements().getOwnElement(cx, obj, index, desc); case Uint8ClampedElements: return header.asUint8ClampedElements().getOwnElement(cx, obj, index, desc); case Float32Elements: return header.asFloat32Elements().getOwnElement(cx, obj, index, desc); case Float64Elements: return header.asFloat64Elements().getOwnElement(cx, obj, index, desc); case ArrayBufferElements: return header.asArrayBufferElements().getOwnElement(cx, obj, index, desc); } __builtin_unreachable(); return false; } bool js::GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, Value *vp) { __builtin_unreachable(); do { do { } while(0); if (static_cast(obj)->isProxy()) { __builtin_unreachable(); return false; } PropDesc desc; if (!GetOwnElement(cx, obj, index, &desc)) return false; if (desc.isUndefined()) { obj = obj->getProto(); if (obj) continue; vp->setUndefined(); return true; } if (desc.isDataDescriptor()) { *vp = desc.value(); return true; } if (desc.isAccessorDescriptor()) { Value get = desc.getterValue(); if (get.isUndefined()) { vp->setUndefined(); return true; } InvokeArgsGuard args; if (!cx->stack.pushInvokeArgs(cx, 0, &args)) return false; args.calleev() = get; args.thisv() = ObjectValue(*receiver); bool ok = Invoke(cx, args); *vp = args.rval(); return ok; } __builtin_unreachable(); return false; } while (false); } bool js::HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found) { __builtin_unreachable(); do { do { } while(0); if (static_cast(obj)->isProxy()) { __builtin_unreachable(); return false; } PropDesc prop; if (!GetOwnElement(cx, obj, index, &prop)) return false; if (!prop.isUndefined()) { *found = true; return true; } obj = obj->getProto(); if (obj) continue; *found = false; return true; } while (false); } bool js::DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, bool shouldThrow, bool *succeeded) { __builtin_unreachable(); ElementsHeader &header = obj->elementsHeader(); switch (header.kind()) { case DenseElements: return header.asDenseElements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case SparseElements: return header.asSparseElements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Uint8Elements: return header.asUint8Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Int8Elements: return header.asInt8Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Uint16Elements: return header.asUint16Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Int16Elements: return header.asInt16Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Uint32Elements: return header.asUint32Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Int32Elements: return header.asInt32Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Uint8ClampedElements: return header.asUint8ClampedElements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Float32Elements: return header.asFloat32Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case Float64Elements: return header.asFloat64Elements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); case ArrayBufferElements: return header.asArrayBufferElements().defineElement(cx, obj, index, desc, shouldThrow, succeeded); } __builtin_unreachable(); return false; } bool SparseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded) { do { } while(0); __builtin_unreachable(); return false; } bool DenseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded) { do { } while(0); __builtin_unreachable(); return false; } template bool TypedElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded) { do { } while(0); uint32_t len = length(); if (index >= len) { *succeeded = true; return true; } double d; if (v.isNumber()) { d = v.toNumber(); } else if (v.isNull()) { d = 0.0; } else if (v.isPrimitive()) { if (v.isString()) { if (!ToNumber(cx, v, &d)) return false; } else if (v.isUndefined()) { d = js_NaN; } else { d = double(v.toBoolean()); } } else { d = js_NaN; } assign(index, d); *succeeded = true; return true; } bool ArrayBufferElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded) { do { } while(0); JSObject *delegate = ArrayBufferDelegate(cx, obj); if (!delegate) return false; return SetElement(cx, obj, receiver, index, v, succeeded); } bool js::SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, bool *succeeded) { __builtin_unreachable(); do { do { } while(0); if (static_cast(obj)->isProxy()) { __builtin_unreachable(); return false; } PropDesc ownDesc; if (!GetOwnElement(cx, obj, index, &ownDesc)) return false; if (!ownDesc.isUndefined()) { if (ownDesc.isDataDescriptor()) { if (!ownDesc.writable()) { *succeeded = false; return true; } if (receiver == obj) { PropDesc updateDesc = PropDesc::valueOnly(v); return DefineElement(cx, receiver, index, updateDesc, false, succeeded); } PropDesc newDesc; return DefineElement(cx, receiver, index, newDesc, false, succeeded); } if (ownDesc.isAccessorDescriptor()) { Value setter = ownDesc.setterValue(); if (setter.isUndefined()) { *succeeded = false; return true; } InvokeArgsGuard args; if (!cx->stack.pushInvokeArgs(cx, 1, &args)) return false; args.calleev() = setter; args.thisv() = ObjectValue(*receiver); args[0] = v; *succeeded = true; return Invoke(cx, args); } __builtin_unreachable(); return false; } obj = obj->getProto(); if (obj) continue; PropDesc newDesc(v, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); return DefineElement(cx, receiver, index, newDesc, false, succeeded); } while (false); }