libv8 3.3.10.4 → 3.5.10.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/libv8/scons/CHANGES.txt +24 -231
- data/lib/libv8/scons/LICENSE.txt +1 -1
- data/lib/libv8/scons/MANIFEST +0 -1
- data/lib/libv8/scons/PKG-INFO +1 -1
- data/lib/libv8/scons/README.txt +9 -9
- data/lib/libv8/scons/RELEASE.txt +75 -77
- data/lib/libv8/scons/engine/SCons/Action.py +6 -22
- data/lib/libv8/scons/engine/SCons/Builder.py +2 -2
- data/lib/libv8/scons/engine/SCons/CacheDir.py +2 -2
- data/lib/libv8/scons/engine/SCons/Debug.py +2 -2
- data/lib/libv8/scons/engine/SCons/Defaults.py +10 -24
- data/lib/libv8/scons/engine/SCons/Environment.py +19 -118
- data/lib/libv8/scons/engine/SCons/Errors.py +2 -2
- data/lib/libv8/scons/engine/SCons/Executor.py +2 -2
- data/lib/libv8/scons/engine/SCons/Job.py +2 -2
- data/lib/libv8/scons/engine/SCons/Memoize.py +2 -2
- data/lib/libv8/scons/engine/SCons/Node/Alias.py +2 -2
- data/lib/libv8/scons/engine/SCons/Node/FS.py +121 -281
- data/lib/libv8/scons/engine/SCons/Node/Python.py +2 -2
- data/lib/libv8/scons/engine/SCons/Node/__init__.py +5 -6
- data/lib/libv8/scons/engine/SCons/Options/BoolOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/EnumOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/ListOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/PackageOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/PathOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/PathList.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/aix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/cygwin.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/darwin.py +3 -27
- data/lib/libv8/scons/engine/SCons/Platform/hpux.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/irix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/os2.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/posix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/sunos.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/win32.py +2 -2
- data/lib/libv8/scons/engine/SCons/SConf.py +2 -2
- data/lib/libv8/scons/engine/SCons/SConsign.py +3 -9
- data/lib/libv8/scons/engine/SCons/Scanner/C.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/D.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/Dir.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/Fortran.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/IDL.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/LaTeX.py +2 -5
- data/lib/libv8/scons/engine/SCons/Scanner/Prog.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/RC.py +3 -3
- data/lib/libv8/scons/engine/SCons/Scanner/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Script/Interactive.py +2 -2
- data/lib/libv8/scons/engine/SCons/Script/Main.py +11 -82
- data/lib/libv8/scons/engine/SCons/Script/SConsOptions.py +5 -5
- data/lib/libv8/scons/engine/SCons/Script/SConscript.py +2 -2
- data/lib/libv8/scons/engine/SCons/Script/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Sig.py +2 -2
- data/lib/libv8/scons/engine/SCons/Subst.py +2 -2
- data/lib/libv8/scons/engine/SCons/Taskmaster.py +2 -10
- data/lib/libv8/scons/engine/SCons/Tool/386asm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/BitKeeper.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/CVS.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/FortranCommon.py +2 -19
- data/lib/libv8/scons/engine/SCons/Tool/JavaCommon.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/arch.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/common.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/netframework.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/sdk.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vc.py +6 -9
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vs.py +2 -29
- data/lib/libv8/scons/engine/SCons/Tool/Perforce.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/PharLapCommon.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/RCS.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/SCCS.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/Subversion.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/__init__.py +3 -3
- data/lib/libv8/scons/engine/SCons/Tool/aixc++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/aixcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/aixf77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/aixlink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/applelink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/as.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/bcc32.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/c++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/cc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/cvf.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/default.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/dmd.py +7 -24
- data/lib/libv8/scons/engine/SCons/Tool/dvi.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/dvipdf.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/dvips.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/f77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/f90.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/f95.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/filesystem.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/fortran.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/g++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/g77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/gas.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/gcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/gfortran.py +3 -3
- data/lib/libv8/scons/engine/SCons/Tool/gnulink.py +3 -2
- data/lib/libv8/scons/engine/SCons/Tool/gs.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/hpc++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/hpcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/hplink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/icc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/icl.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ifl.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ifort.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ilink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ilink32.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/install.py +3 -57
- data/lib/libv8/scons/engine/SCons/Tool/intelc.py +25 -65
- data/lib/libv8/scons/engine/SCons/Tool/ipkg.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/jar.py +3 -9
- data/lib/libv8/scons/engine/SCons/Tool/javac.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/javah.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/latex.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/lex.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/link.py +5 -6
- data/lib/libv8/scons/engine/SCons/Tool/linkloc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/m4.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/masm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/midl.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/mingw.py +10 -31
- data/lib/libv8/scons/engine/SCons/Tool/mslib.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/mslink.py +9 -61
- data/lib/libv8/scons/engine/SCons/Tool/mssdk.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/msvc.py +11 -21
- data/lib/libv8/scons/engine/SCons/Tool/msvs.py +59 -477
- data/lib/libv8/scons/engine/SCons/Tool/mwcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/mwld.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/nasm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/ipk.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/msi.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/rpm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_tarbz2.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_targz.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_zip.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/tarbz2.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/targz.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/zip.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/pdf.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/pdflatex.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/pdftex.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/qt.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/rmic.py +3 -9
- data/lib/libv8/scons/engine/SCons/Tool/rpcgen.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/rpm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgiar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgic++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgicc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgilink.py +3 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunc++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/suncc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunf77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunf90.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunf95.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunlink.py +3 -2
- data/lib/libv8/scons/engine/SCons/Tool/swig.py +5 -6
- data/lib/libv8/scons/engine/SCons/Tool/tar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/tex.py +43 -96
- data/lib/libv8/scons/engine/SCons/Tool/textfile.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/tlib.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/wix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/yacc.py +2 -12
- data/lib/libv8/scons/engine/SCons/Tool/zip.py +2 -2
- data/lib/libv8/scons/engine/SCons/Util.py +3 -3
- data/lib/libv8/scons/engine/SCons/Variables/BoolVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/EnumVariable.py +3 -3
- data/lib/libv8/scons/engine/SCons/Variables/ListVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/PackageVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/PathVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Warnings.py +2 -2
- data/lib/libv8/scons/engine/SCons/__init__.py +6 -6
- data/lib/libv8/scons/engine/SCons/compat/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_builtins.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_collections.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_dbm.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_hashlib.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_io.py +2 -2
- data/lib/libv8/scons/engine/SCons/cpp.py +2 -2
- data/lib/libv8/scons/engine/SCons/dblite.py +1 -4
- data/lib/libv8/scons/engine/SCons/exitfuncs.py +2 -2
- data/lib/libv8/scons/scons-time.1 +3 -3
- data/lib/libv8/scons/scons.1 +1164 -1170
- data/lib/libv8/scons/sconsign.1 +3 -3
- data/lib/libv8/scons/script/scons +22 -22
- data/lib/libv8/scons/script/scons-time +2 -2
- data/lib/libv8/scons/script/scons.bat +4 -7
- data/lib/libv8/scons/script/sconsign +20 -21
- data/lib/libv8/scons/setup.cfg +1 -0
- data/lib/libv8/scons/setup.py +40 -38
- data/lib/libv8/v8/.gitignore +1 -1
- data/lib/libv8/v8/AUTHORS +2 -0
- data/lib/libv8/v8/ChangeLog +387 -0
- data/lib/libv8/v8/Makefile +171 -0
- data/lib/libv8/v8/SConstruct +124 -51
- data/lib/libv8/v8/build/README.txt +31 -14
- data/lib/libv8/v8/build/all.gyp +11 -4
- data/lib/libv8/v8/build/armu.gypi +6 -2
- data/lib/libv8/v8/build/common.gypi +240 -94
- data/lib/libv8/v8/build/gyp_v8 +32 -4
- data/lib/libv8/v8/build/standalone.gypi +200 -0
- data/lib/libv8/v8/include/v8-debug.h +0 -0
- data/lib/libv8/v8/include/v8-profiler.h +8 -11
- data/lib/libv8/v8/include/v8.h +191 -108
- data/lib/libv8/v8/preparser/SConscript +2 -2
- data/lib/libv8/v8/preparser/preparser-process.cc +3 -3
- data/lib/libv8/v8/preparser/preparser.gyp +42 -0
- data/lib/libv8/v8/src/SConscript +33 -8
- data/lib/libv8/v8/src/accessors.cc +77 -43
- data/lib/libv8/v8/src/api.cc +393 -191
- data/lib/libv8/v8/src/api.h +4 -8
- data/lib/libv8/v8/src/apinatives.js +15 -3
- data/lib/libv8/v8/src/arguments.h +8 -0
- data/lib/libv8/v8/src/arm/assembler-arm.cc +120 -120
- data/lib/libv8/v8/src/arm/assembler-arm.h +92 -43
- data/lib/libv8/v8/src/arm/builtins-arm.cc +32 -39
- data/lib/libv8/v8/src/arm/code-stubs-arm.cc +572 -351
- data/lib/libv8/v8/src/arm/code-stubs-arm.h +8 -77
- data/lib/libv8/v8/src/arm/codegen-arm.h +0 -2
- data/lib/libv8/v8/src/arm/deoptimizer-arm.cc +50 -30
- data/lib/libv8/v8/src/arm/disasm-arm.cc +1 -1
- data/lib/libv8/v8/src/arm/frames-arm.h +9 -5
- data/lib/libv8/v8/src/arm/full-codegen-arm.cc +331 -432
- data/lib/libv8/v8/src/arm/ic-arm.cc +192 -124
- data/lib/libv8/v8/src/arm/lithium-arm.cc +216 -232
- data/lib/libv8/v8/src/arm/lithium-arm.h +106 -259
- data/lib/libv8/v8/src/arm/lithium-codegen-arm.cc +633 -642
- data/lib/libv8/v8/src/arm/lithium-codegen-arm.h +4 -4
- data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.cc +1 -3
- data/lib/libv8/v8/src/arm/macro-assembler-arm.cc +260 -185
- data/lib/libv8/v8/src/arm/macro-assembler-arm.h +45 -25
- data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.cc +25 -13
- data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.h +3 -0
- data/lib/libv8/v8/src/arm/stub-cache-arm.cc +413 -226
- data/lib/libv8/v8/src/array.js +38 -18
- data/lib/libv8/v8/src/assembler.cc +12 -5
- data/lib/libv8/v8/src/assembler.h +15 -9
- data/lib/libv8/v8/src/ast-inl.h +34 -25
- data/lib/libv8/v8/src/ast.cc +141 -72
- data/lib/libv8/v8/src/ast.h +255 -181
- data/lib/libv8/v8/src/bignum.cc +3 -4
- data/lib/libv8/v8/src/bootstrapper.cc +55 -11
- data/lib/libv8/v8/src/bootstrapper.h +3 -2
- data/lib/libv8/v8/src/builtins.cc +8 -2
- data/lib/libv8/v8/src/builtins.h +4 -0
- data/lib/libv8/v8/src/cached-powers.cc +8 -4
- data/lib/libv8/v8/src/checks.h +3 -3
- data/lib/libv8/v8/src/code-stubs.cc +173 -28
- data/lib/libv8/v8/src/code-stubs.h +104 -148
- data/lib/libv8/v8/src/codegen.cc +8 -8
- data/lib/libv8/v8/src/compilation-cache.cc +2 -47
- data/lib/libv8/v8/src/compilation-cache.h +0 -10
- data/lib/libv8/v8/src/compiler.cc +27 -16
- data/lib/libv8/v8/src/compiler.h +13 -18
- data/lib/libv8/v8/src/contexts.cc +107 -72
- data/lib/libv8/v8/src/contexts.h +70 -34
- data/lib/libv8/v8/src/conversions-inl.h +572 -14
- data/lib/libv8/v8/src/conversions.cc +9 -707
- data/lib/libv8/v8/src/conversions.h +23 -12
- data/lib/libv8/v8/src/cpu-profiler-inl.h +2 -19
- data/lib/libv8/v8/src/cpu-profiler.cc +4 -21
- data/lib/libv8/v8/src/cpu-profiler.h +8 -17
- data/lib/libv8/v8/src/d8-debug.cc +5 -3
- data/lib/libv8/v8/src/d8-debug.h +6 -7
- data/lib/libv8/v8/src/d8-posix.cc +1 -10
- data/lib/libv8/v8/src/d8.cc +721 -219
- data/lib/libv8/v8/src/d8.gyp +37 -12
- data/lib/libv8/v8/src/d8.h +141 -19
- data/lib/libv8/v8/src/d8.js +17 -8
- data/lib/libv8/v8/src/date.js +16 -5
- data/lib/libv8/v8/src/dateparser-inl.h +242 -39
- data/lib/libv8/v8/src/dateparser.cc +38 -4
- data/lib/libv8/v8/src/dateparser.h +170 -28
- data/lib/libv8/v8/src/debug-agent.cc +5 -3
- data/lib/libv8/v8/src/debug-agent.h +11 -7
- data/lib/libv8/v8/src/debug-debugger.js +65 -34
- data/lib/libv8/v8/src/debug.cc +30 -60
- data/lib/libv8/v8/src/debug.h +5 -3
- data/lib/libv8/v8/src/deoptimizer.cc +227 -10
- data/lib/libv8/v8/src/deoptimizer.h +133 -9
- data/lib/libv8/v8/src/disassembler.cc +22 -14
- data/lib/libv8/v8/src/diy-fp.cc +4 -3
- data/lib/libv8/v8/src/diy-fp.h +3 -3
- data/lib/libv8/v8/src/elements.cc +634 -0
- data/lib/libv8/v8/src/elements.h +95 -0
- data/lib/libv8/v8/src/execution.cc +5 -21
- data/lib/libv8/v8/src/extensions/experimental/break-iterator.cc +3 -1
- data/lib/libv8/v8/src/extensions/experimental/break-iterator.h +1 -1
- data/lib/libv8/v8/src/extensions/experimental/collator.cc +6 -2
- data/lib/libv8/v8/src/extensions/experimental/collator.h +1 -2
- data/lib/libv8/v8/src/extensions/experimental/datetime-format.cc +384 -0
- data/lib/libv8/v8/src/extensions/experimental/datetime-format.h +83 -0
- data/lib/libv8/v8/src/extensions/experimental/experimental.gyp +18 -7
- data/lib/libv8/v8/src/extensions/experimental/i18n-extension.cc +12 -16
- data/lib/libv8/v8/src/extensions/experimental/i18n-extension.h +1 -1
- data/lib/libv8/v8/src/extensions/experimental/i18n-js2c.py +126 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-locale.cc +3 -4
- data/lib/libv8/v8/src/extensions/experimental/i18n-locale.h +1 -1
- data/lib/libv8/v8/src/{shell.h → extensions/experimental/i18n-natives.h} +8 -20
- data/lib/libv8/v8/src/extensions/experimental/i18n-utils.cc +45 -1
- data/lib/libv8/v8/src/extensions/experimental/i18n-utils.h +21 -1
- data/lib/libv8/v8/src/extensions/experimental/i18n.js +211 -11
- data/lib/libv8/v8/src/extensions/experimental/language-matcher.cc +4 -3
- data/lib/libv8/v8/src/extensions/experimental/language-matcher.h +1 -1
- data/lib/libv8/v8/src/extensions/experimental/number-format.cc +374 -0
- data/lib/libv8/v8/src/extensions/experimental/number-format.h +71 -0
- data/lib/libv8/v8/src/factory.cc +89 -18
- data/lib/libv8/v8/src/factory.h +36 -8
- data/lib/libv8/v8/src/flag-definitions.h +11 -44
- data/lib/libv8/v8/src/frames-inl.h +8 -1
- data/lib/libv8/v8/src/frames.cc +39 -3
- data/lib/libv8/v8/src/frames.h +10 -3
- data/lib/libv8/v8/src/full-codegen.cc +311 -293
- data/lib/libv8/v8/src/full-codegen.h +183 -143
- data/lib/libv8/v8/src/func-name-inferrer.cc +29 -15
- data/lib/libv8/v8/src/func-name-inferrer.h +19 -9
- data/lib/libv8/v8/src/gdb-jit.cc +658 -55
- data/lib/libv8/v8/src/gdb-jit.h +6 -2
- data/lib/libv8/v8/src/global-handles.cc +368 -312
- data/lib/libv8/v8/src/global-handles.h +29 -36
- data/lib/libv8/v8/src/globals.h +3 -1
- data/lib/libv8/v8/src/handles.cc +43 -69
- data/lib/libv8/v8/src/handles.h +21 -16
- data/lib/libv8/v8/src/heap-inl.h +11 -13
- data/lib/libv8/v8/src/heap-profiler.cc +0 -999
- data/lib/libv8/v8/src/heap-profiler.h +0 -303
- data/lib/libv8/v8/src/heap.cc +366 -141
- data/lib/libv8/v8/src/heap.h +87 -26
- data/lib/libv8/v8/src/hydrogen-instructions.cc +192 -81
- data/lib/libv8/v8/src/hydrogen-instructions.h +711 -482
- data/lib/libv8/v8/src/hydrogen.cc +1146 -629
- data/lib/libv8/v8/src/hydrogen.h +100 -64
- data/lib/libv8/v8/src/ia32/assembler-ia32.cc +19 -0
- data/lib/libv8/v8/src/ia32/assembler-ia32.h +15 -2
- data/lib/libv8/v8/src/ia32/builtins-ia32.cc +34 -39
- data/lib/libv8/v8/src/ia32/code-stubs-ia32.cc +675 -377
- data/lib/libv8/v8/src/ia32/code-stubs-ia32.h +8 -69
- data/lib/libv8/v8/src/ia32/codegen-ia32.cc +1 -0
- data/lib/libv8/v8/src/ia32/codegen-ia32.h +0 -2
- data/lib/libv8/v8/src/ia32/cpu-ia32.cc +3 -2
- data/lib/libv8/v8/src/ia32/deoptimizer-ia32.cc +28 -3
- data/lib/libv8/v8/src/ia32/disasm-ia32.cc +21 -10
- data/lib/libv8/v8/src/ia32/frames-ia32.h +6 -5
- data/lib/libv8/v8/src/ia32/full-codegen-ia32.cc +459 -465
- data/lib/libv8/v8/src/ia32/ic-ia32.cc +196 -147
- data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.cc +575 -650
- data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.h +19 -21
- data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.cc +7 -2
- data/lib/libv8/v8/src/ia32/lithium-ia32.cc +261 -256
- data/lib/libv8/v8/src/ia32/lithium-ia32.h +234 -335
- data/lib/libv8/v8/src/ia32/macro-assembler-ia32.cc +224 -67
- data/lib/libv8/v8/src/ia32/macro-assembler-ia32.h +63 -19
- data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.cc +22 -8
- data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.h +3 -0
- data/lib/libv8/v8/src/ia32/stub-cache-ia32.cc +380 -239
- data/lib/libv8/v8/src/ic.cc +198 -234
- data/lib/libv8/v8/src/ic.h +32 -30
- data/lib/libv8/v8/src/interpreter-irregexp.cc +6 -4
- data/lib/libv8/v8/src/isolate.cc +112 -95
- data/lib/libv8/v8/src/isolate.h +55 -71
- data/lib/libv8/v8/src/json-parser.h +486 -48
- data/lib/libv8/v8/src/json.js +28 -23
- data/lib/libv8/v8/src/jsregexp.cc +163 -208
- data/lib/libv8/v8/src/jsregexp.h +0 -1
- data/lib/libv8/v8/src/lithium-allocator-inl.h +29 -27
- data/lib/libv8/v8/src/lithium-allocator.cc +22 -17
- data/lib/libv8/v8/src/lithium-allocator.h +8 -8
- data/lib/libv8/v8/src/lithium.cc +16 -11
- data/lib/libv8/v8/src/lithium.h +31 -34
- data/lib/libv8/v8/src/liveedit.cc +111 -15
- data/lib/libv8/v8/src/liveedit.h +3 -4
- data/lib/libv8/v8/src/liveobjectlist.cc +116 -80
- data/lib/libv8/v8/src/liveobjectlist.h +2 -2
- data/lib/libv8/v8/src/log-inl.h +0 -4
- data/lib/libv8/v8/src/log-utils.cc +25 -143
- data/lib/libv8/v8/src/log-utils.h +13 -92
- data/lib/libv8/v8/src/log.cc +26 -249
- data/lib/libv8/v8/src/log.h +6 -17
- data/lib/libv8/v8/src/macros.py +9 -6
- data/lib/libv8/v8/src/mark-compact.cc +276 -56
- data/lib/libv8/v8/src/mark-compact.h +20 -0
- data/lib/libv8/v8/src/messages.js +93 -39
- data/lib/libv8/v8/src/mips/assembler-mips-inl.h +9 -3
- data/lib/libv8/v8/src/mips/assembler-mips.cc +297 -189
- data/lib/libv8/v8/src/mips/assembler-mips.h +121 -54
- data/lib/libv8/v8/src/mips/builtins-mips.cc +23 -24
- data/lib/libv8/v8/src/mips/code-stubs-mips.cc +484 -263
- data/lib/libv8/v8/src/mips/code-stubs-mips.h +8 -83
- data/lib/libv8/v8/src/mips/codegen-mips.h +0 -2
- data/lib/libv8/v8/src/mips/constants-mips.h +37 -11
- data/lib/libv8/v8/src/mips/deoptimizer-mips.cc +6 -1
- data/lib/libv8/v8/src/mips/frames-mips.h +8 -7
- data/lib/libv8/v8/src/mips/full-codegen-mips.cc +258 -419
- data/lib/libv8/v8/src/mips/ic-mips.cc +181 -121
- data/lib/libv8/v8/src/mips/macro-assembler-mips.cc +640 -382
- data/lib/libv8/v8/src/mips/macro-assembler-mips.h +94 -89
- data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.cc +23 -10
- data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.h +6 -1
- data/lib/libv8/v8/src/mips/simulator-mips.cc +249 -49
- data/lib/libv8/v8/src/mips/simulator-mips.h +25 -1
- data/lib/libv8/v8/src/mips/stub-cache-mips.cc +373 -161
- data/lib/libv8/v8/src/mirror-debugger.js +55 -8
- data/lib/libv8/v8/src/misc-intrinsics.h +89 -0
- data/lib/libv8/v8/src/mksnapshot.cc +36 -4
- data/lib/libv8/v8/src/natives.h +5 -2
- data/lib/libv8/v8/src/objects-debug.cc +73 -6
- data/lib/libv8/v8/src/objects-inl.h +529 -164
- data/lib/libv8/v8/src/objects-printer.cc +67 -12
- data/lib/libv8/v8/src/objects-visiting.cc +13 -2
- data/lib/libv8/v8/src/objects-visiting.h +41 -1
- data/lib/libv8/v8/src/objects.cc +2200 -1177
- data/lib/libv8/v8/src/objects.h +912 -283
- data/lib/libv8/v8/src/parser.cc +566 -371
- data/lib/libv8/v8/src/parser.h +35 -33
- data/lib/libv8/v8/src/platform-cygwin.cc +10 -25
- data/lib/libv8/v8/src/platform-freebsd.cc +4 -29
- data/lib/libv8/v8/src/platform-linux.cc +60 -57
- data/lib/libv8/v8/src/platform-macos.cc +4 -27
- data/lib/libv8/v8/src/platform-nullos.cc +3 -16
- data/lib/libv8/v8/src/platform-openbsd.cc +247 -85
- data/lib/libv8/v8/src/platform-posix.cc +43 -1
- data/lib/libv8/v8/src/platform-solaris.cc +151 -112
- data/lib/libv8/v8/src/platform-tls.h +1 -1
- data/lib/libv8/v8/src/platform-win32.cc +65 -39
- data/lib/libv8/v8/src/platform.h +17 -14
- data/lib/libv8/v8/src/preparse-data-format.h +2 -2
- data/lib/libv8/v8/src/preparse-data.h +8 -2
- data/lib/libv8/v8/src/preparser-api.cc +2 -18
- data/lib/libv8/v8/src/preparser.cc +106 -65
- data/lib/libv8/v8/src/preparser.h +26 -5
- data/lib/libv8/v8/src/prettyprinter.cc +25 -43
- data/lib/libv8/v8/src/profile-generator-inl.h +0 -4
- data/lib/libv8/v8/src/profile-generator.cc +213 -34
- data/lib/libv8/v8/src/profile-generator.h +9 -9
- data/lib/libv8/v8/src/property.h +1 -0
- data/lib/libv8/v8/src/proxy.js +74 -4
- data/lib/libv8/v8/src/regexp-macro-assembler.cc +10 -6
- data/lib/libv8/v8/src/regexp.js +16 -11
- data/lib/libv8/v8/src/rewriter.cc +24 -133
- data/lib/libv8/v8/src/runtime-profiler.cc +27 -151
- data/lib/libv8/v8/src/runtime-profiler.h +5 -31
- data/lib/libv8/v8/src/runtime.cc +1450 -681
- data/lib/libv8/v8/src/runtime.h +47 -31
- data/lib/libv8/v8/src/runtime.js +2 -1
- data/lib/libv8/v8/src/scanner-base.cc +358 -220
- data/lib/libv8/v8/src/scanner-base.h +30 -138
- data/lib/libv8/v8/src/scanner.cc +0 -18
- data/lib/libv8/v8/src/scanner.h +0 -15
- data/lib/libv8/v8/src/scopeinfo.cc +3 -1
- data/lib/libv8/v8/src/scopeinfo.h +1 -6
- data/lib/libv8/v8/src/scopes.cc +243 -253
- data/lib/libv8/v8/src/scopes.h +58 -109
- data/lib/libv8/v8/src/serialize.cc +12 -54
- data/lib/libv8/v8/src/serialize.h +47 -0
- data/lib/libv8/v8/src/small-pointer-list.h +25 -0
- data/lib/libv8/v8/src/spaces-inl.h +4 -50
- data/lib/libv8/v8/src/spaces.cc +64 -131
- data/lib/libv8/v8/src/spaces.h +19 -70
- data/lib/libv8/v8/src/string-stream.cc +3 -1
- data/lib/libv8/v8/src/string.js +10 -6
- data/lib/libv8/v8/src/strtod.cc +7 -3
- data/lib/libv8/v8/src/stub-cache.cc +59 -129
- data/lib/libv8/v8/src/stub-cache.h +42 -54
- data/lib/libv8/v8/src/third_party/valgrind/valgrind.h +1447 -1339
- data/lib/libv8/v8/src/token.cc +4 -4
- data/lib/libv8/v8/src/token.h +6 -5
- data/lib/libv8/v8/src/type-info.cc +173 -129
- data/lib/libv8/v8/src/type-info.h +40 -22
- data/lib/libv8/v8/src/utils.cc +25 -304
- data/lib/libv8/v8/src/utils.h +118 -3
- data/lib/libv8/v8/src/v8-counters.h +3 -6
- data/lib/libv8/v8/src/v8.cc +34 -27
- data/lib/libv8/v8/src/v8.h +7 -7
- data/lib/libv8/v8/src/v8conversions.cc +129 -0
- data/lib/libv8/v8/src/v8conversions.h +60 -0
- data/lib/libv8/v8/src/v8globals.h +15 -6
- data/lib/libv8/v8/src/v8natives.js +300 -78
- data/lib/libv8/v8/src/v8threads.cc +14 -6
- data/lib/libv8/v8/src/v8threads.h +4 -1
- data/lib/libv8/v8/src/v8utils.cc +360 -0
- data/lib/libv8/v8/src/v8utils.h +17 -66
- data/lib/libv8/v8/src/variables.cc +7 -12
- data/lib/libv8/v8/src/variables.h +12 -10
- data/lib/libv8/v8/src/version.cc +2 -2
- data/lib/libv8/v8/src/vm-state-inl.h +0 -41
- data/lib/libv8/v8/src/vm-state.h +0 -11
- data/lib/libv8/v8/src/weakmap.js +103 -0
- data/lib/libv8/v8/src/x64/assembler-x64.h +6 -3
- data/lib/libv8/v8/src/x64/builtins-x64.cc +25 -22
- data/lib/libv8/v8/src/x64/code-stubs-x64.cc +523 -250
- data/lib/libv8/v8/src/x64/code-stubs-x64.h +8 -71
- data/lib/libv8/v8/src/x64/codegen-x64.cc +1 -0
- data/lib/libv8/v8/src/x64/codegen-x64.h +0 -2
- data/lib/libv8/v8/src/x64/cpu-x64.cc +2 -1
- data/lib/libv8/v8/src/x64/deoptimizer-x64.cc +40 -8
- data/lib/libv8/v8/src/x64/disasm-x64.cc +12 -10
- data/lib/libv8/v8/src/x64/frames-x64.h +7 -6
- data/lib/libv8/v8/src/x64/full-codegen-x64.cc +310 -415
- data/lib/libv8/v8/src/x64/ic-x64.cc +180 -117
- data/lib/libv8/v8/src/x64/lithium-codegen-x64.cc +411 -523
- data/lib/libv8/v8/src/x64/lithium-codegen-x64.h +11 -6
- data/lib/libv8/v8/src/x64/lithium-x64.cc +191 -216
- data/lib/libv8/v8/src/x64/lithium-x64.h +112 -263
- data/lib/libv8/v8/src/x64/macro-assembler-x64.cc +177 -61
- data/lib/libv8/v8/src/x64/macro-assembler-x64.h +23 -7
- data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.cc +21 -9
- data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.h +6 -0
- data/lib/libv8/v8/src/x64/stub-cache-x64.cc +273 -107
- data/lib/libv8/v8/src/zone.cc +31 -22
- data/lib/libv8/v8/src/zone.h +12 -6
- data/lib/libv8/v8/tools/codemap.js +8 -0
- data/lib/libv8/v8/tools/gcmole/Makefile +43 -0
- data/lib/libv8/v8/tools/gcmole/gcmole.lua +0 -2
- data/lib/libv8/v8/tools/gdb-v8-support.py +154 -0
- data/lib/libv8/v8/tools/grokdump.py +44 -35
- data/lib/libv8/v8/tools/gyp/v8.gyp +94 -248
- data/lib/libv8/v8/tools/js2c.py +83 -52
- data/lib/libv8/v8/tools/linux-tick-processor +4 -6
- data/lib/libv8/v8/tools/ll_prof.py +3 -3
- data/lib/libv8/v8/tools/oom_dump/README +3 -1
- data/lib/libv8/v8/tools/presubmit.py +11 -4
- data/lib/libv8/v8/tools/profile.js +46 -2
- data/lib/libv8/v8/tools/splaytree.js +11 -0
- data/lib/libv8/v8/tools/stats-viewer.py +15 -11
- data/lib/libv8/v8/tools/test-wrapper-gypbuild.py +227 -0
- data/lib/libv8/v8/tools/test.py +28 -8
- data/lib/libv8/v8/tools/tickprocessor.js +0 -16
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +2 -2
- metadata +31 -19
- data/lib/libv8/scons/engine/SCons/Tool/f03.py +0 -63
- data/lib/libv8/v8/src/json-parser.cc +0 -504
@@ -661,7 +661,6 @@ bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type,
|
|
661
661
|
}
|
662
662
|
__ movq(rbx, ExternalReference::re_word_character_map());
|
663
663
|
ASSERT_EQ(0, word_character_map[0]); // Character '\0' is not a word char.
|
664
|
-
ExternalReference word_map = ExternalReference::re_word_character_map();
|
665
664
|
__ testb(Operand(rbx, current_character(), times_1, 0),
|
666
665
|
current_character());
|
667
666
|
BranchOrBacktrack(zero, on_no_match);
|
@@ -676,7 +675,6 @@ bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type,
|
|
676
675
|
}
|
677
676
|
__ movq(rbx, ExternalReference::re_word_character_map());
|
678
677
|
ASSERT_EQ(0, word_character_map[0]); // Character '\0' is not a word char.
|
679
|
-
ExternalReference word_map = ExternalReference::re_word_character_map();
|
680
678
|
__ testb(Operand(rbx, current_character(), times_1, 0),
|
681
679
|
current_character());
|
682
680
|
BranchOrBacktrack(not_zero, on_no_match);
|
@@ -1172,12 +1170,13 @@ int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address,
|
|
1172
1170
|
}
|
1173
1171
|
|
1174
1172
|
// Prepare for possible GC.
|
1175
|
-
HandleScope handles;
|
1173
|
+
HandleScope handles(isolate);
|
1176
1174
|
Handle<Code> code_handle(re_code);
|
1177
1175
|
|
1178
1176
|
Handle<String> subject(frame_entry<String*>(re_frame, kInputString));
|
1177
|
+
|
1179
1178
|
// Current string.
|
1180
|
-
bool is_ascii = subject->
|
1179
|
+
bool is_ascii = subject->IsAsciiRepresentationUnderneath();
|
1181
1180
|
|
1182
1181
|
ASSERT(re_code->instruction_start() <= *return_address);
|
1183
1182
|
ASSERT(*return_address <=
|
@@ -1186,7 +1185,7 @@ int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address,
|
|
1186
1185
|
MaybeObject* result = Execution::HandleStackGuardInterrupt();
|
1187
1186
|
|
1188
1187
|
if (*code_handle != re_code) { // Return address no longer valid
|
1189
|
-
intptr_t delta =
|
1188
|
+
intptr_t delta = code_handle->address() - re_code->address();
|
1190
1189
|
// Overwrite the return address on the stack.
|
1191
1190
|
*return_address += delta;
|
1192
1191
|
}
|
@@ -1195,8 +1194,20 @@ int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address,
|
|
1195
1194
|
return EXCEPTION;
|
1196
1195
|
}
|
1197
1196
|
|
1197
|
+
Handle<String> subject_tmp = subject;
|
1198
|
+
int slice_offset = 0;
|
1199
|
+
|
1200
|
+
// Extract the underlying string and the slice offset.
|
1201
|
+
if (StringShape(*subject_tmp).IsCons()) {
|
1202
|
+
subject_tmp = Handle<String>(ConsString::cast(*subject_tmp)->first());
|
1203
|
+
} else if (StringShape(*subject_tmp).IsSliced()) {
|
1204
|
+
SlicedString* slice = SlicedString::cast(*subject_tmp);
|
1205
|
+
subject_tmp = Handle<String>(slice->parent());
|
1206
|
+
slice_offset = slice->offset();
|
1207
|
+
}
|
1208
|
+
|
1198
1209
|
// String might have changed.
|
1199
|
-
if (
|
1210
|
+
if (subject_tmp->IsAsciiRepresentation() != is_ascii) {
|
1200
1211
|
// If we changed between an ASCII and an UC16 string, the specialized
|
1201
1212
|
// code cannot be used, and we need to restart regexp matching from
|
1202
1213
|
// scratch (including, potentially, compiling a new version of the code).
|
@@ -1207,8 +1218,8 @@ int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address,
|
|
1207
1218
|
// be a sequential or external string with the same content.
|
1208
1219
|
// Update the start and end pointers in the stack frame to the current
|
1209
1220
|
// location (whether it has actually moved or not).
|
1210
|
-
ASSERT(StringShape(*
|
1211
|
-
StringShape(*
|
1221
|
+
ASSERT(StringShape(*subject_tmp).IsSequential() ||
|
1222
|
+
StringShape(*subject_tmp).IsExternal());
|
1212
1223
|
|
1213
1224
|
// The original start address of the characters to match.
|
1214
1225
|
const byte* start_address = frame_entry<const byte*>(re_frame, kInputStart);
|
@@ -1216,7 +1227,8 @@ int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address,
|
|
1216
1227
|
// Find the current start address of the same character at the current string
|
1217
1228
|
// position.
|
1218
1229
|
int start_index = frame_entry<int>(re_frame, kStartIndex);
|
1219
|
-
const byte* new_address = StringCharacterPosition(*
|
1230
|
+
const byte* new_address = StringCharacterPosition(*subject_tmp,
|
1231
|
+
start_index + slice_offset);
|
1220
1232
|
|
1221
1233
|
if (start_address != new_address) {
|
1222
1234
|
// If there is a difference, update the object pointer and start and end
|
@@ -28,6 +28,12 @@
|
|
28
28
|
#ifndef V8_X64_REGEXP_MACRO_ASSEMBLER_X64_H_
|
29
29
|
#define V8_X64_REGEXP_MACRO_ASSEMBLER_X64_H_
|
30
30
|
|
31
|
+
#include "x64/assembler-x64.h"
|
32
|
+
#include "x64/assembler-x64-inl.h"
|
33
|
+
#include "macro-assembler.h"
|
34
|
+
#include "code.h"
|
35
|
+
#include "x64/macro-assembler-x64.h"
|
36
|
+
|
31
37
|
namespace v8 {
|
32
38
|
namespace internal {
|
33
39
|
|
@@ -105,7 +105,7 @@ MUST_USE_RESULT static MaybeObject* GenerateDictionaryNegativeLookup(
|
|
105
105
|
__ j(not_zero, miss_label);
|
106
106
|
|
107
107
|
// Check that receiver is a JSObject.
|
108
|
-
__ CmpInstanceType(r0,
|
108
|
+
__ CmpInstanceType(r0, FIRST_SPEC_OBJECT_TYPE);
|
109
109
|
__ j(below, miss_label);
|
110
110
|
|
111
111
|
// Load properties array.
|
@@ -258,7 +258,7 @@ static void GenerateStringCheck(MacroAssembler* masm,
|
|
258
258
|
// Check that the object is a string.
|
259
259
|
__ movq(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
|
260
260
|
__ movzxbq(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset));
|
261
|
-
|
261
|
+
STATIC_ASSERT(kNotStringTag != 0);
|
262
262
|
__ testl(scratch, Immediate(kNotStringTag));
|
263
263
|
__ j(not_zero, non_string_object);
|
264
264
|
}
|
@@ -478,10 +478,12 @@ class CallInterceptorCompiler BASE_EMBEDDED {
|
|
478
478
|
public:
|
479
479
|
CallInterceptorCompiler(StubCompiler* stub_compiler,
|
480
480
|
const ParameterCount& arguments,
|
481
|
-
Register name
|
481
|
+
Register name,
|
482
|
+
Code::ExtraICState extra_ic_state)
|
482
483
|
: stub_compiler_(stub_compiler),
|
483
484
|
arguments_(arguments),
|
484
|
-
name_(name)
|
485
|
+
name_(name),
|
486
|
+
extra_ic_state_(extra_ic_state) {}
|
485
487
|
|
486
488
|
MaybeObject* Compile(MacroAssembler* masm,
|
487
489
|
JSObject* object,
|
@@ -606,8 +608,11 @@ class CallInterceptorCompiler BASE_EMBEDDED {
|
|
606
608
|
arguments_.immediate());
|
607
609
|
if (result->IsFailure()) return result;
|
608
610
|
} else {
|
611
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
612
|
+
? CALL_AS_FUNCTION
|
613
|
+
: CALL_AS_METHOD;
|
609
614
|
__ InvokeFunction(optimization.constant_function(), arguments_,
|
610
|
-
JUMP_FUNCTION);
|
615
|
+
JUMP_FUNCTION, NullCallWrapper(), call_kind);
|
611
616
|
}
|
612
617
|
|
613
618
|
// Deferred code for fast API call case---clean preallocated space.
|
@@ -686,6 +691,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
|
|
686
691
|
StubCompiler* stub_compiler_;
|
687
692
|
const ParameterCount& arguments_;
|
688
693
|
Register name_;
|
694
|
+
Code::ExtraICState extra_ic_state_;
|
689
695
|
};
|
690
696
|
|
691
697
|
|
@@ -1083,9 +1089,8 @@ void StubCompiler::GenerateLoadConstant(JSObject* object,
|
|
1083
1089
|
__ JumpIfSmi(receiver, miss);
|
1084
1090
|
|
1085
1091
|
// Check that the maps haven't changed.
|
1086
|
-
|
1087
|
-
|
1088
|
-
scratch1, scratch2, scratch3, name, miss);
|
1092
|
+
CheckPrototypes(object, receiver, holder,
|
1093
|
+
scratch1, scratch2, scratch3, name, miss);
|
1089
1094
|
|
1090
1095
|
// Return the constant value.
|
1091
1096
|
__ Move(rax, Handle<Object>(value));
|
@@ -1348,7 +1353,11 @@ MaybeObject* CallStubCompiler::CompileCallField(JSObject* object,
|
|
1348
1353
|
}
|
1349
1354
|
|
1350
1355
|
// Invoke the function.
|
1351
|
-
|
1356
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
1357
|
+
? CALL_AS_FUNCTION
|
1358
|
+
: CALL_AS_METHOD;
|
1359
|
+
__ InvokeFunction(rdi, arguments(), JUMP_FUNCTION,
|
1360
|
+
NullCallWrapper(), call_kind);
|
1352
1361
|
|
1353
1362
|
// Handle call cache miss.
|
1354
1363
|
__ bind(&miss);
|
@@ -1831,7 +1840,11 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall(
|
|
1831
1840
|
// Tail call the full function. We do not have to patch the receiver
|
1832
1841
|
// because the function makes no use of it.
|
1833
1842
|
__ bind(&slow);
|
1834
|
-
|
1843
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
1844
|
+
? CALL_AS_FUNCTION
|
1845
|
+
: CALL_AS_METHOD;
|
1846
|
+
__ InvokeFunction(function, arguments(), JUMP_FUNCTION,
|
1847
|
+
NullCallWrapper(), call_kind);
|
1835
1848
|
|
1836
1849
|
__ bind(&miss);
|
1837
1850
|
// rcx: function name.
|
@@ -1944,7 +1957,11 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object,
|
|
1944
1957
|
// Tail call the full function. We do not have to patch the receiver
|
1945
1958
|
// because the function makes no use of it.
|
1946
1959
|
__ bind(&slow);
|
1947
|
-
|
1960
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
1961
|
+
? CALL_AS_FUNCTION
|
1962
|
+
: CALL_AS_METHOD;
|
1963
|
+
__ InvokeFunction(function, arguments(), JUMP_FUNCTION,
|
1964
|
+
NullCallWrapper(), call_kind);
|
1948
1965
|
|
1949
1966
|
__ bind(&miss);
|
1950
1967
|
// rcx: function name.
|
@@ -2138,7 +2155,11 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
|
|
2138
2155
|
UNREACHABLE();
|
2139
2156
|
}
|
2140
2157
|
|
2141
|
-
|
2158
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
2159
|
+
? CALL_AS_FUNCTION
|
2160
|
+
: CALL_AS_METHOD;
|
2161
|
+
__ InvokeFunction(function, arguments(), JUMP_FUNCTION,
|
2162
|
+
NullCallWrapper(), call_kind);
|
2142
2163
|
|
2143
2164
|
// Handle call cache miss.
|
2144
2165
|
__ bind(&miss);
|
@@ -2175,7 +2196,7 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
|
|
2175
2196
|
// Get the receiver from the stack.
|
2176
2197
|
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
|
2177
2198
|
|
2178
|
-
CallInterceptorCompiler compiler(this, arguments(), rcx);
|
2199
|
+
CallInterceptorCompiler compiler(this, arguments(), rcx, extra_ic_state_);
|
2179
2200
|
MaybeObject* result = compiler.Compile(masm(),
|
2180
2201
|
object,
|
2181
2202
|
holder,
|
@@ -2205,7 +2226,11 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
|
|
2205
2226
|
|
2206
2227
|
// Invoke the function.
|
2207
2228
|
__ movq(rdi, rax);
|
2208
|
-
|
2229
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
2230
|
+
? CALL_AS_FUNCTION
|
2231
|
+
: CALL_AS_METHOD;
|
2232
|
+
__ InvokeFunction(rdi, arguments(), JUMP_FUNCTION,
|
2233
|
+
NullCallWrapper(), call_kind);
|
2209
2234
|
|
2210
2235
|
// Handle load cache miss.
|
2211
2236
|
__ bind(&miss);
|
@@ -2217,13 +2242,11 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
|
|
2217
2242
|
}
|
2218
2243
|
|
2219
2244
|
|
2220
|
-
MaybeObject* CallStubCompiler::CompileCallGlobal(
|
2221
|
-
|
2222
|
-
|
2223
|
-
|
2224
|
-
|
2225
|
-
String* name,
|
2226
|
-
Code::ExtraICState extra_ic_state) {
|
2245
|
+
MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
|
2246
|
+
GlobalObject* holder,
|
2247
|
+
JSGlobalPropertyCell* cell,
|
2248
|
+
JSFunction* function,
|
2249
|
+
String* name) {
|
2227
2250
|
// ----------- S t a t e -------------
|
2228
2251
|
// rcx : function name
|
2229
2252
|
// rsp[0] : return address
|
@@ -2268,7 +2291,7 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(
|
|
2268
2291
|
__ IncrementCounter(counters->call_global_inline(), 1);
|
2269
2292
|
ASSERT(function->is_compiled());
|
2270
2293
|
ParameterCount expected(function->shared()->formal_parameter_count());
|
2271
|
-
CallKind call_kind = CallICBase::Contextual::decode(
|
2294
|
+
CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_)
|
2272
2295
|
? CALL_AS_FUNCTION
|
2273
2296
|
: CALL_AS_METHOD;
|
2274
2297
|
if (V8::UseCrankshaft()) {
|
@@ -2506,18 +2529,18 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
|
|
2506
2529
|
}
|
2507
2530
|
|
2508
2531
|
|
2509
|
-
MaybeObject* KeyedStoreStubCompiler::
|
2510
|
-
Map* receiver_map) {
|
2532
|
+
MaybeObject* KeyedStoreStubCompiler::CompileStoreElement(Map* receiver_map) {
|
2511
2533
|
// ----------- S t a t e -------------
|
2512
2534
|
// -- rax : value
|
2513
2535
|
// -- rcx : key
|
2514
2536
|
// -- rdx : receiver
|
2515
2537
|
// -- rsp[0] : return address
|
2516
2538
|
// -----------------------------------
|
2539
|
+
Code* stub;
|
2540
|
+
JSObject::ElementsKind elements_kind = receiver_map->elements_kind();
|
2517
2541
|
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
|
2518
2542
|
MaybeObject* maybe_stub =
|
2519
|
-
|
2520
|
-
Code* stub;
|
2543
|
+
KeyedStoreElementStub(is_js_array, elements_kind).TryGetCode();
|
2521
2544
|
if (!maybe_stub->To(&stub)) return maybe_stub;
|
2522
2545
|
__ DispatchMap(rdx,
|
2523
2546
|
Handle<Map>(receiver_map),
|
@@ -2966,14 +2989,15 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
|
|
2966
2989
|
}
|
2967
2990
|
|
2968
2991
|
|
2969
|
-
MaybeObject* KeyedLoadStubCompiler::
|
2992
|
+
MaybeObject* KeyedLoadStubCompiler::CompileLoadElement(Map* receiver_map) {
|
2970
2993
|
// ----------- S t a t e -------------
|
2971
2994
|
// -- rax : key
|
2972
2995
|
// -- rdx : receiver
|
2973
2996
|
// -- rsp[0] : return address
|
2974
2997
|
// -----------------------------------
|
2975
|
-
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
|
2976
2998
|
Code* stub;
|
2999
|
+
JSObject::ElementsKind elements_kind = receiver_map->elements_kind();
|
3000
|
+
MaybeObject* maybe_stub = KeyedLoadElementStub(elements_kind).TryGetCode();
|
2977
3001
|
if (!maybe_stub->To(&stub)) return maybe_stub;
|
2978
3002
|
__ DispatchMap(rdx,
|
2979
3003
|
Handle<Map>(receiver_map),
|
@@ -3046,7 +3070,7 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
|
|
3046
3070
|
// Load the initial map and verify that it is in fact a map.
|
3047
3071
|
__ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
|
3048
3072
|
// Will both indicate a NULL and a Smi.
|
3049
|
-
|
3073
|
+
STATIC_ASSERT(kSmiTag == 0);
|
3050
3074
|
__ JumpIfSmi(rbx, &generic_stub_call);
|
3051
3075
|
__ CmpObjectType(rbx, MAP_TYPE, rcx);
|
3052
3076
|
__ j(not_equal, &generic_stub_call);
|
@@ -3152,60 +3176,58 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
|
|
3152
3176
|
}
|
3153
3177
|
|
3154
3178
|
|
3155
|
-
|
3156
|
-
|
3179
|
+
#undef __
|
3180
|
+
#define __ ACCESS_MASM(masm)
|
3181
|
+
|
3182
|
+
|
3183
|
+
void KeyedLoadStubCompiler::GenerateLoadDictionaryElement(
|
3184
|
+
MacroAssembler* masm) {
|
3157
3185
|
// ----------- S t a t e -------------
|
3158
3186
|
// -- rax : key
|
3159
3187
|
// -- rdx : receiver
|
3160
3188
|
// -- rsp[0] : return address
|
3161
3189
|
// -----------------------------------
|
3162
|
-
|
3163
|
-
KeyedLoadExternalArrayStub(array_type).TryGetCode();
|
3164
|
-
Code* stub;
|
3165
|
-
if (!maybe_stub->To(&stub)) return maybe_stub;
|
3166
|
-
__ DispatchMap(rdx,
|
3167
|
-
Handle<Map>(receiver->map()),
|
3168
|
-
Handle<Code>(stub),
|
3169
|
-
DO_SMI_CHECK);
|
3190
|
+
Label slow, miss_force_generic;
|
3170
3191
|
|
3171
|
-
|
3172
|
-
|
3192
|
+
// This stub is meant to be tail-jumped to, the receiver must already
|
3193
|
+
// have been verified by the caller to not be a smi.
|
3173
3194
|
|
3174
|
-
|
3175
|
-
|
3176
|
-
|
3195
|
+
__ JumpIfNotSmi(rax, &miss_force_generic);
|
3196
|
+
__ SmiToInteger32(rbx, rax);
|
3197
|
+
__ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset));
|
3198
|
+
|
3199
|
+
// Check whether the elements is a number dictionary.
|
3200
|
+
// rdx: receiver
|
3201
|
+
// rax: key
|
3202
|
+
// rbx: key as untagged int32
|
3203
|
+
// rcx: elements
|
3204
|
+
__ LoadFromNumberDictionary(&slow, rcx, rax, rbx, r9, rdi, rax);
|
3205
|
+
__ ret(0);
|
3177
3206
|
|
3178
|
-
|
3179
|
-
JSObject* receiver, ExternalArrayType array_type) {
|
3207
|
+
__ bind(&slow);
|
3180
3208
|
// ----------- S t a t e -------------
|
3181
|
-
// -- rax :
|
3182
|
-
// -- rcx : key
|
3209
|
+
// -- rax : key
|
3183
3210
|
// -- rdx : receiver
|
3184
|
-
// -- rsp[0]
|
3211
|
+
// -- rsp[0] : return address
|
3185
3212
|
// -----------------------------------
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
if (!maybe_stub->To(&stub)) return maybe_stub;
|
3190
|
-
__ DispatchMap(rdx,
|
3191
|
-
Handle<Map>(receiver->map()),
|
3192
|
-
Handle<Code>(stub),
|
3193
|
-
DO_SMI_CHECK);
|
3213
|
+
Handle<Code> slow_ic =
|
3214
|
+
masm->isolate()->builtins()->KeyedLoadIC_Slow();
|
3215
|
+
__ jmp(slow_ic, RelocInfo::CODE_TARGET);
|
3194
3216
|
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3217
|
+
__ bind(&miss_force_generic);
|
3218
|
+
// ----------- S t a t e -------------
|
3219
|
+
// -- rax : key
|
3220
|
+
// -- rdx : receiver
|
3221
|
+
// -- rsp[0] : return address
|
3222
|
+
// -----------------------------------
|
3223
|
+
Handle<Code> miss_ic =
|
3224
|
+
masm->isolate()->builtins()->KeyedLoadIC_MissForceGeneric();
|
3225
|
+
__ jmp(miss_ic, RelocInfo::CODE_TARGET);
|
3199
3226
|
}
|
3200
3227
|
|
3201
|
-
|
3202
|
-
#undef __
|
3203
|
-
#define __ ACCESS_MASM(masm)
|
3204
|
-
|
3205
|
-
|
3206
3228
|
void KeyedLoadStubCompiler::GenerateLoadExternalArray(
|
3207
3229
|
MacroAssembler* masm,
|
3208
|
-
|
3230
|
+
JSObject::ElementsKind elements_kind) {
|
3209
3231
|
// ----------- S t a t e -------------
|
3210
3232
|
// -- rax : key
|
3211
3233
|
// -- rdx : receiver
|
@@ -3222,7 +3244,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
|
|
3222
3244
|
// Check that the index is in range.
|
3223
3245
|
__ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
|
3224
3246
|
__ SmiToInteger32(rcx, rax);
|
3225
|
-
__
|
3247
|
+
__ cmpq(rax, FieldOperand(rbx, ExternalArray::kLengthOffset));
|
3226
3248
|
// Unsigned comparison catches both negative and too-large values.
|
3227
3249
|
__ j(above_equal, &miss_force_generic);
|
3228
3250
|
|
@@ -3232,30 +3254,30 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
|
|
3232
3254
|
// rbx: elements array
|
3233
3255
|
__ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset));
|
3234
3256
|
// rbx: base pointer of external storage
|
3235
|
-
switch (
|
3236
|
-
case
|
3257
|
+
switch (elements_kind) {
|
3258
|
+
case JSObject::EXTERNAL_BYTE_ELEMENTS:
|
3237
3259
|
__ movsxbq(rcx, Operand(rbx, rcx, times_1, 0));
|
3238
3260
|
break;
|
3239
|
-
case
|
3240
|
-
case
|
3261
|
+
case JSObject::EXTERNAL_PIXEL_ELEMENTS:
|
3262
|
+
case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
|
3241
3263
|
__ movzxbq(rcx, Operand(rbx, rcx, times_1, 0));
|
3242
3264
|
break;
|
3243
|
-
case
|
3265
|
+
case JSObject::EXTERNAL_SHORT_ELEMENTS:
|
3244
3266
|
__ movsxwq(rcx, Operand(rbx, rcx, times_2, 0));
|
3245
3267
|
break;
|
3246
|
-
case
|
3268
|
+
case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
|
3247
3269
|
__ movzxwq(rcx, Operand(rbx, rcx, times_2, 0));
|
3248
3270
|
break;
|
3249
|
-
case
|
3271
|
+
case JSObject::EXTERNAL_INT_ELEMENTS:
|
3250
3272
|
__ movsxlq(rcx, Operand(rbx, rcx, times_4, 0));
|
3251
3273
|
break;
|
3252
|
-
case
|
3274
|
+
case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
|
3253
3275
|
__ movl(rcx, Operand(rbx, rcx, times_4, 0));
|
3254
3276
|
break;
|
3255
|
-
case
|
3277
|
+
case JSObject::EXTERNAL_FLOAT_ELEMENTS:
|
3256
3278
|
__ cvtss2sd(xmm0, Operand(rbx, rcx, times_4, 0));
|
3257
3279
|
break;
|
3258
|
-
case
|
3280
|
+
case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
|
3259
3281
|
__ movsd(xmm0, Operand(rbx, rcx, times_8, 0));
|
3260
3282
|
break;
|
3261
3283
|
default:
|
@@ -3271,7 +3293,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
|
|
3271
3293
|
// xmm0: value as double.
|
3272
3294
|
|
3273
3295
|
ASSERT(kSmiValueSize == 32);
|
3274
|
-
if (
|
3296
|
+
if (elements_kind == JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS) {
|
3275
3297
|
// For the UnsignedInt array type, we need to see whether
|
3276
3298
|
// the value can be represented in a Smi. If not, we need to convert
|
3277
3299
|
// it to a HeapNumber.
|
@@ -3295,8 +3317,8 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
|
|
3295
3317
|
__ movsd(FieldOperand(rcx, HeapNumber::kValueOffset), xmm0);
|
3296
3318
|
__ movq(rax, rcx);
|
3297
3319
|
__ ret(0);
|
3298
|
-
} else if (
|
3299
|
-
|
3320
|
+
} else if (elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS ||
|
3321
|
+
elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS) {
|
3300
3322
|
// For the floating-point array type, we need to always allocate a
|
3301
3323
|
// HeapNumber.
|
3302
3324
|
__ AllocateHeapNumber(rcx, rbx, &slow);
|
@@ -3339,7 +3361,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
|
|
3339
3361
|
|
3340
3362
|
void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
3341
3363
|
MacroAssembler* masm,
|
3342
|
-
|
3364
|
+
JSObject::ElementsKind elements_kind) {
|
3343
3365
|
// ----------- S t a t e -------------
|
3344
3366
|
// -- rax : value
|
3345
3367
|
// -- rcx : key
|
@@ -3357,7 +3379,7 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
|
3357
3379
|
// Check that the index is in range.
|
3358
3380
|
__ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
|
3359
3381
|
__ SmiToInteger32(rdi, rcx); // Untag the index.
|
3360
|
-
__
|
3382
|
+
__ cmpq(rcx, FieldOperand(rbx, ExternalArray::kLengthOffset));
|
3361
3383
|
// Unsigned comparison catches both negative and too-large values.
|
3362
3384
|
__ j(above_equal, &miss_force_generic);
|
3363
3385
|
|
@@ -3369,7 +3391,7 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
|
3369
3391
|
// rbx: elements array
|
3370
3392
|
// rdi: untagged key
|
3371
3393
|
Label check_heap_number;
|
3372
|
-
if (
|
3394
|
+
if (elements_kind == JSObject::EXTERNAL_PIXEL_ELEMENTS) {
|
3373
3395
|
// Float to pixel conversion is only implemented in the runtime for now.
|
3374
3396
|
__ JumpIfNotSmi(rax, &slow);
|
3375
3397
|
} else {
|
@@ -3379,8 +3401,8 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
|
3379
3401
|
__ SmiToInteger32(rdx, rax);
|
3380
3402
|
__ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset));
|
3381
3403
|
// rbx: base pointer of external storage
|
3382
|
-
switch (
|
3383
|
-
case
|
3404
|
+
switch (elements_kind) {
|
3405
|
+
case JSObject::EXTERNAL_PIXEL_ELEMENTS:
|
3384
3406
|
{ // Clamp the value to [0..255].
|
3385
3407
|
Label done;
|
3386
3408
|
__ testl(rdx, Immediate(0xFFFFFF00));
|
@@ -3391,36 +3413,39 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
|
3391
3413
|
}
|
3392
3414
|
__ movb(Operand(rbx, rdi, times_1, 0), rdx);
|
3393
3415
|
break;
|
3394
|
-
case
|
3395
|
-
case
|
3416
|
+
case JSObject::EXTERNAL_BYTE_ELEMENTS:
|
3417
|
+
case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
|
3396
3418
|
__ movb(Operand(rbx, rdi, times_1, 0), rdx);
|
3397
3419
|
break;
|
3398
|
-
case
|
3399
|
-
case
|
3420
|
+
case JSObject::EXTERNAL_SHORT_ELEMENTS:
|
3421
|
+
case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
|
3400
3422
|
__ movw(Operand(rbx, rdi, times_2, 0), rdx);
|
3401
3423
|
break;
|
3402
|
-
case
|
3403
|
-
case
|
3424
|
+
case JSObject::EXTERNAL_INT_ELEMENTS:
|
3425
|
+
case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
|
3404
3426
|
__ movl(Operand(rbx, rdi, times_4, 0), rdx);
|
3405
3427
|
break;
|
3406
|
-
case
|
3428
|
+
case JSObject::EXTERNAL_FLOAT_ELEMENTS:
|
3407
3429
|
// Need to perform int-to-float conversion.
|
3408
3430
|
__ cvtlsi2ss(xmm0, rdx);
|
3409
3431
|
__ movss(Operand(rbx, rdi, times_4, 0), xmm0);
|
3410
3432
|
break;
|
3411
|
-
case
|
3433
|
+
case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
|
3412
3434
|
// Need to perform int-to-float conversion.
|
3413
3435
|
__ cvtlsi2sd(xmm0, rdx);
|
3414
3436
|
__ movsd(Operand(rbx, rdi, times_8, 0), xmm0);
|
3415
3437
|
break;
|
3416
|
-
|
3438
|
+
case JSObject::FAST_ELEMENTS:
|
3439
|
+
case JSObject::FAST_DOUBLE_ELEMENTS:
|
3440
|
+
case JSObject::DICTIONARY_ELEMENTS:
|
3441
|
+
case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS:
|
3417
3442
|
UNREACHABLE();
|
3418
3443
|
break;
|
3419
3444
|
}
|
3420
3445
|
__ ret(0);
|
3421
3446
|
|
3422
3447
|
// TODO(danno): handle heap number -> pixel array conversion
|
3423
|
-
if (
|
3448
|
+
if (elements_kind != JSObject::EXTERNAL_PIXEL_ELEMENTS) {
|
3424
3449
|
__ bind(&check_heap_number);
|
3425
3450
|
// rax: value
|
3426
3451
|
// rcx: key (a smi)
|
@@ -3439,11 +3464,11 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
|
3439
3464
|
// rdi: untagged index
|
3440
3465
|
// rbx: base pointer of external storage
|
3441
3466
|
// top of FPU stack: value
|
3442
|
-
if (
|
3467
|
+
if (elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) {
|
3443
3468
|
__ cvtsd2ss(xmm0, xmm0);
|
3444
3469
|
__ movss(Operand(rbx, rdi, times_4, 0), xmm0);
|
3445
3470
|
__ ret(0);
|
3446
|
-
} else if (
|
3471
|
+
} else if (elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS) {
|
3447
3472
|
__ movsd(Operand(rbx, rdi, times_8, 0), xmm0);
|
3448
3473
|
__ ret(0);
|
3449
3474
|
} else {
|
@@ -3456,26 +3481,31 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
|
|
3456
3481
|
// rdx: value (converted to an untagged integer)
|
3457
3482
|
// rdi: untagged index
|
3458
3483
|
// rbx: base pointer of external storage
|
3459
|
-
switch (
|
3460
|
-
case
|
3461
|
-
case
|
3484
|
+
switch (elements_kind) {
|
3485
|
+
case JSObject::EXTERNAL_BYTE_ELEMENTS:
|
3486
|
+
case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
|
3462
3487
|
__ cvttsd2si(rdx, xmm0);
|
3463
3488
|
__ movb(Operand(rbx, rdi, times_1, 0), rdx);
|
3464
3489
|
break;
|
3465
|
-
case
|
3466
|
-
case
|
3490
|
+
case JSObject::EXTERNAL_SHORT_ELEMENTS:
|
3491
|
+
case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
|
3467
3492
|
__ cvttsd2si(rdx, xmm0);
|
3468
3493
|
__ movw(Operand(rbx, rdi, times_2, 0), rdx);
|
3469
3494
|
break;
|
3470
|
-
case
|
3471
|
-
case
|
3495
|
+
case JSObject::EXTERNAL_INT_ELEMENTS:
|
3496
|
+
case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
|
3472
3497
|
// Convert to int64, so that NaN and infinities become
|
3473
3498
|
// 0x8000000000000000, which is zero mod 2^32.
|
3474
3499
|
__ cvttsd2siq(rdx, xmm0);
|
3475
3500
|
__ movl(Operand(rbx, rdi, times_4, 0), rdx);
|
3476
3501
|
break;
|
3477
|
-
|
3478
|
-
|
3502
|
+
case JSObject::EXTERNAL_PIXEL_ELEMENTS:
|
3503
|
+
case JSObject::EXTERNAL_FLOAT_ELEMENTS:
|
3504
|
+
case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
|
3505
|
+
case JSObject::FAST_ELEMENTS:
|
3506
|
+
case JSObject::FAST_DOUBLE_ELEMENTS:
|
3507
|
+
case JSObject::DICTIONARY_ELEMENTS:
|
3508
|
+
case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS:
|
3479
3509
|
UNREACHABLE();
|
3480
3510
|
break;
|
3481
3511
|
}
|
@@ -3553,6 +3583,57 @@ void KeyedLoadStubCompiler::GenerateLoadFastElement(MacroAssembler* masm) {
|
|
3553
3583
|
}
|
3554
3584
|
|
3555
3585
|
|
3586
|
+
void KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(
|
3587
|
+
MacroAssembler* masm) {
|
3588
|
+
// ----------- S t a t e -------------
|
3589
|
+
// -- rax : key
|
3590
|
+
// -- rdx : receiver
|
3591
|
+
// -- rsp[0] : return address
|
3592
|
+
// -----------------------------------
|
3593
|
+
Label miss_force_generic, slow_allocate_heapnumber;
|
3594
|
+
|
3595
|
+
// This stub is meant to be tail-jumped to, the receiver must already
|
3596
|
+
// have been verified by the caller to not be a smi.
|
3597
|
+
|
3598
|
+
// Check that the key is a smi.
|
3599
|
+
__ JumpIfNotSmi(rax, &miss_force_generic);
|
3600
|
+
|
3601
|
+
// Get the elements array.
|
3602
|
+
__ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset));
|
3603
|
+
__ AssertFastElements(rcx);
|
3604
|
+
|
3605
|
+
// Check that the key is within bounds.
|
3606
|
+
__ SmiCompare(rax, FieldOperand(rcx, FixedArray::kLengthOffset));
|
3607
|
+
__ j(above_equal, &miss_force_generic);
|
3608
|
+
|
3609
|
+
// Check for the hole
|
3610
|
+
__ SmiToInteger32(kScratchRegister, rax);
|
3611
|
+
uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32);
|
3612
|
+
__ cmpl(FieldOperand(rcx, kScratchRegister, times_8, offset),
|
3613
|
+
Immediate(kHoleNanUpper32));
|
3614
|
+
__ j(equal, &miss_force_generic);
|
3615
|
+
|
3616
|
+
// Always allocate a heap number for the result.
|
3617
|
+
__ movsd(xmm0, FieldOperand(rcx, kScratchRegister, times_8,
|
3618
|
+
FixedDoubleArray::kHeaderSize));
|
3619
|
+
__ AllocateHeapNumber(rcx, rbx, &slow_allocate_heapnumber);
|
3620
|
+
// Set the value.
|
3621
|
+
__ movq(rax, rcx);
|
3622
|
+
__ movsd(FieldOperand(rcx, HeapNumber::kValueOffset), xmm0);
|
3623
|
+
__ ret(0);
|
3624
|
+
|
3625
|
+
__ bind(&slow_allocate_heapnumber);
|
3626
|
+
Handle<Code> slow_ic =
|
3627
|
+
masm->isolate()->builtins()->KeyedLoadIC_Slow();
|
3628
|
+
__ jmp(slow_ic, RelocInfo::CODE_TARGET);
|
3629
|
+
|
3630
|
+
__ bind(&miss_force_generic);
|
3631
|
+
Handle<Code> miss_ic =
|
3632
|
+
masm->isolate()->builtins()->KeyedLoadIC_MissForceGeneric();
|
3633
|
+
__ jmp(miss_ic, RelocInfo::CODE_TARGET);
|
3634
|
+
}
|
3635
|
+
|
3636
|
+
|
3556
3637
|
void KeyedStoreStubCompiler::GenerateStoreFastElement(MacroAssembler* masm,
|
3557
3638
|
bool is_js_array) {
|
3558
3639
|
// ----------- S t a t e -------------
|
@@ -3603,6 +3684,91 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement(MacroAssembler* masm,
|
|
3603
3684
|
}
|
3604
3685
|
|
3605
3686
|
|
3687
|
+
void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
|
3688
|
+
MacroAssembler* masm,
|
3689
|
+
bool is_js_array) {
|
3690
|
+
// ----------- S t a t e -------------
|
3691
|
+
// -- rax : value
|
3692
|
+
// -- rcx : key
|
3693
|
+
// -- rdx : receiver
|
3694
|
+
// -- rsp[0] : return address
|
3695
|
+
// -----------------------------------
|
3696
|
+
Label miss_force_generic, smi_value, is_nan, maybe_nan;
|
3697
|
+
Label have_double_value, not_nan;
|
3698
|
+
|
3699
|
+
// This stub is meant to be tail-jumped to, the receiver must already
|
3700
|
+
// have been verified by the caller to not be a smi.
|
3701
|
+
|
3702
|
+
// Check that the key is a smi.
|
3703
|
+
__ JumpIfNotSmi(rcx, &miss_force_generic);
|
3704
|
+
|
3705
|
+
// Get the elements array.
|
3706
|
+
__ movq(rdi, FieldOperand(rdx, JSObject::kElementsOffset));
|
3707
|
+
__ AssertFastElements(rdi);
|
3708
|
+
|
3709
|
+
// Check that the key is within bounds.
|
3710
|
+
if (is_js_array) {
|
3711
|
+
__ SmiCompare(rcx, FieldOperand(rdx, JSArray::kLengthOffset));
|
3712
|
+
} else {
|
3713
|
+
__ SmiCompare(rcx, FieldOperand(rdi, FixedDoubleArray::kLengthOffset));
|
3714
|
+
}
|
3715
|
+
__ j(above_equal, &miss_force_generic);
|
3716
|
+
|
3717
|
+
// Handle smi values specially
|
3718
|
+
__ JumpIfSmi(rax, &smi_value, Label::kNear);
|
3719
|
+
|
3720
|
+
__ CheckMap(rax,
|
3721
|
+
masm->isolate()->factory()->heap_number_map(),
|
3722
|
+
&miss_force_generic,
|
3723
|
+
DONT_DO_SMI_CHECK);
|
3724
|
+
|
3725
|
+
// Double value, canonicalize NaN.
|
3726
|
+
uint32_t offset = HeapNumber::kValueOffset + sizeof(kHoleNanLower32);
|
3727
|
+
__ cmpl(FieldOperand(rax, offset),
|
3728
|
+
Immediate(kNaNOrInfinityLowerBoundUpper32));
|
3729
|
+
__ j(greater_equal, &maybe_nan, Label::kNear);
|
3730
|
+
|
3731
|
+
__ bind(¬_nan);
|
3732
|
+
__ movsd(xmm0, FieldOperand(rax, HeapNumber::kValueOffset));
|
3733
|
+
__ bind(&have_double_value);
|
3734
|
+
__ SmiToInteger32(rcx, rcx);
|
3735
|
+
__ movsd(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize),
|
3736
|
+
xmm0);
|
3737
|
+
__ ret(0);
|
3738
|
+
|
3739
|
+
__ bind(&maybe_nan);
|
3740
|
+
// Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise
|
3741
|
+
// it's an Infinity, and the non-NaN code path applies.
|
3742
|
+
__ j(greater, &is_nan, Label::kNear);
|
3743
|
+
__ cmpl(FieldOperand(rax, HeapNumber::kValueOffset), Immediate(0));
|
3744
|
+
__ j(zero, ¬_nan);
|
3745
|
+
__ bind(&is_nan);
|
3746
|
+
// Convert all NaNs to the same canonical NaN value when they are stored in
|
3747
|
+
// the double array.
|
3748
|
+
__ Set(kScratchRegister, BitCast<uint64_t>(
|
3749
|
+
FixedDoubleArray::canonical_not_the_hole_nan_as_double()));
|
3750
|
+
__ movq(xmm0, kScratchRegister);
|
3751
|
+
__ jmp(&have_double_value, Label::kNear);
|
3752
|
+
|
3753
|
+
__ bind(&smi_value);
|
3754
|
+
// Value is a smi. convert to a double and store.
|
3755
|
+
// Preserve original value.
|
3756
|
+
__ SmiToInteger32(rdx, rax);
|
3757
|
+
__ push(rdx);
|
3758
|
+
__ fild_s(Operand(rsp, 0));
|
3759
|
+
__ pop(rdx);
|
3760
|
+
__ SmiToInteger32(rcx, rcx);
|
3761
|
+
__ fstp_d(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize));
|
3762
|
+
__ ret(0);
|
3763
|
+
|
3764
|
+
// Handle store cache miss, replacing the ic with the generic stub.
|
3765
|
+
__ bind(&miss_force_generic);
|
3766
|
+
Handle<Code> ic_force_generic =
|
3767
|
+
masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
|
3768
|
+
__ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
|
3769
|
+
}
|
3770
|
+
|
3771
|
+
|
3606
3772
|
#undef __
|
3607
3773
|
|
3608
3774
|
} } // namespace v8::internal
|