libv8-freebsd 3.3.10.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/README.md +75 -0
- data/Rakefile +115 -0
- data/ext/libv8/extconf.rb +27 -0
- data/lib/libv8.rb +15 -0
- data/lib/libv8/Makefile +39 -0
- data/lib/libv8/detect_cpu.rb +27 -0
- data/lib/libv8/fpic-on-freebsd-amd64.patch +16 -0
- data/lib/libv8/fpic-on-linux-amd64.patch +13 -0
- data/lib/libv8/scons/CHANGES.txt +5541 -0
- data/lib/libv8/scons/LICENSE.txt +20 -0
- data/lib/libv8/scons/MANIFEST +200 -0
- data/lib/libv8/scons/PKG-INFO +13 -0
- data/lib/libv8/scons/README.txt +243 -0
- data/lib/libv8/scons/RELEASE.txt +100 -0
- data/lib/libv8/scons/engine/SCons/Action.py +1257 -0
- data/lib/libv8/scons/engine/SCons/Builder.py +877 -0
- data/lib/libv8/scons/engine/SCons/CacheDir.py +216 -0
- data/lib/libv8/scons/engine/SCons/Conftest.py +793 -0
- data/lib/libv8/scons/engine/SCons/Debug.py +220 -0
- data/lib/libv8/scons/engine/SCons/Defaults.py +494 -0
- data/lib/libv8/scons/engine/SCons/Environment.py +2417 -0
- data/lib/libv8/scons/engine/SCons/Errors.py +205 -0
- data/lib/libv8/scons/engine/SCons/Executor.py +633 -0
- data/lib/libv8/scons/engine/SCons/Job.py +435 -0
- data/lib/libv8/scons/engine/SCons/Memoize.py +244 -0
- data/lib/libv8/scons/engine/SCons/Node/Alias.py +152 -0
- data/lib/libv8/scons/engine/SCons/Node/FS.py +3302 -0
- data/lib/libv8/scons/engine/SCons/Node/Python.py +128 -0
- data/lib/libv8/scons/engine/SCons/Node/__init__.py +1329 -0
- data/lib/libv8/scons/engine/SCons/Options/BoolOption.py +50 -0
- data/lib/libv8/scons/engine/SCons/Options/EnumOption.py +50 -0
- data/lib/libv8/scons/engine/SCons/Options/ListOption.py +50 -0
- data/lib/libv8/scons/engine/SCons/Options/PackageOption.py +50 -0
- data/lib/libv8/scons/engine/SCons/Options/PathOption.py +76 -0
- data/lib/libv8/scons/engine/SCons/Options/__init__.py +67 -0
- data/lib/libv8/scons/engine/SCons/PathList.py +231 -0
- data/lib/libv8/scons/engine/SCons/Platform/__init__.py +241 -0
- data/lib/libv8/scons/engine/SCons/Platform/aix.py +69 -0
- data/lib/libv8/scons/engine/SCons/Platform/cygwin.py +55 -0
- data/lib/libv8/scons/engine/SCons/Platform/darwin.py +70 -0
- data/lib/libv8/scons/engine/SCons/Platform/hpux.py +46 -0
- data/lib/libv8/scons/engine/SCons/Platform/irix.py +44 -0
- data/lib/libv8/scons/engine/SCons/Platform/os2.py +58 -0
- data/lib/libv8/scons/engine/SCons/Platform/posix.py +263 -0
- data/lib/libv8/scons/engine/SCons/Platform/sunos.py +50 -0
- data/lib/libv8/scons/engine/SCons/Platform/win32.py +385 -0
- data/lib/libv8/scons/engine/SCons/SConf.py +1030 -0
- data/lib/libv8/scons/engine/SCons/SConsign.py +389 -0
- data/lib/libv8/scons/engine/SCons/Scanner/C.py +132 -0
- data/lib/libv8/scons/engine/SCons/Scanner/D.py +73 -0
- data/lib/libv8/scons/engine/SCons/Scanner/Dir.py +109 -0
- data/lib/libv8/scons/engine/SCons/Scanner/Fortran.py +316 -0
- data/lib/libv8/scons/engine/SCons/Scanner/IDL.py +48 -0
- data/lib/libv8/scons/engine/SCons/Scanner/LaTeX.py +387 -0
- data/lib/libv8/scons/engine/SCons/Scanner/Prog.py +101 -0
- data/lib/libv8/scons/engine/SCons/Scanner/RC.py +55 -0
- data/lib/libv8/scons/engine/SCons/Scanner/__init__.py +413 -0
- data/lib/libv8/scons/engine/SCons/Script/Interactive.py +384 -0
- data/lib/libv8/scons/engine/SCons/Script/Main.py +1405 -0
- data/lib/libv8/scons/engine/SCons/Script/SConsOptions.py +939 -0
- data/lib/libv8/scons/engine/SCons/Script/SConscript.py +640 -0
- data/lib/libv8/scons/engine/SCons/Script/__init__.py +412 -0
- data/lib/libv8/scons/engine/SCons/Sig.py +63 -0
- data/lib/libv8/scons/engine/SCons/Subst.py +904 -0
- data/lib/libv8/scons/engine/SCons/Taskmaster.py +1025 -0
- data/lib/libv8/scons/engine/SCons/Tool/386asm.py +61 -0
- data/lib/libv8/scons/engine/SCons/Tool/BitKeeper.py +67 -0
- data/lib/libv8/scons/engine/SCons/Tool/CVS.py +73 -0
- data/lib/libv8/scons/engine/SCons/Tool/FortranCommon.py +263 -0
- data/lib/libv8/scons/engine/SCons/Tool/JavaCommon.py +323 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/common.py +240 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/netframework.py +82 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/sdk.py +391 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vc.py +459 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vs.py +526 -0
- data/lib/libv8/scons/engine/SCons/Tool/Perforce.py +103 -0
- data/lib/libv8/scons/engine/SCons/Tool/PharLapCommon.py +137 -0
- data/lib/libv8/scons/engine/SCons/Tool/RCS.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/SCCS.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/Subversion.py +71 -0
- data/lib/libv8/scons/engine/SCons/Tool/__init__.py +681 -0
- data/lib/libv8/scons/engine/SCons/Tool/aixc++.py +82 -0
- data/lib/libv8/scons/engine/SCons/Tool/aixcc.py +74 -0
- data/lib/libv8/scons/engine/SCons/Tool/aixf77.py +80 -0
- data/lib/libv8/scons/engine/SCons/Tool/aixlink.py +76 -0
- data/lib/libv8/scons/engine/SCons/Tool/applelink.py +71 -0
- data/lib/libv8/scons/engine/SCons/Tool/ar.py +63 -0
- data/lib/libv8/scons/engine/SCons/Tool/as.py +78 -0
- data/lib/libv8/scons/engine/SCons/Tool/bcc32.py +81 -0
- data/lib/libv8/scons/engine/SCons/Tool/c++.py +99 -0
- data/lib/libv8/scons/engine/SCons/Tool/cc.py +102 -0
- data/lib/libv8/scons/engine/SCons/Tool/cvf.py +58 -0
- data/lib/libv8/scons/engine/SCons/Tool/default.py +50 -0
- data/lib/libv8/scons/engine/SCons/Tool/dmd.py +240 -0
- data/lib/libv8/scons/engine/SCons/Tool/dvi.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/dvipdf.py +125 -0
- data/lib/libv8/scons/engine/SCons/Tool/dvips.py +95 -0
- data/lib/libv8/scons/engine/SCons/Tool/f03.py +63 -0
- data/lib/libv8/scons/engine/SCons/Tool/f77.py +62 -0
- data/lib/libv8/scons/engine/SCons/Tool/f90.py +62 -0
- data/lib/libv8/scons/engine/SCons/Tool/f95.py +63 -0
- data/lib/libv8/scons/engine/SCons/Tool/filesystem.py +98 -0
- data/lib/libv8/scons/engine/SCons/Tool/fortran.py +62 -0
- data/lib/libv8/scons/engine/SCons/Tool/g++.py +90 -0
- data/lib/libv8/scons/engine/SCons/Tool/g77.py +73 -0
- data/lib/libv8/scons/engine/SCons/Tool/gas.py +53 -0
- data/lib/libv8/scons/engine/SCons/Tool/gcc.py +80 -0
- data/lib/libv8/scons/engine/SCons/Tool/gfortran.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/gnulink.py +62 -0
- data/lib/libv8/scons/engine/SCons/Tool/gs.py +81 -0
- data/lib/libv8/scons/engine/SCons/Tool/hpc++.py +84 -0
- data/lib/libv8/scons/engine/SCons/Tool/hpcc.py +53 -0
- data/lib/libv8/scons/engine/SCons/Tool/hplink.py +77 -0
- data/lib/libv8/scons/engine/SCons/Tool/icc.py +59 -0
- data/lib/libv8/scons/engine/SCons/Tool/icl.py +52 -0
- data/lib/libv8/scons/engine/SCons/Tool/ifl.py +72 -0
- data/lib/libv8/scons/engine/SCons/Tool/ifort.py +88 -0
- data/lib/libv8/scons/engine/SCons/Tool/ilink.py +59 -0
- data/lib/libv8/scons/engine/SCons/Tool/ilink32.py +60 -0
- data/lib/libv8/scons/engine/SCons/Tool/install.py +283 -0
- data/lib/libv8/scons/engine/SCons/Tool/intelc.py +522 -0
- data/lib/libv8/scons/engine/SCons/Tool/ipkg.py +67 -0
- data/lib/libv8/scons/engine/SCons/Tool/jar.py +116 -0
- data/lib/libv8/scons/engine/SCons/Tool/javac.py +230 -0
- data/lib/libv8/scons/engine/SCons/Tool/javah.py +137 -0
- data/lib/libv8/scons/engine/SCons/Tool/latex.py +80 -0
- data/lib/libv8/scons/engine/SCons/Tool/lex.py +97 -0
- data/lib/libv8/scons/engine/SCons/Tool/link.py +122 -0
- data/lib/libv8/scons/engine/SCons/Tool/linkloc.py +112 -0
- data/lib/libv8/scons/engine/SCons/Tool/m4.py +63 -0
- data/lib/libv8/scons/engine/SCons/Tool/masm.py +77 -0
- data/lib/libv8/scons/engine/SCons/Tool/midl.py +88 -0
- data/lib/libv8/scons/engine/SCons/Tool/mingw.py +179 -0
- data/lib/libv8/scons/engine/SCons/Tool/mslib.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/mslink.py +318 -0
- data/lib/libv8/scons/engine/SCons/Tool/mssdk.py +50 -0
- data/lib/libv8/scons/engine/SCons/Tool/msvc.py +278 -0
- data/lib/libv8/scons/engine/SCons/Tool/msvs.py +1806 -0
- data/lib/libv8/scons/engine/SCons/Tool/mwcc.py +207 -0
- data/lib/libv8/scons/engine/SCons/Tool/mwld.py +107 -0
- data/lib/libv8/scons/engine/SCons/Tool/nasm.py +72 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/__init__.py +312 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/msi.py +527 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/rpm.py +365 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/targz.py +44 -0
- data/lib/libv8/scons/engine/SCons/Tool/packaging/zip.py +44 -0
- data/lib/libv8/scons/engine/SCons/Tool/pdf.py +78 -0
- data/lib/libv8/scons/engine/SCons/Tool/pdflatex.py +84 -0
- data/lib/libv8/scons/engine/SCons/Tool/pdftex.py +109 -0
- data/lib/libv8/scons/engine/SCons/Tool/qt.py +336 -0
- data/lib/libv8/scons/engine/SCons/Tool/rmic.py +126 -0
- data/lib/libv8/scons/engine/SCons/Tool/rpcgen.py +70 -0
- data/lib/libv8/scons/engine/SCons/Tool/rpm.py +132 -0
- data/lib/libv8/scons/engine/SCons/Tool/sgiar.py +68 -0
- data/lib/libv8/scons/engine/SCons/Tool/sgic++.py +58 -0
- data/lib/libv8/scons/engine/SCons/Tool/sgicc.py +53 -0
- data/lib/libv8/scons/engine/SCons/Tool/sgilink.py +62 -0
- data/lib/libv8/scons/engine/SCons/Tool/sunar.py +67 -0
- data/lib/libv8/scons/engine/SCons/Tool/sunc++.py +142 -0
- data/lib/libv8/scons/engine/SCons/Tool/suncc.py +58 -0
- data/lib/libv8/scons/engine/SCons/Tool/sunf77.py +63 -0
- data/lib/libv8/scons/engine/SCons/Tool/sunf90.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/sunf95.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/sunlink.py +76 -0
- data/lib/libv8/scons/engine/SCons/Tool/swig.py +183 -0
- data/lib/libv8/scons/engine/SCons/Tool/tar.py +73 -0
- data/lib/libv8/scons/engine/SCons/Tool/tex.py +866 -0
- data/lib/libv8/scons/engine/SCons/Tool/textfile.py +175 -0
- data/lib/libv8/scons/engine/SCons/Tool/tlib.py +53 -0
- data/lib/libv8/scons/engine/SCons/Tool/wix.py +99 -0
- data/lib/libv8/scons/engine/SCons/Tool/yacc.py +140 -0
- data/lib/libv8/scons/engine/SCons/Tool/zip.py +99 -0
- data/lib/libv8/scons/engine/SCons/Util.py +1492 -0
- data/lib/libv8/scons/engine/SCons/Variables/BoolVariable.py +89 -0
- data/lib/libv8/scons/engine/SCons/Variables/EnumVariable.py +103 -0
- data/lib/libv8/scons/engine/SCons/Variables/ListVariable.py +135 -0
- data/lib/libv8/scons/engine/SCons/Variables/PackageVariable.py +106 -0
- data/lib/libv8/scons/engine/SCons/Variables/PathVariable.py +147 -0
- data/lib/libv8/scons/engine/SCons/Variables/__init__.py +312 -0
- data/lib/libv8/scons/engine/SCons/Warnings.py +246 -0
- data/lib/libv8/scons/engine/SCons/__init__.py +49 -0
- data/lib/libv8/scons/engine/SCons/compat/__init__.py +237 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_builtins.py +150 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_collections.py +45 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_dbm.py +45 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_hashlib.py +76 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_io.py +45 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_sets.py +563 -0
- data/lib/libv8/scons/engine/SCons/compat/_scons_subprocess.py +1281 -0
- data/lib/libv8/scons/engine/SCons/cpp.py +589 -0
- data/lib/libv8/scons/engine/SCons/dblite.py +254 -0
- data/lib/libv8/scons/engine/SCons/exitfuncs.py +77 -0
- data/lib/libv8/scons/os_spawnv_fix.diff +83 -0
- data/lib/libv8/scons/scons-time.1 +1017 -0
- data/lib/libv8/scons/scons.1 +15225 -0
- data/lib/libv8/scons/sconsign.1 +208 -0
- data/lib/libv8/scons/script/scons +196 -0
- data/lib/libv8/scons/script/scons-time +1544 -0
- data/lib/libv8/scons/script/scons.bat +34 -0
- data/lib/libv8/scons/script/sconsign +514 -0
- data/lib/libv8/scons/setup.cfg +5 -0
- data/lib/libv8/scons/setup.py +423 -0
- data/lib/libv8/v8/.gitignore +35 -0
- data/lib/libv8/v8/AUTHORS +44 -0
- data/lib/libv8/v8/ChangeLog +2839 -0
- data/lib/libv8/v8/LICENSE +52 -0
- data/lib/libv8/v8/LICENSE.strongtalk +29 -0
- data/lib/libv8/v8/LICENSE.v8 +26 -0
- data/lib/libv8/v8/LICENSE.valgrind +45 -0
- data/lib/libv8/v8/SConstruct +1478 -0
- data/lib/libv8/v8/build/README.txt +49 -0
- data/lib/libv8/v8/build/all.gyp +18 -0
- data/lib/libv8/v8/build/armu.gypi +32 -0
- data/lib/libv8/v8/build/common.gypi +144 -0
- data/lib/libv8/v8/build/gyp_v8 +145 -0
- data/lib/libv8/v8/include/v8-debug.h +395 -0
- data/lib/libv8/v8/include/v8-preparser.h +117 -0
- data/lib/libv8/v8/include/v8-profiler.h +505 -0
- data/lib/libv8/v8/include/v8-testing.h +104 -0
- data/lib/libv8/v8/include/v8.h +4124 -0
- data/lib/libv8/v8/include/v8stdint.h +53 -0
- data/lib/libv8/v8/preparser/SConscript +38 -0
- data/lib/libv8/v8/preparser/preparser-process.cc +379 -0
- data/lib/libv8/v8/src/SConscript +368 -0
- data/lib/libv8/v8/src/accessors.cc +767 -0
- data/lib/libv8/v8/src/accessors.h +123 -0
- data/lib/libv8/v8/src/allocation-inl.h +49 -0
- data/lib/libv8/v8/src/allocation.cc +122 -0
- data/lib/libv8/v8/src/allocation.h +143 -0
- data/lib/libv8/v8/src/api.cc +5845 -0
- data/lib/libv8/v8/src/api.h +574 -0
- data/lib/libv8/v8/src/apinatives.js +110 -0
- data/lib/libv8/v8/src/apiutils.h +73 -0
- data/lib/libv8/v8/src/arguments.h +118 -0
- data/lib/libv8/v8/src/arm/assembler-arm-inl.h +353 -0
- data/lib/libv8/v8/src/arm/assembler-arm.cc +2661 -0
- data/lib/libv8/v8/src/arm/assembler-arm.h +1375 -0
- data/lib/libv8/v8/src/arm/builtins-arm.cc +1658 -0
- data/lib/libv8/v8/src/arm/code-stubs-arm.cc +6398 -0
- data/lib/libv8/v8/src/arm/code-stubs-arm.h +673 -0
- data/lib/libv8/v8/src/arm/codegen-arm.cc +52 -0
- data/lib/libv8/v8/src/arm/codegen-arm.h +91 -0
- data/lib/libv8/v8/src/arm/constants-arm.cc +152 -0
- data/lib/libv8/v8/src/arm/constants-arm.h +775 -0
- data/lib/libv8/v8/src/arm/cpu-arm.cc +120 -0
- data/lib/libv8/v8/src/arm/debug-arm.cc +317 -0
- data/lib/libv8/v8/src/arm/deoptimizer-arm.cc +754 -0
- data/lib/libv8/v8/src/arm/disasm-arm.cc +1506 -0
- data/lib/libv8/v8/src/arm/frames-arm.cc +45 -0
- data/lib/libv8/v8/src/arm/frames-arm.h +168 -0
- data/lib/libv8/v8/src/arm/full-codegen-arm.cc +4375 -0
- data/lib/libv8/v8/src/arm/ic-arm.cc +1562 -0
- data/lib/libv8/v8/src/arm/lithium-arm.cc +2206 -0
- data/lib/libv8/v8/src/arm/lithium-arm.h +2348 -0
- data/lib/libv8/v8/src/arm/lithium-codegen-arm.cc +4526 -0
- data/lib/libv8/v8/src/arm/lithium-codegen-arm.h +403 -0
- data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.cc +305 -0
- data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.h +84 -0
- data/lib/libv8/v8/src/arm/macro-assembler-arm.cc +3163 -0
- data/lib/libv8/v8/src/arm/macro-assembler-arm.h +1126 -0
- data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.cc +1287 -0
- data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.h +253 -0
- data/lib/libv8/v8/src/arm/simulator-arm.cc +3424 -0
- data/lib/libv8/v8/src/arm/simulator-arm.h +431 -0
- data/lib/libv8/v8/src/arm/stub-cache-arm.cc +4243 -0
- data/lib/libv8/v8/src/array.js +1366 -0
- data/lib/libv8/v8/src/assembler.cc +1207 -0
- data/lib/libv8/v8/src/assembler.h +858 -0
- data/lib/libv8/v8/src/ast-inl.h +112 -0
- data/lib/libv8/v8/src/ast.cc +1146 -0
- data/lib/libv8/v8/src/ast.h +2188 -0
- data/lib/libv8/v8/src/atomicops.h +167 -0
- data/lib/libv8/v8/src/atomicops_internals_arm_gcc.h +145 -0
- data/lib/libv8/v8/src/atomicops_internals_mips_gcc.h +169 -0
- data/lib/libv8/v8/src/atomicops_internals_x86_gcc.cc +133 -0
- data/lib/libv8/v8/src/atomicops_internals_x86_gcc.h +287 -0
- data/lib/libv8/v8/src/atomicops_internals_x86_macosx.h +301 -0
- data/lib/libv8/v8/src/atomicops_internals_x86_msvc.h +203 -0
- data/lib/libv8/v8/src/bignum-dtoa.cc +655 -0
- data/lib/libv8/v8/src/bignum-dtoa.h +81 -0
- data/lib/libv8/v8/src/bignum.cc +768 -0
- data/lib/libv8/v8/src/bignum.h +140 -0
- data/lib/libv8/v8/src/bootstrapper.cc +2184 -0
- data/lib/libv8/v8/src/bootstrapper.h +188 -0
- data/lib/libv8/v8/src/builtins.cc +1707 -0
- data/lib/libv8/v8/src/builtins.h +371 -0
- data/lib/libv8/v8/src/bytecodes-irregexp.h +105 -0
- data/lib/libv8/v8/src/cached-powers.cc +177 -0
- data/lib/libv8/v8/src/cached-powers.h +65 -0
- data/lib/libv8/v8/src/char-predicates-inl.h +94 -0
- data/lib/libv8/v8/src/char-predicates.h +67 -0
- data/lib/libv8/v8/src/checks.cc +110 -0
- data/lib/libv8/v8/src/checks.h +296 -0
- data/lib/libv8/v8/src/circular-queue-inl.h +53 -0
- data/lib/libv8/v8/src/circular-queue.cc +122 -0
- data/lib/libv8/v8/src/circular-queue.h +103 -0
- data/lib/libv8/v8/src/code-stubs.cc +267 -0
- data/lib/libv8/v8/src/code-stubs.h +1011 -0
- data/lib/libv8/v8/src/code.h +70 -0
- data/lib/libv8/v8/src/codegen.cc +231 -0
- data/lib/libv8/v8/src/codegen.h +84 -0
- data/lib/libv8/v8/src/compilation-cache.cc +540 -0
- data/lib/libv8/v8/src/compilation-cache.h +287 -0
- data/lib/libv8/v8/src/compiler.cc +786 -0
- data/lib/libv8/v8/src/compiler.h +312 -0
- data/lib/libv8/v8/src/contexts.cc +347 -0
- data/lib/libv8/v8/src/contexts.h +391 -0
- data/lib/libv8/v8/src/conversions-inl.h +106 -0
- data/lib/libv8/v8/src/conversions.cc +1131 -0
- data/lib/libv8/v8/src/conversions.h +135 -0
- data/lib/libv8/v8/src/counters.cc +93 -0
- data/lib/libv8/v8/src/counters.h +254 -0
- data/lib/libv8/v8/src/cpu-profiler-inl.h +101 -0
- data/lib/libv8/v8/src/cpu-profiler.cc +609 -0
- data/lib/libv8/v8/src/cpu-profiler.h +302 -0
- data/lib/libv8/v8/src/cpu.h +69 -0
- data/lib/libv8/v8/src/d8-debug.cc +367 -0
- data/lib/libv8/v8/src/d8-debug.h +158 -0
- data/lib/libv8/v8/src/d8-posix.cc +695 -0
- data/lib/libv8/v8/src/d8-readline.cc +130 -0
- data/lib/libv8/v8/src/d8-windows.cc +42 -0
- data/lib/libv8/v8/src/d8.cc +803 -0
- data/lib/libv8/v8/src/d8.gyp +91 -0
- data/lib/libv8/v8/src/d8.h +235 -0
- data/lib/libv8/v8/src/d8.js +2798 -0
- data/lib/libv8/v8/src/data-flow.cc +66 -0
- data/lib/libv8/v8/src/data-flow.h +205 -0
- data/lib/libv8/v8/src/date.js +1103 -0
- data/lib/libv8/v8/src/dateparser-inl.h +127 -0
- data/lib/libv8/v8/src/dateparser.cc +178 -0
- data/lib/libv8/v8/src/dateparser.h +266 -0
- data/lib/libv8/v8/src/debug-agent.cc +447 -0
- data/lib/libv8/v8/src/debug-agent.h +129 -0
- data/lib/libv8/v8/src/debug-debugger.js +2569 -0
- data/lib/libv8/v8/src/debug.cc +3165 -0
- data/lib/libv8/v8/src/debug.h +1057 -0
- data/lib/libv8/v8/src/deoptimizer.cc +1256 -0
- data/lib/libv8/v8/src/deoptimizer.h +602 -0
- data/lib/libv8/v8/src/disasm.h +80 -0
- data/lib/libv8/v8/src/disassembler.cc +343 -0
- data/lib/libv8/v8/src/disassembler.h +58 -0
- data/lib/libv8/v8/src/diy-fp.cc +58 -0
- data/lib/libv8/v8/src/diy-fp.h +117 -0
- data/lib/libv8/v8/src/double.h +238 -0
- data/lib/libv8/v8/src/dtoa.cc +103 -0
- data/lib/libv8/v8/src/dtoa.h +85 -0
- data/lib/libv8/v8/src/execution.cc +849 -0
- data/lib/libv8/v8/src/execution.h +297 -0
- data/lib/libv8/v8/src/extensions/experimental/break-iterator.cc +250 -0
- data/lib/libv8/v8/src/extensions/experimental/break-iterator.h +89 -0
- data/lib/libv8/v8/src/extensions/experimental/collator.cc +218 -0
- data/lib/libv8/v8/src/extensions/experimental/collator.h +69 -0
- data/lib/libv8/v8/src/extensions/experimental/experimental.gyp +94 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-extension.cc +78 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-extension.h +54 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-locale.cc +112 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-locale.h +60 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-utils.cc +43 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-utils.h +49 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n.js +180 -0
- data/lib/libv8/v8/src/extensions/experimental/language-matcher.cc +251 -0
- data/lib/libv8/v8/src/extensions/experimental/language-matcher.h +95 -0
- data/lib/libv8/v8/src/extensions/externalize-string-extension.cc +141 -0
- data/lib/libv8/v8/src/extensions/externalize-string-extension.h +50 -0
- data/lib/libv8/v8/src/extensions/gc-extension.cc +58 -0
- data/lib/libv8/v8/src/extensions/gc-extension.h +49 -0
- data/lib/libv8/v8/src/factory.cc +1222 -0
- data/lib/libv8/v8/src/factory.h +442 -0
- data/lib/libv8/v8/src/fast-dtoa.cc +736 -0
- data/lib/libv8/v8/src/fast-dtoa.h +83 -0
- data/lib/libv8/v8/src/fixed-dtoa.cc +405 -0
- data/lib/libv8/v8/src/fixed-dtoa.h +55 -0
- data/lib/libv8/v8/src/flag-definitions.h +560 -0
- data/lib/libv8/v8/src/flags.cc +551 -0
- data/lib/libv8/v8/src/flags.h +79 -0
- data/lib/libv8/v8/src/frames-inl.h +247 -0
- data/lib/libv8/v8/src/frames.cc +1243 -0
- data/lib/libv8/v8/src/frames.h +870 -0
- data/lib/libv8/v8/src/full-codegen.cc +1374 -0
- data/lib/libv8/v8/src/full-codegen.h +771 -0
- data/lib/libv8/v8/src/func-name-inferrer.cc +92 -0
- data/lib/libv8/v8/src/func-name-inferrer.h +111 -0
- data/lib/libv8/v8/src/gdb-jit.cc +1555 -0
- data/lib/libv8/v8/src/gdb-jit.h +143 -0
- data/lib/libv8/v8/src/global-handles.cc +665 -0
- data/lib/libv8/v8/src/global-handles.h +284 -0
- data/lib/libv8/v8/src/globals.h +325 -0
- data/lib/libv8/v8/src/handles-inl.h +177 -0
- data/lib/libv8/v8/src/handles.cc +987 -0
- data/lib/libv8/v8/src/handles.h +382 -0
- data/lib/libv8/v8/src/hashmap.cc +230 -0
- data/lib/libv8/v8/src/hashmap.h +123 -0
- data/lib/libv8/v8/src/heap-inl.h +704 -0
- data/lib/libv8/v8/src/heap-profiler.cc +1173 -0
- data/lib/libv8/v8/src/heap-profiler.h +397 -0
- data/lib/libv8/v8/src/heap.cc +5930 -0
- data/lib/libv8/v8/src/heap.h +2268 -0
- data/lib/libv8/v8/src/hydrogen-instructions.cc +1769 -0
- data/lib/libv8/v8/src/hydrogen-instructions.h +3971 -0
- data/lib/libv8/v8/src/hydrogen.cc +6239 -0
- data/lib/libv8/v8/src/hydrogen.h +1202 -0
- data/lib/libv8/v8/src/ia32/assembler-ia32-inl.h +446 -0
- data/lib/libv8/v8/src/ia32/assembler-ia32.cc +2487 -0
- data/lib/libv8/v8/src/ia32/assembler-ia32.h +1144 -0
- data/lib/libv8/v8/src/ia32/builtins-ia32.cc +1621 -0
- data/lib/libv8/v8/src/ia32/code-stubs-ia32.cc +6198 -0
- data/lib/libv8/v8/src/ia32/code-stubs-ia32.h +517 -0
- data/lib/libv8/v8/src/ia32/codegen-ia32.cc +265 -0
- data/lib/libv8/v8/src/ia32/codegen-ia32.h +79 -0
- data/lib/libv8/v8/src/ia32/cpu-ia32.cc +88 -0
- data/lib/libv8/v8/src/ia32/debug-ia32.cc +312 -0
- data/lib/libv8/v8/src/ia32/deoptimizer-ia32.cc +774 -0
- data/lib/libv8/v8/src/ia32/disasm-ia32.cc +1628 -0
- data/lib/libv8/v8/src/ia32/frames-ia32.cc +45 -0
- data/lib/libv8/v8/src/ia32/frames-ia32.h +142 -0
- data/lib/libv8/v8/src/ia32/full-codegen-ia32.cc +4338 -0
- data/lib/libv8/v8/src/ia32/ic-ia32.cc +1597 -0
- data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.cc +4461 -0
- data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.h +375 -0
- data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.cc +475 -0
- data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
- data/lib/libv8/v8/src/ia32/lithium-ia32.cc +2261 -0
- data/lib/libv8/v8/src/ia32/lithium-ia32.h +2396 -0
- data/lib/libv8/v8/src/ia32/macro-assembler-ia32.cc +2136 -0
- data/lib/libv8/v8/src/ia32/macro-assembler-ia32.h +775 -0
- data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.cc +1263 -0
- data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.h +216 -0
- data/lib/libv8/v8/src/ia32/simulator-ia32.cc +30 -0
- data/lib/libv8/v8/src/ia32/simulator-ia32.h +74 -0
- data/lib/libv8/v8/src/ia32/stub-cache-ia32.cc +3847 -0
- data/lib/libv8/v8/src/ic-inl.h +130 -0
- data/lib/libv8/v8/src/ic.cc +2577 -0
- data/lib/libv8/v8/src/ic.h +736 -0
- data/lib/libv8/v8/src/inspector.cc +63 -0
- data/lib/libv8/v8/src/inspector.h +62 -0
- data/lib/libv8/v8/src/interpreter-irregexp.cc +659 -0
- data/lib/libv8/v8/src/interpreter-irregexp.h +49 -0
- data/lib/libv8/v8/src/isolate-inl.h +50 -0
- data/lib/libv8/v8/src/isolate.cc +1869 -0
- data/lib/libv8/v8/src/isolate.h +1382 -0
- data/lib/libv8/v8/src/json-parser.cc +504 -0
- data/lib/libv8/v8/src/json-parser.h +161 -0
- data/lib/libv8/v8/src/json.js +342 -0
- data/lib/libv8/v8/src/jsregexp.cc +5385 -0
- data/lib/libv8/v8/src/jsregexp.h +1492 -0
- data/lib/libv8/v8/src/list-inl.h +212 -0
- data/lib/libv8/v8/src/list.h +174 -0
- data/lib/libv8/v8/src/lithium-allocator-inl.h +142 -0
- data/lib/libv8/v8/src/lithium-allocator.cc +2123 -0
- data/lib/libv8/v8/src/lithium-allocator.h +630 -0
- data/lib/libv8/v8/src/lithium.cc +190 -0
- data/lib/libv8/v8/src/lithium.h +597 -0
- data/lib/libv8/v8/src/liveedit-debugger.js +1082 -0
- data/lib/libv8/v8/src/liveedit.cc +1691 -0
- data/lib/libv8/v8/src/liveedit.h +180 -0
- data/lib/libv8/v8/src/liveobjectlist-inl.h +126 -0
- data/lib/libv8/v8/src/liveobjectlist.cc +2589 -0
- data/lib/libv8/v8/src/liveobjectlist.h +322 -0
- data/lib/libv8/v8/src/log-inl.h +59 -0
- data/lib/libv8/v8/src/log-utils.cc +428 -0
- data/lib/libv8/v8/src/log-utils.h +231 -0
- data/lib/libv8/v8/src/log.cc +1993 -0
- data/lib/libv8/v8/src/log.h +476 -0
- data/lib/libv8/v8/src/macro-assembler.h +120 -0
- data/lib/libv8/v8/src/macros.py +178 -0
- data/lib/libv8/v8/src/mark-compact.cc +3143 -0
- data/lib/libv8/v8/src/mark-compact.h +506 -0
- data/lib/libv8/v8/src/math.js +264 -0
- data/lib/libv8/v8/src/messages.cc +179 -0
- data/lib/libv8/v8/src/messages.h +113 -0
- data/lib/libv8/v8/src/messages.js +1096 -0
- data/lib/libv8/v8/src/mips/assembler-mips-inl.h +312 -0
- data/lib/libv8/v8/src/mips/assembler-mips.cc +1960 -0
- data/lib/libv8/v8/src/mips/assembler-mips.h +1138 -0
- data/lib/libv8/v8/src/mips/builtins-mips.cc +1628 -0
- data/lib/libv8/v8/src/mips/code-stubs-mips.cc +6656 -0
- data/lib/libv8/v8/src/mips/code-stubs-mips.h +682 -0
- data/lib/libv8/v8/src/mips/codegen-mips.cc +52 -0
- data/lib/libv8/v8/src/mips/codegen-mips.h +98 -0
- data/lib/libv8/v8/src/mips/constants-mips.cc +352 -0
- data/lib/libv8/v8/src/mips/constants-mips.h +739 -0
- data/lib/libv8/v8/src/mips/cpu-mips.cc +96 -0
- data/lib/libv8/v8/src/mips/debug-mips.cc +308 -0
- data/lib/libv8/v8/src/mips/deoptimizer-mips.cc +91 -0
- data/lib/libv8/v8/src/mips/disasm-mips.cc +1050 -0
- data/lib/libv8/v8/src/mips/frames-mips.cc +47 -0
- data/lib/libv8/v8/src/mips/frames-mips.h +219 -0
- data/lib/libv8/v8/src/mips/full-codegen-mips.cc +4388 -0
- data/lib/libv8/v8/src/mips/ic-mips.cc +1580 -0
- data/lib/libv8/v8/src/mips/lithium-codegen-mips.h +65 -0
- data/lib/libv8/v8/src/mips/lithium-mips.h +307 -0
- data/lib/libv8/v8/src/mips/macro-assembler-mips.cc +4056 -0
- data/lib/libv8/v8/src/mips/macro-assembler-mips.h +1214 -0
- data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.cc +1251 -0
- data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.h +252 -0
- data/lib/libv8/v8/src/mips/simulator-mips.cc +2621 -0
- data/lib/libv8/v8/src/mips/simulator-mips.h +401 -0
- data/lib/libv8/v8/src/mips/stub-cache-mips.cc +4285 -0
- data/lib/libv8/v8/src/mirror-debugger.js +2382 -0
- data/lib/libv8/v8/src/mksnapshot.cc +328 -0
- data/lib/libv8/v8/src/natives.h +64 -0
- data/lib/libv8/v8/src/objects-debug.cc +738 -0
- data/lib/libv8/v8/src/objects-inl.h +4323 -0
- data/lib/libv8/v8/src/objects-printer.cc +829 -0
- data/lib/libv8/v8/src/objects-visiting.cc +148 -0
- data/lib/libv8/v8/src/objects-visiting.h +424 -0
- data/lib/libv8/v8/src/objects.cc +10585 -0
- data/lib/libv8/v8/src/objects.h +6838 -0
- data/lib/libv8/v8/src/parser.cc +4997 -0
- data/lib/libv8/v8/src/parser.h +765 -0
- data/lib/libv8/v8/src/platform-cygwin.cc +779 -0
- data/lib/libv8/v8/src/platform-freebsd.cc +826 -0
- data/lib/libv8/v8/src/platform-linux.cc +1149 -0
- data/lib/libv8/v8/src/platform-macos.cc +830 -0
- data/lib/libv8/v8/src/platform-nullos.cc +479 -0
- data/lib/libv8/v8/src/platform-openbsd.cc +640 -0
- data/lib/libv8/v8/src/platform-posix.cc +424 -0
- data/lib/libv8/v8/src/platform-solaris.cc +762 -0
- data/lib/libv8/v8/src/platform-tls-mac.h +62 -0
- data/lib/libv8/v8/src/platform-tls-win32.h +62 -0
- data/lib/libv8/v8/src/platform-tls.h +50 -0
- data/lib/libv8/v8/src/platform-win32.cc +2021 -0
- data/lib/libv8/v8/src/platform.h +667 -0
- data/lib/libv8/v8/src/preparse-data-format.h +62 -0
- data/lib/libv8/v8/src/preparse-data.cc +183 -0
- data/lib/libv8/v8/src/preparse-data.h +225 -0
- data/lib/libv8/v8/src/preparser-api.cc +220 -0
- data/lib/libv8/v8/src/preparser.cc +1450 -0
- data/lib/libv8/v8/src/preparser.h +493 -0
- data/lib/libv8/v8/src/prettyprinter.cc +1493 -0
- data/lib/libv8/v8/src/prettyprinter.h +223 -0
- data/lib/libv8/v8/src/profile-generator-inl.h +128 -0
- data/lib/libv8/v8/src/profile-generator.cc +3098 -0
- data/lib/libv8/v8/src/profile-generator.h +1126 -0
- data/lib/libv8/v8/src/property.cc +105 -0
- data/lib/libv8/v8/src/property.h +365 -0
- data/lib/libv8/v8/src/proxy.js +83 -0
- data/lib/libv8/v8/src/regexp-macro-assembler-irregexp-inl.h +78 -0
- data/lib/libv8/v8/src/regexp-macro-assembler-irregexp.cc +471 -0
- data/lib/libv8/v8/src/regexp-macro-assembler-irregexp.h +142 -0
- data/lib/libv8/v8/src/regexp-macro-assembler-tracer.cc +373 -0
- data/lib/libv8/v8/src/regexp-macro-assembler-tracer.h +104 -0
- data/lib/libv8/v8/src/regexp-macro-assembler.cc +267 -0
- data/lib/libv8/v8/src/regexp-macro-assembler.h +243 -0
- data/lib/libv8/v8/src/regexp-stack.cc +111 -0
- data/lib/libv8/v8/src/regexp-stack.h +147 -0
- data/lib/libv8/v8/src/regexp.js +483 -0
- data/lib/libv8/v8/src/rewriter.cc +360 -0
- data/lib/libv8/v8/src/rewriter.h +50 -0
- data/lib/libv8/v8/src/runtime-profiler.cc +489 -0
- data/lib/libv8/v8/src/runtime-profiler.h +201 -0
- data/lib/libv8/v8/src/runtime.cc +12227 -0
- data/lib/libv8/v8/src/runtime.h +652 -0
- data/lib/libv8/v8/src/runtime.js +649 -0
- data/lib/libv8/v8/src/safepoint-table.cc +256 -0
- data/lib/libv8/v8/src/safepoint-table.h +270 -0
- data/lib/libv8/v8/src/scanner-base.cc +952 -0
- data/lib/libv8/v8/src/scanner-base.h +670 -0
- data/lib/libv8/v8/src/scanner.cc +345 -0
- data/lib/libv8/v8/src/scanner.h +146 -0
- data/lib/libv8/v8/src/scopeinfo.cc +646 -0
- data/lib/libv8/v8/src/scopeinfo.h +254 -0
- data/lib/libv8/v8/src/scopes.cc +1150 -0
- data/lib/libv8/v8/src/scopes.h +507 -0
- data/lib/libv8/v8/src/serialize.cc +1574 -0
- data/lib/libv8/v8/src/serialize.h +589 -0
- data/lib/libv8/v8/src/shell.h +55 -0
- data/lib/libv8/v8/src/simulator.h +43 -0
- data/lib/libv8/v8/src/small-pointer-list.h +163 -0
- data/lib/libv8/v8/src/smart-pointer.h +109 -0
- data/lib/libv8/v8/src/snapshot-common.cc +83 -0
- data/lib/libv8/v8/src/snapshot-empty.cc +54 -0
- data/lib/libv8/v8/src/snapshot.h +91 -0
- data/lib/libv8/v8/src/spaces-inl.h +529 -0
- data/lib/libv8/v8/src/spaces.cc +3145 -0
- data/lib/libv8/v8/src/spaces.h +2369 -0
- data/lib/libv8/v8/src/splay-tree-inl.h +310 -0
- data/lib/libv8/v8/src/splay-tree.h +205 -0
- data/lib/libv8/v8/src/string-search.cc +41 -0
- data/lib/libv8/v8/src/string-search.h +568 -0
- data/lib/libv8/v8/src/string-stream.cc +592 -0
- data/lib/libv8/v8/src/string-stream.h +191 -0
- data/lib/libv8/v8/src/string.js +994 -0
- data/lib/libv8/v8/src/strtod.cc +440 -0
- data/lib/libv8/v8/src/strtod.h +40 -0
- data/lib/libv8/v8/src/stub-cache.cc +1965 -0
- data/lib/libv8/v8/src/stub-cache.h +924 -0
- data/lib/libv8/v8/src/third_party/valgrind/valgrind.h +3925 -0
- data/lib/libv8/v8/src/token.cc +63 -0
- data/lib/libv8/v8/src/token.h +288 -0
- data/lib/libv8/v8/src/type-info.cc +507 -0
- data/lib/libv8/v8/src/type-info.h +272 -0
- data/lib/libv8/v8/src/unbound-queue-inl.h +95 -0
- data/lib/libv8/v8/src/unbound-queue.h +69 -0
- data/lib/libv8/v8/src/unicode-inl.h +238 -0
- data/lib/libv8/v8/src/unicode.cc +1624 -0
- data/lib/libv8/v8/src/unicode.h +280 -0
- data/lib/libv8/v8/src/uri.js +408 -0
- data/lib/libv8/v8/src/utils-inl.h +48 -0
- data/lib/libv8/v8/src/utils.cc +371 -0
- data/lib/libv8/v8/src/utils.h +800 -0
- data/lib/libv8/v8/src/v8-counters.cc +62 -0
- data/lib/libv8/v8/src/v8-counters.h +314 -0
- data/lib/libv8/v8/src/v8.cc +213 -0
- data/lib/libv8/v8/src/v8.h +131 -0
- data/lib/libv8/v8/src/v8checks.h +64 -0
- data/lib/libv8/v8/src/v8dll-main.cc +44 -0
- data/lib/libv8/v8/src/v8globals.h +512 -0
- data/lib/libv8/v8/src/v8memory.h +82 -0
- data/lib/libv8/v8/src/v8natives.js +1310 -0
- data/lib/libv8/v8/src/v8preparserdll-main.cc +39 -0
- data/lib/libv8/v8/src/v8threads.cc +464 -0
- data/lib/libv8/v8/src/v8threads.h +165 -0
- data/lib/libv8/v8/src/v8utils.h +319 -0
- data/lib/libv8/v8/src/variables.cc +114 -0
- data/lib/libv8/v8/src/variables.h +167 -0
- data/lib/libv8/v8/src/version.cc +116 -0
- data/lib/libv8/v8/src/version.h +68 -0
- data/lib/libv8/v8/src/vm-state-inl.h +138 -0
- data/lib/libv8/v8/src/vm-state.h +71 -0
- data/lib/libv8/v8/src/win32-headers.h +96 -0
- data/lib/libv8/v8/src/x64/assembler-x64-inl.h +462 -0
- data/lib/libv8/v8/src/x64/assembler-x64.cc +3027 -0
- data/lib/libv8/v8/src/x64/assembler-x64.h +1633 -0
- data/lib/libv8/v8/src/x64/builtins-x64.cc +1520 -0
- data/lib/libv8/v8/src/x64/code-stubs-x64.cc +5132 -0
- data/lib/libv8/v8/src/x64/code-stubs-x64.h +514 -0
- data/lib/libv8/v8/src/x64/codegen-x64.cc +146 -0
- data/lib/libv8/v8/src/x64/codegen-x64.h +76 -0
- data/lib/libv8/v8/src/x64/cpu-x64.cc +88 -0
- data/lib/libv8/v8/src/x64/debug-x64.cc +319 -0
- data/lib/libv8/v8/src/x64/deoptimizer-x64.cc +815 -0
- data/lib/libv8/v8/src/x64/disasm-x64.cc +1832 -0
- data/lib/libv8/v8/src/x64/frames-x64.cc +45 -0
- data/lib/libv8/v8/src/x64/frames-x64.h +130 -0
- data/lib/libv8/v8/src/x64/full-codegen-x64.cc +4318 -0
- data/lib/libv8/v8/src/x64/ic-x64.cc +1608 -0
- data/lib/libv8/v8/src/x64/lithium-codegen-x64.cc +4267 -0
- data/lib/libv8/v8/src/x64/lithium-codegen-x64.h +367 -0
- data/lib/libv8/v8/src/x64/lithium-gap-resolver-x64.cc +320 -0
- data/lib/libv8/v8/src/x64/lithium-gap-resolver-x64.h +74 -0
- data/lib/libv8/v8/src/x64/lithium-x64.cc +2202 -0
- data/lib/libv8/v8/src/x64/lithium-x64.h +2333 -0
- data/lib/libv8/v8/src/x64/macro-assembler-x64.cc +3745 -0
- data/lib/libv8/v8/src/x64/macro-assembler-x64.h +1290 -0
- data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.cc +1398 -0
- data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.h +282 -0
- data/lib/libv8/v8/src/x64/simulator-x64.cc +27 -0
- data/lib/libv8/v8/src/x64/simulator-x64.h +72 -0
- data/lib/libv8/v8/src/x64/stub-cache-x64.cc +3610 -0
- data/lib/libv8/v8/src/zone-inl.h +140 -0
- data/lib/libv8/v8/src/zone.cc +196 -0
- data/lib/libv8/v8/src/zone.h +240 -0
- data/lib/libv8/v8/tools/codemap.js +265 -0
- data/lib/libv8/v8/tools/consarray.js +93 -0
- data/lib/libv8/v8/tools/csvparser.js +78 -0
- data/lib/libv8/v8/tools/disasm.py +92 -0
- data/lib/libv8/v8/tools/freebsd-tick-processor +10 -0
- data/lib/libv8/v8/tools/gc-nvp-trace-processor.py +342 -0
- data/lib/libv8/v8/tools/gcmole/README +62 -0
- data/lib/libv8/v8/tools/gcmole/gccause.lua +60 -0
- data/lib/libv8/v8/tools/gcmole/gcmole.cc +1261 -0
- data/lib/libv8/v8/tools/gcmole/gcmole.lua +378 -0
- data/lib/libv8/v8/tools/generate-ten-powers.scm +286 -0
- data/lib/libv8/v8/tools/grokdump.py +841 -0
- data/lib/libv8/v8/tools/gyp/v8.gyp +995 -0
- data/lib/libv8/v8/tools/js2c.py +364 -0
- data/lib/libv8/v8/tools/jsmin.py +280 -0
- data/lib/libv8/v8/tools/linux-tick-processor +35 -0
- data/lib/libv8/v8/tools/ll_prof.py +942 -0
- data/lib/libv8/v8/tools/logreader.js +185 -0
- data/lib/libv8/v8/tools/mac-nm +18 -0
- data/lib/libv8/v8/tools/mac-tick-processor +6 -0
- data/lib/libv8/v8/tools/oom_dump/README +31 -0
- data/lib/libv8/v8/tools/oom_dump/SConstruct +42 -0
- data/lib/libv8/v8/tools/oom_dump/oom_dump.cc +288 -0
- data/lib/libv8/v8/tools/presubmit.py +305 -0
- data/lib/libv8/v8/tools/process-heap-prof.py +120 -0
- data/lib/libv8/v8/tools/profile.js +751 -0
- data/lib/libv8/v8/tools/profile_view.js +219 -0
- data/lib/libv8/v8/tools/run-valgrind.py +77 -0
- data/lib/libv8/v8/tools/splaytree.js +316 -0
- data/lib/libv8/v8/tools/stats-viewer.py +468 -0
- data/lib/libv8/v8/tools/test.py +1510 -0
- data/lib/libv8/v8/tools/tickprocessor-driver.js +59 -0
- data/lib/libv8/v8/tools/tickprocessor.js +877 -0
- data/lib/libv8/v8/tools/utils.py +96 -0
- data/lib/libv8/v8/tools/visual_studio/README.txt +12 -0
- data/lib/libv8/v8/tools/windows-tick-processor.bat +30 -0
- data/lib/libv8/version.rb +6 -0
- data/libv8.gemspec +36 -0
- data/thefrontside.png +0 -0
- metadata +776 -0
@@ -0,0 +1,328 @@
|
|
1
|
+
// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#ifdef COMPRESS_STARTUP_DATA_BZ2
|
29
|
+
#include <bzlib.h>
|
30
|
+
#endif
|
31
|
+
#include <signal.h>
|
32
|
+
#include <string>
|
33
|
+
#include <map>
|
34
|
+
|
35
|
+
#include "v8.h"
|
36
|
+
|
37
|
+
#include "bootstrapper.h"
|
38
|
+
#include "natives.h"
|
39
|
+
#include "platform.h"
|
40
|
+
#include "serialize.h"
|
41
|
+
#include "list.h"
|
42
|
+
|
43
|
+
// use explicit namespace to avoid clashing with types in namespace v8
|
44
|
+
namespace i = v8::internal;
|
45
|
+
using namespace v8;
|
46
|
+
|
47
|
+
static const unsigned int kMaxCounters = 256;
|
48
|
+
|
49
|
+
// A single counter in a counter collection.
|
50
|
+
class Counter {
|
51
|
+
public:
|
52
|
+
static const int kMaxNameSize = 64;
|
53
|
+
int32_t* Bind(const char* name) {
|
54
|
+
int i;
|
55
|
+
for (i = 0; i < kMaxNameSize - 1 && name[i]; i++) {
|
56
|
+
name_[i] = name[i];
|
57
|
+
}
|
58
|
+
name_[i] = '\0';
|
59
|
+
return &counter_;
|
60
|
+
}
|
61
|
+
private:
|
62
|
+
int32_t counter_;
|
63
|
+
uint8_t name_[kMaxNameSize];
|
64
|
+
};
|
65
|
+
|
66
|
+
|
67
|
+
// A set of counters and associated information. An instance of this
|
68
|
+
// class is stored directly in the memory-mapped counters file if
|
69
|
+
// the --save-counters options is used
|
70
|
+
class CounterCollection {
|
71
|
+
public:
|
72
|
+
CounterCollection() {
|
73
|
+
magic_number_ = 0xDEADFACE;
|
74
|
+
max_counters_ = kMaxCounters;
|
75
|
+
max_name_size_ = Counter::kMaxNameSize;
|
76
|
+
counters_in_use_ = 0;
|
77
|
+
}
|
78
|
+
Counter* GetNextCounter() {
|
79
|
+
if (counters_in_use_ == kMaxCounters) return NULL;
|
80
|
+
return &counters_[counters_in_use_++];
|
81
|
+
}
|
82
|
+
private:
|
83
|
+
uint32_t magic_number_;
|
84
|
+
uint32_t max_counters_;
|
85
|
+
uint32_t max_name_size_;
|
86
|
+
uint32_t counters_in_use_;
|
87
|
+
Counter counters_[kMaxCounters];
|
88
|
+
};
|
89
|
+
|
90
|
+
|
91
|
+
// We statically allocate a set of local counters to be used if we
|
92
|
+
// don't want to store the stats in a memory-mapped file
|
93
|
+
static CounterCollection local_counters;
|
94
|
+
|
95
|
+
|
96
|
+
typedef std::map<std::string, int*> CounterMap;
|
97
|
+
typedef std::map<std::string, int*>::iterator CounterMapIterator;
|
98
|
+
static CounterMap counter_table_;
|
99
|
+
|
100
|
+
|
101
|
+
class Compressor {
|
102
|
+
public:
|
103
|
+
virtual ~Compressor() {}
|
104
|
+
virtual bool Compress(i::Vector<char> input) = 0;
|
105
|
+
virtual i::Vector<char>* output() = 0;
|
106
|
+
};
|
107
|
+
|
108
|
+
|
109
|
+
class PartialSnapshotSink : public i::SnapshotByteSink {
|
110
|
+
public:
|
111
|
+
PartialSnapshotSink() : data_(), raw_size_(-1) { }
|
112
|
+
virtual ~PartialSnapshotSink() { data_.Free(); }
|
113
|
+
virtual void Put(int byte, const char* description) {
|
114
|
+
data_.Add(byte);
|
115
|
+
}
|
116
|
+
virtual int Position() { return data_.length(); }
|
117
|
+
void Print(FILE* fp) {
|
118
|
+
int length = Position();
|
119
|
+
for (int j = 0; j < length; j++) {
|
120
|
+
if ((j & 0x1f) == 0x1f) {
|
121
|
+
fprintf(fp, "\n");
|
122
|
+
}
|
123
|
+
if (j != 0) {
|
124
|
+
fprintf(fp, ",");
|
125
|
+
}
|
126
|
+
fprintf(fp, "%d", at(j));
|
127
|
+
}
|
128
|
+
}
|
129
|
+
char at(int i) { return data_[i]; }
|
130
|
+
bool Compress(Compressor* compressor) {
|
131
|
+
ASSERT_EQ(-1, raw_size_);
|
132
|
+
raw_size_ = data_.length();
|
133
|
+
if (!compressor->Compress(data_.ToVector())) return false;
|
134
|
+
data_.Clear();
|
135
|
+
data_.AddAll(*compressor->output());
|
136
|
+
return true;
|
137
|
+
}
|
138
|
+
int raw_size() { return raw_size_; }
|
139
|
+
private:
|
140
|
+
i::List<char> data_;
|
141
|
+
int raw_size_;
|
142
|
+
};
|
143
|
+
|
144
|
+
|
145
|
+
class CppByteSink : public PartialSnapshotSink {
|
146
|
+
public:
|
147
|
+
explicit CppByteSink(const char* snapshot_file) {
|
148
|
+
fp_ = i::OS::FOpen(snapshot_file, "wb");
|
149
|
+
if (fp_ == NULL) {
|
150
|
+
i::PrintF("Unable to write to snapshot file \"%s\"\n", snapshot_file);
|
151
|
+
exit(1);
|
152
|
+
}
|
153
|
+
fprintf(fp_, "// Autogenerated snapshot file. Do not edit.\n\n");
|
154
|
+
fprintf(fp_, "#include \"v8.h\"\n");
|
155
|
+
fprintf(fp_, "#include \"platform.h\"\n\n");
|
156
|
+
fprintf(fp_, "#include \"snapshot.h\"\n\n");
|
157
|
+
fprintf(fp_, "namespace v8 {\nnamespace internal {\n\n");
|
158
|
+
fprintf(fp_, "const byte Snapshot::data_[] = {");
|
159
|
+
}
|
160
|
+
|
161
|
+
virtual ~CppByteSink() {
|
162
|
+
fprintf(fp_, "const int Snapshot::size_ = %d;\n", Position());
|
163
|
+
#ifdef COMPRESS_STARTUP_DATA_BZ2
|
164
|
+
fprintf(fp_, "const byte* Snapshot::raw_data_ = NULL;\n");
|
165
|
+
fprintf(fp_,
|
166
|
+
"const int Snapshot::raw_size_ = %d;\n\n",
|
167
|
+
raw_size());
|
168
|
+
#else
|
169
|
+
fprintf(fp_,
|
170
|
+
"const byte* Snapshot::raw_data_ = Snapshot::data_;\n");
|
171
|
+
fprintf(fp_,
|
172
|
+
"const int Snapshot::raw_size_ = Snapshot::size_;\n\n");
|
173
|
+
#endif
|
174
|
+
fprintf(fp_, "} } // namespace v8::internal\n");
|
175
|
+
fclose(fp_);
|
176
|
+
}
|
177
|
+
|
178
|
+
void WriteSpaceUsed(
|
179
|
+
int new_space_used,
|
180
|
+
int pointer_space_used,
|
181
|
+
int data_space_used,
|
182
|
+
int code_space_used,
|
183
|
+
int map_space_used,
|
184
|
+
int cell_space_used,
|
185
|
+
int large_space_used) {
|
186
|
+
fprintf(fp_, "const int Snapshot::new_space_used_ = %d;\n", new_space_used);
|
187
|
+
fprintf(fp_,
|
188
|
+
"const int Snapshot::pointer_space_used_ = %d;\n",
|
189
|
+
pointer_space_used);
|
190
|
+
fprintf(fp_,
|
191
|
+
"const int Snapshot::data_space_used_ = %d;\n",
|
192
|
+
data_space_used);
|
193
|
+
fprintf(fp_,
|
194
|
+
"const int Snapshot::code_space_used_ = %d;\n",
|
195
|
+
code_space_used);
|
196
|
+
fprintf(fp_, "const int Snapshot::map_space_used_ = %d;\n", map_space_used);
|
197
|
+
fprintf(fp_,
|
198
|
+
"const int Snapshot::cell_space_used_ = %d;\n",
|
199
|
+
cell_space_used);
|
200
|
+
fprintf(fp_,
|
201
|
+
"const int Snapshot::large_space_used_ = %d;\n",
|
202
|
+
large_space_used);
|
203
|
+
}
|
204
|
+
|
205
|
+
void WritePartialSnapshot() {
|
206
|
+
int length = partial_sink_.Position();
|
207
|
+
fprintf(fp_, "};\n\n");
|
208
|
+
fprintf(fp_, "const int Snapshot::context_size_ = %d;\n", length);
|
209
|
+
#ifdef COMPRESS_STARTUP_DATA_BZ2
|
210
|
+
fprintf(fp_,
|
211
|
+
"const int Snapshot::context_raw_size_ = %d;\n",
|
212
|
+
partial_sink_.raw_size());
|
213
|
+
#else
|
214
|
+
fprintf(fp_,
|
215
|
+
"const int Snapshot::context_raw_size_ = "
|
216
|
+
"Snapshot::context_size_;\n");
|
217
|
+
#endif
|
218
|
+
fprintf(fp_, "const byte Snapshot::context_data_[] = {\n");
|
219
|
+
partial_sink_.Print(fp_);
|
220
|
+
fprintf(fp_, "};\n\n");
|
221
|
+
#ifdef COMPRESS_STARTUP_DATA_BZ2
|
222
|
+
fprintf(fp_, "const byte* Snapshot::context_raw_data_ = NULL;\n");
|
223
|
+
#else
|
224
|
+
fprintf(fp_, "const byte* Snapshot::context_raw_data_ ="
|
225
|
+
" Snapshot::context_data_;\n");
|
226
|
+
#endif
|
227
|
+
}
|
228
|
+
|
229
|
+
void WriteSnapshot() {
|
230
|
+
Print(fp_);
|
231
|
+
}
|
232
|
+
|
233
|
+
PartialSnapshotSink* partial_sink() { return &partial_sink_; }
|
234
|
+
|
235
|
+
private:
|
236
|
+
FILE* fp_;
|
237
|
+
PartialSnapshotSink partial_sink_;
|
238
|
+
};
|
239
|
+
|
240
|
+
|
241
|
+
#ifdef COMPRESS_STARTUP_DATA_BZ2
|
242
|
+
class BZip2Compressor : public Compressor {
|
243
|
+
public:
|
244
|
+
BZip2Compressor() : output_(NULL) {}
|
245
|
+
virtual ~BZip2Compressor() {
|
246
|
+
delete output_;
|
247
|
+
}
|
248
|
+
virtual bool Compress(i::Vector<char> input) {
|
249
|
+
delete output_;
|
250
|
+
output_ = new i::ScopedVector<char>((input.length() * 101) / 100 + 1000);
|
251
|
+
unsigned int output_length_ = output_->length();
|
252
|
+
int result = BZ2_bzBuffToBuffCompress(output_->start(), &output_length_,
|
253
|
+
input.start(), input.length(),
|
254
|
+
9, 1, 0);
|
255
|
+
if (result == BZ_OK) {
|
256
|
+
output_->Truncate(output_length_);
|
257
|
+
return true;
|
258
|
+
} else {
|
259
|
+
fprintf(stderr, "bzlib error code: %d\n", result);
|
260
|
+
return false;
|
261
|
+
}
|
262
|
+
}
|
263
|
+
virtual i::Vector<char>* output() { return output_; }
|
264
|
+
|
265
|
+
private:
|
266
|
+
i::ScopedVector<char>* output_;
|
267
|
+
};
|
268
|
+
#endif
|
269
|
+
|
270
|
+
|
271
|
+
int main(int argc, char** argv) {
|
272
|
+
#ifdef ENABLE_LOGGING_AND_PROFILING
|
273
|
+
// By default, log code create information in the snapshot.
|
274
|
+
i::FLAG_log_code = true;
|
275
|
+
#endif
|
276
|
+
// Print the usage if an error occurs when parsing the command line
|
277
|
+
// flags or if the help flag is set.
|
278
|
+
int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
|
279
|
+
if (result > 0 || argc != 2 || i::FLAG_help) {
|
280
|
+
::printf("Usage: %s [flag] ... outfile\n", argv[0]);
|
281
|
+
i::FlagList::PrintHelp();
|
282
|
+
return !i::FLAG_help;
|
283
|
+
}
|
284
|
+
i::Serializer::Enable();
|
285
|
+
Persistent<Context> context = v8::Context::New();
|
286
|
+
ASSERT(!context.IsEmpty());
|
287
|
+
// Make sure all builtin scripts are cached.
|
288
|
+
{ HandleScope scope;
|
289
|
+
for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) {
|
290
|
+
i::Isolate::Current()->bootstrapper()->NativesSourceLookup(i);
|
291
|
+
}
|
292
|
+
}
|
293
|
+
// If we don't do this then we end up with a stray root pointing at the
|
294
|
+
// context even after we have disposed of the context.
|
295
|
+
HEAP->CollectAllGarbage(true);
|
296
|
+
i::Object* raw_context = *(v8::Utils::OpenHandle(*context));
|
297
|
+
context.Dispose();
|
298
|
+
CppByteSink sink(argv[1]);
|
299
|
+
// This results in a somewhat smaller snapshot, probably because it gets rid
|
300
|
+
// of some things that are cached between garbage collections.
|
301
|
+
i::StartupSerializer ser(&sink);
|
302
|
+
ser.SerializeStrongReferences();
|
303
|
+
|
304
|
+
i::PartialSerializer partial_ser(&ser, sink.partial_sink());
|
305
|
+
partial_ser.Serialize(&raw_context);
|
306
|
+
|
307
|
+
ser.SerializeWeakReferences();
|
308
|
+
|
309
|
+
#ifdef COMPRESS_STARTUP_DATA_BZ2
|
310
|
+
BZip2Compressor compressor;
|
311
|
+
if (!sink.Compress(&compressor))
|
312
|
+
return 1;
|
313
|
+
if (!sink.partial_sink()->Compress(&compressor))
|
314
|
+
return 1;
|
315
|
+
#endif
|
316
|
+
sink.WriteSnapshot();
|
317
|
+
sink.WritePartialSnapshot();
|
318
|
+
|
319
|
+
sink.WriteSpaceUsed(
|
320
|
+
partial_ser.CurrentAllocationAddress(i::NEW_SPACE),
|
321
|
+
partial_ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE),
|
322
|
+
partial_ser.CurrentAllocationAddress(i::OLD_DATA_SPACE),
|
323
|
+
partial_ser.CurrentAllocationAddress(i::CODE_SPACE),
|
324
|
+
partial_ser.CurrentAllocationAddress(i::MAP_SPACE),
|
325
|
+
partial_ser.CurrentAllocationAddress(i::CELL_SPACE),
|
326
|
+
partial_ser.CurrentAllocationAddress(i::LO_SPACE));
|
327
|
+
return 0;
|
328
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
// Copyright 2011 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#ifndef V8_NATIVES_H_
|
29
|
+
#define V8_NATIVES_H_
|
30
|
+
|
31
|
+
namespace v8 {
|
32
|
+
namespace internal {
|
33
|
+
|
34
|
+
typedef bool (*NativeSourceCallback)(Vector<const char> name,
|
35
|
+
Vector<const char> source,
|
36
|
+
int index);
|
37
|
+
|
38
|
+
enum NativeType {
|
39
|
+
CORE, EXPERIMENTAL, D8, I18N
|
40
|
+
};
|
41
|
+
|
42
|
+
template <NativeType type>
|
43
|
+
class NativesCollection {
|
44
|
+
public:
|
45
|
+
// Number of built-in scripts.
|
46
|
+
static int GetBuiltinsCount();
|
47
|
+
// Number of debugger implementation scripts.
|
48
|
+
static int GetDebuggerCount();
|
49
|
+
|
50
|
+
// These are used to access built-in scripts. The debugger implementation
|
51
|
+
// scripts have an index in the interval [0, GetDebuggerCount()). The
|
52
|
+
// non-debugger scripts have an index in the interval [GetDebuggerCount(),
|
53
|
+
// GetNativesCount()).
|
54
|
+
static int GetIndex(const char* name);
|
55
|
+
static Vector<const char> GetScriptSource(int index);
|
56
|
+
static Vector<const char> GetScriptName(int index);
|
57
|
+
};
|
58
|
+
|
59
|
+
typedef NativesCollection<CORE> Natives;
|
60
|
+
typedef NativesCollection<EXPERIMENTAL> ExperimentalNatives;
|
61
|
+
|
62
|
+
} } // namespace v8::internal
|
63
|
+
|
64
|
+
#endif // V8_NATIVES_H_
|
@@ -0,0 +1,738 @@
|
|
1
|
+
// Copyright 2011 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#include "v8.h"
|
29
|
+
|
30
|
+
#include "disassembler.h"
|
31
|
+
#include "disasm.h"
|
32
|
+
#include "jsregexp.h"
|
33
|
+
#include "objects-visiting.h"
|
34
|
+
|
35
|
+
namespace v8 {
|
36
|
+
namespace internal {
|
37
|
+
|
38
|
+
#ifdef DEBUG
|
39
|
+
|
40
|
+
void MaybeObject::Verify() {
|
41
|
+
Object* this_as_object;
|
42
|
+
if (ToObject(&this_as_object)) {
|
43
|
+
if (this_as_object->IsSmi()) {
|
44
|
+
Smi::cast(this_as_object)->SmiVerify();
|
45
|
+
} else {
|
46
|
+
HeapObject::cast(this_as_object)->HeapObjectVerify();
|
47
|
+
}
|
48
|
+
} else {
|
49
|
+
Failure::cast(this)->FailureVerify();
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
void Object::VerifyPointer(Object* p) {
|
55
|
+
if (p->IsHeapObject()) {
|
56
|
+
HeapObject::VerifyHeapPointer(p);
|
57
|
+
} else {
|
58
|
+
ASSERT(p->IsSmi());
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
void Smi::SmiVerify() {
|
64
|
+
ASSERT(IsSmi());
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
void Failure::FailureVerify() {
|
69
|
+
ASSERT(IsFailure());
|
70
|
+
}
|
71
|
+
|
72
|
+
|
73
|
+
void HeapObject::HeapObjectVerify() {
|
74
|
+
InstanceType instance_type = map()->instance_type();
|
75
|
+
|
76
|
+
if (instance_type < FIRST_NONSTRING_TYPE) {
|
77
|
+
String::cast(this)->StringVerify();
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
81
|
+
switch (instance_type) {
|
82
|
+
case MAP_TYPE:
|
83
|
+
Map::cast(this)->MapVerify();
|
84
|
+
break;
|
85
|
+
case HEAP_NUMBER_TYPE:
|
86
|
+
HeapNumber::cast(this)->HeapNumberVerify();
|
87
|
+
break;
|
88
|
+
case FIXED_ARRAY_TYPE:
|
89
|
+
FixedArray::cast(this)->FixedArrayVerify();
|
90
|
+
break;
|
91
|
+
case BYTE_ARRAY_TYPE:
|
92
|
+
ByteArray::cast(this)->ByteArrayVerify();
|
93
|
+
break;
|
94
|
+
case EXTERNAL_PIXEL_ARRAY_TYPE:
|
95
|
+
ExternalPixelArray::cast(this)->ExternalPixelArrayVerify();
|
96
|
+
break;
|
97
|
+
case EXTERNAL_BYTE_ARRAY_TYPE:
|
98
|
+
ExternalByteArray::cast(this)->ExternalByteArrayVerify();
|
99
|
+
break;
|
100
|
+
case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE:
|
101
|
+
ExternalUnsignedByteArray::cast(this)->ExternalUnsignedByteArrayVerify();
|
102
|
+
break;
|
103
|
+
case EXTERNAL_SHORT_ARRAY_TYPE:
|
104
|
+
ExternalShortArray::cast(this)->ExternalShortArrayVerify();
|
105
|
+
break;
|
106
|
+
case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE:
|
107
|
+
ExternalUnsignedShortArray::cast(this)->
|
108
|
+
ExternalUnsignedShortArrayVerify();
|
109
|
+
break;
|
110
|
+
case EXTERNAL_INT_ARRAY_TYPE:
|
111
|
+
ExternalIntArray::cast(this)->ExternalIntArrayVerify();
|
112
|
+
break;
|
113
|
+
case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
|
114
|
+
ExternalUnsignedIntArray::cast(this)->ExternalUnsignedIntArrayVerify();
|
115
|
+
break;
|
116
|
+
case EXTERNAL_FLOAT_ARRAY_TYPE:
|
117
|
+
ExternalFloatArray::cast(this)->ExternalFloatArrayVerify();
|
118
|
+
break;
|
119
|
+
case EXTERNAL_DOUBLE_ARRAY_TYPE:
|
120
|
+
ExternalDoubleArray::cast(this)->ExternalDoubleArrayVerify();
|
121
|
+
break;
|
122
|
+
case CODE_TYPE:
|
123
|
+
Code::cast(this)->CodeVerify();
|
124
|
+
break;
|
125
|
+
case ODDBALL_TYPE:
|
126
|
+
Oddball::cast(this)->OddballVerify();
|
127
|
+
break;
|
128
|
+
case JS_OBJECT_TYPE:
|
129
|
+
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
|
130
|
+
JSObject::cast(this)->JSObjectVerify();
|
131
|
+
break;
|
132
|
+
case JS_VALUE_TYPE:
|
133
|
+
JSValue::cast(this)->JSValueVerify();
|
134
|
+
break;
|
135
|
+
case JS_FUNCTION_TYPE:
|
136
|
+
JSFunction::cast(this)->JSFunctionVerify();
|
137
|
+
break;
|
138
|
+
case JS_GLOBAL_PROXY_TYPE:
|
139
|
+
JSGlobalProxy::cast(this)->JSGlobalProxyVerify();
|
140
|
+
break;
|
141
|
+
case JS_GLOBAL_OBJECT_TYPE:
|
142
|
+
JSGlobalObject::cast(this)->JSGlobalObjectVerify();
|
143
|
+
break;
|
144
|
+
case JS_BUILTINS_OBJECT_TYPE:
|
145
|
+
JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify();
|
146
|
+
break;
|
147
|
+
case JS_GLOBAL_PROPERTY_CELL_TYPE:
|
148
|
+
JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify();
|
149
|
+
break;
|
150
|
+
case JS_ARRAY_TYPE:
|
151
|
+
JSArray::cast(this)->JSArrayVerify();
|
152
|
+
break;
|
153
|
+
case JS_REGEXP_TYPE:
|
154
|
+
JSRegExp::cast(this)->JSRegExpVerify();
|
155
|
+
break;
|
156
|
+
case FILLER_TYPE:
|
157
|
+
break;
|
158
|
+
case JS_PROXY_TYPE:
|
159
|
+
JSProxy::cast(this)->JSProxyVerify();
|
160
|
+
break;
|
161
|
+
case FOREIGN_TYPE:
|
162
|
+
Foreign::cast(this)->ForeignVerify();
|
163
|
+
break;
|
164
|
+
case SHARED_FUNCTION_INFO_TYPE:
|
165
|
+
SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify();
|
166
|
+
break;
|
167
|
+
case JS_MESSAGE_OBJECT_TYPE:
|
168
|
+
JSMessageObject::cast(this)->JSMessageObjectVerify();
|
169
|
+
break;
|
170
|
+
|
171
|
+
#define MAKE_STRUCT_CASE(NAME, Name, name) \
|
172
|
+
case NAME##_TYPE: \
|
173
|
+
Name::cast(this)->Name##Verify(); \
|
174
|
+
break;
|
175
|
+
STRUCT_LIST(MAKE_STRUCT_CASE)
|
176
|
+
#undef MAKE_STRUCT_CASE
|
177
|
+
|
178
|
+
default:
|
179
|
+
UNREACHABLE();
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
|
185
|
+
void HeapObject::VerifyHeapPointer(Object* p) {
|
186
|
+
ASSERT(p->IsHeapObject());
|
187
|
+
ASSERT(HEAP->Contains(HeapObject::cast(p)));
|
188
|
+
}
|
189
|
+
|
190
|
+
|
191
|
+
void HeapNumber::HeapNumberVerify() {
|
192
|
+
ASSERT(IsHeapNumber());
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
void ByteArray::ByteArrayVerify() {
|
197
|
+
ASSERT(IsByteArray());
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
void ExternalPixelArray::ExternalPixelArrayVerify() {
|
202
|
+
ASSERT(IsExternalPixelArray());
|
203
|
+
}
|
204
|
+
|
205
|
+
|
206
|
+
void ExternalByteArray::ExternalByteArrayVerify() {
|
207
|
+
ASSERT(IsExternalByteArray());
|
208
|
+
}
|
209
|
+
|
210
|
+
|
211
|
+
void ExternalUnsignedByteArray::ExternalUnsignedByteArrayVerify() {
|
212
|
+
ASSERT(IsExternalUnsignedByteArray());
|
213
|
+
}
|
214
|
+
|
215
|
+
|
216
|
+
void ExternalShortArray::ExternalShortArrayVerify() {
|
217
|
+
ASSERT(IsExternalShortArray());
|
218
|
+
}
|
219
|
+
|
220
|
+
|
221
|
+
void ExternalUnsignedShortArray::ExternalUnsignedShortArrayVerify() {
|
222
|
+
ASSERT(IsExternalUnsignedShortArray());
|
223
|
+
}
|
224
|
+
|
225
|
+
|
226
|
+
void ExternalIntArray::ExternalIntArrayVerify() {
|
227
|
+
ASSERT(IsExternalIntArray());
|
228
|
+
}
|
229
|
+
|
230
|
+
|
231
|
+
void ExternalUnsignedIntArray::ExternalUnsignedIntArrayVerify() {
|
232
|
+
ASSERT(IsExternalUnsignedIntArray());
|
233
|
+
}
|
234
|
+
|
235
|
+
|
236
|
+
void ExternalFloatArray::ExternalFloatArrayVerify() {
|
237
|
+
ASSERT(IsExternalFloatArray());
|
238
|
+
}
|
239
|
+
|
240
|
+
|
241
|
+
void ExternalDoubleArray::ExternalDoubleArrayVerify() {
|
242
|
+
ASSERT(IsExternalDoubleArray());
|
243
|
+
}
|
244
|
+
|
245
|
+
|
246
|
+
void JSObject::JSObjectVerify() {
|
247
|
+
VerifyHeapPointer(properties());
|
248
|
+
VerifyHeapPointer(elements());
|
249
|
+
if (HasFastProperties()) {
|
250
|
+
CHECK_EQ(map()->unused_property_fields(),
|
251
|
+
(map()->inobject_properties() + properties()->length() -
|
252
|
+
map()->NextFreePropertyIndex()));
|
253
|
+
}
|
254
|
+
ASSERT(map()->has_fast_elements() ==
|
255
|
+
(elements()->map() == GetHeap()->fixed_array_map() ||
|
256
|
+
elements()->map() == GetHeap()->fixed_cow_array_map()));
|
257
|
+
ASSERT(map()->has_fast_elements() == HasFastElements());
|
258
|
+
}
|
259
|
+
|
260
|
+
|
261
|
+
void Map::MapVerify() {
|
262
|
+
ASSERT(!HEAP->InNewSpace(this));
|
263
|
+
ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE);
|
264
|
+
ASSERT(instance_size() == kVariableSizeSentinel ||
|
265
|
+
(kPointerSize <= instance_size() &&
|
266
|
+
instance_size() < HEAP->Capacity()));
|
267
|
+
VerifyHeapPointer(prototype());
|
268
|
+
VerifyHeapPointer(instance_descriptors());
|
269
|
+
}
|
270
|
+
|
271
|
+
|
272
|
+
void Map::SharedMapVerify() {
|
273
|
+
MapVerify();
|
274
|
+
ASSERT(is_shared());
|
275
|
+
ASSERT(instance_descriptors()->IsEmpty());
|
276
|
+
ASSERT_EQ(0, pre_allocated_property_fields());
|
277
|
+
ASSERT_EQ(0, unused_property_fields());
|
278
|
+
ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()),
|
279
|
+
visitor_id());
|
280
|
+
}
|
281
|
+
|
282
|
+
|
283
|
+
void CodeCache::CodeCacheVerify() {
|
284
|
+
VerifyHeapPointer(default_cache());
|
285
|
+
VerifyHeapPointer(normal_type_cache());
|
286
|
+
ASSERT(default_cache()->IsFixedArray());
|
287
|
+
ASSERT(normal_type_cache()->IsUndefined()
|
288
|
+
|| normal_type_cache()->IsCodeCacheHashTable());
|
289
|
+
}
|
290
|
+
|
291
|
+
|
292
|
+
void FixedArray::FixedArrayVerify() {
|
293
|
+
for (int i = 0; i < length(); i++) {
|
294
|
+
Object* e = get(i);
|
295
|
+
if (e->IsHeapObject()) {
|
296
|
+
VerifyHeapPointer(e);
|
297
|
+
} else {
|
298
|
+
e->Verify();
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
|
303
|
+
|
304
|
+
void JSValue::JSValueVerify() {
|
305
|
+
Object* v = value();
|
306
|
+
if (v->IsHeapObject()) {
|
307
|
+
VerifyHeapPointer(v);
|
308
|
+
}
|
309
|
+
}
|
310
|
+
|
311
|
+
|
312
|
+
void JSMessageObject::JSMessageObjectVerify() {
|
313
|
+
CHECK(IsJSMessageObject());
|
314
|
+
CHECK(type()->IsString());
|
315
|
+
CHECK(arguments()->IsJSArray());
|
316
|
+
VerifyObjectField(kStartPositionOffset);
|
317
|
+
VerifyObjectField(kEndPositionOffset);
|
318
|
+
VerifyObjectField(kArgumentsOffset);
|
319
|
+
VerifyObjectField(kScriptOffset);
|
320
|
+
VerifyObjectField(kStackTraceOffset);
|
321
|
+
VerifyObjectField(kStackFramesOffset);
|
322
|
+
}
|
323
|
+
|
324
|
+
|
325
|
+
void String::StringVerify() {
|
326
|
+
CHECK(IsString());
|
327
|
+
CHECK(length() >= 0 && length() <= Smi::kMaxValue);
|
328
|
+
if (IsSymbol()) {
|
329
|
+
CHECK(!HEAP->InNewSpace(this));
|
330
|
+
}
|
331
|
+
}
|
332
|
+
|
333
|
+
|
334
|
+
void JSFunction::JSFunctionVerify() {
|
335
|
+
CHECK(IsJSFunction());
|
336
|
+
VerifyObjectField(kPrototypeOrInitialMapOffset);
|
337
|
+
VerifyObjectField(kNextFunctionLinkOffset);
|
338
|
+
CHECK(next_function_link()->IsUndefined() ||
|
339
|
+
next_function_link()->IsJSFunction());
|
340
|
+
}
|
341
|
+
|
342
|
+
|
343
|
+
void SharedFunctionInfo::SharedFunctionInfoVerify() {
|
344
|
+
CHECK(IsSharedFunctionInfo());
|
345
|
+
VerifyObjectField(kNameOffset);
|
346
|
+
VerifyObjectField(kCodeOffset);
|
347
|
+
VerifyObjectField(kScopeInfoOffset);
|
348
|
+
VerifyObjectField(kInstanceClassNameOffset);
|
349
|
+
VerifyObjectField(kFunctionDataOffset);
|
350
|
+
VerifyObjectField(kScriptOffset);
|
351
|
+
VerifyObjectField(kDebugInfoOffset);
|
352
|
+
}
|
353
|
+
|
354
|
+
|
355
|
+
void JSGlobalProxy::JSGlobalProxyVerify() {
|
356
|
+
CHECK(IsJSGlobalProxy());
|
357
|
+
JSObjectVerify();
|
358
|
+
VerifyObjectField(JSGlobalProxy::kContextOffset);
|
359
|
+
// Make sure that this object has no properties, elements.
|
360
|
+
CHECK_EQ(0, properties()->length());
|
361
|
+
CHECK(HasFastElements());
|
362
|
+
CHECK_EQ(0, FixedArray::cast(elements())->length());
|
363
|
+
}
|
364
|
+
|
365
|
+
|
366
|
+
void JSGlobalObject::JSGlobalObjectVerify() {
|
367
|
+
CHECK(IsJSGlobalObject());
|
368
|
+
JSObjectVerify();
|
369
|
+
for (int i = GlobalObject::kBuiltinsOffset;
|
370
|
+
i < JSGlobalObject::kSize;
|
371
|
+
i += kPointerSize) {
|
372
|
+
VerifyObjectField(i);
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
|
377
|
+
void JSBuiltinsObject::JSBuiltinsObjectVerify() {
|
378
|
+
CHECK(IsJSBuiltinsObject());
|
379
|
+
JSObjectVerify();
|
380
|
+
for (int i = GlobalObject::kBuiltinsOffset;
|
381
|
+
i < JSBuiltinsObject::kSize;
|
382
|
+
i += kPointerSize) {
|
383
|
+
VerifyObjectField(i);
|
384
|
+
}
|
385
|
+
}
|
386
|
+
|
387
|
+
|
388
|
+
void Oddball::OddballVerify() {
|
389
|
+
CHECK(IsOddball());
|
390
|
+
VerifyHeapPointer(to_string());
|
391
|
+
Object* number = to_number();
|
392
|
+
if (number->IsHeapObject()) {
|
393
|
+
ASSERT(number == HEAP->nan_value());
|
394
|
+
} else {
|
395
|
+
ASSERT(number->IsSmi());
|
396
|
+
int value = Smi::cast(number)->value();
|
397
|
+
// Hidden oddballs have negative smis.
|
398
|
+
const int kLeastHiddenOddballNumber = -4;
|
399
|
+
ASSERT(value <= 1);
|
400
|
+
ASSERT(value >= kLeastHiddenOddballNumber);
|
401
|
+
}
|
402
|
+
}
|
403
|
+
|
404
|
+
|
405
|
+
void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() {
|
406
|
+
CHECK(IsJSGlobalPropertyCell());
|
407
|
+
VerifyObjectField(kValueOffset);
|
408
|
+
}
|
409
|
+
|
410
|
+
|
411
|
+
void Code::CodeVerify() {
|
412
|
+
CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()),
|
413
|
+
kCodeAlignment));
|
414
|
+
Address last_gc_pc = NULL;
|
415
|
+
for (RelocIterator it(this); !it.done(); it.next()) {
|
416
|
+
it.rinfo()->Verify();
|
417
|
+
// Ensure that GC will not iterate twice over the same pointer.
|
418
|
+
if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) {
|
419
|
+
CHECK(it.rinfo()->pc() != last_gc_pc);
|
420
|
+
last_gc_pc = it.rinfo()->pc();
|
421
|
+
}
|
422
|
+
}
|
423
|
+
}
|
424
|
+
|
425
|
+
|
426
|
+
void JSArray::JSArrayVerify() {
|
427
|
+
JSObjectVerify();
|
428
|
+
ASSERT(length()->IsNumber() || length()->IsUndefined());
|
429
|
+
ASSERT(elements()->IsUndefined() || elements()->IsFixedArray());
|
430
|
+
}
|
431
|
+
|
432
|
+
|
433
|
+
void JSRegExp::JSRegExpVerify() {
|
434
|
+
JSObjectVerify();
|
435
|
+
ASSERT(data()->IsUndefined() || data()->IsFixedArray());
|
436
|
+
switch (TypeTag()) {
|
437
|
+
case JSRegExp::ATOM: {
|
438
|
+
FixedArray* arr = FixedArray::cast(data());
|
439
|
+
ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
|
440
|
+
break;
|
441
|
+
}
|
442
|
+
case JSRegExp::IRREGEXP: {
|
443
|
+
bool is_native = RegExpImpl::UsesNativeRegExp();
|
444
|
+
|
445
|
+
FixedArray* arr = FixedArray::cast(data());
|
446
|
+
Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
|
447
|
+
// TheHole : Not compiled yet.
|
448
|
+
// JSObject: Compilation error.
|
449
|
+
// Code/ByteArray: Compiled code.
|
450
|
+
ASSERT(ascii_data->IsTheHole() || ascii_data->IsJSObject() ||
|
451
|
+
(is_native ? ascii_data->IsCode() : ascii_data->IsByteArray()));
|
452
|
+
Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
|
453
|
+
ASSERT(uc16_data->IsTheHole() || uc16_data->IsJSObject() ||
|
454
|
+
(is_native ? uc16_data->IsCode() : uc16_data->IsByteArray()));
|
455
|
+
ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
|
456
|
+
ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
|
457
|
+
break;
|
458
|
+
}
|
459
|
+
default:
|
460
|
+
ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag());
|
461
|
+
ASSERT(data()->IsUndefined());
|
462
|
+
break;
|
463
|
+
}
|
464
|
+
}
|
465
|
+
|
466
|
+
|
467
|
+
void JSProxy::JSProxyVerify() {
|
468
|
+
ASSERT(IsJSProxy());
|
469
|
+
VerifyPointer(handler());
|
470
|
+
}
|
471
|
+
|
472
|
+
void Foreign::ForeignVerify() {
|
473
|
+
ASSERT(IsForeign());
|
474
|
+
}
|
475
|
+
|
476
|
+
|
477
|
+
void AccessorInfo::AccessorInfoVerify() {
|
478
|
+
CHECK(IsAccessorInfo());
|
479
|
+
VerifyPointer(getter());
|
480
|
+
VerifyPointer(setter());
|
481
|
+
VerifyPointer(name());
|
482
|
+
VerifyPointer(data());
|
483
|
+
VerifyPointer(flag());
|
484
|
+
}
|
485
|
+
|
486
|
+
|
487
|
+
void AccessCheckInfo::AccessCheckInfoVerify() {
|
488
|
+
CHECK(IsAccessCheckInfo());
|
489
|
+
VerifyPointer(named_callback());
|
490
|
+
VerifyPointer(indexed_callback());
|
491
|
+
VerifyPointer(data());
|
492
|
+
}
|
493
|
+
|
494
|
+
|
495
|
+
void InterceptorInfo::InterceptorInfoVerify() {
|
496
|
+
CHECK(IsInterceptorInfo());
|
497
|
+
VerifyPointer(getter());
|
498
|
+
VerifyPointer(setter());
|
499
|
+
VerifyPointer(query());
|
500
|
+
VerifyPointer(deleter());
|
501
|
+
VerifyPointer(enumerator());
|
502
|
+
VerifyPointer(data());
|
503
|
+
}
|
504
|
+
|
505
|
+
|
506
|
+
void CallHandlerInfo::CallHandlerInfoVerify() {
|
507
|
+
CHECK(IsCallHandlerInfo());
|
508
|
+
VerifyPointer(callback());
|
509
|
+
VerifyPointer(data());
|
510
|
+
}
|
511
|
+
|
512
|
+
|
513
|
+
void TemplateInfo::TemplateInfoVerify() {
|
514
|
+
VerifyPointer(tag());
|
515
|
+
VerifyPointer(property_list());
|
516
|
+
}
|
517
|
+
|
518
|
+
void FunctionTemplateInfo::FunctionTemplateInfoVerify() {
|
519
|
+
CHECK(IsFunctionTemplateInfo());
|
520
|
+
TemplateInfoVerify();
|
521
|
+
VerifyPointer(serial_number());
|
522
|
+
VerifyPointer(call_code());
|
523
|
+
VerifyPointer(property_accessors());
|
524
|
+
VerifyPointer(prototype_template());
|
525
|
+
VerifyPointer(parent_template());
|
526
|
+
VerifyPointer(named_property_handler());
|
527
|
+
VerifyPointer(indexed_property_handler());
|
528
|
+
VerifyPointer(instance_template());
|
529
|
+
VerifyPointer(signature());
|
530
|
+
VerifyPointer(access_check_info());
|
531
|
+
}
|
532
|
+
|
533
|
+
|
534
|
+
void ObjectTemplateInfo::ObjectTemplateInfoVerify() {
|
535
|
+
CHECK(IsObjectTemplateInfo());
|
536
|
+
TemplateInfoVerify();
|
537
|
+
VerifyPointer(constructor());
|
538
|
+
VerifyPointer(internal_field_count());
|
539
|
+
}
|
540
|
+
|
541
|
+
|
542
|
+
void SignatureInfo::SignatureInfoVerify() {
|
543
|
+
CHECK(IsSignatureInfo());
|
544
|
+
VerifyPointer(receiver());
|
545
|
+
VerifyPointer(args());
|
546
|
+
}
|
547
|
+
|
548
|
+
|
549
|
+
void TypeSwitchInfo::TypeSwitchInfoVerify() {
|
550
|
+
CHECK(IsTypeSwitchInfo());
|
551
|
+
VerifyPointer(types());
|
552
|
+
}
|
553
|
+
|
554
|
+
|
555
|
+
void Script::ScriptVerify() {
|
556
|
+
CHECK(IsScript());
|
557
|
+
VerifyPointer(source());
|
558
|
+
VerifyPointer(name());
|
559
|
+
line_offset()->SmiVerify();
|
560
|
+
column_offset()->SmiVerify();
|
561
|
+
VerifyPointer(data());
|
562
|
+
VerifyPointer(wrapper());
|
563
|
+
type()->SmiVerify();
|
564
|
+
VerifyPointer(line_ends());
|
565
|
+
VerifyPointer(id());
|
566
|
+
}
|
567
|
+
|
568
|
+
|
569
|
+
#ifdef ENABLE_DEBUGGER_SUPPORT
|
570
|
+
void DebugInfo::DebugInfoVerify() {
|
571
|
+
CHECK(IsDebugInfo());
|
572
|
+
VerifyPointer(shared());
|
573
|
+
VerifyPointer(original_code());
|
574
|
+
VerifyPointer(code());
|
575
|
+
VerifyPointer(break_points());
|
576
|
+
}
|
577
|
+
|
578
|
+
|
579
|
+
void BreakPointInfo::BreakPointInfoVerify() {
|
580
|
+
CHECK(IsBreakPointInfo());
|
581
|
+
code_position()->SmiVerify();
|
582
|
+
source_position()->SmiVerify();
|
583
|
+
statement_position()->SmiVerify();
|
584
|
+
VerifyPointer(break_point_objects());
|
585
|
+
}
|
586
|
+
#endif // ENABLE_DEBUGGER_SUPPORT
|
587
|
+
|
588
|
+
|
589
|
+
void JSObject::IncrementSpillStatistics(SpillInformation* info) {
|
590
|
+
info->number_of_objects_++;
|
591
|
+
// Named properties
|
592
|
+
if (HasFastProperties()) {
|
593
|
+
info->number_of_objects_with_fast_properties_++;
|
594
|
+
info->number_of_fast_used_fields_ += map()->NextFreePropertyIndex();
|
595
|
+
info->number_of_fast_unused_fields_ += map()->unused_property_fields();
|
596
|
+
} else {
|
597
|
+
StringDictionary* dict = property_dictionary();
|
598
|
+
info->number_of_slow_used_properties_ += dict->NumberOfElements();
|
599
|
+
info->number_of_slow_unused_properties_ +=
|
600
|
+
dict->Capacity() - dict->NumberOfElements();
|
601
|
+
}
|
602
|
+
// Indexed properties
|
603
|
+
switch (GetElementsKind()) {
|
604
|
+
case FAST_ELEMENTS: {
|
605
|
+
info->number_of_objects_with_fast_elements_++;
|
606
|
+
int holes = 0;
|
607
|
+
FixedArray* e = FixedArray::cast(elements());
|
608
|
+
int len = e->length();
|
609
|
+
Heap* heap = HEAP;
|
610
|
+
for (int i = 0; i < len; i++) {
|
611
|
+
if (e->get(i) == heap->the_hole_value()) holes++;
|
612
|
+
}
|
613
|
+
info->number_of_fast_used_elements_ += len - holes;
|
614
|
+
info->number_of_fast_unused_elements_ += holes;
|
615
|
+
break;
|
616
|
+
}
|
617
|
+
case EXTERNAL_PIXEL_ELEMENTS: {
|
618
|
+
info->number_of_objects_with_fast_elements_++;
|
619
|
+
ExternalPixelArray* e = ExternalPixelArray::cast(elements());
|
620
|
+
info->number_of_fast_used_elements_ += e->length();
|
621
|
+
break;
|
622
|
+
}
|
623
|
+
case DICTIONARY_ELEMENTS: {
|
624
|
+
NumberDictionary* dict = element_dictionary();
|
625
|
+
info->number_of_slow_used_elements_ += dict->NumberOfElements();
|
626
|
+
info->number_of_slow_unused_elements_ +=
|
627
|
+
dict->Capacity() - dict->NumberOfElements();
|
628
|
+
break;
|
629
|
+
}
|
630
|
+
default:
|
631
|
+
UNREACHABLE();
|
632
|
+
break;
|
633
|
+
}
|
634
|
+
}
|
635
|
+
|
636
|
+
|
637
|
+
void JSObject::SpillInformation::Clear() {
|
638
|
+
number_of_objects_ = 0;
|
639
|
+
number_of_objects_with_fast_properties_ = 0;
|
640
|
+
number_of_objects_with_fast_elements_ = 0;
|
641
|
+
number_of_fast_used_fields_ = 0;
|
642
|
+
number_of_fast_unused_fields_ = 0;
|
643
|
+
number_of_slow_used_properties_ = 0;
|
644
|
+
number_of_slow_unused_properties_ = 0;
|
645
|
+
number_of_fast_used_elements_ = 0;
|
646
|
+
number_of_fast_unused_elements_ = 0;
|
647
|
+
number_of_slow_used_elements_ = 0;
|
648
|
+
number_of_slow_unused_elements_ = 0;
|
649
|
+
}
|
650
|
+
|
651
|
+
void JSObject::SpillInformation::Print() {
|
652
|
+
PrintF("\n JSObject Spill Statistics (#%d):\n", number_of_objects_);
|
653
|
+
|
654
|
+
PrintF(" - fast properties (#%d): %d (used) %d (unused)\n",
|
655
|
+
number_of_objects_with_fast_properties_,
|
656
|
+
number_of_fast_used_fields_, number_of_fast_unused_fields_);
|
657
|
+
|
658
|
+
PrintF(" - slow properties (#%d): %d (used) %d (unused)\n",
|
659
|
+
number_of_objects_ - number_of_objects_with_fast_properties_,
|
660
|
+
number_of_slow_used_properties_, number_of_slow_unused_properties_);
|
661
|
+
|
662
|
+
PrintF(" - fast elements (#%d): %d (used) %d (unused)\n",
|
663
|
+
number_of_objects_with_fast_elements_,
|
664
|
+
number_of_fast_used_elements_, number_of_fast_unused_elements_);
|
665
|
+
|
666
|
+
PrintF(" - slow elements (#%d): %d (used) %d (unused)\n",
|
667
|
+
number_of_objects_ - number_of_objects_with_fast_elements_,
|
668
|
+
number_of_slow_used_elements_, number_of_slow_unused_elements_);
|
669
|
+
|
670
|
+
PrintF("\n");
|
671
|
+
}
|
672
|
+
|
673
|
+
|
674
|
+
bool DescriptorArray::IsSortedNoDuplicates() {
|
675
|
+
String* current_key = NULL;
|
676
|
+
uint32_t current = 0;
|
677
|
+
for (int i = 0; i < number_of_descriptors(); i++) {
|
678
|
+
String* key = GetKey(i);
|
679
|
+
if (key == current_key) {
|
680
|
+
PrintDescriptors();
|
681
|
+
return false;
|
682
|
+
}
|
683
|
+
current_key = key;
|
684
|
+
uint32_t hash = GetKey(i)->Hash();
|
685
|
+
if (hash < current) {
|
686
|
+
PrintDescriptors();
|
687
|
+
return false;
|
688
|
+
}
|
689
|
+
current = hash;
|
690
|
+
}
|
691
|
+
return true;
|
692
|
+
}
|
693
|
+
|
694
|
+
|
695
|
+
void JSFunctionResultCache::JSFunctionResultCacheVerify() {
|
696
|
+
JSFunction::cast(get(kFactoryIndex))->Verify();
|
697
|
+
|
698
|
+
int size = Smi::cast(get(kCacheSizeIndex))->value();
|
699
|
+
ASSERT(kEntriesIndex <= size);
|
700
|
+
ASSERT(size <= length());
|
701
|
+
ASSERT_EQ(0, size % kEntrySize);
|
702
|
+
|
703
|
+
int finger = Smi::cast(get(kFingerIndex))->value();
|
704
|
+
ASSERT(kEntriesIndex <= finger);
|
705
|
+
ASSERT((finger < size) || (finger == kEntriesIndex && finger == size));
|
706
|
+
ASSERT_EQ(0, finger % kEntrySize);
|
707
|
+
|
708
|
+
if (FLAG_enable_slow_asserts) {
|
709
|
+
for (int i = kEntriesIndex; i < size; i++) {
|
710
|
+
ASSERT(!get(i)->IsTheHole());
|
711
|
+
get(i)->Verify();
|
712
|
+
}
|
713
|
+
for (int i = size; i < length(); i++) {
|
714
|
+
ASSERT(get(i)->IsTheHole());
|
715
|
+
get(i)->Verify();
|
716
|
+
}
|
717
|
+
}
|
718
|
+
}
|
719
|
+
|
720
|
+
|
721
|
+
void NormalizedMapCache::NormalizedMapCacheVerify() {
|
722
|
+
FixedArray::cast(this)->Verify();
|
723
|
+
if (FLAG_enable_slow_asserts) {
|
724
|
+
for (int i = 0; i < length(); i++) {
|
725
|
+
Object* e = get(i);
|
726
|
+
if (e->IsMap()) {
|
727
|
+
Map::cast(e)->SharedMapVerify();
|
728
|
+
} else {
|
729
|
+
ASSERT(e->IsUndefined());
|
730
|
+
}
|
731
|
+
}
|
732
|
+
}
|
733
|
+
}
|
734
|
+
|
735
|
+
|
736
|
+
#endif // DEBUG
|
737
|
+
|
738
|
+
} } // namespace v8::internal
|