libv8 3.3.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/README.md +44 -0
- data/Rakefile +73 -0
- data/ext/libv8/extconf.rb +9 -0
- data/lib/libv8.rb +15 -0
- data/lib/libv8/Makefile +38 -0
- data/lib/libv8/detect_cpu.rb +27 -0
- data/lib/libv8/fpic-on-linux-amd64.patch +13 -0
- data/lib/libv8/scons/CHANGES.txt +5334 -0
- data/lib/libv8/scons/LICENSE.txt +20 -0
- data/lib/libv8/scons/MANIFEST +199 -0
- data/lib/libv8/scons/PKG-INFO +13 -0
- data/lib/libv8/scons/README.txt +243 -0
- data/lib/libv8/scons/RELEASE.txt +98 -0
- data/lib/libv8/scons/engine/SCons/Action.py +1241 -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 +480 -0
- data/lib/libv8/scons/engine/SCons/Environment.py +2318 -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 +3142 -0
- data/lib/libv8/scons/engine/SCons/Node/Python.py +128 -0
- data/lib/libv8/scons/engine/SCons/Node/__init__.py +1328 -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 +46 -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 +383 -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 +384 -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 +1334 -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 +1017 -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 +246 -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 +456 -0
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vs.py +499 -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 +223 -0
- data/lib/libv8/scons/engine/SCons/Tool/dvi.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/dvipdf.py +124 -0
- data/lib/libv8/scons/engine/SCons/Tool/dvips.py +94 -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 +63 -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 +229 -0
- data/lib/libv8/scons/engine/SCons/Tool/intelc.py +482 -0
- data/lib/libv8/scons/engine/SCons/Tool/ipkg.py +67 -0
- data/lib/libv8/scons/engine/SCons/Tool/jar.py +110 -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 +79 -0
- data/lib/libv8/scons/engine/SCons/Tool/lex.py +97 -0
- data/lib/libv8/scons/engine/SCons/Tool/link.py +121 -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 +158 -0
- data/lib/libv8/scons/engine/SCons/Tool/mslib.py +64 -0
- data/lib/libv8/scons/engine/SCons/Tool/mslink.py +266 -0
- data/lib/libv8/scons/engine/SCons/Tool/mssdk.py +50 -0
- data/lib/libv8/scons/engine/SCons/Tool/msvc.py +268 -0
- data/lib/libv8/scons/engine/SCons/Tool/msvs.py +1388 -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 +83 -0
- data/lib/libv8/scons/engine/SCons/Tool/pdftex.py +108 -0
- data/lib/libv8/scons/engine/SCons/Tool/qt.py +336 -0
- data/lib/libv8/scons/engine/SCons/Tool/rmic.py +120 -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 +63 -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 +77 -0
- data/lib/libv8/scons/engine/SCons/Tool/swig.py +182 -0
- data/lib/libv8/scons/engine/SCons/Tool/tar.py +73 -0
- data/lib/libv8/scons/engine/SCons/Tool/tex.py +813 -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 +130 -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 +251 -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 +15219 -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 +31 -0
- data/lib/libv8/scons/script/sconsign +513 -0
- data/lib/libv8/scons/setup.cfg +6 -0
- data/lib/libv8/scons/setup.py +425 -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 +4 -0
- data/libv8.gemspec +31 -0
- metadata +800 -0
@@ -0,0 +1,1126 @@
|
|
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_ARM_MACRO_ASSEMBLER_ARM_H_
|
29
|
+
#define V8_ARM_MACRO_ASSEMBLER_ARM_H_
|
30
|
+
|
31
|
+
#include "assembler.h"
|
32
|
+
#include "v8globals.h"
|
33
|
+
|
34
|
+
namespace v8 {
|
35
|
+
namespace internal {
|
36
|
+
|
37
|
+
// ----------------------------------------------------------------------------
|
38
|
+
// Static helper functions
|
39
|
+
|
40
|
+
// Generate a MemOperand for loading a field from an object.
|
41
|
+
static inline MemOperand FieldMemOperand(Register object, int offset) {
|
42
|
+
return MemOperand(object, offset - kHeapObjectTag);
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
static inline Operand SmiUntagOperand(Register object) {
|
47
|
+
return Operand(object, ASR, kSmiTagSize);
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
// Give alias names to registers
|
53
|
+
const Register cp = { 8 }; // JavaScript context pointer
|
54
|
+
const Register roots = { 10 }; // Roots array pointer.
|
55
|
+
|
56
|
+
// Flags used for the AllocateInNewSpace functions.
|
57
|
+
enum AllocationFlags {
|
58
|
+
// No special flags.
|
59
|
+
NO_ALLOCATION_FLAGS = 0,
|
60
|
+
// Return the pointer to the allocated already tagged as a heap object.
|
61
|
+
TAG_OBJECT = 1 << 0,
|
62
|
+
// The content of the result register already contains the allocation top in
|
63
|
+
// new space.
|
64
|
+
RESULT_CONTAINS_TOP = 1 << 1,
|
65
|
+
// Specify that the requested size of the space to allocate is specified in
|
66
|
+
// words instead of bytes.
|
67
|
+
SIZE_IN_WORDS = 1 << 2
|
68
|
+
};
|
69
|
+
|
70
|
+
|
71
|
+
// Flags used for the ObjectToDoubleVFPRegister function.
|
72
|
+
enum ObjectToDoubleFlags {
|
73
|
+
// No special flags.
|
74
|
+
NO_OBJECT_TO_DOUBLE_FLAGS = 0,
|
75
|
+
// Object is known to be a non smi.
|
76
|
+
OBJECT_NOT_SMI = 1 << 0,
|
77
|
+
// Don't load NaNs or infinities, branch to the non number case instead.
|
78
|
+
AVOID_NANS_AND_INFINITIES = 1 << 1
|
79
|
+
};
|
80
|
+
|
81
|
+
|
82
|
+
// MacroAssembler implements a collection of frequently used macros.
|
83
|
+
class MacroAssembler: public Assembler {
|
84
|
+
public:
|
85
|
+
// The isolate parameter can be NULL if the macro assembler should
|
86
|
+
// not use isolate-dependent functionality. In this case, it's the
|
87
|
+
// responsibility of the caller to never invoke such function on the
|
88
|
+
// macro assembler.
|
89
|
+
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
90
|
+
|
91
|
+
// Jump, Call, and Ret pseudo instructions implementing inter-working.
|
92
|
+
void Jump(Register target, Condition cond = al);
|
93
|
+
void Jump(byte* target, RelocInfo::Mode rmode, Condition cond = al);
|
94
|
+
void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al);
|
95
|
+
int CallSize(Register target, Condition cond = al);
|
96
|
+
void Call(Register target, Condition cond = al);
|
97
|
+
int CallSize(byte* target, RelocInfo::Mode rmode, Condition cond = al);
|
98
|
+
void Call(byte* target, RelocInfo::Mode rmode, Condition cond = al);
|
99
|
+
int CallSize(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al);
|
100
|
+
void Call(Handle<Code> code,
|
101
|
+
RelocInfo::Mode rmode,
|
102
|
+
Condition cond = al);
|
103
|
+
void CallWithAstId(Handle<Code> code,
|
104
|
+
RelocInfo::Mode rmode,
|
105
|
+
unsigned ast_id,
|
106
|
+
Condition cond = al);
|
107
|
+
void Ret(Condition cond = al);
|
108
|
+
|
109
|
+
// Emit code to discard a non-negative number of pointer-sized elements
|
110
|
+
// from the stack, clobbering only the sp register.
|
111
|
+
void Drop(int count, Condition cond = al);
|
112
|
+
|
113
|
+
void Ret(int drop, Condition cond = al);
|
114
|
+
|
115
|
+
// Swap two registers. If the scratch register is omitted then a slightly
|
116
|
+
// less efficient form using xor instead of mov is emitted.
|
117
|
+
void Swap(Register reg1,
|
118
|
+
Register reg2,
|
119
|
+
Register scratch = no_reg,
|
120
|
+
Condition cond = al);
|
121
|
+
|
122
|
+
|
123
|
+
void And(Register dst, Register src1, const Operand& src2,
|
124
|
+
Condition cond = al);
|
125
|
+
void Ubfx(Register dst, Register src, int lsb, int width,
|
126
|
+
Condition cond = al);
|
127
|
+
void Sbfx(Register dst, Register src, int lsb, int width,
|
128
|
+
Condition cond = al);
|
129
|
+
// The scratch register is not used for ARMv7.
|
130
|
+
// scratch can be the same register as src (in which case it is trashed), but
|
131
|
+
// not the same as dst.
|
132
|
+
void Bfi(Register dst,
|
133
|
+
Register src,
|
134
|
+
Register scratch,
|
135
|
+
int lsb,
|
136
|
+
int width,
|
137
|
+
Condition cond = al);
|
138
|
+
void Bfc(Register dst, int lsb, int width, Condition cond = al);
|
139
|
+
void Usat(Register dst, int satpos, const Operand& src,
|
140
|
+
Condition cond = al);
|
141
|
+
|
142
|
+
void Call(Label* target);
|
143
|
+
|
144
|
+
// Register move. May do nothing if the registers are identical.
|
145
|
+
void Move(Register dst, Handle<Object> value);
|
146
|
+
void Move(Register dst, Register src);
|
147
|
+
void Move(DoubleRegister dst, DoubleRegister src);
|
148
|
+
|
149
|
+
// Jumps to the label at the index given by the Smi in "index".
|
150
|
+
void SmiJumpTable(Register index, Vector<Label*> targets);
|
151
|
+
// Load an object from the root table.
|
152
|
+
void LoadRoot(Register destination,
|
153
|
+
Heap::RootListIndex index,
|
154
|
+
Condition cond = al);
|
155
|
+
// Store an object to the root table.
|
156
|
+
void StoreRoot(Register source,
|
157
|
+
Heap::RootListIndex index,
|
158
|
+
Condition cond = al);
|
159
|
+
|
160
|
+
|
161
|
+
// Check if object is in new space.
|
162
|
+
// scratch can be object itself, but it will be clobbered.
|
163
|
+
void InNewSpace(Register object,
|
164
|
+
Register scratch,
|
165
|
+
Condition cond, // eq for new space, ne otherwise
|
166
|
+
Label* branch);
|
167
|
+
|
168
|
+
|
169
|
+
// For the page containing |object| mark the region covering [address]
|
170
|
+
// dirty. The object address must be in the first 8K of an allocated page.
|
171
|
+
void RecordWriteHelper(Register object,
|
172
|
+
Register address,
|
173
|
+
Register scratch);
|
174
|
+
|
175
|
+
// For the page containing |object| mark the region covering
|
176
|
+
// [object+offset] dirty. The object address must be in the first 8K
|
177
|
+
// of an allocated page. The 'scratch' registers are used in the
|
178
|
+
// implementation and all 3 registers are clobbered by the
|
179
|
+
// operation, as well as the ip register. RecordWrite updates the
|
180
|
+
// write barrier even when storing smis.
|
181
|
+
void RecordWrite(Register object,
|
182
|
+
Operand offset,
|
183
|
+
Register scratch0,
|
184
|
+
Register scratch1);
|
185
|
+
|
186
|
+
// For the page containing |object| mark the region covering
|
187
|
+
// [address] dirty. The object address must be in the first 8K of an
|
188
|
+
// allocated page. All 3 registers are clobbered by the operation,
|
189
|
+
// as well as the ip register. RecordWrite updates the write barrier
|
190
|
+
// even when storing smis.
|
191
|
+
void RecordWrite(Register object,
|
192
|
+
Register address,
|
193
|
+
Register scratch);
|
194
|
+
|
195
|
+
// Push two registers. Pushes leftmost register first (to highest address).
|
196
|
+
void Push(Register src1, Register src2, Condition cond = al) {
|
197
|
+
ASSERT(!src1.is(src2));
|
198
|
+
if (src1.code() > src2.code()) {
|
199
|
+
stm(db_w, sp, src1.bit() | src2.bit(), cond);
|
200
|
+
} else {
|
201
|
+
str(src1, MemOperand(sp, 4, NegPreIndex), cond);
|
202
|
+
str(src2, MemOperand(sp, 4, NegPreIndex), cond);
|
203
|
+
}
|
204
|
+
}
|
205
|
+
|
206
|
+
// Push three registers. Pushes leftmost register first (to highest address).
|
207
|
+
void Push(Register src1, Register src2, Register src3, Condition cond = al) {
|
208
|
+
ASSERT(!src1.is(src2));
|
209
|
+
ASSERT(!src2.is(src3));
|
210
|
+
ASSERT(!src1.is(src3));
|
211
|
+
if (src1.code() > src2.code()) {
|
212
|
+
if (src2.code() > src3.code()) {
|
213
|
+
stm(db_w, sp, src1.bit() | src2.bit() | src3.bit(), cond);
|
214
|
+
} else {
|
215
|
+
stm(db_w, sp, src1.bit() | src2.bit(), cond);
|
216
|
+
str(src3, MemOperand(sp, 4, NegPreIndex), cond);
|
217
|
+
}
|
218
|
+
} else {
|
219
|
+
str(src1, MemOperand(sp, 4, NegPreIndex), cond);
|
220
|
+
Push(src2, src3, cond);
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
224
|
+
// Push four registers. Pushes leftmost register first (to highest address).
|
225
|
+
void Push(Register src1, Register src2,
|
226
|
+
Register src3, Register src4, Condition cond = al) {
|
227
|
+
ASSERT(!src1.is(src2));
|
228
|
+
ASSERT(!src2.is(src3));
|
229
|
+
ASSERT(!src1.is(src3));
|
230
|
+
ASSERT(!src1.is(src4));
|
231
|
+
ASSERT(!src2.is(src4));
|
232
|
+
ASSERT(!src3.is(src4));
|
233
|
+
if (src1.code() > src2.code()) {
|
234
|
+
if (src2.code() > src3.code()) {
|
235
|
+
if (src3.code() > src4.code()) {
|
236
|
+
stm(db_w,
|
237
|
+
sp,
|
238
|
+
src1.bit() | src2.bit() | src3.bit() | src4.bit(),
|
239
|
+
cond);
|
240
|
+
} else {
|
241
|
+
stm(db_w, sp, src1.bit() | src2.bit() | src3.bit(), cond);
|
242
|
+
str(src4, MemOperand(sp, 4, NegPreIndex), cond);
|
243
|
+
}
|
244
|
+
} else {
|
245
|
+
stm(db_w, sp, src1.bit() | src2.bit(), cond);
|
246
|
+
Push(src3, src4, cond);
|
247
|
+
}
|
248
|
+
} else {
|
249
|
+
str(src1, MemOperand(sp, 4, NegPreIndex), cond);
|
250
|
+
Push(src2, src3, src4, cond);
|
251
|
+
}
|
252
|
+
}
|
253
|
+
|
254
|
+
// Pop two registers. Pops rightmost register first (from lower address).
|
255
|
+
void Pop(Register src1, Register src2, Condition cond = al) {
|
256
|
+
ASSERT(!src1.is(src2));
|
257
|
+
if (src1.code() > src2.code()) {
|
258
|
+
ldm(ia_w, sp, src1.bit() | src2.bit(), cond);
|
259
|
+
} else {
|
260
|
+
ldr(src2, MemOperand(sp, 4, PostIndex), cond);
|
261
|
+
ldr(src1, MemOperand(sp, 4, PostIndex), cond);
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
// Push and pop the registers that can hold pointers, as defined by the
|
266
|
+
// RegList constant kSafepointSavedRegisters.
|
267
|
+
void PushSafepointRegisters();
|
268
|
+
void PopSafepointRegisters();
|
269
|
+
void PushSafepointRegistersAndDoubles();
|
270
|
+
void PopSafepointRegistersAndDoubles();
|
271
|
+
// Store value in register src in the safepoint stack slot for
|
272
|
+
// register dst.
|
273
|
+
void StoreToSafepointRegisterSlot(Register src, Register dst);
|
274
|
+
void StoreToSafepointRegistersAndDoublesSlot(Register src, Register dst);
|
275
|
+
// Load the value of the src register from its safepoint stack slot
|
276
|
+
// into register dst.
|
277
|
+
void LoadFromSafepointRegisterSlot(Register dst, Register src);
|
278
|
+
|
279
|
+
// Load two consecutive registers with two consecutive memory locations.
|
280
|
+
void Ldrd(Register dst1,
|
281
|
+
Register dst2,
|
282
|
+
const MemOperand& src,
|
283
|
+
Condition cond = al);
|
284
|
+
|
285
|
+
// Store two consecutive registers to two consecutive memory locations.
|
286
|
+
void Strd(Register src1,
|
287
|
+
Register src2,
|
288
|
+
const MemOperand& dst,
|
289
|
+
Condition cond = al);
|
290
|
+
|
291
|
+
// Clear specified FPSCR bits.
|
292
|
+
void ClearFPSCRBits(const uint32_t bits_to_clear,
|
293
|
+
const Register scratch,
|
294
|
+
const Condition cond = al);
|
295
|
+
|
296
|
+
// Compare double values and move the result to the normal condition flags.
|
297
|
+
void VFPCompareAndSetFlags(const DwVfpRegister src1,
|
298
|
+
const DwVfpRegister src2,
|
299
|
+
const Condition cond = al);
|
300
|
+
void VFPCompareAndSetFlags(const DwVfpRegister src1,
|
301
|
+
const double src2,
|
302
|
+
const Condition cond = al);
|
303
|
+
|
304
|
+
// Compare double values and then load the fpscr flags to a register.
|
305
|
+
void VFPCompareAndLoadFlags(const DwVfpRegister src1,
|
306
|
+
const DwVfpRegister src2,
|
307
|
+
const Register fpscr_flags,
|
308
|
+
const Condition cond = al);
|
309
|
+
void VFPCompareAndLoadFlags(const DwVfpRegister src1,
|
310
|
+
const double src2,
|
311
|
+
const Register fpscr_flags,
|
312
|
+
const Condition cond = al);
|
313
|
+
|
314
|
+
|
315
|
+
// ---------------------------------------------------------------------------
|
316
|
+
// Activation frames
|
317
|
+
|
318
|
+
void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); }
|
319
|
+
void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); }
|
320
|
+
|
321
|
+
void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); }
|
322
|
+
void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); }
|
323
|
+
|
324
|
+
// Enter exit frame.
|
325
|
+
// stack_space - extra stack space, used for alignment before call to C.
|
326
|
+
void EnterExitFrame(bool save_doubles, int stack_space = 0);
|
327
|
+
|
328
|
+
// Leave the current exit frame. Expects the return value in r0.
|
329
|
+
// Expect the number of values, pushed prior to the exit frame, to
|
330
|
+
// remove in a register (or no_reg, if there is nothing to remove).
|
331
|
+
void LeaveExitFrame(bool save_doubles, Register argument_count);
|
332
|
+
|
333
|
+
// Get the actual activation frame alignment for target environment.
|
334
|
+
static int ActivationFrameAlignment();
|
335
|
+
|
336
|
+
void LoadContext(Register dst, int context_chain_length);
|
337
|
+
|
338
|
+
void LoadGlobalFunction(int index, Register function);
|
339
|
+
|
340
|
+
// Load the initial map from the global function. The registers
|
341
|
+
// function and map can be the same, function is then overwritten.
|
342
|
+
void LoadGlobalFunctionInitialMap(Register function,
|
343
|
+
Register map,
|
344
|
+
Register scratch);
|
345
|
+
|
346
|
+
// ---------------------------------------------------------------------------
|
347
|
+
// JavaScript invokes
|
348
|
+
|
349
|
+
// Setup call kind marking in ecx. The method takes ecx as an
|
350
|
+
// explicit first parameter to make the code more readable at the
|
351
|
+
// call sites.
|
352
|
+
void SetCallKind(Register dst, CallKind kind);
|
353
|
+
|
354
|
+
// Invoke the JavaScript function code by either calling or jumping.
|
355
|
+
void InvokeCode(Register code,
|
356
|
+
const ParameterCount& expected,
|
357
|
+
const ParameterCount& actual,
|
358
|
+
InvokeFlag flag,
|
359
|
+
const CallWrapper& call_wrapper = NullCallWrapper(),
|
360
|
+
CallKind call_kind = CALL_AS_METHOD);
|
361
|
+
|
362
|
+
void InvokeCode(Handle<Code> code,
|
363
|
+
const ParameterCount& expected,
|
364
|
+
const ParameterCount& actual,
|
365
|
+
RelocInfo::Mode rmode,
|
366
|
+
InvokeFlag flag,
|
367
|
+
CallKind call_kind = CALL_AS_METHOD);
|
368
|
+
|
369
|
+
// Invoke the JavaScript function in the given register. Changes the
|
370
|
+
// current context to the context in the function before invoking.
|
371
|
+
void InvokeFunction(Register function,
|
372
|
+
const ParameterCount& actual,
|
373
|
+
InvokeFlag flag,
|
374
|
+
const CallWrapper& call_wrapper = NullCallWrapper(),
|
375
|
+
CallKind call_kind = CALL_AS_METHOD);
|
376
|
+
|
377
|
+
void InvokeFunction(JSFunction* function,
|
378
|
+
const ParameterCount& actual,
|
379
|
+
InvokeFlag flag);
|
380
|
+
|
381
|
+
void IsObjectJSObjectType(Register heap_object,
|
382
|
+
Register map,
|
383
|
+
Register scratch,
|
384
|
+
Label* fail);
|
385
|
+
|
386
|
+
void IsInstanceJSObjectType(Register map,
|
387
|
+
Register scratch,
|
388
|
+
Label* fail);
|
389
|
+
|
390
|
+
void IsObjectJSStringType(Register object,
|
391
|
+
Register scratch,
|
392
|
+
Label* fail);
|
393
|
+
|
394
|
+
#ifdef ENABLE_DEBUGGER_SUPPORT
|
395
|
+
// ---------------------------------------------------------------------------
|
396
|
+
// Debugger Support
|
397
|
+
|
398
|
+
void DebugBreak();
|
399
|
+
#endif
|
400
|
+
|
401
|
+
// ---------------------------------------------------------------------------
|
402
|
+
// Exception handling
|
403
|
+
|
404
|
+
// Push a new try handler and link into try handler chain.
|
405
|
+
// The return address must be passed in register lr.
|
406
|
+
// On exit, r0 contains TOS (code slot).
|
407
|
+
void PushTryHandler(CodeLocation try_location, HandlerType type);
|
408
|
+
|
409
|
+
// Unlink the stack handler on top of the stack from the try handler chain.
|
410
|
+
// Must preserve the result register.
|
411
|
+
void PopTryHandler();
|
412
|
+
|
413
|
+
// Passes thrown value (in r0) to the handler of top of the try handler chain.
|
414
|
+
void Throw(Register value);
|
415
|
+
|
416
|
+
// Propagates an uncatchable exception to the top of the current JS stack's
|
417
|
+
// handler chain.
|
418
|
+
void ThrowUncatchable(UncatchableExceptionType type, Register value);
|
419
|
+
|
420
|
+
// ---------------------------------------------------------------------------
|
421
|
+
// Inline caching support
|
422
|
+
|
423
|
+
// Generate code for checking access rights - used for security checks
|
424
|
+
// on access to global objects across environments. The holder register
|
425
|
+
// is left untouched, whereas both scratch registers are clobbered.
|
426
|
+
void CheckAccessGlobalProxy(Register holder_reg,
|
427
|
+
Register scratch,
|
428
|
+
Label* miss);
|
429
|
+
|
430
|
+
inline void MarkCode(NopMarkerTypes type) {
|
431
|
+
nop(type);
|
432
|
+
}
|
433
|
+
|
434
|
+
// Check if the given instruction is a 'type' marker.
|
435
|
+
// ie. check if is is a mov r<type>, r<type> (referenced as nop(type))
|
436
|
+
// These instructions are generated to mark special location in the code,
|
437
|
+
// like some special IC code.
|
438
|
+
static inline bool IsMarkedCode(Instr instr, int type) {
|
439
|
+
ASSERT((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER));
|
440
|
+
return IsNop(instr, type);
|
441
|
+
}
|
442
|
+
|
443
|
+
|
444
|
+
static inline int GetCodeMarker(Instr instr) {
|
445
|
+
int dst_reg_offset = 12;
|
446
|
+
int dst_mask = 0xf << dst_reg_offset;
|
447
|
+
int src_mask = 0xf;
|
448
|
+
int dst_reg = (instr & dst_mask) >> dst_reg_offset;
|
449
|
+
int src_reg = instr & src_mask;
|
450
|
+
uint32_t non_register_mask = ~(dst_mask | src_mask);
|
451
|
+
uint32_t mov_mask = al | 13 << 21;
|
452
|
+
|
453
|
+
// Return <n> if we have a mov rn rn, else return -1.
|
454
|
+
int type = ((instr & non_register_mask) == mov_mask) &&
|
455
|
+
(dst_reg == src_reg) &&
|
456
|
+
(FIRST_IC_MARKER <= dst_reg) && (dst_reg < LAST_CODE_MARKER)
|
457
|
+
? src_reg
|
458
|
+
: -1;
|
459
|
+
ASSERT((type == -1) ||
|
460
|
+
((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER)));
|
461
|
+
return type;
|
462
|
+
}
|
463
|
+
|
464
|
+
|
465
|
+
// ---------------------------------------------------------------------------
|
466
|
+
// Allocation support
|
467
|
+
|
468
|
+
// Allocate an object in new space. The object_size is specified
|
469
|
+
// either in bytes or in words if the allocation flag SIZE_IN_WORDS
|
470
|
+
// is passed. If the new space is exhausted control continues at the
|
471
|
+
// gc_required label. The allocated object is returned in result. If
|
472
|
+
// the flag tag_allocated_object is true the result is tagged as as
|
473
|
+
// a heap object. All registers are clobbered also when control
|
474
|
+
// continues at the gc_required label.
|
475
|
+
void AllocateInNewSpace(int object_size,
|
476
|
+
Register result,
|
477
|
+
Register scratch1,
|
478
|
+
Register scratch2,
|
479
|
+
Label* gc_required,
|
480
|
+
AllocationFlags flags);
|
481
|
+
void AllocateInNewSpace(Register object_size,
|
482
|
+
Register result,
|
483
|
+
Register scratch1,
|
484
|
+
Register scratch2,
|
485
|
+
Label* gc_required,
|
486
|
+
AllocationFlags flags);
|
487
|
+
|
488
|
+
// Undo allocation in new space. The object passed and objects allocated after
|
489
|
+
// it will no longer be allocated. The caller must make sure that no pointers
|
490
|
+
// are left to the object(s) no longer allocated as they would be invalid when
|
491
|
+
// allocation is undone.
|
492
|
+
void UndoAllocationInNewSpace(Register object, Register scratch);
|
493
|
+
|
494
|
+
|
495
|
+
void AllocateTwoByteString(Register result,
|
496
|
+
Register length,
|
497
|
+
Register scratch1,
|
498
|
+
Register scratch2,
|
499
|
+
Register scratch3,
|
500
|
+
Label* gc_required);
|
501
|
+
void AllocateAsciiString(Register result,
|
502
|
+
Register length,
|
503
|
+
Register scratch1,
|
504
|
+
Register scratch2,
|
505
|
+
Register scratch3,
|
506
|
+
Label* gc_required);
|
507
|
+
void AllocateTwoByteConsString(Register result,
|
508
|
+
Register length,
|
509
|
+
Register scratch1,
|
510
|
+
Register scratch2,
|
511
|
+
Label* gc_required);
|
512
|
+
void AllocateAsciiConsString(Register result,
|
513
|
+
Register length,
|
514
|
+
Register scratch1,
|
515
|
+
Register scratch2,
|
516
|
+
Label* gc_required);
|
517
|
+
|
518
|
+
// Allocates a heap number or jumps to the gc_required label if the young
|
519
|
+
// space is full and a scavenge is needed. All registers are clobbered also
|
520
|
+
// when control continues at the gc_required label.
|
521
|
+
void AllocateHeapNumber(Register result,
|
522
|
+
Register scratch1,
|
523
|
+
Register scratch2,
|
524
|
+
Register heap_number_map,
|
525
|
+
Label* gc_required);
|
526
|
+
void AllocateHeapNumberWithValue(Register result,
|
527
|
+
DwVfpRegister value,
|
528
|
+
Register scratch1,
|
529
|
+
Register scratch2,
|
530
|
+
Register heap_number_map,
|
531
|
+
Label* gc_required);
|
532
|
+
|
533
|
+
// Copies a fixed number of fields of heap objects from src to dst.
|
534
|
+
void CopyFields(Register dst, Register src, RegList temps, int field_count);
|
535
|
+
|
536
|
+
// Copies a number of bytes from src to dst. All registers are clobbered. On
|
537
|
+
// exit src and dst will point to the place just after where the last byte was
|
538
|
+
// read or written and length will be zero.
|
539
|
+
void CopyBytes(Register src,
|
540
|
+
Register dst,
|
541
|
+
Register length,
|
542
|
+
Register scratch);
|
543
|
+
|
544
|
+
// ---------------------------------------------------------------------------
|
545
|
+
// Support functions.
|
546
|
+
|
547
|
+
// Try to get function prototype of a function and puts the value in
|
548
|
+
// the result register. Checks that the function really is a
|
549
|
+
// function and jumps to the miss label if the fast checks fail. The
|
550
|
+
// function register will be untouched; the other registers may be
|
551
|
+
// clobbered.
|
552
|
+
void TryGetFunctionPrototype(Register function,
|
553
|
+
Register result,
|
554
|
+
Register scratch,
|
555
|
+
Label* miss);
|
556
|
+
|
557
|
+
// Compare object type for heap object. heap_object contains a non-Smi
|
558
|
+
// whose object type should be compared with the given type. This both
|
559
|
+
// sets the flags and leaves the object type in the type_reg register.
|
560
|
+
// It leaves the map in the map register (unless the type_reg and map register
|
561
|
+
// are the same register). It leaves the heap object in the heap_object
|
562
|
+
// register unless the heap_object register is the same register as one of the
|
563
|
+
// other registers.
|
564
|
+
void CompareObjectType(Register heap_object,
|
565
|
+
Register map,
|
566
|
+
Register type_reg,
|
567
|
+
InstanceType type);
|
568
|
+
|
569
|
+
// Compare instance type in a map. map contains a valid map object whose
|
570
|
+
// object type should be compared with the given type. This both
|
571
|
+
// sets the flags and leaves the object type in the type_reg register. It
|
572
|
+
// leaves the heap object in the heap_object register unless the heap_object
|
573
|
+
// register is the same register as type_reg.
|
574
|
+
void CompareInstanceType(Register map,
|
575
|
+
Register type_reg,
|
576
|
+
InstanceType type);
|
577
|
+
|
578
|
+
|
579
|
+
// Check if the map of an object is equal to a specified map (either
|
580
|
+
// given directly or as an index into the root list) and branch to
|
581
|
+
// label if not. Skip the smi check if not required (object is known
|
582
|
+
// to be a heap object)
|
583
|
+
void CheckMap(Register obj,
|
584
|
+
Register scratch,
|
585
|
+
Handle<Map> map,
|
586
|
+
Label* fail,
|
587
|
+
SmiCheckType smi_check_type);
|
588
|
+
|
589
|
+
|
590
|
+
void CheckMap(Register obj,
|
591
|
+
Register scratch,
|
592
|
+
Heap::RootListIndex index,
|
593
|
+
Label* fail,
|
594
|
+
SmiCheckType smi_check_type);
|
595
|
+
|
596
|
+
|
597
|
+
// Check if the map of an object is equal to a specified map and branch to a
|
598
|
+
// specified target if equal. Skip the smi check if not required (object is
|
599
|
+
// known to be a heap object)
|
600
|
+
void DispatchMap(Register obj,
|
601
|
+
Register scratch,
|
602
|
+
Handle<Map> map,
|
603
|
+
Handle<Code> success,
|
604
|
+
SmiCheckType smi_check_type);
|
605
|
+
|
606
|
+
|
607
|
+
// Compare the object in a register to a value from the root list.
|
608
|
+
// Uses the ip register as scratch.
|
609
|
+
void CompareRoot(Register obj, Heap::RootListIndex index);
|
610
|
+
|
611
|
+
|
612
|
+
// Load and check the instance type of an object for being a string.
|
613
|
+
// Loads the type into the second argument register.
|
614
|
+
// Returns a condition that will be enabled if the object was a string.
|
615
|
+
Condition IsObjectStringType(Register obj,
|
616
|
+
Register type) {
|
617
|
+
ldr(type, FieldMemOperand(obj, HeapObject::kMapOffset));
|
618
|
+
ldrb(type, FieldMemOperand(type, Map::kInstanceTypeOffset));
|
619
|
+
tst(type, Operand(kIsNotStringMask));
|
620
|
+
ASSERT_EQ(0, kStringTag);
|
621
|
+
return eq;
|
622
|
+
}
|
623
|
+
|
624
|
+
|
625
|
+
// Generates code for reporting that an illegal operation has
|
626
|
+
// occurred.
|
627
|
+
void IllegalOperation(int num_arguments);
|
628
|
+
|
629
|
+
// Picks out an array index from the hash field.
|
630
|
+
// Register use:
|
631
|
+
// hash - holds the index's hash. Clobbered.
|
632
|
+
// index - holds the overwritten index on exit.
|
633
|
+
void IndexFromHash(Register hash, Register index);
|
634
|
+
|
635
|
+
// Get the number of least significant bits from a register
|
636
|
+
void GetLeastBitsFromSmi(Register dst, Register src, int num_least_bits);
|
637
|
+
void GetLeastBitsFromInt32(Register dst, Register src, int mun_least_bits);
|
638
|
+
|
639
|
+
// Uses VFP instructions to Convert a Smi to a double.
|
640
|
+
void IntegerToDoubleConversionWithVFP3(Register inReg,
|
641
|
+
Register outHighReg,
|
642
|
+
Register outLowReg);
|
643
|
+
|
644
|
+
// Load the value of a number object into a VFP double register. If the object
|
645
|
+
// is not a number a jump to the label not_number is performed and the VFP
|
646
|
+
// double register is unchanged.
|
647
|
+
void ObjectToDoubleVFPRegister(
|
648
|
+
Register object,
|
649
|
+
DwVfpRegister value,
|
650
|
+
Register scratch1,
|
651
|
+
Register scratch2,
|
652
|
+
Register heap_number_map,
|
653
|
+
SwVfpRegister scratch3,
|
654
|
+
Label* not_number,
|
655
|
+
ObjectToDoubleFlags flags = NO_OBJECT_TO_DOUBLE_FLAGS);
|
656
|
+
|
657
|
+
// Load the value of a smi object into a VFP double register. The register
|
658
|
+
// scratch1 can be the same register as smi in which case smi will hold the
|
659
|
+
// untagged value afterwards.
|
660
|
+
void SmiToDoubleVFPRegister(Register smi,
|
661
|
+
DwVfpRegister value,
|
662
|
+
Register scratch1,
|
663
|
+
SwVfpRegister scratch2);
|
664
|
+
|
665
|
+
// Convert the HeapNumber pointed to by source to a 32bits signed integer
|
666
|
+
// dest. If the HeapNumber does not fit into a 32bits signed integer branch
|
667
|
+
// to not_int32 label. If VFP3 is available double_scratch is used but not
|
668
|
+
// scratch2.
|
669
|
+
void ConvertToInt32(Register source,
|
670
|
+
Register dest,
|
671
|
+
Register scratch,
|
672
|
+
Register scratch2,
|
673
|
+
DwVfpRegister double_scratch,
|
674
|
+
Label *not_int32);
|
675
|
+
|
676
|
+
// Truncates a double using a specific rounding mode.
|
677
|
+
// Clears the z flag (ne condition) if an overflow occurs.
|
678
|
+
// If exact_conversion is true, the z flag is also cleared if the conversion
|
679
|
+
// was inexact, ie. if the double value could not be converted exactly
|
680
|
+
// to a 32bit integer.
|
681
|
+
void EmitVFPTruncate(VFPRoundingMode rounding_mode,
|
682
|
+
SwVfpRegister result,
|
683
|
+
DwVfpRegister double_input,
|
684
|
+
Register scratch1,
|
685
|
+
Register scratch2,
|
686
|
+
CheckForInexactConversion check
|
687
|
+
= kDontCheckForInexactConversion);
|
688
|
+
|
689
|
+
// Helper for EmitECMATruncate.
|
690
|
+
// This will truncate a floating-point value outside of the singed 32bit
|
691
|
+
// integer range to a 32bit signed integer.
|
692
|
+
// Expects the double value loaded in input_high and input_low.
|
693
|
+
// Exits with the answer in 'result'.
|
694
|
+
// Note that this code does not work for values in the 32bit range!
|
695
|
+
void EmitOutOfInt32RangeTruncate(Register result,
|
696
|
+
Register input_high,
|
697
|
+
Register input_low,
|
698
|
+
Register scratch);
|
699
|
+
|
700
|
+
// Performs a truncating conversion of a floating point number as used by
|
701
|
+
// the JS bitwise operations. See ECMA-262 9.5: ToInt32.
|
702
|
+
// Exits with 'result' holding the answer and all other registers clobbered.
|
703
|
+
void EmitECMATruncate(Register result,
|
704
|
+
DwVfpRegister double_input,
|
705
|
+
SwVfpRegister single_scratch,
|
706
|
+
Register scratch,
|
707
|
+
Register scratch2,
|
708
|
+
Register scratch3);
|
709
|
+
|
710
|
+
// Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz
|
711
|
+
// instruction. On pre-ARM5 hardware this routine gives the wrong answer
|
712
|
+
// for 0 (31 instead of 32). Source and scratch can be the same in which case
|
713
|
+
// the source is clobbered. Source and zeros can also be the same in which
|
714
|
+
// case scratch should be a different register.
|
715
|
+
void CountLeadingZeros(Register zeros,
|
716
|
+
Register source,
|
717
|
+
Register scratch);
|
718
|
+
|
719
|
+
// ---------------------------------------------------------------------------
|
720
|
+
// Runtime calls
|
721
|
+
|
722
|
+
// Call a code stub.
|
723
|
+
void CallStub(CodeStub* stub, Condition cond = al);
|
724
|
+
|
725
|
+
// Call a code stub and return the code object called. Try to generate
|
726
|
+
// the code if necessary. Do not perform a GC but instead return a retry
|
727
|
+
// after GC failure.
|
728
|
+
MUST_USE_RESULT MaybeObject* TryCallStub(CodeStub* stub, Condition cond = al);
|
729
|
+
|
730
|
+
// Call a code stub.
|
731
|
+
void TailCallStub(CodeStub* stub, Condition cond = al);
|
732
|
+
|
733
|
+
// Tail call a code stub (jump) and return the code object called. Try to
|
734
|
+
// generate the code if necessary. Do not perform a GC but instead return
|
735
|
+
// a retry after GC failure.
|
736
|
+
MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub,
|
737
|
+
Condition cond = al);
|
738
|
+
|
739
|
+
// Call a runtime routine.
|
740
|
+
void CallRuntime(const Runtime::Function* f, int num_arguments);
|
741
|
+
void CallRuntimeSaveDoubles(Runtime::FunctionId id);
|
742
|
+
|
743
|
+
// Convenience function: Same as above, but takes the fid instead.
|
744
|
+
void CallRuntime(Runtime::FunctionId fid, int num_arguments);
|
745
|
+
|
746
|
+
// Convenience function: call an external reference.
|
747
|
+
void CallExternalReference(const ExternalReference& ext,
|
748
|
+
int num_arguments);
|
749
|
+
|
750
|
+
// Tail call of a runtime routine (jump).
|
751
|
+
// Like JumpToExternalReference, but also takes care of passing the number
|
752
|
+
// of parameters.
|
753
|
+
void TailCallExternalReference(const ExternalReference& ext,
|
754
|
+
int num_arguments,
|
755
|
+
int result_size);
|
756
|
+
|
757
|
+
// Tail call of a runtime routine (jump). Try to generate the code if
|
758
|
+
// necessary. Do not perform a GC but instead return a retry after GC
|
759
|
+
// failure.
|
760
|
+
MUST_USE_RESULT MaybeObject* TryTailCallExternalReference(
|
761
|
+
const ExternalReference& ext, int num_arguments, int result_size);
|
762
|
+
|
763
|
+
// Convenience function: tail call a runtime routine (jump).
|
764
|
+
void TailCallRuntime(Runtime::FunctionId fid,
|
765
|
+
int num_arguments,
|
766
|
+
int result_size);
|
767
|
+
|
768
|
+
int CalculateStackPassedWords(int num_reg_arguments,
|
769
|
+
int num_double_arguments);
|
770
|
+
|
771
|
+
// Before calling a C-function from generated code, align arguments on stack.
|
772
|
+
// After aligning the frame, non-register arguments must be stored in
|
773
|
+
// sp[0], sp[4], etc., not pushed. The argument count assumes all arguments
|
774
|
+
// are word sized. If double arguments are used, this function assumes that
|
775
|
+
// all double arguments are stored before core registers; otherwise the
|
776
|
+
// correct alignment of the double values is not guaranteed.
|
777
|
+
// Some compilers/platforms require the stack to be aligned when calling
|
778
|
+
// C++ code.
|
779
|
+
// Needs a scratch register to do some arithmetic. This register will be
|
780
|
+
// trashed.
|
781
|
+
void PrepareCallCFunction(int num_reg_arguments,
|
782
|
+
int num_double_registers,
|
783
|
+
Register scratch);
|
784
|
+
void PrepareCallCFunction(int num_reg_arguments,
|
785
|
+
Register scratch);
|
786
|
+
|
787
|
+
// There are two ways of passing double arguments on ARM, depending on
|
788
|
+
// whether soft or hard floating point ABI is used. These functions
|
789
|
+
// abstract parameter passing for the three different ways we call
|
790
|
+
// C functions from generated code.
|
791
|
+
void SetCallCDoubleArguments(DoubleRegister dreg);
|
792
|
+
void SetCallCDoubleArguments(DoubleRegister dreg1, DoubleRegister dreg2);
|
793
|
+
void SetCallCDoubleArguments(DoubleRegister dreg, Register reg);
|
794
|
+
|
795
|
+
// Calls a C function and cleans up the space for arguments allocated
|
796
|
+
// by PrepareCallCFunction. The called function is not allowed to trigger a
|
797
|
+
// garbage collection, since that might move the code and invalidate the
|
798
|
+
// return address (unless this is somehow accounted for by the called
|
799
|
+
// function).
|
800
|
+
void CallCFunction(ExternalReference function, int num_arguments);
|
801
|
+
void CallCFunction(Register function, Register scratch, int num_arguments);
|
802
|
+
void CallCFunction(ExternalReference function,
|
803
|
+
int num_reg_arguments,
|
804
|
+
int num_double_arguments);
|
805
|
+
void CallCFunction(Register function, Register scratch,
|
806
|
+
int num_reg_arguments,
|
807
|
+
int num_double_arguments);
|
808
|
+
|
809
|
+
void GetCFunctionDoubleResult(const DoubleRegister dst);
|
810
|
+
|
811
|
+
// Calls an API function. Allocates HandleScope, extracts returned value
|
812
|
+
// from handle and propagates exceptions. Restores context.
|
813
|
+
// stack_space - space to be unwound on exit (includes the call js
|
814
|
+
// arguments space and the additional space allocated for the fast call).
|
815
|
+
MaybeObject* TryCallApiFunctionAndReturn(ExternalReference function,
|
816
|
+
int stack_space);
|
817
|
+
|
818
|
+
// Jump to a runtime routine.
|
819
|
+
void JumpToExternalReference(const ExternalReference& builtin);
|
820
|
+
|
821
|
+
MaybeObject* TryJumpToExternalReference(const ExternalReference& ext);
|
822
|
+
|
823
|
+
// Invoke specified builtin JavaScript function. Adds an entry to
|
824
|
+
// the unresolved list if the name does not resolve.
|
825
|
+
void InvokeBuiltin(Builtins::JavaScript id,
|
826
|
+
InvokeFlag flag,
|
827
|
+
const CallWrapper& call_wrapper = NullCallWrapper());
|
828
|
+
|
829
|
+
// Store the code object for the given builtin in the target register and
|
830
|
+
// setup the function in r1.
|
831
|
+
void GetBuiltinEntry(Register target, Builtins::JavaScript id);
|
832
|
+
|
833
|
+
// Store the function for the given builtin in the target register.
|
834
|
+
void GetBuiltinFunction(Register target, Builtins::JavaScript id);
|
835
|
+
|
836
|
+
Handle<Object> CodeObject() {
|
837
|
+
ASSERT(!code_object_.is_null());
|
838
|
+
return code_object_;
|
839
|
+
}
|
840
|
+
|
841
|
+
|
842
|
+
// ---------------------------------------------------------------------------
|
843
|
+
// StatsCounter support
|
844
|
+
|
845
|
+
void SetCounter(StatsCounter* counter, int value,
|
846
|
+
Register scratch1, Register scratch2);
|
847
|
+
void IncrementCounter(StatsCounter* counter, int value,
|
848
|
+
Register scratch1, Register scratch2);
|
849
|
+
void DecrementCounter(StatsCounter* counter, int value,
|
850
|
+
Register scratch1, Register scratch2);
|
851
|
+
|
852
|
+
|
853
|
+
// ---------------------------------------------------------------------------
|
854
|
+
// Debugging
|
855
|
+
|
856
|
+
// Calls Abort(msg) if the condition cond is not satisfied.
|
857
|
+
// Use --debug_code to enable.
|
858
|
+
void Assert(Condition cond, const char* msg);
|
859
|
+
void AssertRegisterIsRoot(Register reg, Heap::RootListIndex index);
|
860
|
+
void AssertFastElements(Register elements);
|
861
|
+
|
862
|
+
// Like Assert(), but always enabled.
|
863
|
+
void Check(Condition cond, const char* msg);
|
864
|
+
|
865
|
+
// Print a message to stdout and abort execution.
|
866
|
+
void Abort(const char* msg);
|
867
|
+
|
868
|
+
// Verify restrictions about code generated in stubs.
|
869
|
+
void set_generating_stub(bool value) { generating_stub_ = value; }
|
870
|
+
bool generating_stub() { return generating_stub_; }
|
871
|
+
void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
|
872
|
+
bool allow_stub_calls() { return allow_stub_calls_; }
|
873
|
+
|
874
|
+
// EABI variant for double arguments in use.
|
875
|
+
bool use_eabi_hardfloat() {
|
876
|
+
#if USE_EABI_HARDFLOAT
|
877
|
+
return true;
|
878
|
+
#else
|
879
|
+
return false;
|
880
|
+
#endif
|
881
|
+
}
|
882
|
+
|
883
|
+
// ---------------------------------------------------------------------------
|
884
|
+
// Number utilities
|
885
|
+
|
886
|
+
// Check whether the value of reg is a power of two and not zero. If not
|
887
|
+
// control continues at the label not_power_of_two. If reg is a power of two
|
888
|
+
// the register scratch contains the value of (reg - 1) when control falls
|
889
|
+
// through.
|
890
|
+
void JumpIfNotPowerOfTwoOrZero(Register reg,
|
891
|
+
Register scratch,
|
892
|
+
Label* not_power_of_two_or_zero);
|
893
|
+
// Check whether the value of reg is a power of two and not zero.
|
894
|
+
// Control falls through if it is, with scratch containing the mask
|
895
|
+
// value (reg - 1).
|
896
|
+
// Otherwise control jumps to the 'zero_and_neg' label if the value of reg is
|
897
|
+
// zero or negative, or jumps to the 'not_power_of_two' label if the value is
|
898
|
+
// strictly positive but not a power of two.
|
899
|
+
void JumpIfNotPowerOfTwoOrZeroAndNeg(Register reg,
|
900
|
+
Register scratch,
|
901
|
+
Label* zero_and_neg,
|
902
|
+
Label* not_power_of_two);
|
903
|
+
|
904
|
+
// ---------------------------------------------------------------------------
|
905
|
+
// Smi utilities
|
906
|
+
|
907
|
+
void SmiTag(Register reg, SBit s = LeaveCC) {
|
908
|
+
add(reg, reg, Operand(reg), s);
|
909
|
+
}
|
910
|
+
void SmiTag(Register dst, Register src, SBit s = LeaveCC) {
|
911
|
+
add(dst, src, Operand(src), s);
|
912
|
+
}
|
913
|
+
|
914
|
+
// Try to convert int32 to smi. If the value is to large, preserve
|
915
|
+
// the original value and jump to not_a_smi. Destroys scratch and
|
916
|
+
// sets flags.
|
917
|
+
void TrySmiTag(Register reg, Label* not_a_smi, Register scratch) {
|
918
|
+
mov(scratch, reg);
|
919
|
+
SmiTag(scratch, SetCC);
|
920
|
+
b(vs, not_a_smi);
|
921
|
+
mov(reg, scratch);
|
922
|
+
}
|
923
|
+
|
924
|
+
void SmiUntag(Register reg, SBit s = LeaveCC) {
|
925
|
+
mov(reg, Operand(reg, ASR, kSmiTagSize), s);
|
926
|
+
}
|
927
|
+
void SmiUntag(Register dst, Register src, SBit s = LeaveCC) {
|
928
|
+
mov(dst, Operand(src, ASR, kSmiTagSize), s);
|
929
|
+
}
|
930
|
+
|
931
|
+
// Jump the register contains a smi.
|
932
|
+
inline void JumpIfSmi(Register value, Label* smi_label) {
|
933
|
+
tst(value, Operand(kSmiTagMask));
|
934
|
+
b(eq, smi_label);
|
935
|
+
}
|
936
|
+
// Jump if either of the registers contain a non-smi.
|
937
|
+
inline void JumpIfNotSmi(Register value, Label* not_smi_label) {
|
938
|
+
tst(value, Operand(kSmiTagMask));
|
939
|
+
b(ne, not_smi_label);
|
940
|
+
}
|
941
|
+
// Jump if either of the registers contain a non-smi.
|
942
|
+
void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi);
|
943
|
+
// Jump if either of the registers contain a smi.
|
944
|
+
void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi);
|
945
|
+
|
946
|
+
// Abort execution if argument is a smi. Used in debug code.
|
947
|
+
void AbortIfSmi(Register object);
|
948
|
+
void AbortIfNotSmi(Register object);
|
949
|
+
|
950
|
+
// Abort execution if argument is a string. Used in debug code.
|
951
|
+
void AbortIfNotString(Register object);
|
952
|
+
|
953
|
+
// Abort execution if argument is not the root value with the given index.
|
954
|
+
void AbortIfNotRootValue(Register src,
|
955
|
+
Heap::RootListIndex root_value_index,
|
956
|
+
const char* message);
|
957
|
+
|
958
|
+
// ---------------------------------------------------------------------------
|
959
|
+
// HeapNumber utilities
|
960
|
+
|
961
|
+
void JumpIfNotHeapNumber(Register object,
|
962
|
+
Register heap_number_map,
|
963
|
+
Register scratch,
|
964
|
+
Label* on_not_heap_number);
|
965
|
+
|
966
|
+
// ---------------------------------------------------------------------------
|
967
|
+
// String utilities
|
968
|
+
|
969
|
+
// Checks if both objects are sequential ASCII strings and jumps to label
|
970
|
+
// if either is not. Assumes that neither object is a smi.
|
971
|
+
void JumpIfNonSmisNotBothSequentialAsciiStrings(Register object1,
|
972
|
+
Register object2,
|
973
|
+
Register scratch1,
|
974
|
+
Register scratch2,
|
975
|
+
Label* failure);
|
976
|
+
|
977
|
+
// Checks if both objects are sequential ASCII strings and jumps to label
|
978
|
+
// if either is not.
|
979
|
+
void JumpIfNotBothSequentialAsciiStrings(Register first,
|
980
|
+
Register second,
|
981
|
+
Register scratch1,
|
982
|
+
Register scratch2,
|
983
|
+
Label* not_flat_ascii_strings);
|
984
|
+
|
985
|
+
// Checks if both instance types are sequential ASCII strings and jumps to
|
986
|
+
// label if either is not.
|
987
|
+
void JumpIfBothInstanceTypesAreNotSequentialAscii(
|
988
|
+
Register first_object_instance_type,
|
989
|
+
Register second_object_instance_type,
|
990
|
+
Register scratch1,
|
991
|
+
Register scratch2,
|
992
|
+
Label* failure);
|
993
|
+
|
994
|
+
// Check if instance type is sequential ASCII string and jump to label if
|
995
|
+
// it is not.
|
996
|
+
void JumpIfInstanceTypeIsNotSequentialAscii(Register type,
|
997
|
+
Register scratch,
|
998
|
+
Label* failure);
|
999
|
+
|
1000
|
+
|
1001
|
+
// ---------------------------------------------------------------------------
|
1002
|
+
// Patching helpers.
|
1003
|
+
|
1004
|
+
// Get the location of a relocated constant (its address in the constant pool)
|
1005
|
+
// from its load site.
|
1006
|
+
void GetRelocatedValueLocation(Register ldr_location,
|
1007
|
+
Register result);
|
1008
|
+
|
1009
|
+
|
1010
|
+
void ClampUint8(Register output_reg, Register input_reg);
|
1011
|
+
|
1012
|
+
void ClampDoubleToUint8(Register result_reg,
|
1013
|
+
DoubleRegister input_reg,
|
1014
|
+
DoubleRegister temp_double_reg);
|
1015
|
+
|
1016
|
+
|
1017
|
+
void LoadInstanceDescriptors(Register map, Register descriptors);
|
1018
|
+
|
1019
|
+
private:
|
1020
|
+
void CallCFunctionHelper(Register function,
|
1021
|
+
ExternalReference function_reference,
|
1022
|
+
Register scratch,
|
1023
|
+
int num_reg_arguments,
|
1024
|
+
int num_double_arguments);
|
1025
|
+
|
1026
|
+
void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
|
1027
|
+
int CallSize(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
|
1028
|
+
void Call(intptr_t target,
|
1029
|
+
RelocInfo::Mode rmode,
|
1030
|
+
Condition cond = al);
|
1031
|
+
|
1032
|
+
// Helper functions for generating invokes.
|
1033
|
+
void InvokePrologue(const ParameterCount& expected,
|
1034
|
+
const ParameterCount& actual,
|
1035
|
+
Handle<Code> code_constant,
|
1036
|
+
Register code_reg,
|
1037
|
+
Label* done,
|
1038
|
+
InvokeFlag flag,
|
1039
|
+
const CallWrapper& call_wrapper = NullCallWrapper(),
|
1040
|
+
CallKind call_kind = CALL_AS_METHOD);
|
1041
|
+
|
1042
|
+
// Activation support.
|
1043
|
+
void EnterFrame(StackFrame::Type type);
|
1044
|
+
void LeaveFrame(StackFrame::Type type);
|
1045
|
+
|
1046
|
+
void InitializeNewString(Register string,
|
1047
|
+
Register length,
|
1048
|
+
Heap::RootListIndex map_index,
|
1049
|
+
Register scratch1,
|
1050
|
+
Register scratch2);
|
1051
|
+
|
1052
|
+
// Compute memory operands for safepoint stack slots.
|
1053
|
+
static int SafepointRegisterStackIndex(int reg_code);
|
1054
|
+
MemOperand SafepointRegisterSlot(Register reg);
|
1055
|
+
MemOperand SafepointRegistersAndDoublesSlot(Register reg);
|
1056
|
+
|
1057
|
+
bool generating_stub_;
|
1058
|
+
bool allow_stub_calls_;
|
1059
|
+
// This handle will be patched with the code object on installation.
|
1060
|
+
Handle<Object> code_object_;
|
1061
|
+
|
1062
|
+
// Needs access to SafepointRegisterStackIndex for optimized frame
|
1063
|
+
// traversal.
|
1064
|
+
friend class OptimizedFrame;
|
1065
|
+
};
|
1066
|
+
|
1067
|
+
|
1068
|
+
#ifdef ENABLE_DEBUGGER_SUPPORT
|
1069
|
+
// The code patcher is used to patch (typically) small parts of code e.g. for
|
1070
|
+
// debugging and other types of instrumentation. When using the code patcher
|
1071
|
+
// the exact number of bytes specified must be emitted. It is not legal to emit
|
1072
|
+
// relocation information. If any of these constraints are violated it causes
|
1073
|
+
// an assertion to fail.
|
1074
|
+
class CodePatcher {
|
1075
|
+
public:
|
1076
|
+
CodePatcher(byte* address, int instructions);
|
1077
|
+
virtual ~CodePatcher();
|
1078
|
+
|
1079
|
+
// Macro assembler to emit code.
|
1080
|
+
MacroAssembler* masm() { return &masm_; }
|
1081
|
+
|
1082
|
+
// Emit an instruction directly.
|
1083
|
+
void Emit(Instr instr);
|
1084
|
+
|
1085
|
+
// Emit an address directly.
|
1086
|
+
void Emit(Address addr);
|
1087
|
+
|
1088
|
+
// Emit the condition part of an instruction leaving the rest of the current
|
1089
|
+
// instruction unchanged.
|
1090
|
+
void EmitCondition(Condition cond);
|
1091
|
+
|
1092
|
+
private:
|
1093
|
+
byte* address_; // The address of the code being patched.
|
1094
|
+
int instructions_; // Number of instructions of the expected patch size.
|
1095
|
+
int size_; // Number of bytes of the expected patch size.
|
1096
|
+
MacroAssembler masm_; // Macro assembler used to generate the code.
|
1097
|
+
};
|
1098
|
+
#endif // ENABLE_DEBUGGER_SUPPORT
|
1099
|
+
|
1100
|
+
|
1101
|
+
// -----------------------------------------------------------------------------
|
1102
|
+
// Static helper functions.
|
1103
|
+
|
1104
|
+
static MemOperand ContextOperand(Register context, int index) {
|
1105
|
+
return MemOperand(context, Context::SlotOffset(index));
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
|
1109
|
+
static inline MemOperand GlobalObjectOperand() {
|
1110
|
+
return ContextOperand(cp, Context::GLOBAL_INDEX);
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
|
1114
|
+
#ifdef GENERATED_CODE_COVERAGE
|
1115
|
+
#define CODE_COVERAGE_STRINGIFY(x) #x
|
1116
|
+
#define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
|
1117
|
+
#define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
|
1118
|
+
#define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
|
1119
|
+
#else
|
1120
|
+
#define ACCESS_MASM(masm) masm->
|
1121
|
+
#endif
|
1122
|
+
|
1123
|
+
|
1124
|
+
} } // namespace v8::internal
|
1125
|
+
|
1126
|
+
#endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
|