libv8 3.3.10.4 → 3.5.10.beta1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -158,7 +158,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
|
|
158
158
|
__ lw(a3, MemOperand(sp, 0));
|
159
159
|
|
160
160
|
// Setup the object header.
|
161
|
-
__ LoadRoot(a2, Heap::
|
161
|
+
__ LoadRoot(a2, Heap::kFunctionContextMapRootIndex);
|
162
162
|
__ sw(a2, FieldMemOperand(v0, HeapObject::kMapOffset));
|
163
163
|
__ li(a2, Operand(Smi::FromInt(length)));
|
164
164
|
__ sw(a2, FieldMemOperand(v0, FixedArray::kLengthOffset));
|
@@ -166,11 +166,10 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
|
|
166
166
|
// Setup the fixed slots.
|
167
167
|
__ li(a1, Operand(Smi::FromInt(0)));
|
168
168
|
__ sw(a3, MemOperand(v0, Context::SlotOffset(Context::CLOSURE_INDEX)));
|
169
|
-
__ sw(
|
170
|
-
__ sw(a1, MemOperand(v0, Context::SlotOffset(Context::PREVIOUS_INDEX)));
|
169
|
+
__ sw(cp, MemOperand(v0, Context::SlotOffset(Context::PREVIOUS_INDEX)));
|
171
170
|
__ sw(a1, MemOperand(v0, Context::SlotOffset(Context::EXTENSION_INDEX)));
|
172
171
|
|
173
|
-
// Copy the global object from the
|
172
|
+
// Copy the global object from the previous context.
|
174
173
|
__ lw(a1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
175
174
|
__ sw(a1, MemOperand(v0, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
176
175
|
|
@@ -187,7 +186,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
|
|
187
186
|
|
188
187
|
// Need to collect. Call into runtime system.
|
189
188
|
__ bind(&gc);
|
190
|
-
__ TailCallRuntime(Runtime::
|
189
|
+
__ TailCallRuntime(Runtime::kNewFunctionContext, 1, 1);
|
191
190
|
}
|
192
191
|
|
193
192
|
|
@@ -306,12 +305,6 @@ class ConvertToDoubleStub : public CodeStub {
|
|
306
305
|
}
|
307
306
|
|
308
307
|
void Generate(MacroAssembler* masm);
|
309
|
-
|
310
|
-
const char* GetName() { return "ConvertToDoubleStub"; }
|
311
|
-
|
312
|
-
#ifdef DEBUG
|
313
|
-
void Print() { PrintF("ConvertToDoubleStub\n"); }
|
314
|
-
#endif
|
315
308
|
};
|
316
309
|
|
317
310
|
|
@@ -397,11 +390,11 @@ void FloatingPointHelper::LoadSmis(MacroAssembler* masm,
|
|
397
390
|
__ mov(scratch1, a0);
|
398
391
|
ConvertToDoubleStub stub1(a3, a2, scratch1, scratch2);
|
399
392
|
__ push(ra);
|
400
|
-
__ Call(stub1.GetCode()
|
393
|
+
__ Call(stub1.GetCode());
|
401
394
|
// Write Smi from a1 to a1 and a0 in double format.
|
402
395
|
__ mov(scratch1, a1);
|
403
396
|
ConvertToDoubleStub stub2(a1, a0, scratch1, scratch2);
|
404
|
-
__ Call(stub2.GetCode()
|
397
|
+
__ Call(stub2.GetCode());
|
405
398
|
__ pop(ra);
|
406
399
|
}
|
407
400
|
}
|
@@ -483,7 +476,7 @@ void FloatingPointHelper::LoadNumber(MacroAssembler* masm,
|
|
483
476
|
__ mov(scratch1, object);
|
484
477
|
ConvertToDoubleStub stub(dst2, dst1, scratch1, scratch2);
|
485
478
|
__ push(ra);
|
486
|
-
__ Call(stub.GetCode()
|
479
|
+
__ Call(stub.GetCode());
|
487
480
|
__ pop(ra);
|
488
481
|
}
|
489
482
|
|
@@ -672,9 +665,8 @@ void FloatingPointHelper::LoadNumberAsInt32Double(MacroAssembler* masm,
|
|
672
665
|
// Restore FCSR.
|
673
666
|
__ ctc1(scratch1, FCSR);
|
674
667
|
|
675
|
-
// Check for inexact conversion.
|
676
|
-
__
|
677
|
-
__ And(scratch2, scratch2, (kFCSRFlagMask | kFCSRInexactFlagBit));
|
668
|
+
// Check for inexact conversion or exception.
|
669
|
+
__ And(scratch2, scratch2, kFCSRFlagMask);
|
678
670
|
|
679
671
|
// Jump to not_int32 if the operation did not succeed.
|
680
672
|
__ Branch(not_int32, ne, scratch2, Operand(zero_reg));
|
@@ -757,9 +749,8 @@ void FloatingPointHelper::LoadNumberAsInt32(MacroAssembler* masm,
|
|
757
749
|
// Restore FCSR.
|
758
750
|
__ ctc1(scratch1, FCSR);
|
759
751
|
|
760
|
-
// Check for inexact conversion.
|
761
|
-
__
|
762
|
-
__ And(scratch2, scratch2, (kFCSRFlagMask | kFCSRInexactFlagBit));
|
752
|
+
// Check for inexact conversion or exception.
|
753
|
+
__ And(scratch2, scratch2, kFCSRFlagMask);
|
763
754
|
|
764
755
|
// Jump to not_int32 if the operation did not succeed.
|
765
756
|
__ Branch(not_int32, ne, scratch2, Operand(zero_reg));
|
@@ -985,13 +976,13 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm,
|
|
985
976
|
// Smis. If it's not a heap number, then return equal.
|
986
977
|
if (cc == less || cc == greater) {
|
987
978
|
__ GetObjectType(a0, t4, t4);
|
988
|
-
__ Branch(slow, greater, t4, Operand(
|
979
|
+
__ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
|
989
980
|
} else {
|
990
981
|
__ GetObjectType(a0, t4, t4);
|
991
982
|
__ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE));
|
992
983
|
// Comparing JS objects with <=, >= is complicated.
|
993
984
|
if (cc != eq) {
|
994
|
-
__ Branch(slow, greater, t4, Operand(
|
985
|
+
__ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
|
995
986
|
// Normally here we fall through to return_equal, but undefined is
|
996
987
|
// special: (undefined == undefined) == true, but
|
997
988
|
// (undefined <= undefined) == false! See ECMAScript 11.8.5.
|
@@ -1110,7 +1101,7 @@ static void EmitSmiNonsmiComparison(MacroAssembler* masm,
|
|
1110
1101
|
__ mov(t6, rhs);
|
1111
1102
|
ConvertToDoubleStub stub1(a1, a0, t6, t5);
|
1112
1103
|
__ push(ra);
|
1113
|
-
__ Call(stub1.GetCode()
|
1104
|
+
__ Call(stub1.GetCode());
|
1114
1105
|
|
1115
1106
|
__ pop(ra);
|
1116
1107
|
}
|
@@ -1145,7 +1136,7 @@ static void EmitSmiNonsmiComparison(MacroAssembler* masm,
|
|
1145
1136
|
__ mov(t6, lhs);
|
1146
1137
|
ConvertToDoubleStub stub2(a3, a2, t6, t5);
|
1147
1138
|
__ push(ra);
|
1148
|
-
__ Call(stub2.GetCode()
|
1139
|
+
__ Call(stub2.GetCode());
|
1149
1140
|
__ pop(ra);
|
1150
1141
|
// Load rhs to a double in a1, a0.
|
1151
1142
|
if (rhs.is(a0)) {
|
@@ -1309,15 +1300,15 @@ static void EmitTwoNonNanDoubleComparison(MacroAssembler* masm, Condition cc) {
|
|
1309
1300
|
static void EmitStrictTwoHeapObjectCompare(MacroAssembler* masm,
|
1310
1301
|
Register lhs,
|
1311
1302
|
Register rhs) {
|
1312
|
-
// If either operand is a
|
1303
|
+
// If either operand is a JS object or an oddball value, then they are
|
1313
1304
|
// not equal since their pointers are different.
|
1314
1305
|
// There is no test for undetectability in strict equality.
|
1315
|
-
STATIC_ASSERT(LAST_TYPE ==
|
1306
|
+
STATIC_ASSERT(LAST_TYPE == LAST_CALLABLE_SPEC_OBJECT_TYPE);
|
1316
1307
|
Label first_non_object;
|
1317
1308
|
// Get the type of the first operand into a2 and compare it with
|
1318
|
-
//
|
1309
|
+
// FIRST_SPEC_OBJECT_TYPE.
|
1319
1310
|
__ GetObjectType(lhs, a2, a2);
|
1320
|
-
__ Branch(&first_non_object, less, a2, Operand(
|
1311
|
+
__ Branch(&first_non_object, less, a2, Operand(FIRST_SPEC_OBJECT_TYPE));
|
1321
1312
|
|
1322
1313
|
// Return non-zero.
|
1323
1314
|
Label return_not_equal;
|
@@ -1330,7 +1321,7 @@ static void EmitStrictTwoHeapObjectCompare(MacroAssembler* masm,
|
|
1330
1321
|
__ Branch(&return_not_equal, eq, a2, Operand(ODDBALL_TYPE));
|
1331
1322
|
|
1332
1323
|
__ GetObjectType(rhs, a3, a3);
|
1333
|
-
__ Branch(&return_not_equal, greater, a3, Operand(
|
1324
|
+
__ Branch(&return_not_equal, greater, a3, Operand(FIRST_SPEC_OBJECT_TYPE));
|
1334
1325
|
|
1335
1326
|
// Check for oddballs: true, false, null, undefined.
|
1336
1327
|
__ Branch(&return_not_equal, eq, a3, Operand(ODDBALL_TYPE));
|
@@ -1406,9 +1397,9 @@ static void EmitCheckForSymbolsOrObjects(MacroAssembler* masm,
|
|
1406
1397
|
__ Ret();
|
1407
1398
|
|
1408
1399
|
__ bind(&object_test);
|
1409
|
-
__ Branch(not_both_strings, lt, a2, Operand(
|
1400
|
+
__ Branch(not_both_strings, lt, a2, Operand(FIRST_SPEC_OBJECT_TYPE));
|
1410
1401
|
__ GetObjectType(rhs, a2, a3);
|
1411
|
-
__ Branch(not_both_strings, lt, a3, Operand(
|
1402
|
+
__ Branch(not_both_strings, lt, a3, Operand(FIRST_SPEC_OBJECT_TYPE));
|
1412
1403
|
|
1413
1404
|
// If both objects are undetectable, they are equal. Otherwise, they
|
1414
1405
|
// are not equal, since they are different objects and an object is not
|
@@ -1720,7 +1711,6 @@ void CompareStub::Generate(MacroAssembler* masm) {
|
|
1720
1711
|
}
|
1721
1712
|
|
1722
1713
|
|
1723
|
-
// This stub does not handle the inlined cases (Smis, Booleans, undefined).
|
1724
1714
|
// The stub returns zero for false, and a non-zero value for true.
|
1725
1715
|
void ToBooleanStub::Generate(MacroAssembler* masm) {
|
1726
1716
|
// This stub uses FPU instructions.
|
@@ -1784,7 +1774,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
|
1784
1774
|
// "tos_" is a register and contains a non-zero value.
|
1785
1775
|
// Hence we implicitly return true if the greater than
|
1786
1776
|
// condition is satisfied.
|
1787
|
-
__ Ret(
|
1777
|
+
__ Ret(ge, scratch0, Operand(FIRST_SPEC_OBJECT_TYPE));
|
1788
1778
|
|
1789
1779
|
// Check for string.
|
1790
1780
|
__ lw(scratch0, FieldMemOperand(tos_, HeapObject::kMapOffset));
|
@@ -1792,7 +1782,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
|
1792
1782
|
// "tos_" is a register and contains a non-zero value.
|
1793
1783
|
// Hence we implicitly return true if the greater than
|
1794
1784
|
// condition is satisfied.
|
1795
|
-
__ Ret(
|
1785
|
+
__ Ret(ge, scratch0, Operand(FIRST_NONSTRING_TYPE));
|
1796
1786
|
|
1797
1787
|
// String value => false iff empty, i.e., length is zero.
|
1798
1788
|
__ lw(tos_, FieldMemOperand(tos_, String::kLengthOffset));
|
@@ -1807,31 +1797,17 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
|
1807
1797
|
}
|
1808
1798
|
|
1809
1799
|
|
1810
|
-
|
1811
|
-
UnaryOpStub stub(key, type_info);
|
1812
|
-
return stub.GetCode();
|
1813
|
-
}
|
1814
|
-
|
1815
|
-
|
1816
|
-
const char* UnaryOpStub::GetName() {
|
1817
|
-
if (name_ != NULL) return name_;
|
1818
|
-
const int kMaxNameLength = 100;
|
1819
|
-
name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
|
1820
|
-
kMaxNameLength);
|
1821
|
-
if (name_ == NULL) return "OOM";
|
1800
|
+
void UnaryOpStub::PrintName(StringStream* stream) {
|
1822
1801
|
const char* op_name = Token::Name(op_);
|
1823
1802
|
const char* overwrite_name = NULL; // Make g++ happy.
|
1824
1803
|
switch (mode_) {
|
1825
1804
|
case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break;
|
1826
1805
|
case UNARY_OVERWRITE: overwrite_name = "Overwrite"; break;
|
1827
1806
|
}
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
overwrite_name,
|
1833
|
-
UnaryOpIC::GetName(operand_type_));
|
1834
|
-
return name_;
|
1807
|
+
stream->Add("UnaryOpStub_%s_%s_%s",
|
1808
|
+
op_name,
|
1809
|
+
overwrite_name,
|
1810
|
+
UnaryOpIC::GetName(operand_type_));
|
1835
1811
|
}
|
1836
1812
|
|
1837
1813
|
|
@@ -1856,19 +1832,13 @@ void UnaryOpStub::Generate(MacroAssembler* masm) {
|
|
1856
1832
|
|
1857
1833
|
void UnaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
|
1858
1834
|
// Argument is in a0 and v0 at this point, so we can overwrite a0.
|
1859
|
-
|
1860
|
-
|
1861
|
-
__ li(a2, Operand(Smi::FromInt(MinorKey())));
|
1862
|
-
__ li(a1, Operand(Smi::FromInt(op_)));
|
1835
|
+
__ li(a2, Operand(Smi::FromInt(op_)));
|
1836
|
+
__ li(a1, Operand(Smi::FromInt(mode_)));
|
1863
1837
|
__ li(a0, Operand(Smi::FromInt(operand_type_)));
|
1864
|
-
|
1865
1838
|
__ Push(v0, a2, a1, a0);
|
1866
1839
|
|
1867
1840
|
__ TailCallExternalReference(
|
1868
|
-
ExternalReference(IC_Utility(IC::kUnaryOp_Patch),
|
1869
|
-
masm->isolate()),
|
1870
|
-
4,
|
1871
|
-
1);
|
1841
|
+
ExternalReference(IC_Utility(IC::kUnaryOp_Patch), masm->isolate()), 4, 1);
|
1872
1842
|
}
|
1873
1843
|
|
1874
1844
|
|
@@ -1966,6 +1936,7 @@ void UnaryOpStub::GenerateHeapNumberStubBitNot(MacroAssembler* masm) {
|
|
1966
1936
|
GenerateTypeTransition(masm);
|
1967
1937
|
}
|
1968
1938
|
|
1939
|
+
|
1969
1940
|
void UnaryOpStub::GenerateHeapNumberCodeSub(MacroAssembler* masm,
|
1970
1941
|
Label* slow) {
|
1971
1942
|
EmitCheckForHeapNumber(masm, a0, a1, t2, slow);
|
@@ -2002,6 +1973,8 @@ void UnaryOpStub::GenerateHeapNumberCodeSub(MacroAssembler* masm,
|
|
2002
1973
|
void UnaryOpStub::GenerateHeapNumberCodeBitNot(
|
2003
1974
|
MacroAssembler* masm,
|
2004
1975
|
Label* slow) {
|
1976
|
+
Label impossible;
|
1977
|
+
|
2005
1978
|
EmitCheckForHeapNumber(masm, a0, a1, t2, slow);
|
2006
1979
|
// Convert the heap number in a0 to an untagged integer in a1.
|
2007
1980
|
__ ConvertToInt32(a0, a1, a2, a3, f0, slow);
|
@@ -2020,17 +1993,28 @@ void UnaryOpStub::GenerateHeapNumberCodeBitNot(
|
|
2020
1993
|
__ bind(&try_float);
|
2021
1994
|
if (mode_ == UNARY_NO_OVERWRITE) {
|
2022
1995
|
Label slow_allocate_heapnumber, heapnumber_allocated;
|
2023
|
-
|
1996
|
+
// Allocate a new heap number without zapping v0, which we need if it fails.
|
1997
|
+
__ AllocateHeapNumber(a2, a3, t0, t2, &slow_allocate_heapnumber);
|
2024
1998
|
__ jmp(&heapnumber_allocated);
|
2025
1999
|
|
2026
2000
|
__ bind(&slow_allocate_heapnumber);
|
2027
2001
|
__ EnterInternalFrame();
|
2028
|
-
__ push(
|
2002
|
+
__ push(v0); // Push the heap number, not the untagged int32.
|
2029
2003
|
__ CallRuntime(Runtime::kNumberAlloc, 0);
|
2030
|
-
__
|
2004
|
+
__ mov(a2, v0); // Move the new heap number into a2.
|
2005
|
+
// Get the heap number into v0, now that the new heap number is in a2.
|
2006
|
+
__ pop(v0);
|
2031
2007
|
__ LeaveInternalFrame();
|
2032
2008
|
|
2009
|
+
// Convert the heap number in v0 to an untagged integer in a1.
|
2010
|
+
// This can't go slow-case because it's the same number we already
|
2011
|
+
// converted once again.
|
2012
|
+
__ ConvertToInt32(v0, a1, a3, t0, f0, &impossible);
|
2013
|
+
// Negate the result.
|
2014
|
+
__ Xor(a1, a1, -1);
|
2015
|
+
|
2033
2016
|
__ bind(&heapnumber_allocated);
|
2017
|
+
__ mov(v0, a2); // Move newly allocated heap number to v0.
|
2034
2018
|
}
|
2035
2019
|
|
2036
2020
|
if (CpuFeatures::IsSupported(FPU)) {
|
@@ -2046,6 +2030,11 @@ void UnaryOpStub::GenerateHeapNumberCodeBitNot(
|
|
2046
2030
|
WriteInt32ToHeapNumberStub stub(a1, v0, a2, a3);
|
2047
2031
|
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
|
2048
2032
|
}
|
2033
|
+
|
2034
|
+
__ bind(&impossible);
|
2035
|
+
if (FLAG_debug_code) {
|
2036
|
+
__ stop("Incorrect assumption in bit-not stub");
|
2037
|
+
}
|
2049
2038
|
}
|
2050
2039
|
|
2051
2040
|
|
@@ -2101,14 +2090,6 @@ void UnaryOpStub::GenerateGenericCodeFallback(
|
|
2101
2090
|
}
|
2102
2091
|
|
2103
2092
|
|
2104
|
-
Handle<Code> GetBinaryOpStub(int key,
|
2105
|
-
BinaryOpIC::TypeInfo type_info,
|
2106
|
-
BinaryOpIC::TypeInfo result_type_info) {
|
2107
|
-
BinaryOpStub stub(key, type_info, result_type_info);
|
2108
|
-
return stub.GetCode();
|
2109
|
-
}
|
2110
|
-
|
2111
|
-
|
2112
2093
|
void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
|
2113
2094
|
Label get_result;
|
2114
2095
|
|
@@ -2165,12 +2146,7 @@ void BinaryOpStub::Generate(MacroAssembler* masm) {
|
|
2165
2146
|
}
|
2166
2147
|
|
2167
2148
|
|
2168
|
-
|
2169
|
-
if (name_ != NULL) return name_;
|
2170
|
-
const int kMaxNameLength = 100;
|
2171
|
-
name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
|
2172
|
-
kMaxNameLength);
|
2173
|
-
if (name_ == NULL) return "OOM";
|
2149
|
+
void BinaryOpStub::PrintName(StringStream* stream) {
|
2174
2150
|
const char* op_name = Token::Name(op_);
|
2175
2151
|
const char* overwrite_name;
|
2176
2152
|
switch (mode_) {
|
@@ -2179,13 +2155,10 @@ const char* BinaryOpStub::GetName() {
|
|
2179
2155
|
case OVERWRITE_LEFT: overwrite_name = "OverwriteLeft"; break;
|
2180
2156
|
default: overwrite_name = "UnknownOverwrite"; break;
|
2181
2157
|
}
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
overwrite_name,
|
2187
|
-
BinaryOpIC::GetName(operands_type_));
|
2188
|
-
return name_;
|
2158
|
+
stream->Add("BinaryOpStub_%s_%s_%s",
|
2159
|
+
op_name,
|
2160
|
+
overwrite_name,
|
2161
|
+
BinaryOpIC::GetName(operands_type_));
|
2189
2162
|
}
|
2190
2163
|
|
2191
2164
|
|
@@ -2533,7 +2506,7 @@ void BinaryOpStub::GenerateFPOperation(MacroAssembler* masm,
|
|
2533
2506
|
CpuFeatures::Scope scope(FPU);
|
2534
2507
|
__ mtc1(a2, f0);
|
2535
2508
|
if (op_ == Token::SHR) {
|
2536
|
-
__ Cvt_d_uw(f0, f0);
|
2509
|
+
__ Cvt_d_uw(f0, f0, f22);
|
2537
2510
|
} else {
|
2538
2511
|
__ cvt_d_w(f0, f0);
|
2539
2512
|
}
|
@@ -2687,37 +2660,36 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
|
|
2687
2660
|
case Token::MUL:
|
2688
2661
|
case Token::DIV:
|
2689
2662
|
case Token::MOD: {
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2700
|
-
|
2701
|
-
|
2702
|
-
|
2703
|
-
|
2704
|
-
|
2705
|
-
|
2706
|
-
|
2707
|
-
|
2708
|
-
|
2709
|
-
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
|
2714
|
-
|
2715
|
-
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2719
|
-
|
2720
|
-
&transition);
|
2663
|
+
// Load both operands and check that they are 32-bit integer.
|
2664
|
+
// Jump to type transition if they are not. The registers a0 and a1 (right
|
2665
|
+
// and left) are preserved for the runtime call.
|
2666
|
+
FloatingPointHelper::Destination destination =
|
2667
|
+
(CpuFeatures::IsSupported(FPU) && op_ != Token::MOD)
|
2668
|
+
? FloatingPointHelper::kFPURegisters
|
2669
|
+
: FloatingPointHelper::kCoreRegisters;
|
2670
|
+
|
2671
|
+
FloatingPointHelper::LoadNumberAsInt32Double(masm,
|
2672
|
+
right,
|
2673
|
+
destination,
|
2674
|
+
f14,
|
2675
|
+
a2,
|
2676
|
+
a3,
|
2677
|
+
heap_number_map,
|
2678
|
+
scratch1,
|
2679
|
+
scratch2,
|
2680
|
+
f2,
|
2681
|
+
&transition);
|
2682
|
+
FloatingPointHelper::LoadNumberAsInt32Double(masm,
|
2683
|
+
left,
|
2684
|
+
destination,
|
2685
|
+
f12,
|
2686
|
+
t0,
|
2687
|
+
t1,
|
2688
|
+
heap_number_map,
|
2689
|
+
scratch1,
|
2690
|
+
scratch2,
|
2691
|
+
f2,
|
2692
|
+
&transition);
|
2721
2693
|
|
2722
2694
|
if (destination == FloatingPointHelper::kFPURegisters) {
|
2723
2695
|
CpuFeatures::Scope scope(FPU);
|
@@ -2759,8 +2731,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
|
|
2759
2731
|
// Restore FCSR.
|
2760
2732
|
__ ctc1(scratch1, FCSR);
|
2761
2733
|
|
2762
|
-
// Check for inexact conversion.
|
2763
|
-
__ srl(scratch2, scratch2, kFCSRFlagShift);
|
2734
|
+
// Check for inexact conversion or exception.
|
2764
2735
|
__ And(scratch2, scratch2, kFCSRFlagMask);
|
2765
2736
|
|
2766
2737
|
if (result_type_ <= BinaryOpIC::INT32) {
|
@@ -2788,9 +2759,11 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
|
|
2788
2759
|
// DIV just falls through to allocating a heap number.
|
2789
2760
|
}
|
2790
2761
|
|
2791
|
-
|
2792
|
-
|
2793
|
-
|
2762
|
+
__ bind(&return_heap_number);
|
2763
|
+
// Return a heap number, or fall through to type transition or runtime
|
2764
|
+
// call if we can't.
|
2765
|
+
if (result_type_ >= ((op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
|
2766
|
+
: BinaryOpIC::INT32)) {
|
2794
2767
|
// We are using FPU registers so s0 is available.
|
2795
2768
|
heap_number_result = s0;
|
2796
2769
|
GenerateHeapResultAllocation(masm,
|
@@ -2947,7 +2920,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
|
|
2947
2920
|
} else {
|
2948
2921
|
// The result must be interpreted as an unsigned 32-bit integer.
|
2949
2922
|
__ mtc1(a2, double_scratch);
|
2950
|
-
__ Cvt_d_uw(double_scratch, double_scratch);
|
2923
|
+
__ Cvt_d_uw(double_scratch, double_scratch, single_scratch);
|
2951
2924
|
}
|
2952
2925
|
|
2953
2926
|
// Store the result.
|
@@ -2969,7 +2942,11 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
|
|
2969
2942
|
UNREACHABLE();
|
2970
2943
|
}
|
2971
2944
|
|
2972
|
-
|
2945
|
+
// We never expect DIV to yield an integer result, so we always generate
|
2946
|
+
// type transition code for DIV operations expecting an integer result: the
|
2947
|
+
// code will fall through to this type transition.
|
2948
|
+
if (transition.is_linked() ||
|
2949
|
+
((op_ == Token::DIV) && (result_type_ <= BinaryOpIC::INT32))) {
|
2973
2950
|
__ bind(&transition);
|
2974
2951
|
GenerateTypeTransition(masm);
|
2975
2952
|
}
|
@@ -3541,15 +3518,10 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
|
|
3541
3518
|
|
3542
3519
|
__ li(a2, Operand(ExternalReference::isolate_address()));
|
3543
3520
|
|
3544
|
-
//
|
3545
|
-
//
|
3546
|
-
//
|
3547
|
-
// we
|
3548
|
-
// restore from it in case of changes, which makes it impossible to
|
3549
|
-
// support moving the C entry code stub. This should be fixed, but currently
|
3550
|
-
// this is OK because the CEntryStub gets generated so early in the V8 boot
|
3551
|
-
// sequence that it is not moving ever.
|
3552
|
-
|
3521
|
+
// To let the GC traverse the return address of the exit frames, we need to
|
3522
|
+
// know where the return address is. The CEntryStub is unmovable, so
|
3523
|
+
// we can store the address on the stack to be able to find it again and
|
3524
|
+
// we never have to restore it, because it will not change.
|
3553
3525
|
{ Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm);
|
3554
3526
|
// This branch-and-link sequence is needed to find the current PC on mips,
|
3555
3527
|
// saved to the ra register.
|
@@ -3721,10 +3693,10 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
|
3721
3693
|
// args
|
3722
3694
|
|
3723
3695
|
// Save callee saved registers on the stack.
|
3724
|
-
__ MultiPush(
|
3696
|
+
__ MultiPush(kCalleeSaved | ra.bit());
|
3725
3697
|
|
3726
3698
|
// Load argv in s0 register.
|
3727
|
-
__ lw(s0, MemOperand(sp, kNumCalleeSaved * kPointerSize +
|
3699
|
+
__ lw(s0, MemOperand(sp, (kNumCalleeSaved + 1) * kPointerSize +
|
3728
3700
|
StandardFrameConstants::kCArgsSlotsSize));
|
3729
3701
|
|
3730
3702
|
// We build an EntryFrame.
|
@@ -3755,24 +3727,22 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
|
3755
3727
|
// 4 args slots
|
3756
3728
|
// args
|
3757
3729
|
|
3758
|
-
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
3769
|
-
|
3770
|
-
|
3771
|
-
|
3772
|
-
|
3773
|
-
|
3774
|
-
__ push(t0);
|
3775
|
-
#endif
|
3730
|
+
// If this is the outermost JS call, set js_entry_sp value.
|
3731
|
+
Label non_outermost_js;
|
3732
|
+
ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address,
|
3733
|
+
masm->isolate());
|
3734
|
+
__ li(t1, Operand(ExternalReference(js_entry_sp)));
|
3735
|
+
__ lw(t2, MemOperand(t1));
|
3736
|
+
__ Branch(&non_outermost_js, ne, t2, Operand(zero_reg));
|
3737
|
+
__ sw(fp, MemOperand(t1));
|
3738
|
+
__ li(t0, Operand(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)));
|
3739
|
+
Label cont;
|
3740
|
+
__ b(&cont);
|
3741
|
+
__ nop(); // Branch delay slot nop.
|
3742
|
+
__ bind(&non_outermost_js);
|
3743
|
+
__ li(t0, Operand(Smi::FromInt(StackFrame::INNER_JSENTRY_FRAME)));
|
3744
|
+
__ bind(&cont);
|
3745
|
+
__ push(t0);
|
3776
3746
|
|
3777
3747
|
// Call a faked try-block that does the invoke.
|
3778
3748
|
__ bal(&invoke); // bal exposes branch delay slot.
|
@@ -3841,16 +3811,14 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
|
3841
3811
|
__ PopTryHandler();
|
3842
3812
|
|
3843
3813
|
__ bind(&exit); // v0 holds result
|
3844
|
-
|
3845
|
-
|
3846
|
-
|
3847
|
-
|
3848
|
-
|
3849
|
-
|
3850
|
-
|
3851
|
-
|
3852
|
-
__ bind(&non_outermost_js_2);
|
3853
|
-
#endif
|
3814
|
+
// Check if the current stack frame is marked as the outermost JS frame.
|
3815
|
+
Label non_outermost_js_2;
|
3816
|
+
__ pop(t1);
|
3817
|
+
__ Branch(&non_outermost_js_2, ne, t1,
|
3818
|
+
Operand(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)));
|
3819
|
+
__ li(t1, Operand(ExternalReference(js_entry_sp)));
|
3820
|
+
__ sw(zero_reg, MemOperand(t1));
|
3821
|
+
__ bind(&non_outermost_js_2);
|
3854
3822
|
|
3855
3823
|
// Restore the top frame descriptors from the stack.
|
3856
3824
|
__ pop(t1);
|
@@ -3862,7 +3830,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
|
3862
3830
|
__ addiu(sp, sp, -EntryFrameConstants::kCallerFPOffset);
|
3863
3831
|
|
3864
3832
|
// Restore callee saved registers from the stack.
|
3865
|
-
__ MultiPop(
|
3833
|
+
__ MultiPop(kCalleeSaved | ra.bit());
|
3866
3834
|
// Return.
|
3867
3835
|
__ Jump(ra);
|
3868
3836
|
}
|
@@ -4074,11 +4042,252 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
|
|
4074
4042
|
}
|
4075
4043
|
|
4076
4044
|
|
4077
|
-
void ArgumentsAccessStub::
|
4045
|
+
void ArgumentsAccessStub::GenerateNewNonStrictSlow(MacroAssembler* masm) {
|
4078
4046
|
// sp[0] : number of parameters
|
4079
4047
|
// sp[4] : receiver displacement
|
4080
4048
|
// sp[8] : function
|
4049
|
+
// Check if the calling frame is an arguments adaptor frame.
|
4050
|
+
Label runtime;
|
4051
|
+
__ lw(a3, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
|
4052
|
+
__ lw(a2, MemOperand(a3, StandardFrameConstants::kContextOffset));
|
4053
|
+
__ Branch(&runtime, ne,
|
4054
|
+
a2, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
|
4055
|
+
|
4056
|
+
// Patch the arguments.length and the parameters pointer in the current frame.
|
4057
|
+
__ lw(a2, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset));
|
4058
|
+
__ sw(a2, MemOperand(sp, 0 * kPointerSize));
|
4059
|
+
__ sll(t3, a2, 1);
|
4060
|
+
__ Addu(a3, a3, Operand(t3));
|
4061
|
+
__ addiu(a3, a3, StandardFrameConstants::kCallerSPOffset);
|
4062
|
+
__ sw(a3, MemOperand(sp, 1 * kPointerSize));
|
4063
|
+
|
4064
|
+
__ bind(&runtime);
|
4065
|
+
__ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1);
|
4066
|
+
}
|
4067
|
+
|
4068
|
+
|
4069
|
+
void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) {
|
4070
|
+
// Stack layout:
|
4071
|
+
// sp[0] : number of parameters (tagged)
|
4072
|
+
// sp[4] : address of receiver argument
|
4073
|
+
// sp[8] : function
|
4074
|
+
// Registers used over whole function:
|
4075
|
+
// t2 : allocated object (tagged)
|
4076
|
+
// t5 : mapped parameter count (tagged)
|
4077
|
+
|
4078
|
+
__ lw(a1, MemOperand(sp, 0 * kPointerSize));
|
4079
|
+
// a1 = parameter count (tagged)
|
4081
4080
|
|
4081
|
+
// Check if the calling frame is an arguments adaptor frame.
|
4082
|
+
Label runtime;
|
4083
|
+
Label adaptor_frame, try_allocate;
|
4084
|
+
__ lw(a3, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
|
4085
|
+
__ lw(a2, MemOperand(a3, StandardFrameConstants::kContextOffset));
|
4086
|
+
__ Branch(&adaptor_frame, eq, a2,
|
4087
|
+
Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
|
4088
|
+
|
4089
|
+
// No adaptor, parameter count = argument count.
|
4090
|
+
__ mov(a2, a1);
|
4091
|
+
__ b(&try_allocate);
|
4092
|
+
__ nop(); // Branch delay slot nop.
|
4093
|
+
|
4094
|
+
// We have an adaptor frame. Patch the parameters pointer.
|
4095
|
+
__ bind(&adaptor_frame);
|
4096
|
+
__ lw(a2, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset));
|
4097
|
+
__ sll(t6, a2, 1);
|
4098
|
+
__ Addu(a3, a3, Operand(t6));
|
4099
|
+
__ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
|
4100
|
+
__ sw(a3, MemOperand(sp, 1 * kPointerSize));
|
4101
|
+
|
4102
|
+
// a1 = parameter count (tagged)
|
4103
|
+
// a2 = argument count (tagged)
|
4104
|
+
// Compute the mapped parameter count = min(a1, a2) in a1.
|
4105
|
+
Label skip_min;
|
4106
|
+
__ Branch(&skip_min, lt, a1, Operand(a2));
|
4107
|
+
__ mov(a1, a2);
|
4108
|
+
__ bind(&skip_min);
|
4109
|
+
|
4110
|
+
__ bind(&try_allocate);
|
4111
|
+
|
4112
|
+
// Compute the sizes of backing store, parameter map, and arguments object.
|
4113
|
+
// 1. Parameter map, has 2 extra words containing context and backing store.
|
4114
|
+
const int kParameterMapHeaderSize =
|
4115
|
+
FixedArray::kHeaderSize + 2 * kPointerSize;
|
4116
|
+
// If there are no mapped parameters, we do not need the parameter_map.
|
4117
|
+
Label param_map_size;
|
4118
|
+
ASSERT_EQ(0, Smi::FromInt(0));
|
4119
|
+
__ Branch(USE_DELAY_SLOT, ¶m_map_size, eq, a1, Operand(zero_reg));
|
4120
|
+
__ mov(t5, zero_reg); // In delay slot: param map size = 0 when a1 == 0.
|
4121
|
+
__ sll(t5, a1, 1);
|
4122
|
+
__ addiu(t5, t5, kParameterMapHeaderSize);
|
4123
|
+
__ bind(¶m_map_size);
|
4124
|
+
|
4125
|
+
// 2. Backing store.
|
4126
|
+
__ sll(t6, a2, 1);
|
4127
|
+
__ Addu(t5, t5, Operand(t6));
|
4128
|
+
__ Addu(t5, t5, Operand(FixedArray::kHeaderSize));
|
4129
|
+
|
4130
|
+
// 3. Arguments object.
|
4131
|
+
__ Addu(t5, t5, Operand(Heap::kArgumentsObjectSize));
|
4132
|
+
|
4133
|
+
// Do the allocation of all three objects in one go.
|
4134
|
+
__ AllocateInNewSpace(t5, v0, a3, t0, &runtime, TAG_OBJECT);
|
4135
|
+
|
4136
|
+
// v0 = address of new object(s) (tagged)
|
4137
|
+
// a2 = argument count (tagged)
|
4138
|
+
// Get the arguments boilerplate from the current (global) context into t0.
|
4139
|
+
const int kNormalOffset =
|
4140
|
+
Context::SlotOffset(Context::ARGUMENTS_BOILERPLATE_INDEX);
|
4141
|
+
const int kAliasedOffset =
|
4142
|
+
Context::SlotOffset(Context::ALIASED_ARGUMENTS_BOILERPLATE_INDEX);
|
4143
|
+
|
4144
|
+
__ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
4145
|
+
__ lw(t0, FieldMemOperand(t0, GlobalObject::kGlobalContextOffset));
|
4146
|
+
Label skip2_ne, skip2_eq;
|
4147
|
+
__ Branch(&skip2_ne, ne, a1, Operand(zero_reg));
|
4148
|
+
__ lw(t0, MemOperand(t0, kNormalOffset));
|
4149
|
+
__ bind(&skip2_ne);
|
4150
|
+
|
4151
|
+
__ Branch(&skip2_eq, eq, a1, Operand(zero_reg));
|
4152
|
+
__ lw(t0, MemOperand(t0, kAliasedOffset));
|
4153
|
+
__ bind(&skip2_eq);
|
4154
|
+
|
4155
|
+
// v0 = address of new object (tagged)
|
4156
|
+
// a1 = mapped parameter count (tagged)
|
4157
|
+
// a2 = argument count (tagged)
|
4158
|
+
// t0 = address of boilerplate object (tagged)
|
4159
|
+
// Copy the JS object part.
|
4160
|
+
for (int i = 0; i < JSObject::kHeaderSize; i += kPointerSize) {
|
4161
|
+
__ lw(a3, FieldMemOperand(t0, i));
|
4162
|
+
__ sw(a3, FieldMemOperand(v0, i));
|
4163
|
+
}
|
4164
|
+
|
4165
|
+
// Setup the callee in-object property.
|
4166
|
+
STATIC_ASSERT(Heap::kArgumentsCalleeIndex == 1);
|
4167
|
+
__ lw(a3, MemOperand(sp, 2 * kPointerSize));
|
4168
|
+
const int kCalleeOffset = JSObject::kHeaderSize +
|
4169
|
+
Heap::kArgumentsCalleeIndex * kPointerSize;
|
4170
|
+
__ sw(a3, FieldMemOperand(v0, kCalleeOffset));
|
4171
|
+
|
4172
|
+
// Use the length (smi tagged) and set that as an in-object property too.
|
4173
|
+
STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0);
|
4174
|
+
const int kLengthOffset = JSObject::kHeaderSize +
|
4175
|
+
Heap::kArgumentsLengthIndex * kPointerSize;
|
4176
|
+
__ sw(a2, FieldMemOperand(v0, kLengthOffset));
|
4177
|
+
|
4178
|
+
// Setup the elements pointer in the allocated arguments object.
|
4179
|
+
// If we allocated a parameter map, t0 will point there, otherwise
|
4180
|
+
// it will point to the backing store.
|
4181
|
+
__ Addu(t0, v0, Operand(Heap::kArgumentsObjectSize));
|
4182
|
+
__ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
|
4183
|
+
|
4184
|
+
// v0 = address of new object (tagged)
|
4185
|
+
// a1 = mapped parameter count (tagged)
|
4186
|
+
// a2 = argument count (tagged)
|
4187
|
+
// t0 = address of parameter map or backing store (tagged)
|
4188
|
+
// Initialize parameter map. If there are no mapped arguments, we're done.
|
4189
|
+
Label skip_parameter_map;
|
4190
|
+
Label skip3;
|
4191
|
+
__ Branch(&skip3, ne, a1, Operand(Smi::FromInt(0)));
|
4192
|
+
// Move backing store address to a3, because it is
|
4193
|
+
// expected there when filling in the unmapped arguments.
|
4194
|
+
__ mov(a3, t0);
|
4195
|
+
__ bind(&skip3);
|
4196
|
+
|
4197
|
+
__ Branch(&skip_parameter_map, eq, a1, Operand(Smi::FromInt(0)));
|
4198
|
+
|
4199
|
+
__ LoadRoot(t2, Heap::kNonStrictArgumentsElementsMapRootIndex);
|
4200
|
+
__ sw(t2, FieldMemOperand(t0, FixedArray::kMapOffset));
|
4201
|
+
__ Addu(t2, a1, Operand(Smi::FromInt(2)));
|
4202
|
+
__ sw(t2, FieldMemOperand(t0, FixedArray::kLengthOffset));
|
4203
|
+
__ sw(cp, FieldMemOperand(t0, FixedArray::kHeaderSize + 0 * kPointerSize));
|
4204
|
+
__ sll(t6, a1, 1);
|
4205
|
+
__ Addu(t2, t0, Operand(t6));
|
4206
|
+
__ Addu(t2, t2, Operand(kParameterMapHeaderSize));
|
4207
|
+
__ sw(t2, FieldMemOperand(t0, FixedArray::kHeaderSize + 1 * kPointerSize));
|
4208
|
+
|
4209
|
+
// Copy the parameter slots and the holes in the arguments.
|
4210
|
+
// We need to fill in mapped_parameter_count slots. They index the context,
|
4211
|
+
// where parameters are stored in reverse order, at
|
4212
|
+
// MIN_CONTEXT_SLOTS .. MIN_CONTEXT_SLOTS+parameter_count-1
|
4213
|
+
// The mapped parameter thus need to get indices
|
4214
|
+
// MIN_CONTEXT_SLOTS+parameter_count-1 ..
|
4215
|
+
// MIN_CONTEXT_SLOTS+parameter_count-mapped_parameter_count
|
4216
|
+
// We loop from right to left.
|
4217
|
+
Label parameters_loop, parameters_test;
|
4218
|
+
__ mov(t2, a1);
|
4219
|
+
__ lw(t5, MemOperand(sp, 0 * kPointerSize));
|
4220
|
+
__ Addu(t5, t5, Operand(Smi::FromInt(Context::MIN_CONTEXT_SLOTS)));
|
4221
|
+
__ Subu(t5, t5, Operand(a1));
|
4222
|
+
__ LoadRoot(t3, Heap::kTheHoleValueRootIndex);
|
4223
|
+
__ sll(t6, t2, 1);
|
4224
|
+
__ Addu(a3, t0, Operand(t6));
|
4225
|
+
__ Addu(a3, a3, Operand(kParameterMapHeaderSize));
|
4226
|
+
|
4227
|
+
// t2 = loop variable (tagged)
|
4228
|
+
// a1 = mapping index (tagged)
|
4229
|
+
// a3 = address of backing store (tagged)
|
4230
|
+
// t0 = address of parameter map (tagged)
|
4231
|
+
// t1 = temporary scratch (a.o., for address calculation)
|
4232
|
+
// t3 = the hole value
|
4233
|
+
__ jmp(¶meters_test);
|
4234
|
+
|
4235
|
+
__ bind(¶meters_loop);
|
4236
|
+
__ Subu(t2, t2, Operand(Smi::FromInt(1)));
|
4237
|
+
__ sll(t1, t2, 1);
|
4238
|
+
__ Addu(t1, t1, Operand(kParameterMapHeaderSize - kHeapObjectTag));
|
4239
|
+
__ Addu(t6, t0, t1);
|
4240
|
+
__ sw(t5, MemOperand(t6));
|
4241
|
+
__ Subu(t1, t1, Operand(kParameterMapHeaderSize - FixedArray::kHeaderSize));
|
4242
|
+
__ Addu(t6, a3, t1);
|
4243
|
+
__ sw(t3, MemOperand(t6));
|
4244
|
+
__ Addu(t5, t5, Operand(Smi::FromInt(1)));
|
4245
|
+
__ bind(¶meters_test);
|
4246
|
+
__ Branch(¶meters_loop, ne, t2, Operand(Smi::FromInt(0)));
|
4247
|
+
|
4248
|
+
__ bind(&skip_parameter_map);
|
4249
|
+
// a2 = argument count (tagged)
|
4250
|
+
// a3 = address of backing store (tagged)
|
4251
|
+
// t1 = scratch
|
4252
|
+
// Copy arguments header and remaining slots (if there are any).
|
4253
|
+
__ LoadRoot(t1, Heap::kFixedArrayMapRootIndex);
|
4254
|
+
__ sw(t1, FieldMemOperand(a3, FixedArray::kMapOffset));
|
4255
|
+
__ sw(a2, FieldMemOperand(a3, FixedArray::kLengthOffset));
|
4256
|
+
|
4257
|
+
Label arguments_loop, arguments_test;
|
4258
|
+
__ mov(t5, a1);
|
4259
|
+
__ lw(t0, MemOperand(sp, 1 * kPointerSize));
|
4260
|
+
__ sll(t6, t5, 1);
|
4261
|
+
__ Subu(t0, t0, Operand(t6));
|
4262
|
+
__ jmp(&arguments_test);
|
4263
|
+
|
4264
|
+
__ bind(&arguments_loop);
|
4265
|
+
__ Subu(t0, t0, Operand(kPointerSize));
|
4266
|
+
__ lw(t2, MemOperand(t0, 0));
|
4267
|
+
__ sll(t6, t5, 1);
|
4268
|
+
__ Addu(t1, a3, Operand(t6));
|
4269
|
+
__ sw(t2, FieldMemOperand(t1, FixedArray::kHeaderSize));
|
4270
|
+
__ Addu(t5, t5, Operand(Smi::FromInt(1)));
|
4271
|
+
|
4272
|
+
__ bind(&arguments_test);
|
4273
|
+
__ Branch(&arguments_loop, lt, t5, Operand(a2));
|
4274
|
+
|
4275
|
+
// Return and remove the on-stack parameters.
|
4276
|
+
__ Addu(sp, sp, Operand(3 * kPointerSize));
|
4277
|
+
__ Ret();
|
4278
|
+
|
4279
|
+
// Do the runtime call to allocate the arguments object.
|
4280
|
+
// a2 = argument count (taggged)
|
4281
|
+
__ bind(&runtime);
|
4282
|
+
__ sw(a2, MemOperand(sp, 0 * kPointerSize)); // Patch argument count.
|
4283
|
+
__ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1);
|
4284
|
+
}
|
4285
|
+
|
4286
|
+
|
4287
|
+
void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
|
4288
|
+
// sp[0] : number of parameters
|
4289
|
+
// sp[4] : receiver displacement
|
4290
|
+
// sp[8] : function
|
4082
4291
|
// Check if the calling frame is an arguments adaptor frame.
|
4083
4292
|
Label adaptor_frame, try_allocate, runtime;
|
4084
4293
|
__ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
|
@@ -4111,40 +4320,31 @@ void ArgumentsAccessStub::GenerateNewObject(MacroAssembler* masm) {
|
|
4111
4320
|
|
4112
4321
|
__ Addu(a1, a1, Operand(FixedArray::kHeaderSize / kPointerSize));
|
4113
4322
|
__ bind(&add_arguments_object);
|
4114
|
-
__ Addu(a1, a1, Operand(
|
4323
|
+
__ Addu(a1, a1, Operand(Heap::kArgumentsObjectSizeStrict / kPointerSize));
|
4115
4324
|
|
4116
4325
|
// Do the allocation of both objects in one go.
|
4117
|
-
__ AllocateInNewSpace(
|
4118
|
-
|
4119
|
-
|
4120
|
-
|
4121
|
-
|
4122
|
-
|
4123
|
-
|
4326
|
+
__ AllocateInNewSpace(a1,
|
4327
|
+
v0,
|
4328
|
+
a2,
|
4329
|
+
a3,
|
4330
|
+
&runtime,
|
4331
|
+
static_cast<AllocationFlags>(TAG_OBJECT |
|
4332
|
+
SIZE_IN_WORDS));
|
4124
4333
|
|
4125
4334
|
// Get the arguments boilerplate from the current (global) context.
|
4126
4335
|
__ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
4127
4336
|
__ lw(t0, FieldMemOperand(t0, GlobalObject::kGlobalContextOffset));
|
4128
|
-
__ lw(t0, MemOperand(t0,
|
4129
|
-
|
4337
|
+
__ lw(t0, MemOperand(t0, Context::SlotOffset(
|
4338
|
+
Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX)));
|
4130
4339
|
|
4131
4340
|
// Copy the JS object part.
|
4132
4341
|
__ CopyFields(v0, t0, a3.bit(), JSObject::kHeaderSize / kPointerSize);
|
4133
4342
|
|
4134
|
-
if (type_ == NEW_NON_STRICT) {
|
4135
|
-
// Setup the callee in-object property.
|
4136
|
-
STATIC_ASSERT(Heap::kArgumentsCalleeIndex == 1);
|
4137
|
-
__ lw(a3, MemOperand(sp, 2 * kPointerSize));
|
4138
|
-
const int kCalleeOffset = JSObject::kHeaderSize +
|
4139
|
-
Heap::kArgumentsCalleeIndex * kPointerSize;
|
4140
|
-
__ sw(a3, FieldMemOperand(v0, kCalleeOffset));
|
4141
|
-
}
|
4142
|
-
|
4143
4343
|
// Get the length (smi tagged) and set that as an in-object property too.
|
4144
4344
|
STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0);
|
4145
4345
|
__ lw(a1, MemOperand(sp, 0 * kPointerSize));
|
4146
4346
|
__ sw(a1, FieldMemOperand(v0, JSObject::kHeaderSize +
|
4147
|
-
|
4347
|
+
Heap::kArgumentsLengthIndex * kPointerSize));
|
4148
4348
|
|
4149
4349
|
Label done;
|
4150
4350
|
__ Branch(&done, eq, a1, Operand(zero_reg));
|
@@ -4154,12 +4354,13 @@ void ArgumentsAccessStub::GenerateNewObject(MacroAssembler* masm) {
|
|
4154
4354
|
|
4155
4355
|
// Setup the elements pointer in the allocated arguments object and
|
4156
4356
|
// initialize the header in the elements fixed array.
|
4157
|
-
__ Addu(t0, v0, Operand(
|
4357
|
+
__ Addu(t0, v0, Operand(Heap::kArgumentsObjectSizeStrict));
|
4158
4358
|
__ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
|
4159
4359
|
__ LoadRoot(a3, Heap::kFixedArrayMapRootIndex);
|
4160
4360
|
__ sw(a3, FieldMemOperand(t0, FixedArray::kMapOffset));
|
4161
4361
|
__ sw(a1, FieldMemOperand(t0, FixedArray::kLengthOffset));
|
4162
|
-
|
4362
|
+
// Untag the length for the loop.
|
4363
|
+
__ srl(a1, a1, kSmiTagSize);
|
4163
4364
|
|
4164
4365
|
// Copy the fixed array slots.
|
4165
4366
|
Label loop;
|
@@ -4183,7 +4384,7 @@ void ArgumentsAccessStub::GenerateNewObject(MacroAssembler* masm) {
|
|
4183
4384
|
|
4184
4385
|
// Do the runtime call to allocate the arguments object.
|
4185
4386
|
__ bind(&runtime);
|
4186
|
-
__ TailCallRuntime(Runtime::
|
4387
|
+
__ TailCallRuntime(Runtime::kNewStrictArgumentsFast, 3, 1);
|
4187
4388
|
}
|
4188
4389
|
|
4189
4390
|
|
@@ -4316,6 +4517,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
4316
4517
|
__ Addu(a2, a2, Operand(RegExpImpl::kLastMatchOverhead));
|
4317
4518
|
__ sra(at, a0, kSmiTagSize); // Untag length for comparison.
|
4318
4519
|
__ Branch(&runtime, gt, a2, Operand(at));
|
4520
|
+
|
4521
|
+
// Reset offset for possibly sliced string.
|
4522
|
+
__ mov(t0, zero_reg);
|
4319
4523
|
// subject: Subject string
|
4320
4524
|
// regexp_data: RegExp data (FixedArray)
|
4321
4525
|
// Check the representation and encoding of the subject string.
|
@@ -4323,29 +4527,41 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
4323
4527
|
__ lw(a0, FieldMemOperand(subject, HeapObject::kMapOffset));
|
4324
4528
|
__ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset));
|
4325
4529
|
// First check for flat string.
|
4326
|
-
__ And(
|
4530
|
+
__ And(a1, a0, Operand(kIsNotStringMask | kStringRepresentationMask));
|
4327
4531
|
STATIC_ASSERT((kStringTag | kSeqStringTag) == 0);
|
4328
|
-
__ Branch(&seq_string, eq,
|
4532
|
+
__ Branch(&seq_string, eq, a1, Operand(zero_reg));
|
4329
4533
|
|
4330
4534
|
// subject: Subject string
|
4331
4535
|
// a0: instance type if Subject string
|
4332
4536
|
// regexp_data: RegExp data (FixedArray)
|
4333
|
-
// Check for flat cons string.
|
4537
|
+
// Check for flat cons string or sliced string.
|
4334
4538
|
// A flat cons string is a cons string where the second part is the empty
|
4335
4539
|
// string. In that case the subject string is just the first part of the cons
|
4336
4540
|
// string. Also in this case the first part of the cons string is known to be
|
4337
4541
|
// a sequential string or an external string.
|
4338
|
-
|
4339
|
-
|
4340
|
-
|
4341
|
-
|
4542
|
+
// In the case of a sliced string its offset has to be taken into account.
|
4543
|
+
Label cons_string, check_encoding;
|
4544
|
+
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
|
4545
|
+
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
|
4546
|
+
__ Branch(&cons_string, lt, a1, Operand(kExternalStringTag));
|
4547
|
+
__ Branch(&runtime, eq, a1, Operand(kExternalStringTag));
|
4548
|
+
|
4549
|
+
// String is sliced.
|
4550
|
+
__ lw(t0, FieldMemOperand(subject, SlicedString::kOffsetOffset));
|
4551
|
+
__ sra(t0, t0, kSmiTagSize);
|
4552
|
+
__ lw(subject, FieldMemOperand(subject, SlicedString::kParentOffset));
|
4553
|
+
// t5: offset of sliced string, smi-tagged.
|
4554
|
+
__ jmp(&check_encoding);
|
4555
|
+
// String is a cons string, check whether it is flat.
|
4556
|
+
__ bind(&cons_string);
|
4342
4557
|
__ lw(a0, FieldMemOperand(subject, ConsString::kSecondOffset));
|
4343
4558
|
__ LoadRoot(a1, Heap::kEmptyStringRootIndex);
|
4344
4559
|
__ Branch(&runtime, ne, a0, Operand(a1));
|
4345
4560
|
__ lw(subject, FieldMemOperand(subject, ConsString::kFirstOffset));
|
4561
|
+
// Is first part of cons or parent of slice a flat string?
|
4562
|
+
__ bind(&check_encoding);
|
4346
4563
|
__ lw(a0, FieldMemOperand(subject, HeapObject::kMapOffset));
|
4347
4564
|
__ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset));
|
4348
|
-
// Is first part a flat string?
|
4349
4565
|
STATIC_ASSERT(kSeqStringTag == 0);
|
4350
4566
|
__ And(at, a0, Operand(kStringRepresentationMask));
|
4351
4567
|
__ Branch(&runtime, ne, at, Operand(zero_reg));
|
@@ -4361,14 +4577,13 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
4361
4577
|
__ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for ascii.
|
4362
4578
|
__ lw(t9, FieldMemOperand(regexp_data, JSRegExp::kDataAsciiCodeOffset));
|
4363
4579
|
__ sra(a3, a0, 2); // a3 is 1 for ascii, 0 for UC16 (usyed below).
|
4364
|
-
__ lw(
|
4365
|
-
__ movz(t9,
|
4580
|
+
__ lw(t1, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset));
|
4581
|
+
__ movz(t9, t1, a0); // If UC16 (a0 is 0), replace t9 w/kDataUC16CodeOffset.
|
4366
4582
|
|
4367
4583
|
// Check that the irregexp code has been generated for the actual string
|
4368
|
-
// encoding. If it has, the field contains a code object otherwise it
|
4369
|
-
//
|
4370
|
-
__
|
4371
|
-
__ Branch(&runtime, ne, a0, Operand(CODE_TYPE));
|
4584
|
+
// encoding. If it has, the field contains a code object otherwise it contains
|
4585
|
+
// a smi (code flushing support).
|
4586
|
+
__ JumpIfSmi(t9, &runtime);
|
4372
4587
|
|
4373
4588
|
// a3: encoding of subject string (1 if ASCII, 0 if two_byte);
|
4374
4589
|
// t9: code
|
@@ -4430,23 +4645,32 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
4430
4645
|
|
4431
4646
|
// For arguments 4 and 3 get string length, calculate start of string data
|
4432
4647
|
// and calculate the shift of the index (0 for ASCII and 1 for two byte).
|
4433
|
-
__ lw(a0, FieldMemOperand(subject, String::kLengthOffset));
|
4434
|
-
__ sra(a0, a0, kSmiTagSize);
|
4435
4648
|
STATIC_ASSERT(SeqAsciiString::kHeaderSize == SeqTwoByteString::kHeaderSize);
|
4436
|
-
__ Addu(
|
4649
|
+
__ Addu(t2, subject, Operand(SeqAsciiString::kHeaderSize - kHeapObjectTag));
|
4437
4650
|
__ Xor(a3, a3, Operand(1)); // 1 for 2-byte str, 0 for 1-byte.
|
4438
|
-
//
|
4439
|
-
//
|
4651
|
+
// Load the length from the original subject string from the previous stack
|
4652
|
+
// frame. Therefore we have to use fp, which points exactly to two pointer
|
4653
|
+
// sizes below the previous sp. (Because creating a new stack frame pushes
|
4654
|
+
// the previous fp onto the stack and moves up sp by 2 * kPointerSize.)
|
4655
|
+
__ lw(a0, MemOperand(fp, kSubjectOffset + 2 * kPointerSize));
|
4656
|
+
// If slice offset is not 0, load the length from the original sliced string.
|
4657
|
+
// Argument 4, a3: End of string data
|
4658
|
+
// Argument 3, a2: Start of string data
|
4659
|
+
// Prepare start and end index of the input.
|
4660
|
+
__ sllv(t1, t0, a3);
|
4661
|
+
__ addu(t0, t2, t1);
|
4440
4662
|
__ sllv(t1, a1, a3);
|
4441
4663
|
__ addu(a2, t0, t1);
|
4442
|
-
__ sllv(t1, a0, a3);
|
4443
|
-
__ addu(a3, t0, t1);
|
4444
4664
|
|
4665
|
+
__ lw(t2, FieldMemOperand(a0, String::kLengthOffset));
|
4666
|
+
__ sra(t2, t2, kSmiTagSize);
|
4667
|
+
__ sllv(t1, t2, a3);
|
4668
|
+
__ addu(a3, t0, t1);
|
4445
4669
|
// Argument 2 (a1): Previous index.
|
4446
4670
|
// Already there
|
4447
4671
|
|
4448
4672
|
// Argument 1 (a0): Subject string.
|
4449
|
-
|
4673
|
+
// Already there
|
4450
4674
|
|
4451
4675
|
// Locate the code entry and call it.
|
4452
4676
|
__ Addu(t9, t9, Operand(Code::kHeaderSize - kHeapObjectTag));
|
@@ -4463,11 +4687,14 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
4463
4687
|
// Check the result.
|
4464
4688
|
|
4465
4689
|
Label success;
|
4466
|
-
__ Branch(&success, eq,
|
4690
|
+
__ Branch(&success, eq,
|
4691
|
+
subject, Operand(NativeRegExpMacroAssembler::SUCCESS));
|
4467
4692
|
Label failure;
|
4468
|
-
__ Branch(&failure, eq,
|
4693
|
+
__ Branch(&failure, eq,
|
4694
|
+
subject, Operand(NativeRegExpMacroAssembler::FAILURE));
|
4469
4695
|
// If not exception it can only be retry. Handle that in the runtime system.
|
4470
|
-
__ Branch(&runtime, ne,
|
4696
|
+
__ Branch(&runtime, ne,
|
4697
|
+
subject, Operand(NativeRegExpMacroAssembler::EXCEPTION));
|
4471
4698
|
// Result must now be exception. If there is no pending exception already a
|
4472
4699
|
// stack overflow (on the backtrack stack) was detected in RegExp code but
|
4473
4700
|
// haven't created the exception yet. Handle that in the runtime system.
|
@@ -4478,16 +4705,16 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
4478
4705
|
__ li(a2, Operand(ExternalReference(Isolate::k_pending_exception_address,
|
4479
4706
|
masm->isolate())));
|
4480
4707
|
__ lw(v0, MemOperand(a2, 0));
|
4481
|
-
__ Branch(&runtime, eq,
|
4708
|
+
__ Branch(&runtime, eq, subject, Operand(a1));
|
4482
4709
|
|
4483
4710
|
__ sw(a1, MemOperand(a2, 0)); // Clear pending exception.
|
4484
4711
|
|
4485
4712
|
// Check if the exception is a termination. If so, throw as uncatchable.
|
4486
4713
|
__ LoadRoot(a0, Heap::kTerminationExceptionRootIndex);
|
4487
4714
|
Label termination_exception;
|
4488
|
-
__ Branch(&termination_exception, eq,
|
4715
|
+
__ Branch(&termination_exception, eq, subject, Operand(a0));
|
4489
4716
|
|
4490
|
-
__ Throw(
|
4717
|
+
__ Throw(subject); // Expects thrown value in v0.
|
4491
4718
|
|
4492
4719
|
__ bind(&termination_exception);
|
4493
4720
|
__ ThrowUncatchable(TERMINATION, v0); // Expects thrown value in v0.
|
@@ -4692,7 +4919,11 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
|
4692
4919
|
Label call_as_function;
|
4693
4920
|
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
|
4694
4921
|
__ Branch(&call_as_function, eq, t0, Operand(at));
|
4695
|
-
__ InvokeFunction(a1,
|
4922
|
+
__ InvokeFunction(a1,
|
4923
|
+
actual,
|
4924
|
+
JUMP_FUNCTION,
|
4925
|
+
NullCallWrapper(),
|
4926
|
+
CALL_AS_METHOD);
|
4696
4927
|
__ bind(&call_as_function);
|
4697
4928
|
}
|
4698
4929
|
__ InvokeFunction(a1,
|
@@ -4709,6 +4940,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
|
4709
4940
|
__ li(a0, Operand(argc_)); // Setup the number of arguments.
|
4710
4941
|
__ mov(a2, zero_reg);
|
4711
4942
|
__ GetBuiltinEntry(a3, Builtins::CALL_NON_FUNCTION);
|
4943
|
+
__ SetCallKind(t1, CALL_AS_METHOD);
|
4712
4944
|
__ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
|
4713
4945
|
RelocInfo::CODE_TARGET);
|
4714
4946
|
}
|
@@ -4716,16 +4948,9 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
|
4716
4948
|
|
4717
4949
|
// Unfortunately you have to run without snapshots to see most of these
|
4718
4950
|
// names in the profile since most compare stubs end up in the snapshot.
|
4719
|
-
|
4951
|
+
void CompareStub::PrintName(StringStream* stream) {
|
4720
4952
|
ASSERT((lhs_.is(a0) && rhs_.is(a1)) ||
|
4721
4953
|
(lhs_.is(a1) && rhs_.is(a0)));
|
4722
|
-
|
4723
|
-
if (name_ != NULL) return name_;
|
4724
|
-
const int kMaxNameLength = 100;
|
4725
|
-
name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
|
4726
|
-
kMaxNameLength);
|
4727
|
-
if (name_ == NULL) return "OOM";
|
4728
|
-
|
4729
4954
|
const char* cc_name;
|
4730
4955
|
switch (cc_) {
|
4731
4956
|
case lt: cc_name = "LT"; break;
|
@@ -4736,40 +4961,14 @@ const char* CompareStub::GetName() {
|
|
4736
4961
|
case ne: cc_name = "NE"; break;
|
4737
4962
|
default: cc_name = "UnknownCondition"; break;
|
4738
4963
|
}
|
4739
|
-
|
4740
|
-
|
4741
|
-
|
4742
|
-
|
4743
|
-
|
4744
|
-
if (
|
4745
|
-
|
4746
|
-
|
4747
|
-
|
4748
|
-
const char* never_nan_nan_name = "";
|
4749
|
-
if (never_nan_nan_ && (cc_ == eq || cc_ == ne)) {
|
4750
|
-
never_nan_nan_name = "_NO_NAN";
|
4751
|
-
}
|
4752
|
-
|
4753
|
-
const char* include_number_compare_name = "";
|
4754
|
-
if (!include_number_compare_) {
|
4755
|
-
include_number_compare_name = "_NO_NUMBER";
|
4756
|
-
}
|
4757
|
-
|
4758
|
-
const char* include_smi_compare_name = "";
|
4759
|
-
if (!include_smi_compare_) {
|
4760
|
-
include_smi_compare_name = "_NO_SMI";
|
4761
|
-
}
|
4762
|
-
|
4763
|
-
OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
|
4764
|
-
"CompareStub_%s%s%s%s%s%s",
|
4765
|
-
cc_name,
|
4766
|
-
lhs_name,
|
4767
|
-
rhs_name,
|
4768
|
-
strict_name,
|
4769
|
-
never_nan_nan_name,
|
4770
|
-
include_number_compare_name,
|
4771
|
-
include_smi_compare_name);
|
4772
|
-
return name_;
|
4964
|
+
bool is_equality = cc_ == eq || cc_ == ne;
|
4965
|
+
stream->Add("CompareStub_%s", cc_name);
|
4966
|
+
stream->Add(lhs_.is(a0) ? "_a0" : "_a1");
|
4967
|
+
stream->Add(rhs_.is(a0) ? "_a0" : "_a1");
|
4968
|
+
if (strict_ && is_equality) stream->Add("_STRICT");
|
4969
|
+
if (never_nan_nan_ && is_equality) stream->Add("_NO_NAN");
|
4970
|
+
if (!include_number_compare_) stream->Add("_NO_NUMBER");
|
4971
|
+
if (!include_smi_compare_) stream->Add("_NO_SMI");
|
4773
4972
|
}
|
4774
4973
|
|
4775
4974
|
|
@@ -4791,6 +4990,7 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
|
|
4791
4990
|
Label flat_string;
|
4792
4991
|
Label ascii_string;
|
4793
4992
|
Label got_char_code;
|
4993
|
+
Label sliced_string;
|
4794
4994
|
|
4795
4995
|
ASSERT(!t0.is(scratch_));
|
4796
4996
|
ASSERT(!t0.is(index_));
|
@@ -4824,23 +5024,37 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
|
|
4824
5024
|
__ Branch(&flat_string, eq, t0, Operand(zero_reg));
|
4825
5025
|
|
4826
5026
|
// Handle non-flat strings.
|
4827
|
-
__ And(
|
4828
|
-
|
5027
|
+
__ And(result_, result_, Operand(kStringRepresentationMask));
|
5028
|
+
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
|
5029
|
+
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
|
5030
|
+
__ Branch(&sliced_string, gt, result_, Operand(kExternalStringTag));
|
5031
|
+
__ Branch(&call_runtime_, eq, result_, Operand(kExternalStringTag));
|
4829
5032
|
|
4830
5033
|
// ConsString.
|
4831
5034
|
// Check whether the right hand side is the empty string (i.e. if
|
4832
5035
|
// this is really a flat string in a cons string). If that is not
|
4833
5036
|
// the case we would rather go to the runtime system now to flatten
|
4834
5037
|
// the string.
|
5038
|
+
Label assure_seq_string;
|
4835
5039
|
__ lw(result_, FieldMemOperand(object_, ConsString::kSecondOffset));
|
4836
5040
|
__ LoadRoot(t0, Heap::kEmptyStringRootIndex);
|
4837
5041
|
__ Branch(&call_runtime_, ne, result_, Operand(t0));
|
4838
5042
|
|
4839
5043
|
// Get the first of the two strings and load its instance type.
|
4840
5044
|
__ lw(object_, FieldMemOperand(object_, ConsString::kFirstOffset));
|
5045
|
+
__ jmp(&assure_seq_string);
|
5046
|
+
|
5047
|
+
// SlicedString, unpack and add offset.
|
5048
|
+
__ bind(&sliced_string);
|
5049
|
+
__ lw(result_, FieldMemOperand(object_, SlicedString::kOffsetOffset));
|
5050
|
+
__ addu(scratch_, scratch_, result_);
|
5051
|
+
__ lw(object_, FieldMemOperand(object_, SlicedString::kParentOffset));
|
5052
|
+
|
5053
|
+
// Assure that we are dealing with a sequential string. Go to runtime if not.
|
5054
|
+
__ bind(&assure_seq_string);
|
4841
5055
|
__ lw(result_, FieldMemOperand(object_, HeapObject::kMapOffset));
|
4842
5056
|
__ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset));
|
4843
|
-
//
|
5057
|
+
// Check that parent is not an external string. Go to runtime otherwise.
|
4844
5058
|
STATIC_ASSERT(kSeqStringTag == 0);
|
4845
5059
|
|
4846
5060
|
__ And(t0, result_, Operand(kStringRepresentationMask));
|
@@ -5411,6 +5625,11 @@ void SubStringStub::Generate(MacroAssembler* masm) {
|
|
5411
5625
|
Register to = t2;
|
5412
5626
|
Register from = t3;
|
5413
5627
|
|
5628
|
+
if (FLAG_string_slices) {
|
5629
|
+
__ nop(); // Jumping as first instruction would crash the code generation.
|
5630
|
+
__ jmp(&sub_string_runtime);
|
5631
|
+
}
|
5632
|
+
|
5414
5633
|
// Check bounds and smi-ness.
|
5415
5634
|
__ lw(to, MemOperand(sp, kToOffset));
|
5416
5635
|
__ lw(from, MemOperand(sp, kFromOffset));
|
@@ -6352,6 +6571,7 @@ void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
|
|
6352
6571
|
__ Jump(a2);
|
6353
6572
|
}
|
6354
6573
|
|
6574
|
+
|
6355
6575
|
void DirectCEntryStub::Generate(MacroAssembler* masm) {
|
6356
6576
|
// No need to pop or drop anything, LeaveExitFrame will restore the old
|
6357
6577
|
// stack, thus dropping the allocated space for the return value.
|
@@ -6376,6 +6596,7 @@ void DirectCEntryStub::GenerateCall(MacroAssembler* masm,
|
|
6376
6596
|
this->GenerateCall(masm, t9);
|
6377
6597
|
}
|
6378
6598
|
|
6599
|
+
|
6379
6600
|
void DirectCEntryStub::GenerateCall(MacroAssembler* masm,
|
6380
6601
|
Register target) {
|
6381
6602
|
__ Move(t9, target);
|