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
@@ -79,15 +79,14 @@ static void GenerateStringDictionaryReceiverCheck(MacroAssembler* masm,
|
|
79
79
|
// elements map.
|
80
80
|
|
81
81
|
// Check that the receiver isn't a smi.
|
82
|
-
__
|
83
|
-
__ b(eq, miss);
|
82
|
+
__ JumpIfSmi(receiver, miss);
|
84
83
|
|
85
84
|
// Check that the receiver is a valid JS object.
|
86
|
-
__ CompareObjectType(receiver, t0, t1,
|
85
|
+
__ CompareObjectType(receiver, t0, t1, FIRST_SPEC_OBJECT_TYPE);
|
87
86
|
__ b(lt, miss);
|
88
87
|
|
89
88
|
// If this assert fails, we have to check upper bound too.
|
90
|
-
|
89
|
+
STATIC_ASSERT(LAST_TYPE == LAST_SPEC_OBJECT_TYPE);
|
91
90
|
|
92
91
|
GenerateGlobalInstanceTypeCheck(masm, t1, miss);
|
93
92
|
|
@@ -213,101 +212,6 @@ static void GenerateDictionaryStore(MacroAssembler* masm,
|
|
213
212
|
}
|
214
213
|
|
215
214
|
|
216
|
-
static void GenerateNumberDictionaryLoad(MacroAssembler* masm,
|
217
|
-
Label* miss,
|
218
|
-
Register elements,
|
219
|
-
Register key,
|
220
|
-
Register result,
|
221
|
-
Register t0,
|
222
|
-
Register t1,
|
223
|
-
Register t2) {
|
224
|
-
// Register use:
|
225
|
-
//
|
226
|
-
// elements - holds the slow-case elements of the receiver on entry.
|
227
|
-
// Unchanged unless 'result' is the same register.
|
228
|
-
//
|
229
|
-
// key - holds the smi key on entry.
|
230
|
-
// Unchanged unless 'result' is the same register.
|
231
|
-
//
|
232
|
-
// result - holds the result on exit if the load succeeded.
|
233
|
-
// Allowed to be the same as 'key' or 'result'.
|
234
|
-
// Unchanged on bailout so 'key' or 'result' can be used
|
235
|
-
// in further computation.
|
236
|
-
//
|
237
|
-
// Scratch registers:
|
238
|
-
//
|
239
|
-
// t0 - holds the untagged key on entry and holds the hash once computed.
|
240
|
-
//
|
241
|
-
// t1 - used to hold the capacity mask of the dictionary
|
242
|
-
//
|
243
|
-
// t2 - used for the index into the dictionary.
|
244
|
-
Label done;
|
245
|
-
|
246
|
-
// Compute the hash code from the untagged key. This must be kept in sync
|
247
|
-
// with ComputeIntegerHash in utils.h.
|
248
|
-
//
|
249
|
-
// hash = ~hash + (hash << 15);
|
250
|
-
__ mvn(t1, Operand(t0));
|
251
|
-
__ add(t0, t1, Operand(t0, LSL, 15));
|
252
|
-
// hash = hash ^ (hash >> 12);
|
253
|
-
__ eor(t0, t0, Operand(t0, LSR, 12));
|
254
|
-
// hash = hash + (hash << 2);
|
255
|
-
__ add(t0, t0, Operand(t0, LSL, 2));
|
256
|
-
// hash = hash ^ (hash >> 4);
|
257
|
-
__ eor(t0, t0, Operand(t0, LSR, 4));
|
258
|
-
// hash = hash * 2057;
|
259
|
-
__ mov(t1, Operand(2057));
|
260
|
-
__ mul(t0, t0, t1);
|
261
|
-
// hash = hash ^ (hash >> 16);
|
262
|
-
__ eor(t0, t0, Operand(t0, LSR, 16));
|
263
|
-
|
264
|
-
// Compute the capacity mask.
|
265
|
-
__ ldr(t1, FieldMemOperand(elements, NumberDictionary::kCapacityOffset));
|
266
|
-
__ mov(t1, Operand(t1, ASR, kSmiTagSize)); // convert smi to int
|
267
|
-
__ sub(t1, t1, Operand(1));
|
268
|
-
|
269
|
-
// Generate an unrolled loop that performs a few probes before giving up.
|
270
|
-
static const int kProbes = 4;
|
271
|
-
for (int i = 0; i < kProbes; i++) {
|
272
|
-
// Use t2 for index calculations and keep the hash intact in t0.
|
273
|
-
__ mov(t2, t0);
|
274
|
-
// Compute the masked index: (hash + i + i * i) & mask.
|
275
|
-
if (i > 0) {
|
276
|
-
__ add(t2, t2, Operand(NumberDictionary::GetProbeOffset(i)));
|
277
|
-
}
|
278
|
-
__ and_(t2, t2, Operand(t1));
|
279
|
-
|
280
|
-
// Scale the index by multiplying by the element size.
|
281
|
-
ASSERT(NumberDictionary::kEntrySize == 3);
|
282
|
-
__ add(t2, t2, Operand(t2, LSL, 1)); // t2 = t2 * 3
|
283
|
-
|
284
|
-
// Check if the key is identical to the name.
|
285
|
-
__ add(t2, elements, Operand(t2, LSL, kPointerSizeLog2));
|
286
|
-
__ ldr(ip, FieldMemOperand(t2, NumberDictionary::kElementsStartOffset));
|
287
|
-
__ cmp(key, Operand(ip));
|
288
|
-
if (i != kProbes - 1) {
|
289
|
-
__ b(eq, &done);
|
290
|
-
} else {
|
291
|
-
__ b(ne, miss);
|
292
|
-
}
|
293
|
-
}
|
294
|
-
|
295
|
-
__ bind(&done);
|
296
|
-
// Check that the value is a normal property.
|
297
|
-
// t2: elements + (index * kPointerSize)
|
298
|
-
const int kDetailsOffset =
|
299
|
-
NumberDictionary::kElementsStartOffset + 2 * kPointerSize;
|
300
|
-
__ ldr(t1, FieldMemOperand(t2, kDetailsOffset));
|
301
|
-
__ tst(t1, Operand(Smi::FromInt(PropertyDetails::TypeField::mask())));
|
302
|
-
__ b(ne, miss);
|
303
|
-
|
304
|
-
// Get the value at the masked, scaled index and return.
|
305
|
-
const int kValueOffset =
|
306
|
-
NumberDictionary::kElementsStartOffset + kPointerSize;
|
307
|
-
__ ldr(result, FieldMemOperand(t2, kValueOffset));
|
308
|
-
}
|
309
|
-
|
310
|
-
|
311
215
|
void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
|
312
216
|
// ----------- S t a t e -------------
|
313
217
|
// -- r2 : name
|
@@ -433,7 +337,7 @@ static void GenerateFastArrayLoad(MacroAssembler* masm,
|
|
433
337
|
// Fast case: Do the load.
|
434
338
|
__ add(scratch1, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
|
435
339
|
// The key is a smi.
|
436
|
-
|
340
|
+
STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
|
437
341
|
__ ldr(scratch2,
|
438
342
|
MemOperand(scratch1, key, LSL, kPointerSizeLog2 - kSmiTagSize));
|
439
343
|
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
|
@@ -466,7 +370,7 @@ static void GenerateKeyStringCheck(MacroAssembler* masm,
|
|
466
370
|
// Is the string a symbol?
|
467
371
|
// map: key map
|
468
372
|
__ ldrb(hash, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
469
|
-
|
373
|
+
STATIC_ASSERT(kSymbolTag != 0);
|
470
374
|
__ tst(hash, Operand(kIsSymbolMask));
|
471
375
|
__ b(eq, not_symbol);
|
472
376
|
}
|
@@ -503,8 +407,7 @@ static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
|
|
503
407
|
// to probe.
|
504
408
|
//
|
505
409
|
// Check for number.
|
506
|
-
__
|
507
|
-
__ b(eq, &number);
|
410
|
+
__ JumpIfSmi(r1, &number);
|
508
411
|
__ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE);
|
509
412
|
__ b(ne, &non_number);
|
510
413
|
__ bind(&number);
|
@@ -548,8 +451,7 @@ static void GenerateFunctionTailCall(MacroAssembler* masm,
|
|
548
451
|
// r1: function
|
549
452
|
|
550
453
|
// Check that the value isn't a smi.
|
551
|
-
__
|
552
|
-
__ b(eq, miss);
|
454
|
+
__ JumpIfSmi(r1, miss);
|
553
455
|
|
554
456
|
// Check that the value is a JSFunction.
|
555
457
|
__ CompareObjectType(r1, scratch, scratch, JS_FUNCTION_TYPE);
|
@@ -557,7 +459,8 @@ static void GenerateFunctionTailCall(MacroAssembler* masm,
|
|
557
459
|
|
558
460
|
// Invoke the function.
|
559
461
|
ParameterCount actual(argc);
|
560
|
-
__ InvokeFunction(r1, actual, JUMP_FUNCTION
|
462
|
+
__ InvokeFunction(r1, actual, JUMP_FUNCTION,
|
463
|
+
NullCallWrapper(), CALL_AS_METHOD);
|
561
464
|
}
|
562
465
|
|
563
466
|
|
@@ -623,8 +526,7 @@ static void GenerateCallMiss(MacroAssembler* masm,
|
|
623
526
|
if (id == IC::kCallIC_Miss) {
|
624
527
|
Label invoke, global;
|
625
528
|
__ ldr(r2, MemOperand(sp, argc * kPointerSize)); // receiver
|
626
|
-
__
|
627
|
-
__ b(eq, &invoke);
|
529
|
+
__ JumpIfSmi(r2, &invoke);
|
628
530
|
__ CompareObjectType(r2, r3, r3, JS_GLOBAL_OBJECT_TYPE);
|
629
531
|
__ b(eq, &global);
|
630
532
|
__ cmp(r3, Operand(JS_BUILTINS_OBJECT_TYPE));
|
@@ -741,7 +643,7 @@ void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
|
|
741
643
|
__ b(ne, &slow_load);
|
742
644
|
__ mov(r0, Operand(r2, ASR, kSmiTagSize));
|
743
645
|
// r0: untagged index
|
744
|
-
|
646
|
+
__ LoadFromNumberDictionary(&slow_load, r4, r2, r1, r0, r3, r5);
|
745
647
|
__ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, r0, r3);
|
746
648
|
__ jmp(&do_call);
|
747
649
|
|
@@ -811,8 +713,7 @@ void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) {
|
|
811
713
|
|
812
714
|
// Check if the name is a string.
|
813
715
|
Label miss;
|
814
|
-
__
|
815
|
-
__ b(eq, &miss);
|
716
|
+
__ JumpIfSmi(r2, &miss);
|
816
717
|
__ IsObjectJSStringType(r2, r0, &miss);
|
817
718
|
|
818
719
|
GenerateCallNormal(masm, argc);
|
@@ -886,6 +787,174 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|
886
787
|
}
|
887
788
|
|
888
789
|
|
790
|
+
static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
|
791
|
+
Register object,
|
792
|
+
Register key,
|
793
|
+
Register scratch1,
|
794
|
+
Register scratch2,
|
795
|
+
Register scratch3,
|
796
|
+
Label* unmapped_case,
|
797
|
+
Label* slow_case) {
|
798
|
+
Heap* heap = masm->isolate()->heap();
|
799
|
+
|
800
|
+
// Check that the receiver is a JSObject. Because of the map check
|
801
|
+
// later, we do not need to check for interceptors or whether it
|
802
|
+
// requires access checks.
|
803
|
+
__ JumpIfSmi(object, slow_case);
|
804
|
+
// Check that the object is some kind of JSObject.
|
805
|
+
__ CompareObjectType(object, scratch1, scratch2, FIRST_JS_RECEIVER_TYPE);
|
806
|
+
__ b(lt, slow_case);
|
807
|
+
|
808
|
+
// Check that the key is a positive smi.
|
809
|
+
__ tst(key, Operand(0x8000001));
|
810
|
+
__ b(ne, slow_case);
|
811
|
+
|
812
|
+
// Load the elements into scratch1 and check its map.
|
813
|
+
Handle<Map> arguments_map(heap->non_strict_arguments_elements_map());
|
814
|
+
__ ldr(scratch1, FieldMemOperand(object, JSObject::kElementsOffset));
|
815
|
+
__ CheckMap(scratch1, scratch2, arguments_map, slow_case, DONT_DO_SMI_CHECK);
|
816
|
+
|
817
|
+
// Check if element is in the range of mapped arguments. If not, jump
|
818
|
+
// to the unmapped lookup with the parameter map in scratch1.
|
819
|
+
__ ldr(scratch2, FieldMemOperand(scratch1, FixedArray::kLengthOffset));
|
820
|
+
__ sub(scratch2, scratch2, Operand(Smi::FromInt(2)));
|
821
|
+
__ cmp(key, Operand(scratch2));
|
822
|
+
__ b(cs, unmapped_case);
|
823
|
+
|
824
|
+
// Load element index and check whether it is the hole.
|
825
|
+
const int kOffset =
|
826
|
+
FixedArray::kHeaderSize + 2 * kPointerSize - kHeapObjectTag;
|
827
|
+
|
828
|
+
__ mov(scratch3, Operand(kPointerSize >> 1));
|
829
|
+
__ mul(scratch3, key, scratch3);
|
830
|
+
__ add(scratch3, scratch3, Operand(kOffset));
|
831
|
+
|
832
|
+
__ ldr(scratch2, MemOperand(scratch1, scratch3));
|
833
|
+
__ LoadRoot(scratch3, Heap::kTheHoleValueRootIndex);
|
834
|
+
__ cmp(scratch2, scratch3);
|
835
|
+
__ b(eq, unmapped_case);
|
836
|
+
|
837
|
+
// Load value from context and return it. We can reuse scratch1 because
|
838
|
+
// we do not jump to the unmapped lookup (which requires the parameter
|
839
|
+
// map in scratch1).
|
840
|
+
__ ldr(scratch1, FieldMemOperand(scratch1, FixedArray::kHeaderSize));
|
841
|
+
__ mov(scratch3, Operand(kPointerSize >> 1));
|
842
|
+
__ mul(scratch3, scratch2, scratch3);
|
843
|
+
__ add(scratch3, scratch3, Operand(Context::kHeaderSize - kHeapObjectTag));
|
844
|
+
return MemOperand(scratch1, scratch3);
|
845
|
+
}
|
846
|
+
|
847
|
+
|
848
|
+
static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
|
849
|
+
Register key,
|
850
|
+
Register parameter_map,
|
851
|
+
Register scratch,
|
852
|
+
Label* slow_case) {
|
853
|
+
// Element is in arguments backing store, which is referenced by the
|
854
|
+
// second element of the parameter_map. The parameter_map register
|
855
|
+
// must be loaded with the parameter map of the arguments object and is
|
856
|
+
// overwritten.
|
857
|
+
const int kBackingStoreOffset = FixedArray::kHeaderSize + kPointerSize;
|
858
|
+
Register backing_store = parameter_map;
|
859
|
+
__ ldr(backing_store, FieldMemOperand(parameter_map, kBackingStoreOffset));
|
860
|
+
Handle<Map> fixed_array_map(masm->isolate()->heap()->fixed_array_map());
|
861
|
+
__ CheckMap(backing_store, scratch, fixed_array_map, slow_case,
|
862
|
+
DONT_DO_SMI_CHECK);
|
863
|
+
__ ldr(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset));
|
864
|
+
__ cmp(key, Operand(scratch));
|
865
|
+
__ b(cs, slow_case);
|
866
|
+
__ mov(scratch, Operand(kPointerSize >> 1));
|
867
|
+
__ mul(scratch, key, scratch);
|
868
|
+
__ add(scratch,
|
869
|
+
scratch,
|
870
|
+
Operand(FixedArray::kHeaderSize - kHeapObjectTag));
|
871
|
+
return MemOperand(backing_store, scratch);
|
872
|
+
}
|
873
|
+
|
874
|
+
|
875
|
+
void KeyedLoadIC::GenerateNonStrictArguments(MacroAssembler* masm) {
|
876
|
+
// ---------- S t a t e --------------
|
877
|
+
// -- lr : return address
|
878
|
+
// -- r0 : key
|
879
|
+
// -- r1 : receiver
|
880
|
+
// -----------------------------------
|
881
|
+
Label slow, notin;
|
882
|
+
MemOperand mapped_location =
|
883
|
+
GenerateMappedArgumentsLookup(masm, r1, r0, r2, r3, r4, ¬in, &slow);
|
884
|
+
__ ldr(r0, mapped_location);
|
885
|
+
__ Ret();
|
886
|
+
__ bind(¬in);
|
887
|
+
// The unmapped lookup expects that the parameter map is in r2.
|
888
|
+
MemOperand unmapped_location =
|
889
|
+
GenerateUnmappedArgumentsLookup(masm, r0, r2, r3, &slow);
|
890
|
+
__ ldr(r2, unmapped_location);
|
891
|
+
__ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
|
892
|
+
__ cmp(r2, r3);
|
893
|
+
__ b(eq, &slow);
|
894
|
+
__ mov(r0, r2);
|
895
|
+
__ Ret();
|
896
|
+
__ bind(&slow);
|
897
|
+
GenerateMiss(masm, false);
|
898
|
+
}
|
899
|
+
|
900
|
+
|
901
|
+
void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) {
|
902
|
+
// ---------- S t a t e --------------
|
903
|
+
// -- r0 : value
|
904
|
+
// -- r1 : key
|
905
|
+
// -- r2 : receiver
|
906
|
+
// -- lr : return address
|
907
|
+
// -----------------------------------
|
908
|
+
Label slow, notin;
|
909
|
+
MemOperand mapped_location =
|
910
|
+
GenerateMappedArgumentsLookup(masm, r2, r1, r3, r4, r5, ¬in, &slow);
|
911
|
+
__ str(r0, mapped_location);
|
912
|
+
__ add(r6, r3, r5);
|
913
|
+
__ RecordWrite(r3, r6, r9);
|
914
|
+
__ Ret();
|
915
|
+
__ bind(¬in);
|
916
|
+
// The unmapped lookup expects that the parameter map is in r3.
|
917
|
+
MemOperand unmapped_location =
|
918
|
+
GenerateUnmappedArgumentsLookup(masm, r1, r3, r4, &slow);
|
919
|
+
__ str(r0, unmapped_location);
|
920
|
+
__ add(r6, r3, r4);
|
921
|
+
__ RecordWrite(r3, r6, r9);
|
922
|
+
__ Ret();
|
923
|
+
__ bind(&slow);
|
924
|
+
GenerateMiss(masm, false);
|
925
|
+
}
|
926
|
+
|
927
|
+
|
928
|
+
void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm,
|
929
|
+
int argc) {
|
930
|
+
// ----------- S t a t e -------------
|
931
|
+
// -- r2 : name
|
932
|
+
// -- lr : return address
|
933
|
+
// -----------------------------------
|
934
|
+
Label slow, notin;
|
935
|
+
// Load receiver.
|
936
|
+
__ ldr(r1, MemOperand(sp, argc * kPointerSize));
|
937
|
+
MemOperand mapped_location =
|
938
|
+
GenerateMappedArgumentsLookup(masm, r1, r2, r3, r4, r5, ¬in, &slow);
|
939
|
+
__ ldr(r1, mapped_location);
|
940
|
+
GenerateFunctionTailCall(masm, argc, &slow, r3);
|
941
|
+
__ bind(¬in);
|
942
|
+
// The unmapped lookup expects that the parameter map is in r3.
|
943
|
+
MemOperand unmapped_location =
|
944
|
+
GenerateUnmappedArgumentsLookup(masm, r2, r3, r4, &slow);
|
945
|
+
__ ldr(r1, unmapped_location);
|
946
|
+
__ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
|
947
|
+
__ cmp(r1, r3);
|
948
|
+
__ b(eq, &slow);
|
949
|
+
GenerateFunctionTailCall(masm, argc, &slow, r3);
|
950
|
+
__ bind(&slow);
|
951
|
+
GenerateMiss(masm, argc);
|
952
|
+
}
|
953
|
+
|
954
|
+
|
955
|
+
Object* KeyedLoadIC_Miss(Arguments args);
|
956
|
+
|
957
|
+
|
889
958
|
void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, bool force_generic) {
|
890
959
|
// ---------- S t a t e --------------
|
891
960
|
// -- lr : return address
|
@@ -943,11 +1012,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
|
943
1012
|
GenerateKeyedLoadReceiverCheck(
|
944
1013
|
masm, receiver, r2, r3, Map::kHasIndexedInterceptor, &slow);
|
945
1014
|
|
946
|
-
// Check the
|
947
|
-
|
948
|
-
__ ldrb(r3, FieldMemOperand(r2, Map::kBitField2Offset));
|
949
|
-
__ tst(r3, Operand(1 << Map::kHasFastElements));
|
950
|
-
__ b(eq, &check_number_dictionary);
|
1015
|
+
// Check the receiver's map to see if it has fast elements.
|
1016
|
+
__ CheckFastElements(r2, r3, &check_number_dictionary);
|
951
1017
|
|
952
1018
|
GenerateFastArrayLoad(
|
953
1019
|
masm, receiver, key, r4, r3, r2, r0, NULL, &slow);
|
@@ -966,7 +1032,7 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
|
966
1032
|
__ cmp(r3, ip);
|
967
1033
|
__ b(ne, &slow);
|
968
1034
|
__ mov(r2, Operand(r0, ASR, kSmiTagSize));
|
969
|
-
|
1035
|
+
__ LoadFromNumberDictionary(&slow, r4, r0, r0, r2, r3, r5);
|
970
1036
|
__ Ret();
|
971
1037
|
|
972
1038
|
// Slow case, key and receiver still in r0 and r1.
|
@@ -1213,11 +1279,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
|
1213
1279
|
// r4 and r5 are used as general scratch registers.
|
1214
1280
|
|
1215
1281
|
// Check that the key is a smi.
|
1216
|
-
__
|
1217
|
-
__ b(ne, &slow);
|
1282
|
+
__ JumpIfNotSmi(key, &slow);
|
1218
1283
|
// Check that the object isn't a smi.
|
1219
|
-
__
|
1220
|
-
__ b(eq, &slow);
|
1284
|
+
__ JumpIfSmi(receiver, &slow);
|
1221
1285
|
// Get the map of the object.
|
1222
1286
|
__ ldr(r4, FieldMemOperand(receiver, HeapObject::kMapOffset));
|
1223
1287
|
// Check that the receiver does not require access checks. We need
|
@@ -1229,9 +1293,13 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
|
1229
1293
|
__ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset));
|
1230
1294
|
__ cmp(r4, Operand(JS_ARRAY_TYPE));
|
1231
1295
|
__ b(eq, &array);
|
1232
|
-
// Check that the object is some kind of
|
1233
|
-
__ cmp(r4, Operand(
|
1296
|
+
// Check that the object is some kind of JSObject.
|
1297
|
+
__ cmp(r4, Operand(FIRST_JS_RECEIVER_TYPE));
|
1234
1298
|
__ b(lt, &slow);
|
1299
|
+
__ cmp(r4, Operand(JS_PROXY_TYPE));
|
1300
|
+
__ b(eq, &slow);
|
1301
|
+
__ cmp(r4, Operand(JS_FUNCTION_PROXY_TYPE));
|
1302
|
+
__ b(eq, &slow);
|
1235
1303
|
|
1236
1304
|
// Object case: Check key against length in the elements array.
|
1237
1305
|
__ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
|
@@ -1265,7 +1333,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
|
1265
1333
|
__ cmp(key, Operand(ip));
|
1266
1334
|
__ b(hs, &slow);
|
1267
1335
|
// Calculate key + 1 as smi.
|
1268
|
-
|
1336
|
+
STATIC_ASSERT(kSmiTag == 0);
|
1269
1337
|
__ add(r4, key, Operand(Smi::FromInt(1)));
|
1270
1338
|
__ str(r4, FieldMemOperand(receiver, JSArray::kLengthOffset));
|
1271
1339
|
__ b(&fast);
|
@@ -68,13 +68,13 @@ void LInstruction::VerifyCall() {
|
|
68
68
|
ASSERT(Output() == NULL ||
|
69
69
|
LUnallocated::cast(Output())->HasFixedPolicy() ||
|
70
70
|
!LUnallocated::cast(Output())->HasRegisterPolicy());
|
71
|
-
for (UseIterator it(this); it.
|
72
|
-
LUnallocated* operand = LUnallocated::cast(it.
|
71
|
+
for (UseIterator it(this); !it.Done(); it.Advance()) {
|
72
|
+
LUnallocated* operand = LUnallocated::cast(it.Current());
|
73
73
|
ASSERT(operand->HasFixedPolicy() ||
|
74
74
|
operand->IsUsedAtStart());
|
75
75
|
}
|
76
|
-
for (TempIterator it(this); it.
|
77
|
-
LUnallocated* operand = LUnallocated::cast(it.
|
76
|
+
for (TempIterator it(this); !it.Done(); it.Advance()) {
|
77
|
+
LUnallocated* operand = LUnallocated::cast(it.Current());
|
78
78
|
ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy());
|
79
79
|
}
|
80
80
|
}
|
@@ -111,21 +111,18 @@ void LInstruction::PrintTo(StringStream* stream) {
|
|
111
111
|
template<int R, int I, int T>
|
112
112
|
void LTemplateInstruction<R, I, T>::PrintDataTo(StringStream* stream) {
|
113
113
|
stream->Add("= ");
|
114
|
-
inputs_.
|
114
|
+
for (int i = 0; i < inputs_.length(); i++) {
|
115
|
+
if (i > 0) stream->Add(" ");
|
116
|
+
inputs_[i]->PrintTo(stream);
|
117
|
+
}
|
115
118
|
}
|
116
119
|
|
117
120
|
|
118
121
|
template<int R, int I, int T>
|
119
122
|
void LTemplateInstruction<R, I, T>::PrintOutputOperandTo(StringStream* stream) {
|
120
|
-
results_.
|
121
|
-
}
|
122
|
-
|
123
|
-
|
124
|
-
template<typename T, int N>
|
125
|
-
void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
|
126
|
-
for (int i = 0; i < N; i++) {
|
123
|
+
for (int i = 0; i < results_.length(); i++) {
|
127
124
|
if (i > 0) stream->Add(" ");
|
128
|
-
|
125
|
+
results_[i]->PrintTo(stream);
|
129
126
|
}
|
130
127
|
}
|
131
128
|
|
@@ -268,12 +265,6 @@ void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
|
268
265
|
}
|
269
266
|
|
270
267
|
|
271
|
-
void LTypeofIs::PrintDataTo(StringStream* stream) {
|
272
|
-
InputAt(0)->PrintTo(stream);
|
273
|
-
stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
|
274
|
-
}
|
275
|
-
|
276
|
-
|
277
268
|
void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
278
269
|
stream->Add("if typeof ");
|
279
270
|
InputAt(0)->PrintTo(stream);
|
@@ -343,13 +334,6 @@ void LCallNew::PrintDataTo(StringStream* stream) {
|
|
343
334
|
}
|
344
335
|
|
345
336
|
|
346
|
-
void LClassOfTest::PrintDataTo(StringStream* stream) {
|
347
|
-
stream->Add("= class_of_test(");
|
348
|
-
InputAt(0)->PrintTo(stream);
|
349
|
-
stream->Add(", \"%o\")", *hydrogen()->class_name());
|
350
|
-
}
|
351
|
-
|
352
|
-
|
353
337
|
void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
354
338
|
arguments()->PrintTo(stream);
|
355
339
|
|
@@ -388,6 +372,15 @@ void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
|
|
388
372
|
}
|
389
373
|
|
390
374
|
|
375
|
+
void LStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) {
|
376
|
+
elements()->PrintTo(stream);
|
377
|
+
stream->Add("[");
|
378
|
+
key()->PrintTo(stream);
|
379
|
+
stream->Add("] <- ");
|
380
|
+
value()->PrintTo(stream);
|
381
|
+
}
|
382
|
+
|
383
|
+
|
391
384
|
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
392
385
|
object()->PrintTo(stream);
|
393
386
|
stream->Add("[");
|
@@ -436,8 +429,7 @@ void LChunk::MarkEmptyBlocks() {
|
|
436
429
|
LLabel* label = LLabel::cast(first_instr);
|
437
430
|
if (last_instr->IsGoto()) {
|
438
431
|
LGoto* goto_instr = LGoto::cast(last_instr);
|
439
|
-
if (
|
440
|
-
label->IsRedundant() &&
|
432
|
+
if (label->IsRedundant() &&
|
441
433
|
!label->is_loop_header()) {
|
442
434
|
bool can_eliminate = true;
|
443
435
|
for (int i = first + 1; i < last && can_eliminate; ++i) {
|
@@ -808,6 +800,11 @@ LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
|
|
808
800
|
}
|
809
801
|
|
810
802
|
|
803
|
+
LInstruction* LChunkBuilder::DoSoftDeoptimize(HSoftDeoptimize* instr) {
|
804
|
+
return AssignEnvironment(new LDeoptimize);
|
805
|
+
}
|
806
|
+
|
807
|
+
|
811
808
|
LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
|
812
809
|
return AssignEnvironment(new LDeoptimize);
|
813
810
|
}
|
@@ -821,7 +818,7 @@ LInstruction* LChunkBuilder::DoBit(Token::Value op,
|
|
821
818
|
|
822
819
|
LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
823
820
|
LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
|
824
|
-
return
|
821
|
+
return DefineAsRegister(new LBitI(op, left, right));
|
825
822
|
} else {
|
826
823
|
ASSERT(instr->representation().IsTagged());
|
827
824
|
ASSERT(instr->left()->representation().IsTagged());
|
@@ -848,11 +845,11 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
|
848
845
|
}
|
849
846
|
|
850
847
|
ASSERT(instr->representation().IsInteger32());
|
851
|
-
ASSERT(instr->
|
852
|
-
ASSERT(instr->
|
853
|
-
LOperand* left = UseRegisterAtStart(instr->
|
848
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
849
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
850
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
854
851
|
|
855
|
-
HValue* right_value = instr->
|
852
|
+
HValue* right_value = instr->right();
|
856
853
|
LOperand* right = NULL;
|
857
854
|
int constant_value = 0;
|
858
855
|
if (right_value->IsConstant()) {
|
@@ -860,7 +857,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
|
860
857
|
right = chunk_->DefineConstantOperand(constant);
|
861
858
|
constant_value = constant->Integer32Value() & 0x1f;
|
862
859
|
} else {
|
863
|
-
right =
|
860
|
+
right = UseRegisterAtStart(right_value);
|
864
861
|
}
|
865
862
|
|
866
863
|
// Shift operations can only deoptimize if we do a logical shift
|
@@ -877,7 +874,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
|
877
874
|
}
|
878
875
|
|
879
876
|
LInstruction* result =
|
880
|
-
|
877
|
+
DefineAsRegister(new LShiftI(op, left, right, does_deopt));
|
881
878
|
return does_deopt ? AssignEnvironment(result) : result;
|
882
879
|
}
|
883
880
|
|
@@ -891,7 +888,7 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
|
|
891
888
|
LOperand* left = UseRegisterAtStart(instr->left());
|
892
889
|
LOperand* right = UseRegisterAtStart(instr->right());
|
893
890
|
LArithmeticD* result = new LArithmeticD(op, left, right);
|
894
|
-
return
|
891
|
+
return DefineAsRegister(result);
|
895
892
|
}
|
896
893
|
|
897
894
|
|
@@ -989,18 +986,7 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
|
989
986
|
if (FLAG_stress_environments && !instr->HasEnvironment()) {
|
990
987
|
instr = AssignEnvironment(instr);
|
991
988
|
}
|
992
|
-
|
993
|
-
ASSERT(instr->IsControl());
|
994
|
-
HTest* test = HTest::cast(current);
|
995
|
-
instr->set_hydrogen_value(test->value());
|
996
|
-
HBasicBlock* first = test->FirstSuccessor();
|
997
|
-
HBasicBlock* second = test->SecondSuccessor();
|
998
|
-
ASSERT(first != NULL && second != NULL);
|
999
|
-
instr->SetBranchTargets(first->block_id(), second->block_id());
|
1000
|
-
} else {
|
1001
|
-
instr->set_hydrogen_value(current);
|
1002
|
-
}
|
1003
|
-
|
989
|
+
instr->set_hydrogen_value(current);
|
1004
990
|
chunk_->AddInstruction(instr, current_block_);
|
1005
991
|
}
|
1006
992
|
current_instruction_ = old_current;
|
@@ -1041,102 +1027,19 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
|
|
1041
1027
|
|
1042
1028
|
|
1043
1029
|
LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
1044
|
-
|
1045
|
-
instr->include_stack_check());
|
1046
|
-
if (instr->include_stack_check()) result = AssignPointerMap(result);
|
1047
|
-
return result;
|
1030
|
+
return new LGoto(instr->FirstSuccessor()->block_id());
|
1048
1031
|
}
|
1049
1032
|
|
1050
1033
|
|
1051
|
-
LInstruction* LChunkBuilder::
|
1034
|
+
LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
1052
1035
|
HValue* v = instr->value();
|
1053
|
-
if (
|
1054
|
-
return new LBranch(UseRegisterAtStart(v));
|
1055
|
-
} else if (v->IsClassOfTest()) {
|
1056
|
-
HClassOfTest* compare = HClassOfTest::cast(v);
|
1057
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1058
|
-
return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
|
1059
|
-
TempRegister());
|
1060
|
-
} else if (v->IsCompare()) {
|
1061
|
-
HCompare* compare = HCompare::cast(v);
|
1062
|
-
Token::Value op = compare->token();
|
1063
|
-
HValue* left = compare->left();
|
1064
|
-
HValue* right = compare->right();
|
1065
|
-
Representation r = compare->GetInputRepresentation();
|
1066
|
-
if (r.IsInteger32()) {
|
1067
|
-
ASSERT(left->representation().IsInteger32());
|
1068
|
-
ASSERT(right->representation().IsInteger32());
|
1069
|
-
return new LCmpIDAndBranch(UseRegisterAtStart(left),
|
1070
|
-
UseRegisterAtStart(right));
|
1071
|
-
} else if (r.IsDouble()) {
|
1072
|
-
ASSERT(left->representation().IsDouble());
|
1073
|
-
ASSERT(right->representation().IsDouble());
|
1074
|
-
return new LCmpIDAndBranch(UseRegisterAtStart(left),
|
1075
|
-
UseRegisterAtStart(right));
|
1076
|
-
} else {
|
1077
|
-
ASSERT(left->representation().IsTagged());
|
1078
|
-
ASSERT(right->representation().IsTagged());
|
1079
|
-
bool reversed = op == Token::GT || op == Token::LTE;
|
1080
|
-
LOperand* left_operand = UseFixed(left, reversed ? r0 : r1);
|
1081
|
-
LOperand* right_operand = UseFixed(right, reversed ? r1 : r0);
|
1082
|
-
LInstruction* result = new LCmpTAndBranch(left_operand, right_operand);
|
1083
|
-
return MarkAsCall(result, instr);
|
1084
|
-
}
|
1085
|
-
} else if (v->IsIsSmi()) {
|
1086
|
-
HIsSmi* compare = HIsSmi::cast(v);
|
1087
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1088
|
-
return new LIsSmiAndBranch(Use(compare->value()));
|
1089
|
-
} else if (v->IsIsUndetectable()) {
|
1090
|
-
HIsUndetectable* compare = HIsUndetectable::cast(v);
|
1091
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1092
|
-
return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()),
|
1093
|
-
TempRegister());
|
1094
|
-
} else if (v->IsHasInstanceType()) {
|
1095
|
-
HHasInstanceType* compare = HHasInstanceType::cast(v);
|
1096
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1097
|
-
return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()));
|
1098
|
-
} else if (v->IsHasCachedArrayIndex()) {
|
1099
|
-
HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v);
|
1100
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1101
|
-
return new LHasCachedArrayIndexAndBranch(
|
1102
|
-
UseRegisterAtStart(compare->value()));
|
1103
|
-
} else if (v->IsIsNull()) {
|
1104
|
-
HIsNull* compare = HIsNull::cast(v);
|
1105
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1106
|
-
return new LIsNullAndBranch(UseRegisterAtStart(compare->value()));
|
1107
|
-
} else if (v->IsIsObject()) {
|
1108
|
-
HIsObject* compare = HIsObject::cast(v);
|
1109
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1110
|
-
LOperand* temp = TempRegister();
|
1111
|
-
return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
|
1112
|
-
} else if (v->IsCompareJSObjectEq()) {
|
1113
|
-
HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
|
1114
|
-
return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
|
1115
|
-
UseRegisterAtStart(compare->right()));
|
1116
|
-
} else if (v->IsCompareSymbolEq()) {
|
1117
|
-
HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
|
1118
|
-
return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
|
1119
|
-
UseRegisterAtStart(compare->right()));
|
1120
|
-
} else if (v->IsInstanceOf()) {
|
1121
|
-
HInstanceOf* instance_of = HInstanceOf::cast(v);
|
1122
|
-
LInstruction* result =
|
1123
|
-
new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0),
|
1124
|
-
UseFixed(instance_of->right(), r1));
|
1125
|
-
return MarkAsCall(result, instr);
|
1126
|
-
} else if (v->IsTypeofIs()) {
|
1127
|
-
HTypeofIs* typeof_is = HTypeofIs::cast(v);
|
1128
|
-
return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
|
1129
|
-
} else if (v->IsIsConstructCall()) {
|
1130
|
-
return new LIsConstructCallAndBranch(TempRegister());
|
1131
|
-
} else if (v->IsConstant()) {
|
1036
|
+
if (v->EmitAtUses()) {
|
1132
1037
|
HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
|
1133
1038
|
? instr->FirstSuccessor()
|
1134
1039
|
: instr->SecondSuccessor();
|
1135
1040
|
return new LGoto(successor->block_id());
|
1136
|
-
} else {
|
1137
|
-
Abort("Undefined compare before branch");
|
1138
|
-
return NULL;
|
1139
1041
|
}
|
1042
|
+
return AssignEnvironment(new LBranch(UseRegister(v)));
|
1140
1043
|
}
|
1141
1044
|
|
1142
1045
|
|
@@ -1170,7 +1073,7 @@ LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
|
|
1170
1073
|
LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
|
1171
1074
|
HInstanceOfKnownGlobal* instr) {
|
1172
1075
|
LInstanceOfKnownGlobal* result =
|
1173
|
-
new LInstanceOfKnownGlobal(UseFixed(instr->
|
1076
|
+
new LInstanceOfKnownGlobal(UseFixed(instr->left(), r0), FixedTemp(r4));
|
1174
1077
|
return MarkAsCall(DefineFixed(result, r0), instr);
|
1175
1078
|
}
|
1176
1079
|
|
@@ -1195,6 +1098,11 @@ LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
|
|
1195
1098
|
}
|
1196
1099
|
|
1197
1100
|
|
1101
|
+
LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
|
1102
|
+
return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction);
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
|
1198
1106
|
LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
1199
1107
|
return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext);
|
1200
1108
|
}
|
@@ -1245,15 +1153,15 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
|
1245
1153
|
LUnaryMathOperation* result = new LUnaryMathOperation(input, temp);
|
1246
1154
|
switch (op) {
|
1247
1155
|
case kMathAbs:
|
1248
|
-
return AssignEnvironment(AssignPointerMap(
|
1156
|
+
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
1249
1157
|
case kMathFloor:
|
1250
1158
|
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
1251
1159
|
case kMathSqrt:
|
1252
|
-
return
|
1160
|
+
return DefineAsRegister(result);
|
1253
1161
|
case kMathRound:
|
1254
1162
|
return AssignEnvironment(DefineAsRegister(result));
|
1255
1163
|
case kMathPowHalf:
|
1256
|
-
return
|
1164
|
+
return DefineAsRegister(result);
|
1257
1165
|
default:
|
1258
1166
|
UNREACHABLE();
|
1259
1167
|
return NULL;
|
@@ -1331,7 +1239,7 @@ LInstruction* LChunkBuilder::DoBitAnd(HBitAnd* instr) {
|
|
1331
1239
|
LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
|
1332
1240
|
ASSERT(instr->value()->representation().IsInteger32());
|
1333
1241
|
ASSERT(instr->representation().IsInteger32());
|
1334
|
-
return
|
1242
|
+
return DefineAsRegister(new LBitNotI(UseRegisterAtStart(instr->value())));
|
1335
1243
|
}
|
1336
1244
|
|
1337
1245
|
|
@@ -1376,15 +1284,20 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
|
1376
1284
|
mod = new LModI(value, UseOrConstant(instr->right()));
|
1377
1285
|
} else {
|
1378
1286
|
LOperand* dividend = UseRegister(instr->left());
|
1379
|
-
LOperand* divisor =
|
1287
|
+
LOperand* divisor = UseRegister(instr->right());
|
1380
1288
|
mod = new LModI(dividend,
|
1381
1289
|
divisor,
|
1382
1290
|
TempRegister(),
|
1383
|
-
FixedTemp(
|
1384
|
-
FixedTemp(
|
1291
|
+
FixedTemp(d10),
|
1292
|
+
FixedTemp(d11));
|
1385
1293
|
}
|
1386
1294
|
|
1387
|
-
|
1295
|
+
if (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
|
1296
|
+
instr->CheckFlag(HValue::kCanBeDivByZero)) {
|
1297
|
+
return AssignEnvironment(DefineAsRegister(mod));
|
1298
|
+
} else {
|
1299
|
+
return DefineAsRegister(mod);
|
1300
|
+
}
|
1388
1301
|
} else if (instr->representation().IsTagged()) {
|
1389
1302
|
return DoArithmeticT(Token::MOD, instr);
|
1390
1303
|
} else {
|
@@ -1404,16 +1317,22 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
|
|
1404
1317
|
if (instr->representation().IsInteger32()) {
|
1405
1318
|
ASSERT(instr->left()->representation().IsInteger32());
|
1406
1319
|
ASSERT(instr->right()->representation().IsInteger32());
|
1407
|
-
LOperand* left
|
1320
|
+
LOperand* left;
|
1408
1321
|
LOperand* right = UseOrConstant(instr->MostConstantOperand());
|
1409
1322
|
LOperand* temp = NULL;
|
1410
|
-
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)
|
1323
|
+
if (instr->CheckFlag(HValue::kBailoutOnMinusZero) &&
|
1324
|
+
(instr->CheckFlag(HValue::kCanOverflow) ||
|
1325
|
+
!right->IsConstantOperand())) {
|
1326
|
+
left = UseRegister(instr->LeastConstantOperand());
|
1411
1327
|
temp = TempRegister();
|
1328
|
+
} else {
|
1329
|
+
left = UseRegisterAtStart(instr->LeastConstantOperand());
|
1412
1330
|
}
|
1413
|
-
|
1414
|
-
|
1331
|
+
return AssignEnvironment(DefineAsRegister(new LMulI(left, right, temp)));
|
1332
|
+
|
1415
1333
|
} else if (instr->representation().IsDouble()) {
|
1416
1334
|
return DoArithmeticD(Token::MUL, instr);
|
1335
|
+
|
1417
1336
|
} else {
|
1418
1337
|
return DoArithmeticT(Token::MUL, instr);
|
1419
1338
|
}
|
@@ -1427,7 +1346,7 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) {
|
|
1427
1346
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1428
1347
|
LOperand* right = UseOrConstantAtStart(instr->right());
|
1429
1348
|
LSubI* sub = new LSubI(left, right);
|
1430
|
-
LInstruction* result =
|
1349
|
+
LInstruction* result = DefineAsRegister(sub);
|
1431
1350
|
if (instr->CheckFlag(HValue::kCanOverflow)) {
|
1432
1351
|
result = AssignEnvironment(result);
|
1433
1352
|
}
|
@@ -1447,7 +1366,7 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
|
|
1447
1366
|
LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
1448
1367
|
LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
|
1449
1368
|
LAddI* add = new LAddI(left, right);
|
1450
|
-
LInstruction* result =
|
1369
|
+
LInstruction* result = DefineAsRegister(add);
|
1451
1370
|
if (instr->CheckFlag(HValue::kCanOverflow)) {
|
1452
1371
|
result = AssignEnvironment(result);
|
1453
1372
|
}
|
@@ -1478,88 +1397,83 @@ LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
|
1478
1397
|
}
|
1479
1398
|
|
1480
1399
|
|
1481
|
-
LInstruction* LChunkBuilder::
|
1400
|
+
LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
1482
1401
|
Token::Value op = instr->token();
|
1402
|
+
ASSERT(instr->left()->representation().IsTagged());
|
1403
|
+
ASSERT(instr->right()->representation().IsTagged());
|
1404
|
+
bool reversed = (op == Token::GT || op == Token::LTE);
|
1405
|
+
LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
|
1406
|
+
LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
|
1407
|
+
LCmpT* result = new LCmpT(left, right);
|
1408
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1409
|
+
}
|
1410
|
+
|
1411
|
+
|
1412
|
+
LInstruction* LChunkBuilder::DoCompareIDAndBranch(
|
1413
|
+
HCompareIDAndBranch* instr) {
|
1483
1414
|
Representation r = instr->GetInputRepresentation();
|
1484
1415
|
if (r.IsInteger32()) {
|
1485
1416
|
ASSERT(instr->left()->representation().IsInteger32());
|
1486
1417
|
ASSERT(instr->right()->representation().IsInteger32());
|
1487
1418
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1488
1419
|
LOperand* right = UseRegisterAtStart(instr->right());
|
1489
|
-
return
|
1490
|
-
} else
|
1420
|
+
return new LCmpIDAndBranch(left, right);
|
1421
|
+
} else {
|
1422
|
+
ASSERT(r.IsDouble());
|
1491
1423
|
ASSERT(instr->left()->representation().IsDouble());
|
1492
1424
|
ASSERT(instr->right()->representation().IsDouble());
|
1493
1425
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1494
1426
|
LOperand* right = UseRegisterAtStart(instr->right());
|
1495
|
-
return
|
1496
|
-
} else {
|
1497
|
-
ASSERT(instr->left()->representation().IsTagged());
|
1498
|
-
ASSERT(instr->right()->representation().IsTagged());
|
1499
|
-
bool reversed = (op == Token::GT || op == Token::LTE);
|
1500
|
-
LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
|
1501
|
-
LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
|
1502
|
-
LCmpT* result = new LCmpT(left, right);
|
1503
|
-
return MarkAsCall(DefineFixed(result, r0), instr);
|
1427
|
+
return new LCmpIDAndBranch(left, right);
|
1504
1428
|
}
|
1505
1429
|
}
|
1506
1430
|
|
1507
1431
|
|
1508
|
-
LInstruction* LChunkBuilder::
|
1509
|
-
|
1432
|
+
LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
|
1433
|
+
HCompareObjectEqAndBranch* instr) {
|
1510
1434
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1511
1435
|
LOperand* right = UseRegisterAtStart(instr->right());
|
1512
|
-
|
1513
|
-
return DefineAsRegister(result);
|
1436
|
+
return new LCmpObjectEqAndBranch(left, right);
|
1514
1437
|
}
|
1515
1438
|
|
1516
1439
|
|
1517
|
-
LInstruction* LChunkBuilder::
|
1518
|
-
|
1519
|
-
|
1520
|
-
LOperand* right = UseRegisterAtStart(instr->right());
|
1521
|
-
LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
|
1522
|
-
return DefineAsRegister(result);
|
1440
|
+
LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch(
|
1441
|
+
HCompareConstantEqAndBranch* instr) {
|
1442
|
+
return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value()));
|
1523
1443
|
}
|
1524
1444
|
|
1525
1445
|
|
1526
|
-
LInstruction* LChunkBuilder::
|
1446
|
+
LInstruction* LChunkBuilder::DoIsNullAndBranch(HIsNullAndBranch* instr) {
|
1527
1447
|
ASSERT(instr->value()->representation().IsTagged());
|
1528
|
-
|
1529
|
-
|
1530
|
-
return DefineAsRegister(new LIsNull(value));
|
1448
|
+
return new LIsNullAndBranch(UseRegisterAtStart(instr->value()));
|
1531
1449
|
}
|
1532
1450
|
|
1533
1451
|
|
1534
|
-
LInstruction* LChunkBuilder::
|
1452
|
+
LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
|
1535
1453
|
ASSERT(instr->value()->representation().IsTagged());
|
1536
|
-
LOperand*
|
1537
|
-
|
1538
|
-
return DefineAsRegister(new LIsObject(value));
|
1454
|
+
LOperand* temp = TempRegister();
|
1455
|
+
return new LIsObjectAndBranch(UseRegisterAtStart(instr->value()), temp);
|
1539
1456
|
}
|
1540
1457
|
|
1541
1458
|
|
1542
|
-
LInstruction* LChunkBuilder::
|
1459
|
+
LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) {
|
1543
1460
|
ASSERT(instr->value()->representation().IsTagged());
|
1544
|
-
|
1545
|
-
|
1546
|
-
return DefineAsRegister(new LIsSmi(value));
|
1461
|
+
return new LIsSmiAndBranch(Use(instr->value()));
|
1547
1462
|
}
|
1548
1463
|
|
1549
1464
|
|
1550
|
-
LInstruction* LChunkBuilder::
|
1465
|
+
LInstruction* LChunkBuilder::DoIsUndetectableAndBranch(
|
1466
|
+
HIsUndetectableAndBranch* instr) {
|
1551
1467
|
ASSERT(instr->value()->representation().IsTagged());
|
1552
|
-
|
1553
|
-
|
1554
|
-
return DefineAsRegister(new LIsUndetectable(value));
|
1468
|
+
return new LIsUndetectableAndBranch(UseRegisterAtStart(instr->value()),
|
1469
|
+
TempRegister());
|
1555
1470
|
}
|
1556
1471
|
|
1557
1472
|
|
1558
|
-
LInstruction* LChunkBuilder::
|
1473
|
+
LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
|
1474
|
+
HHasInstanceTypeAndBranch* instr) {
|
1559
1475
|
ASSERT(instr->value()->representation().IsTagged());
|
1560
|
-
|
1561
|
-
|
1562
|
-
return DefineAsRegister(new LHasInstanceType(value));
|
1476
|
+
return new LHasInstanceTypeAndBranch(UseRegisterAtStart(instr->value()));
|
1563
1477
|
}
|
1564
1478
|
|
1565
1479
|
|
@@ -1572,19 +1486,19 @@ LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
|
|
1572
1486
|
}
|
1573
1487
|
|
1574
1488
|
|
1575
|
-
LInstruction* LChunkBuilder::
|
1576
|
-
|
1489
|
+
LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
|
1490
|
+
HHasCachedArrayIndexAndBranch* instr) {
|
1577
1491
|
ASSERT(instr->value()->representation().IsTagged());
|
1578
|
-
|
1579
|
-
|
1580
|
-
return DefineAsRegister(new LHasCachedArrayIndex(value));
|
1492
|
+
return new LHasCachedArrayIndexAndBranch(
|
1493
|
+
UseRegisterAtStart(instr->value()));
|
1581
1494
|
}
|
1582
1495
|
|
1583
1496
|
|
1584
|
-
LInstruction* LChunkBuilder::
|
1497
|
+
LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
|
1498
|
+
HClassOfTestAndBranch* instr) {
|
1585
1499
|
ASSERT(instr->value()->representation().IsTagged());
|
1586
|
-
|
1587
|
-
|
1500
|
+
return new LClassOfTestAndBranch(UseTempRegister(instr->value()),
|
1501
|
+
TempRegister());
|
1588
1502
|
}
|
1589
1503
|
|
1590
1504
|
|
@@ -1594,23 +1508,23 @@ LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
|
|
1594
1508
|
}
|
1595
1509
|
|
1596
1510
|
|
1597
|
-
LInstruction* LChunkBuilder::
|
1598
|
-
|
1511
|
+
LInstruction* LChunkBuilder::DoFixedArrayBaseLength(
|
1512
|
+
HFixedArrayBaseLength* instr) {
|
1599
1513
|
LOperand* array = UseRegisterAtStart(instr->value());
|
1600
|
-
return DefineAsRegister(new
|
1514
|
+
return DefineAsRegister(new LFixedArrayBaseLength(array));
|
1601
1515
|
}
|
1602
1516
|
|
1603
1517
|
|
1604
|
-
LInstruction* LChunkBuilder::
|
1605
|
-
LOperand*
|
1606
|
-
return DefineAsRegister(new
|
1518
|
+
LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) {
|
1519
|
+
LOperand* object = UseRegisterAtStart(instr->value());
|
1520
|
+
return DefineAsRegister(new LElementsKind(object));
|
1607
1521
|
}
|
1608
1522
|
|
1609
1523
|
|
1610
1524
|
LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
|
1611
1525
|
LOperand* object = UseRegister(instr->value());
|
1612
1526
|
LValueOf* result = new LValueOf(object, TempRegister());
|
1613
|
-
return AssignEnvironment(
|
1527
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1614
1528
|
}
|
1615
1529
|
|
1616
1530
|
|
@@ -1633,6 +1547,11 @@ LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
|
|
1633
1547
|
}
|
1634
1548
|
|
1635
1549
|
|
1550
|
+
LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) {
|
1551
|
+
return NULL;
|
1552
|
+
}
|
1553
|
+
|
1554
|
+
|
1636
1555
|
LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
|
1637
1556
|
// All HForceRepresentation instructions should be eliminated in the
|
1638
1557
|
// representation change phase of Hydrogen.
|
@@ -1660,7 +1579,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|
1660
1579
|
LOperand* temp1 = TempRegister();
|
1661
1580
|
LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
|
1662
1581
|
: NULL;
|
1663
|
-
LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(
|
1582
|
+
LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d11)
|
1664
1583
|
: NULL;
|
1665
1584
|
res = DefineSameAsFirst(new LTaggedToI(value, temp1, temp2, temp3));
|
1666
1585
|
res = AssignEnvironment(res);
|
@@ -1754,19 +1673,44 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
|
1754
1673
|
Representation input_rep = value->representation();
|
1755
1674
|
LOperand* reg = UseRegister(value);
|
1756
1675
|
if (input_rep.IsDouble()) {
|
1757
|
-
return DefineAsRegister(new LClampDToUint8(reg, FixedTemp(
|
1676
|
+
return DefineAsRegister(new LClampDToUint8(reg, FixedTemp(d11)));
|
1758
1677
|
} else if (input_rep.IsInteger32()) {
|
1759
1678
|
return DefineAsRegister(new LClampIToUint8(reg));
|
1760
1679
|
} else {
|
1761
1680
|
ASSERT(input_rep.IsTagged());
|
1762
1681
|
// Register allocator doesn't (yet) support allocation of double
|
1763
1682
|
// temps. Reserve d1 explicitly.
|
1764
|
-
LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(
|
1683
|
+
LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(d11));
|
1765
1684
|
return AssignEnvironment(DefineAsRegister(result));
|
1766
1685
|
}
|
1767
1686
|
}
|
1768
1687
|
|
1769
1688
|
|
1689
|
+
LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) {
|
1690
|
+
HValue* value = instr->value();
|
1691
|
+
Representation input_rep = value->representation();
|
1692
|
+
LOperand* reg = UseRegister(value);
|
1693
|
+
if (input_rep.IsDouble()) {
|
1694
|
+
LOperand* temp1 = TempRegister();
|
1695
|
+
LOperand* temp2 = TempRegister();
|
1696
|
+
LDoubleToI* res = new LDoubleToI(reg, temp1, temp2);
|
1697
|
+
return AssignEnvironment(DefineAsRegister(res));
|
1698
|
+
} else if (input_rep.IsInteger32()) {
|
1699
|
+
// Canonicalization should already have removed the hydrogen instruction in
|
1700
|
+
// this case, since it is a noop.
|
1701
|
+
UNREACHABLE();
|
1702
|
+
return NULL;
|
1703
|
+
} else {
|
1704
|
+
ASSERT(input_rep.IsTagged());
|
1705
|
+
LOperand* temp1 = TempRegister();
|
1706
|
+
LOperand* temp2 = TempRegister();
|
1707
|
+
LOperand* temp3 = FixedTemp(d11);
|
1708
|
+
LTaggedToI* res = new LTaggedToI(reg, temp1, temp2, temp3);
|
1709
|
+
return AssignEnvironment(DefineSameAsFirst(res));
|
1710
|
+
}
|
1711
|
+
}
|
1712
|
+
|
1713
|
+
|
1770
1714
|
LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
|
1771
1715
|
return new LReturn(UseFixed(instr->value(), r0));
|
1772
1716
|
}
|
@@ -1898,19 +1842,33 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
|
|
1898
1842
|
LOperand* obj = UseRegisterAtStart(instr->object());
|
1899
1843
|
LOperand* key = UseRegisterAtStart(instr->key());
|
1900
1844
|
LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
|
1901
|
-
return AssignEnvironment(
|
1845
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1846
|
+
}
|
1847
|
+
|
1848
|
+
|
1849
|
+
LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement(
|
1850
|
+
HLoadKeyedFastDoubleElement* instr) {
|
1851
|
+
ASSERT(instr->representation().IsDouble());
|
1852
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1853
|
+
LOperand* elements = UseTempRegister(instr->elements());
|
1854
|
+
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1855
|
+
LLoadKeyedFastDoubleElement* result =
|
1856
|
+
new LLoadKeyedFastDoubleElement(elements, key);
|
1857
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1902
1858
|
}
|
1903
1859
|
|
1904
1860
|
|
1905
1861
|
LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
|
1906
1862
|
HLoadKeyedSpecializedArrayElement* instr) {
|
1907
|
-
|
1863
|
+
JSObject::ElementsKind elements_kind = instr->elements_kind();
|
1908
1864
|
Representation representation(instr->representation());
|
1909
1865
|
ASSERT(
|
1910
|
-
(representation.IsInteger32() &&
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1866
|
+
(representation.IsInteger32() &&
|
1867
|
+
(elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) &&
|
1868
|
+
(elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1869
|
+
(representation.IsDouble() &&
|
1870
|
+
((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) ||
|
1871
|
+
(elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS))));
|
1914
1872
|
ASSERT(instr->key()->representation().IsInteger32());
|
1915
1873
|
LOperand* external_pointer = UseRegister(instr->external_pointer());
|
1916
1874
|
LOperand* key = UseRegisterOrConstant(instr->key());
|
@@ -1919,7 +1877,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
|
|
1919
1877
|
LInstruction* load_instr = DefineAsRegister(result);
|
1920
1878
|
// An unsigned int array load might overflow and cause a deopt, make sure it
|
1921
1879
|
// has an environment.
|
1922
|
-
return (
|
1880
|
+
return (elements_kind == JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS) ?
|
1923
1881
|
AssignEnvironment(load_instr) : load_instr;
|
1924
1882
|
}
|
1925
1883
|
|
@@ -1953,21 +1911,38 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
|
|
1953
1911
|
}
|
1954
1912
|
|
1955
1913
|
|
1914
|
+
LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement(
|
1915
|
+
HStoreKeyedFastDoubleElement* instr) {
|
1916
|
+
ASSERT(instr->value()->representation().IsDouble());
|
1917
|
+
ASSERT(instr->elements()->representation().IsTagged());
|
1918
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1919
|
+
|
1920
|
+
LOperand* elements = UseRegisterAtStart(instr->elements());
|
1921
|
+
LOperand* val = UseTempRegister(instr->value());
|
1922
|
+
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1923
|
+
|
1924
|
+
return new LStoreKeyedFastDoubleElement(elements, key, val);
|
1925
|
+
}
|
1926
|
+
|
1927
|
+
|
1956
1928
|
LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
|
1957
1929
|
HStoreKeyedSpecializedArrayElement* instr) {
|
1958
1930
|
Representation representation(instr->value()->representation());
|
1959
|
-
|
1931
|
+
JSObject::ElementsKind elements_kind = instr->elements_kind();
|
1960
1932
|
ASSERT(
|
1961
|
-
(representation.IsInteger32() &&
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1933
|
+
(representation.IsInteger32() &&
|
1934
|
+
(elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) &&
|
1935
|
+
(elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1936
|
+
(representation.IsDouble() &&
|
1937
|
+
((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) ||
|
1938
|
+
(elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS))));
|
1965
1939
|
ASSERT(instr->external_pointer()->representation().IsExternal());
|
1966
1940
|
ASSERT(instr->key()->representation().IsInteger32());
|
1967
1941
|
|
1968
1942
|
LOperand* external_pointer = UseRegister(instr->external_pointer());
|
1969
|
-
bool val_is_temp_register =
|
1970
|
-
|
1943
|
+
bool val_is_temp_register =
|
1944
|
+
elements_kind == JSObject::EXTERNAL_PIXEL_ELEMENTS ||
|
1945
|
+
elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS;
|
1971
1946
|
LOperand* val = val_is_temp_register
|
1972
1947
|
? UseTempRegister(instr->value())
|
1973
1948
|
: UseRegister(instr->value());
|
@@ -2024,8 +1999,8 @@ LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
|
|
2024
1999
|
|
2025
2000
|
|
2026
2001
|
LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
|
2027
|
-
LOperand* string =
|
2028
|
-
LOperand* index =
|
2002
|
+
LOperand* string = UseTempRegister(instr->string());
|
2003
|
+
LOperand* index = UseTempRegister(instr->index());
|
2029
2004
|
LStringCharCodeAt* result = new LStringCharCodeAt(string, index);
|
2030
2005
|
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
2031
2006
|
}
|
@@ -2087,6 +2062,10 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
|
2087
2062
|
|
2088
2063
|
LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
2089
2064
|
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
|
2065
|
+
if (spill_index > LUnallocated::kMaxFixedIndex) {
|
2066
|
+
Abort("Too many spill slots needed for OSR");
|
2067
|
+
spill_index = 0;
|
2068
|
+
}
|
2090
2069
|
return DefineAsSpilled(new LUnknownOSRValue, spill_index);
|
2091
2070
|
}
|
2092
2071
|
|
@@ -2128,13 +2107,14 @@ LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
|
2128
2107
|
}
|
2129
2108
|
|
2130
2109
|
|
2131
|
-
LInstruction* LChunkBuilder::
|
2132
|
-
return
|
2110
|
+
LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) {
|
2111
|
+
return new LTypeofIsAndBranch(UseTempRegister(instr->value()));
|
2133
2112
|
}
|
2134
2113
|
|
2135
2114
|
|
2136
|
-
LInstruction* LChunkBuilder::
|
2137
|
-
|
2115
|
+
LInstruction* LChunkBuilder::DoIsConstructCallAndBranch(
|
2116
|
+
HIsConstructCallAndBranch* instr) {
|
2117
|
+
return new LIsConstructCallAndBranch(TempRegister());
|
2138
2118
|
}
|
2139
2119
|
|
2140
2120
|
|
@@ -2170,7 +2150,12 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
|
2170
2150
|
|
2171
2151
|
|
2172
2152
|
LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
|
2173
|
-
|
2153
|
+
if (instr->is_function_entry()) {
|
2154
|
+
return MarkAsCall(new LStackCheck, instr);
|
2155
|
+
} else {
|
2156
|
+
ASSERT(instr->is_backwards_branch());
|
2157
|
+
return AssignEnvironment(AssignPointerMap(new LStackCheck));
|
2158
|
+
}
|
2174
2159
|
}
|
2175
2160
|
|
2176
2161
|
|
@@ -2179,7 +2164,6 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
|
2179
2164
|
HConstant* undefined = graph()->GetConstantUndefined();
|
2180
2165
|
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
|
2181
2166
|
instr->function(),
|
2182
|
-
HEnvironment::LITHIUM,
|
2183
2167
|
undefined,
|
2184
2168
|
instr->call_kind());
|
2185
2169
|
current_block_->UpdateEnvironment(inner);
|