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
@@ -35,6 +35,8 @@
|
|
35
35
|
#include "data-flow.h"
|
36
36
|
#include "small-pointer-list.h"
|
37
37
|
#include "string-stream.h"
|
38
|
+
#include "v8conversions.h"
|
39
|
+
#include "v8utils.h"
|
38
40
|
#include "zone.h"
|
39
41
|
|
40
42
|
namespace v8 {
|
@@ -71,6 +73,7 @@ class LChunkBuilder;
|
|
71
73
|
V(BitXor) \
|
72
74
|
V(BlockEntry) \
|
73
75
|
V(BoundsCheck) \
|
76
|
+
V(Branch) \
|
74
77
|
V(CallConstantFunction) \
|
75
78
|
V(CallFunction) \
|
76
79
|
V(CallGlobal) \
|
@@ -88,36 +91,37 @@ class LChunkBuilder;
|
|
88
91
|
V(CheckPrototypeMaps) \
|
89
92
|
V(CheckSmi) \
|
90
93
|
V(ClampToUint8) \
|
91
|
-
V(
|
92
|
-
V(
|
93
|
-
V(
|
94
|
+
V(ClassOfTestAndBranch) \
|
95
|
+
V(CompareIDAndBranch) \
|
96
|
+
V(CompareGeneric) \
|
97
|
+
V(CompareObjectEqAndBranch) \
|
94
98
|
V(CompareMap) \
|
95
|
-
V(
|
99
|
+
V(CompareConstantEqAndBranch) \
|
96
100
|
V(Constant) \
|
97
101
|
V(Context) \
|
98
102
|
V(DeleteProperty) \
|
99
103
|
V(Deoptimize) \
|
100
104
|
V(Div) \
|
105
|
+
V(ElementsKind) \
|
101
106
|
V(EnterInlined) \
|
102
|
-
V(
|
103
|
-
V(FixedArrayLength) \
|
107
|
+
V(FixedArrayBaseLength) \
|
104
108
|
V(ForceRepresentation) \
|
105
109
|
V(FunctionLiteral) \
|
106
110
|
V(GetCachedArrayIndex) \
|
107
111
|
V(GlobalObject) \
|
108
112
|
V(GlobalReceiver) \
|
109
113
|
V(Goto) \
|
110
|
-
V(
|
111
|
-
V(
|
114
|
+
V(HasCachedArrayIndexAndBranch) \
|
115
|
+
V(HasInstanceTypeAndBranch) \
|
112
116
|
V(In) \
|
113
117
|
V(InstanceOf) \
|
114
118
|
V(InstanceOfKnownGlobal) \
|
115
119
|
V(InvokeFunction) \
|
116
|
-
V(
|
117
|
-
V(
|
118
|
-
V(
|
119
|
-
V(
|
120
|
-
V(
|
120
|
+
V(IsConstructCallAndBranch) \
|
121
|
+
V(IsNullAndBranch) \
|
122
|
+
V(IsObjectAndBranch) \
|
123
|
+
V(IsSmiAndBranch) \
|
124
|
+
V(IsUndetectableAndBranch) \
|
121
125
|
V(JSArrayLength) \
|
122
126
|
V(LeaveInlined) \
|
123
127
|
V(LoadContextSlot) \
|
@@ -126,6 +130,7 @@ class LChunkBuilder;
|
|
126
130
|
V(LoadFunctionPrototype) \
|
127
131
|
V(LoadGlobalCell) \
|
128
132
|
V(LoadGlobalGeneric) \
|
133
|
+
V(LoadKeyedFastDoubleElement) \
|
129
134
|
V(LoadKeyedFastElement) \
|
130
135
|
V(LoadKeyedGeneric) \
|
131
136
|
V(LoadKeyedSpecializedArrayElement) \
|
@@ -146,13 +151,15 @@ class LChunkBuilder;
|
|
146
151
|
V(Shl) \
|
147
152
|
V(Shr) \
|
148
153
|
V(Simulate) \
|
154
|
+
V(SoftDeoptimize) \
|
149
155
|
V(StackCheck) \
|
150
156
|
V(StoreContextSlot) \
|
151
157
|
V(StoreGlobalCell) \
|
152
158
|
V(StoreGlobalGeneric) \
|
159
|
+
V(StoreKeyedFastDoubleElement) \
|
153
160
|
V(StoreKeyedFastElement) \
|
154
|
-
V(StoreKeyedSpecializedArrayElement) \
|
155
161
|
V(StoreKeyedGeneric) \
|
162
|
+
V(StoreKeyedSpecializedArrayElement) \
|
156
163
|
V(StoreNamedField) \
|
157
164
|
V(StoreNamedGeneric) \
|
158
165
|
V(StringAdd) \
|
@@ -160,13 +167,15 @@ class LChunkBuilder;
|
|
160
167
|
V(StringCharFromCode) \
|
161
168
|
V(StringLength) \
|
162
169
|
V(Sub) \
|
163
|
-
V(
|
170
|
+
V(ThisFunction) \
|
164
171
|
V(Throw) \
|
165
172
|
V(ToFastProperties) \
|
173
|
+
V(ToInt32) \
|
166
174
|
V(Typeof) \
|
167
|
-
V(
|
175
|
+
V(TypeofIsAndBranch) \
|
168
176
|
V(UnaryMathOperation) \
|
169
177
|
V(UnknownOSRValue) \
|
178
|
+
V(UseConst) \
|
170
179
|
V(ValueOf)
|
171
180
|
|
172
181
|
#define GVN_FLAG_LIST(V) \
|
@@ -174,6 +183,7 @@ class LChunkBuilder;
|
|
174
183
|
V(InobjectFields) \
|
175
184
|
V(BackingStoreFields) \
|
176
185
|
V(ArrayElements) \
|
186
|
+
V(DoubleArrayElements) \
|
177
187
|
V(SpecializedArrayElements) \
|
178
188
|
V(GlobalVars) \
|
179
189
|
V(Maps) \
|
@@ -217,14 +227,20 @@ class Range: public ZoneObject {
|
|
217
227
|
Range* next() const { return next_; }
|
218
228
|
Range* CopyClearLower() const { return new Range(kMinInt, upper_); }
|
219
229
|
Range* CopyClearUpper() const { return new Range(lower_, kMaxInt); }
|
220
|
-
Range* Copy() const {
|
230
|
+
Range* Copy() const {
|
231
|
+
Range* result = new Range(lower_, upper_);
|
232
|
+
result->set_can_be_minus_zero(CanBeMinusZero());
|
233
|
+
return result;
|
234
|
+
}
|
221
235
|
int32_t Mask() const;
|
222
236
|
void set_can_be_minus_zero(bool b) { can_be_minus_zero_ = b; }
|
223
237
|
bool CanBeMinusZero() const { return CanBeZero() && can_be_minus_zero_; }
|
224
238
|
bool CanBeZero() const { return upper_ >= 0 && lower_ <= 0; }
|
225
239
|
bool CanBeNegative() const { return lower_ < 0; }
|
226
240
|
bool Includes(int value) const { return lower_ <= value && upper_ >= value; }
|
227
|
-
bool IsMostGeneric() const {
|
241
|
+
bool IsMostGeneric() const {
|
242
|
+
return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero();
|
243
|
+
}
|
228
244
|
bool IsInSmiRange() const {
|
229
245
|
return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue;
|
230
246
|
}
|
@@ -397,7 +413,7 @@ class HType {
|
|
397
413
|
kBoolean = 0x85, // 0000 0000 1000 0101
|
398
414
|
kNonPrimitive = 0x101, // 0000 0001 0000 0001
|
399
415
|
kJSObject = 0x301, // 0000 0011 0000 0001
|
400
|
-
kJSArray = 0x701, // 0000 0111
|
416
|
+
kJSArray = 0x701, // 0000 0111 0000 0001
|
401
417
|
kUninitialized = 0x1fff // 0001 1111 1111 1111
|
402
418
|
};
|
403
419
|
|
@@ -479,10 +495,15 @@ class HValue: public ZoneObject {
|
|
479
495
|
GVN_FLAG_LIST(DECLARE_DO)
|
480
496
|
#undef DECLARE_DO
|
481
497
|
kFlexibleRepresentation,
|
498
|
+
// Participate in Global Value Numbering, i.e. elimination of
|
499
|
+
// unnecessary recomputations. If an instruction sets this flag, it must
|
500
|
+
// implement DataEquals(), which will be used to determine if other
|
501
|
+
// occurrences of the instruction are indeed the same.
|
482
502
|
kUseGVN,
|
483
503
|
kCanOverflow,
|
484
504
|
kBailoutOnMinusZero,
|
485
505
|
kCanBeDivByZero,
|
506
|
+
kDeoptimizeOnUndefined,
|
486
507
|
kIsArguments,
|
487
508
|
kTruncatingToInt32,
|
488
509
|
kLastFlag = kTruncatingToInt32
|
@@ -563,9 +584,9 @@ class HValue: public ZoneObject {
|
|
563
584
|
virtual bool IsConvertibleToInteger() const { return true; }
|
564
585
|
|
565
586
|
HType type() const { return type_; }
|
566
|
-
void set_type(HType
|
567
|
-
ASSERT(
|
568
|
-
type_ =
|
587
|
+
void set_type(HType new_type) {
|
588
|
+
ASSERT(new_type.IsSubtypeOf(type_));
|
589
|
+
type_ = new_type;
|
569
590
|
}
|
570
591
|
|
571
592
|
// An operation needs to override this function iff:
|
@@ -575,9 +596,9 @@ class HValue: public ZoneObject {
|
|
575
596
|
// it would otherwise output what should be a minus zero as an int32 zero.
|
576
597
|
// If the operation also exists in a form that takes int32 and outputs int32
|
577
598
|
// then the operation should return its input value so that we can propagate
|
578
|
-
// back. There are
|
579
|
-
// one input. They are phi and binary
|
580
|
-
// expect the caller to take care of things.
|
599
|
+
// back. There are three operations that need to propagate back to more than
|
600
|
+
// one input. They are phi and binary div and mul. They always return NULL
|
601
|
+
// and expect the caller to take care of things.
|
581
602
|
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
582
603
|
visited->Add(id());
|
583
604
|
return NULL;
|
@@ -591,6 +612,7 @@ class HValue: public ZoneObject {
|
|
591
612
|
void SetOperandAt(int index, HValue* value);
|
592
613
|
|
593
614
|
void DeleteAndReplaceWith(HValue* other);
|
615
|
+
void ReplaceAllUsesWith(HValue* other);
|
594
616
|
bool HasNoUses() const { return use_list_ == NULL; }
|
595
617
|
bool HasMultipleUses() const {
|
596
618
|
return use_list_ != NULL && use_list_->tail() != NULL;
|
@@ -680,8 +702,6 @@ class HValue: public ZoneObject {
|
|
680
702
|
// removed list node or NULL.
|
681
703
|
HUseListNode* RemoveUse(HValue* value, int index);
|
682
704
|
|
683
|
-
void ReplaceAllUsesWith(HValue* other);
|
684
|
-
|
685
705
|
void RegisterUse(int index, HValue* new_value);
|
686
706
|
|
687
707
|
HBasicBlock* block_;
|
@@ -723,10 +743,6 @@ class HInstruction: public HValue {
|
|
723
743
|
virtual void Verify();
|
724
744
|
#endif
|
725
745
|
|
726
|
-
// Returns whether this is some kind of deoptimizing check
|
727
|
-
// instruction.
|
728
|
-
virtual bool IsCheckInstruction() const { return false; }
|
729
|
-
|
730
746
|
virtual bool IsCall() { return false; }
|
731
747
|
|
732
748
|
DECLARE_ABSTRACT_INSTRUCTION(Instruction)
|
@@ -757,80 +773,71 @@ class HInstruction: public HValue {
|
|
757
773
|
};
|
758
774
|
|
759
775
|
|
760
|
-
|
776
|
+
template<int V>
|
777
|
+
class HTemplateInstruction : public HInstruction {
|
761
778
|
public:
|
762
|
-
|
763
|
-
|
764
|
-
}
|
765
|
-
|
766
|
-
HBasicBlock* FirstSuccessor() const { return first_successor_; }
|
767
|
-
HBasicBlock* SecondSuccessor() const { return second_successor_; }
|
768
|
-
|
769
|
-
virtual void PrintDataTo(StringStream* stream);
|
779
|
+
int OperandCount() { return V; }
|
780
|
+
HValue* OperandAt(int i) { return inputs_[i]; }
|
770
781
|
|
771
|
-
|
782
|
+
protected:
|
783
|
+
void InternalSetOperandAt(int i, HValue* value) { inputs_[i] = value; }
|
772
784
|
|
773
785
|
private:
|
774
|
-
|
775
|
-
HBasicBlock* second_successor_;
|
786
|
+
EmbeddedContainer<HValue*, V> inputs_;
|
776
787
|
};
|
777
788
|
|
778
789
|
|
779
|
-
|
780
|
-
class HOperandContainer {
|
790
|
+
class HControlInstruction: public HInstruction {
|
781
791
|
public:
|
782
|
-
|
783
|
-
|
784
|
-
int
|
785
|
-
HValue*& operator[](int i) {
|
786
|
-
ASSERT(i < length());
|
787
|
-
return elems_[i];
|
788
|
-
}
|
789
|
-
|
790
|
-
private:
|
791
|
-
HValue* elems_[NumElements];
|
792
|
-
};
|
792
|
+
virtual HBasicBlock* SuccessorAt(int i) = 0;
|
793
|
+
virtual int SuccessorCount() = 0;
|
794
|
+
virtual void SetSuccessorAt(int i, HBasicBlock* block) = 0;
|
793
795
|
|
796
|
+
virtual void PrintDataTo(StringStream* stream);
|
794
797
|
|
795
|
-
|
796
|
-
|
797
|
-
public:
|
798
|
-
int length() { return 0; }
|
799
|
-
HValue*& operator[](int i) {
|
800
|
-
UNREACHABLE();
|
801
|
-
static HValue* t = 0;
|
802
|
-
return t;
|
798
|
+
HBasicBlock* FirstSuccessor() {
|
799
|
+
return SuccessorCount() > 0 ? SuccessorAt(0) : NULL;
|
803
800
|
}
|
801
|
+
HBasicBlock* SecondSuccessor() {
|
802
|
+
return SuccessorCount() > 1 ? SuccessorAt(1) : NULL;
|
803
|
+
}
|
804
|
+
|
805
|
+
DECLARE_ABSTRACT_INSTRUCTION(ControlInstruction)
|
804
806
|
};
|
805
807
|
|
806
808
|
|
807
|
-
|
808
|
-
class HTemplateInstruction : public HInstruction {
|
809
|
+
class HSuccessorIterator BASE_EMBEDDED {
|
809
810
|
public:
|
810
|
-
|
811
|
-
|
811
|
+
explicit HSuccessorIterator(HControlInstruction* instr)
|
812
|
+
: instr_(instr), current_(0) { }
|
812
813
|
|
813
|
-
|
814
|
-
|
814
|
+
bool Done() { return current_ >= instr_->SuccessorCount(); }
|
815
|
+
HBasicBlock* Current() { return instr_->SuccessorAt(current_); }
|
816
|
+
void Advance() { current_++; }
|
815
817
|
|
816
818
|
private:
|
817
|
-
|
819
|
+
HControlInstruction* instr_;
|
820
|
+
int current_;
|
818
821
|
};
|
819
822
|
|
820
823
|
|
821
|
-
template<int V>
|
822
|
-
class HTemplateControlInstruction
|
824
|
+
template<int S, int V>
|
825
|
+
class HTemplateControlInstruction: public HControlInstruction {
|
823
826
|
public:
|
824
|
-
|
825
|
-
|
827
|
+
int SuccessorCount() { return S; }
|
828
|
+
HBasicBlock* SuccessorAt(int i) { return successors_[i]; }
|
829
|
+
void SetSuccessorAt(int i, HBasicBlock* block) { successors_[i] = block; }
|
830
|
+
|
826
831
|
int OperandCount() { return V; }
|
827
832
|
HValue* OperandAt(int i) { return inputs_[i]; }
|
828
833
|
|
834
|
+
|
829
835
|
protected:
|
830
836
|
void InternalSetOperandAt(int i, HValue* value) { inputs_[i] = value; }
|
831
837
|
|
832
838
|
private:
|
833
|
-
|
839
|
+
EmbeddedContainer<HBasicBlock*, S> successors_;
|
840
|
+
EmbeddedContainer<HValue*, V> inputs_;
|
834
841
|
};
|
835
842
|
|
836
843
|
|
@@ -844,11 +851,22 @@ class HBlockEntry: public HTemplateInstruction<0> {
|
|
844
851
|
};
|
845
852
|
|
846
853
|
|
854
|
+
// We insert soft-deoptimize when we hit code with unknown typefeedback,
|
855
|
+
// so that we get a chance of re-optimizing with useful typefeedback.
|
856
|
+
// HSoftDeoptimize does not end a basic block as opposed to HDeoptimize.
|
857
|
+
class HSoftDeoptimize: public HTemplateInstruction<0> {
|
858
|
+
public:
|
859
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
860
|
+
return Representation::None();
|
861
|
+
}
|
862
|
+
|
863
|
+
DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize)
|
864
|
+
};
|
865
|
+
|
866
|
+
|
847
867
|
class HDeoptimize: public HControlInstruction {
|
848
868
|
public:
|
849
|
-
explicit HDeoptimize(int environment_length)
|
850
|
-
: HControlInstruction(NULL, NULL),
|
851
|
-
values_(environment_length) { }
|
869
|
+
explicit HDeoptimize(int environment_length) : values_(environment_length) { }
|
852
870
|
|
853
871
|
virtual Representation RequiredInputRepresentation(int index) const {
|
854
872
|
return Representation::None();
|
@@ -856,6 +874,16 @@ class HDeoptimize: public HControlInstruction {
|
|
856
874
|
|
857
875
|
virtual int OperandCount() { return values_.length(); }
|
858
876
|
virtual HValue* OperandAt(int index) { return values_[index]; }
|
877
|
+
virtual void PrintDataTo(StringStream* stream);
|
878
|
+
|
879
|
+
virtual int SuccessorCount() { return 0; }
|
880
|
+
virtual HBasicBlock* SuccessorAt(int i) {
|
881
|
+
UNREACHABLE();
|
882
|
+
return NULL;
|
883
|
+
}
|
884
|
+
virtual void SetSuccessorAt(int i, HBasicBlock* block) {
|
885
|
+
UNREACHABLE();
|
886
|
+
}
|
859
887
|
|
860
888
|
void AddEnvironmentValue(HValue* value) {
|
861
889
|
values_.Add(NULL);
|
@@ -879,35 +907,28 @@ class HDeoptimize: public HControlInstruction {
|
|
879
907
|
};
|
880
908
|
|
881
909
|
|
882
|
-
class HGoto: public HTemplateControlInstruction<0> {
|
910
|
+
class HGoto: public HTemplateControlInstruction<1, 0> {
|
883
911
|
public:
|
884
|
-
explicit HGoto(HBasicBlock* target)
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
void set_include_stack_check(bool include_stack_check) {
|
889
|
-
include_stack_check_ = include_stack_check;
|
890
|
-
}
|
891
|
-
bool include_stack_check() const { return include_stack_check_; }
|
912
|
+
explicit HGoto(HBasicBlock* target) {
|
913
|
+
SetSuccessorAt(0, target);
|
914
|
+
}
|
892
915
|
|
893
916
|
virtual Representation RequiredInputRepresentation(int index) const {
|
894
917
|
return Representation::None();
|
895
918
|
}
|
896
919
|
|
897
920
|
DECLARE_CONCRETE_INSTRUCTION(Goto)
|
898
|
-
|
899
|
-
private:
|
900
|
-
bool include_stack_check_;
|
901
921
|
};
|
902
922
|
|
903
923
|
|
904
|
-
class HUnaryControlInstruction: public HTemplateControlInstruction<1> {
|
924
|
+
class HUnaryControlInstruction: public HTemplateControlInstruction<2, 1> {
|
905
925
|
public:
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
: HTemplateControlInstruction<1>(true_target, false_target) {
|
926
|
+
HUnaryControlInstruction(HValue* value,
|
927
|
+
HBasicBlock* true_target,
|
928
|
+
HBasicBlock* false_target) {
|
910
929
|
SetOperandAt(0, value);
|
930
|
+
SetSuccessorAt(0, true_target);
|
931
|
+
SetSuccessorAt(1, false_target);
|
911
932
|
}
|
912
933
|
|
913
934
|
virtual void PrintDataTo(StringStream* stream);
|
@@ -916,18 +937,32 @@ class HUnaryControlInstruction: public HTemplateControlInstruction<1> {
|
|
916
937
|
};
|
917
938
|
|
918
939
|
|
919
|
-
class
|
940
|
+
class HBranch: public HUnaryControlInstruction {
|
920
941
|
public:
|
921
|
-
|
922
|
-
|
942
|
+
HBranch(HValue* value,
|
943
|
+
HBasicBlock* true_target,
|
944
|
+
HBasicBlock* false_target,
|
945
|
+
ToBooleanStub::Types expected_input_types = ToBooleanStub::no_types())
|
946
|
+
: HUnaryControlInstruction(value, true_target, false_target),
|
947
|
+
expected_input_types_(expected_input_types) {
|
923
948
|
ASSERT(true_target != NULL && false_target != NULL);
|
924
949
|
}
|
950
|
+
explicit HBranch(HValue* value)
|
951
|
+
: HUnaryControlInstruction(value, NULL, NULL) { }
|
952
|
+
|
925
953
|
|
926
954
|
virtual Representation RequiredInputRepresentation(int index) const {
|
927
955
|
return Representation::None();
|
928
956
|
}
|
929
957
|
|
930
|
-
|
958
|
+
ToBooleanStub::Types expected_input_types() const {
|
959
|
+
return expected_input_types_;
|
960
|
+
}
|
961
|
+
|
962
|
+
DECLARE_CONCRETE_INSTRUCTION(Branch)
|
963
|
+
|
964
|
+
private:
|
965
|
+
ToBooleanStub::Types expected_input_types_;
|
931
966
|
};
|
932
967
|
|
933
968
|
|
@@ -959,24 +994,26 @@ class HCompareMap: public HUnaryControlInstruction {
|
|
959
994
|
};
|
960
995
|
|
961
996
|
|
962
|
-
class HReturn: public
|
997
|
+
class HReturn: public HTemplateControlInstruction<0, 1> {
|
963
998
|
public:
|
964
|
-
explicit HReturn(HValue* value)
|
965
|
-
|
999
|
+
explicit HReturn(HValue* value) {
|
1000
|
+
SetOperandAt(0, value);
|
966
1001
|
}
|
967
1002
|
|
968
1003
|
virtual Representation RequiredInputRepresentation(int index) const {
|
969
1004
|
return Representation::Tagged();
|
970
1005
|
}
|
971
1006
|
|
1007
|
+
virtual void PrintDataTo(StringStream* stream);
|
1008
|
+
|
1009
|
+
HValue* value() { return OperandAt(0); }
|
1010
|
+
|
972
1011
|
DECLARE_CONCRETE_INSTRUCTION(Return)
|
973
1012
|
};
|
974
1013
|
|
975
1014
|
|
976
|
-
class HAbnormalExit: public HTemplateControlInstruction<0> {
|
1015
|
+
class HAbnormalExit: public HTemplateControlInstruction<0, 0> {
|
977
1016
|
public:
|
978
|
-
HAbnormalExit() : HTemplateControlInstruction<0>(NULL, NULL) { }
|
979
|
-
|
980
1017
|
virtual Representation RequiredInputRepresentation(int index) const {
|
981
1018
|
return Representation::None();
|
982
1019
|
}
|
@@ -991,14 +1028,24 @@ class HUnaryOperation: public HTemplateInstruction<1> {
|
|
991
1028
|
SetOperandAt(0, value);
|
992
1029
|
}
|
993
1030
|
|
1031
|
+
static HUnaryOperation* cast(HValue* value) {
|
1032
|
+
return reinterpret_cast<HUnaryOperation*>(value);
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
virtual bool CanTruncateToInt32() const {
|
1036
|
+
return CheckFlag(kTruncatingToInt32);
|
1037
|
+
}
|
1038
|
+
|
994
1039
|
HValue* value() { return OperandAt(0); }
|
995
1040
|
virtual void PrintDataTo(StringStream* stream);
|
996
1041
|
};
|
997
1042
|
|
998
1043
|
|
999
|
-
class HThrow: public
|
1044
|
+
class HThrow: public HTemplateInstruction<2> {
|
1000
1045
|
public:
|
1001
|
-
|
1046
|
+
HThrow(HValue* context, HValue* value) {
|
1047
|
+
SetOperandAt(0, context);
|
1048
|
+
SetOperandAt(1, value);
|
1002
1049
|
SetAllSideEffects();
|
1003
1050
|
}
|
1004
1051
|
|
@@ -1006,10 +1053,25 @@ class HThrow: public HUnaryOperation {
|
|
1006
1053
|
return Representation::Tagged();
|
1007
1054
|
}
|
1008
1055
|
|
1056
|
+
HValue* context() { return OperandAt(0); }
|
1057
|
+
HValue* value() { return OperandAt(1); }
|
1058
|
+
|
1009
1059
|
DECLARE_CONCRETE_INSTRUCTION(Throw)
|
1010
1060
|
};
|
1011
1061
|
|
1012
1062
|
|
1063
|
+
class HUseConst: public HUnaryOperation {
|
1064
|
+
public:
|
1065
|
+
explicit HUseConst(HValue* old_value) : HUnaryOperation(old_value) { }
|
1066
|
+
|
1067
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
1068
|
+
return Representation::None();
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
DECLARE_CONCRETE_INSTRUCTION(UseConst)
|
1072
|
+
};
|
1073
|
+
|
1074
|
+
|
1013
1075
|
class HForceRepresentation: public HTemplateInstruction<1> {
|
1014
1076
|
public:
|
1015
1077
|
HForceRepresentation(HValue* value, Representation required_representation) {
|
@@ -1034,28 +1096,28 @@ class HChange: public HUnaryOperation {
|
|
1034
1096
|
HChange(HValue* value,
|
1035
1097
|
Representation from,
|
1036
1098
|
Representation to,
|
1037
|
-
bool is_truncating
|
1038
|
-
|
1099
|
+
bool is_truncating,
|
1100
|
+
bool deoptimize_on_undefined)
|
1101
|
+
: HUnaryOperation(value),
|
1102
|
+
from_(from),
|
1103
|
+
deoptimize_on_undefined_(deoptimize_on_undefined) {
|
1039
1104
|
ASSERT(!from.IsNone() && !to.IsNone());
|
1040
1105
|
ASSERT(!from.Equals(to));
|
1041
1106
|
set_representation(to);
|
1042
1107
|
SetFlag(kUseGVN);
|
1043
1108
|
if (is_truncating) SetFlag(kTruncatingToInt32);
|
1044
|
-
if (from.IsInteger32() && to.IsTagged() && value->range() != NULL &&
|
1045
|
-
value->range()->IsInSmiRange()) {
|
1046
|
-
set_type(HType::Smi());
|
1047
|
-
}
|
1048
1109
|
}
|
1049
1110
|
|
1050
1111
|
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
1051
1112
|
|
1052
1113
|
Representation from() const { return from_; }
|
1053
1114
|
Representation to() const { return representation(); }
|
1115
|
+
bool deoptimize_on_undefined() const { return deoptimize_on_undefined_; }
|
1054
1116
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1055
1117
|
return from_;
|
1056
1118
|
}
|
1057
1119
|
|
1058
|
-
|
1120
|
+
virtual Range* InferRange();
|
1059
1121
|
|
1060
1122
|
virtual void PrintDataTo(StringStream* stream);
|
1061
1123
|
|
@@ -1065,52 +1127,63 @@ class HChange: public HUnaryOperation {
|
|
1065
1127
|
virtual bool DataEquals(HValue* other) {
|
1066
1128
|
if (!other->IsChange()) return false;
|
1067
1129
|
HChange* change = HChange::cast(other);
|
1068
|
-
return
|
1069
|
-
&&
|
1130
|
+
return to().Equals(change->to())
|
1131
|
+
&& deoptimize_on_undefined() == change->deoptimize_on_undefined();
|
1070
1132
|
}
|
1071
1133
|
|
1072
1134
|
private:
|
1073
1135
|
Representation from_;
|
1136
|
+
bool deoptimize_on_undefined_;
|
1074
1137
|
};
|
1075
1138
|
|
1076
1139
|
|
1077
1140
|
class HClampToUint8: public HUnaryOperation {
|
1078
1141
|
public:
|
1079
1142
|
explicit HClampToUint8(HValue* value)
|
1080
|
-
: HUnaryOperation(value)
|
1081
|
-
|
1082
|
-
SetFlag(kFlexibleRepresentation);
|
1083
|
-
set_representation(Representation::Tagged());
|
1143
|
+
: HUnaryOperation(value) {
|
1144
|
+
set_representation(Representation::Integer32());
|
1084
1145
|
SetFlag(kUseGVN);
|
1085
1146
|
}
|
1086
1147
|
|
1087
1148
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1088
|
-
return
|
1149
|
+
return Representation::None();
|
1089
1150
|
}
|
1090
1151
|
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1152
|
+
DECLARE_CONCRETE_INSTRUCTION(ClampToUint8)
|
1153
|
+
|
1154
|
+
protected:
|
1155
|
+
virtual bool DataEquals(HValue* other) { return true; }
|
1156
|
+
};
|
1157
|
+
|
1158
|
+
|
1159
|
+
class HToInt32: public HUnaryOperation {
|
1160
|
+
public:
|
1161
|
+
explicit HToInt32(HValue* value)
|
1162
|
+
: HUnaryOperation(value) {
|
1163
|
+
set_representation(Representation::Integer32());
|
1164
|
+
SetFlag(kUseGVN);
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
1168
|
+
return Representation::None();
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
virtual bool CanTruncateToInt32() const {
|
1172
|
+
return true;
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
virtual HValue* Canonicalize() {
|
1176
|
+
if (value()->representation().IsInteger32()) {
|
1177
|
+
return value();
|
1102
1178
|
} else {
|
1103
|
-
return
|
1179
|
+
return this;
|
1104
1180
|
}
|
1105
1181
|
}
|
1106
1182
|
|
1107
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
1183
|
+
DECLARE_CONCRETE_INSTRUCTION(ToInt32)
|
1108
1184
|
|
1109
1185
|
protected:
|
1110
1186
|
virtual bool DataEquals(HValue* other) { return true; }
|
1111
|
-
|
1112
|
-
private:
|
1113
|
-
Representation input_rep_;
|
1114
1187
|
};
|
1115
1188
|
|
1116
1189
|
|
@@ -1182,15 +1255,38 @@ class HSimulate: public HInstruction {
|
|
1182
1255
|
};
|
1183
1256
|
|
1184
1257
|
|
1185
|
-
class HStackCheck: public HTemplateInstruction<
|
1258
|
+
class HStackCheck: public HTemplateInstruction<1> {
|
1186
1259
|
public:
|
1187
|
-
|
1260
|
+
enum Type {
|
1261
|
+
kFunctionEntry,
|
1262
|
+
kBackwardsBranch
|
1263
|
+
};
|
1264
|
+
|
1265
|
+
HStackCheck(HValue* context, Type type) : type_(type) {
|
1266
|
+
SetOperandAt(0, context);
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
HValue* context() { return OperandAt(0); }
|
1188
1270
|
|
1189
1271
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1190
|
-
return Representation::
|
1272
|
+
return Representation::Tagged();
|
1191
1273
|
}
|
1192
1274
|
|
1275
|
+
void Eliminate() {
|
1276
|
+
// The stack check eliminator might try to eliminate the same stack
|
1277
|
+
// check instruction multiple times.
|
1278
|
+
if (IsLinked()) {
|
1279
|
+
DeleteFromGraph();
|
1280
|
+
}
|
1281
|
+
}
|
1282
|
+
|
1283
|
+
bool is_function_entry() { return type_ == kFunctionEntry; }
|
1284
|
+
bool is_backwards_branch() { return type_ == kBackwardsBranch; }
|
1285
|
+
|
1193
1286
|
DECLARE_CONCRETE_INSTRUCTION(StackCheck)
|
1287
|
+
|
1288
|
+
private:
|
1289
|
+
Type type_;
|
1194
1290
|
};
|
1195
1291
|
|
1196
1292
|
|
@@ -1251,6 +1347,24 @@ class HPushArgument: public HUnaryOperation {
|
|
1251
1347
|
};
|
1252
1348
|
|
1253
1349
|
|
1350
|
+
class HThisFunction: public HTemplateInstruction<0> {
|
1351
|
+
public:
|
1352
|
+
HThisFunction() {
|
1353
|
+
set_representation(Representation::Tagged());
|
1354
|
+
SetFlag(kUseGVN);
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
1358
|
+
return Representation::None();
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
DECLARE_CONCRETE_INSTRUCTION(ThisFunction)
|
1362
|
+
|
1363
|
+
protected:
|
1364
|
+
virtual bool DataEquals(HValue* other) { return true; }
|
1365
|
+
};
|
1366
|
+
|
1367
|
+
|
1254
1368
|
class HContext: public HTemplateInstruction<0> {
|
1255
1369
|
public:
|
1256
1370
|
HContext() {
|
@@ -1262,7 +1376,7 @@ class HContext: public HTemplateInstruction<0> {
|
|
1262
1376
|
return Representation::None();
|
1263
1377
|
}
|
1264
1378
|
|
1265
|
-
DECLARE_CONCRETE_INSTRUCTION(Context)
|
1379
|
+
DECLARE_CONCRETE_INSTRUCTION(Context)
|
1266
1380
|
|
1267
1381
|
protected:
|
1268
1382
|
virtual bool DataEquals(HValue* other) { return true; }
|
@@ -1536,19 +1650,24 @@ class HCallNew: public HBinaryCall {
|
|
1536
1650
|
};
|
1537
1651
|
|
1538
1652
|
|
1539
|
-
class HCallRuntime: public HCall<
|
1653
|
+
class HCallRuntime: public HCall<1> {
|
1540
1654
|
public:
|
1541
|
-
HCallRuntime(
|
1655
|
+
HCallRuntime(HValue* context,
|
1656
|
+
Handle<String> name,
|
1542
1657
|
const Runtime::Function* c_function,
|
1543
1658
|
int argument_count)
|
1544
|
-
: HCall<
|
1659
|
+
: HCall<1>(argument_count), c_function_(c_function), name_(name) {
|
1660
|
+
SetOperandAt(0, context);
|
1661
|
+
}
|
1662
|
+
|
1545
1663
|
virtual void PrintDataTo(StringStream* stream);
|
1546
1664
|
|
1665
|
+
HValue* context() { return OperandAt(0); }
|
1547
1666
|
const Runtime::Function* function() const { return c_function_; }
|
1548
1667
|
Handle<String> name() const { return name_; }
|
1549
1668
|
|
1550
1669
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1551
|
-
return Representation::
|
1670
|
+
return Representation::Tagged();
|
1552
1671
|
}
|
1553
1672
|
|
1554
1673
|
DECLARE_CONCRETE_INSTRUCTION(CallRuntime)
|
@@ -1559,12 +1678,14 @@ class HCallRuntime: public HCall<0> {
|
|
1559
1678
|
};
|
1560
1679
|
|
1561
1680
|
|
1562
|
-
class HJSArrayLength: public
|
1681
|
+
class HJSArrayLength: public HTemplateInstruction<2> {
|
1563
1682
|
public:
|
1564
|
-
|
1683
|
+
HJSArrayLength(HValue* value, HValue* typecheck) {
|
1565
1684
|
// The length of an array is stored as a tagged value in the array
|
1566
1685
|
// object. It is guaranteed to be 32 bit integer, but it can be
|
1567
1686
|
// represented as either a smi or heap number.
|
1687
|
+
SetOperandAt(0, value);
|
1688
|
+
SetOperandAt(1, typecheck);
|
1568
1689
|
set_representation(Representation::Tagged());
|
1569
1690
|
SetFlag(kUseGVN);
|
1570
1691
|
SetFlag(kDependsOnArrayLengths);
|
@@ -1575,6 +1696,8 @@ class HJSArrayLength: public HUnaryOperation {
|
|
1575
1696
|
return Representation::Tagged();
|
1576
1697
|
}
|
1577
1698
|
|
1699
|
+
HValue* value() { return OperandAt(0); }
|
1700
|
+
|
1578
1701
|
DECLARE_CONCRETE_INSTRUCTION(JSArrayLength)
|
1579
1702
|
|
1580
1703
|
protected:
|
@@ -1582,9 +1705,9 @@ class HJSArrayLength: public HUnaryOperation {
|
|
1582
1705
|
};
|
1583
1706
|
|
1584
1707
|
|
1585
|
-
class
|
1708
|
+
class HFixedArrayBaseLength: public HUnaryOperation {
|
1586
1709
|
public:
|
1587
|
-
explicit
|
1710
|
+
explicit HFixedArrayBaseLength(HValue* value) : HUnaryOperation(value) {
|
1588
1711
|
set_representation(Representation::Tagged());
|
1589
1712
|
SetFlag(kUseGVN);
|
1590
1713
|
SetFlag(kDependsOnArrayLengths);
|
@@ -1594,28 +1717,26 @@ class HFixedArrayLength: public HUnaryOperation {
|
|
1594
1717
|
return Representation::Tagged();
|
1595
1718
|
}
|
1596
1719
|
|
1597
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
1720
|
+
DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength)
|
1598
1721
|
|
1599
1722
|
protected:
|
1600
1723
|
virtual bool DataEquals(HValue* other) { return true; }
|
1601
1724
|
};
|
1602
1725
|
|
1603
1726
|
|
1604
|
-
class
|
1727
|
+
class HElementsKind: public HUnaryOperation {
|
1605
1728
|
public:
|
1606
|
-
explicit
|
1729
|
+
explicit HElementsKind(HValue* value) : HUnaryOperation(value) {
|
1607
1730
|
set_representation(Representation::Integer32());
|
1608
|
-
// The result of this instruction is idempotent as long as its inputs don't
|
1609
|
-
// change. The length of a pixel array cannot change once set, so it's not
|
1610
|
-
// necessary to introduce a kDependsOnArrayLengths or any other dependency.
|
1611
1731
|
SetFlag(kUseGVN);
|
1732
|
+
SetFlag(kDependsOnMaps);
|
1612
1733
|
}
|
1613
1734
|
|
1614
1735
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1615
1736
|
return Representation::Tagged();
|
1616
1737
|
}
|
1617
1738
|
|
1618
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
1739
|
+
DECLARE_CONCRETE_INSTRUCTION(ElementsKind)
|
1619
1740
|
|
1620
1741
|
protected:
|
1621
1742
|
virtual bool DataEquals(HValue* other) { return true; }
|
@@ -1642,10 +1763,12 @@ class HBitNot: public HUnaryOperation {
|
|
1642
1763
|
};
|
1643
1764
|
|
1644
1765
|
|
1645
|
-
class HUnaryMathOperation: public
|
1766
|
+
class HUnaryMathOperation: public HTemplateInstruction<2> {
|
1646
1767
|
public:
|
1647
|
-
HUnaryMathOperation(HValue* value, BuiltinFunctionId op)
|
1648
|
-
:
|
1768
|
+
HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op)
|
1769
|
+
: op_(op) {
|
1770
|
+
SetOperandAt(0, context);
|
1771
|
+
SetOperandAt(1, value);
|
1649
1772
|
switch (op) {
|
1650
1773
|
case kMathFloor:
|
1651
1774
|
case kMathRound:
|
@@ -1669,6 +1792,9 @@ class HUnaryMathOperation: public HUnaryOperation {
|
|
1669
1792
|
SetFlag(kUseGVN);
|
1670
1793
|
}
|
1671
1794
|
|
1795
|
+
HValue* context() { return OperandAt(0); }
|
1796
|
+
HValue* value() { return OperandAt(1); }
|
1797
|
+
|
1672
1798
|
virtual void PrintDataTo(StringStream* stream);
|
1673
1799
|
|
1674
1800
|
virtual HType CalculateInferredType();
|
@@ -1676,21 +1802,25 @@ class HUnaryMathOperation: public HUnaryOperation {
|
|
1676
1802
|
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
1677
1803
|
|
1678
1804
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1805
|
+
if (index == 0) {
|
1806
|
+
return Representation::Tagged();
|
1807
|
+
} else {
|
1808
|
+
switch (op_) {
|
1809
|
+
case kMathFloor:
|
1810
|
+
case kMathRound:
|
1811
|
+
case kMathCeil:
|
1812
|
+
case kMathSqrt:
|
1813
|
+
case kMathPowHalf:
|
1814
|
+
case kMathLog:
|
1815
|
+
case kMathSin:
|
1816
|
+
case kMathCos:
|
1817
|
+
return Representation::Double();
|
1818
|
+
case kMathAbs:
|
1819
|
+
return representation();
|
1820
|
+
default:
|
1821
|
+
UNREACHABLE();
|
1822
|
+
return Representation::None();
|
1823
|
+
}
|
1694
1824
|
}
|
1695
1825
|
}
|
1696
1826
|
|
@@ -1762,27 +1892,26 @@ class HLoadExternalArrayPointer: public HUnaryOperation {
|
|
1762
1892
|
};
|
1763
1893
|
|
1764
1894
|
|
1765
|
-
class HCheckMap: public
|
1895
|
+
class HCheckMap: public HTemplateInstruction<2> {
|
1766
1896
|
public:
|
1767
|
-
HCheckMap(HValue* value, Handle<Map> map)
|
1768
|
-
:
|
1897
|
+
HCheckMap(HValue* value, Handle<Map> map, HValue* typecheck = NULL)
|
1898
|
+
: map_(map) {
|
1899
|
+
SetOperandAt(0, value);
|
1900
|
+
// If callers don't depend on a typecheck, they can pass in NULL. In that
|
1901
|
+
// case we use a copy of the |value| argument as a dummy value.
|
1902
|
+
SetOperandAt(1, typecheck != NULL ? typecheck : value);
|
1769
1903
|
set_representation(Representation::Tagged());
|
1770
1904
|
SetFlag(kUseGVN);
|
1771
1905
|
SetFlag(kDependsOnMaps);
|
1772
1906
|
}
|
1773
1907
|
|
1774
|
-
virtual bool IsCheckInstruction() const { return true; }
|
1775
|
-
|
1776
1908
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1777
1909
|
return Representation::Tagged();
|
1778
1910
|
}
|
1779
1911
|
virtual void PrintDataTo(StringStream* stream);
|
1780
1912
|
virtual HType CalculateInferredType();
|
1781
1913
|
|
1782
|
-
|
1783
|
-
virtual void Verify();
|
1784
|
-
#endif
|
1785
|
-
|
1914
|
+
HValue* value() { return OperandAt(0); }
|
1786
1915
|
Handle<Map> map() const { return map_; }
|
1787
1916
|
|
1788
1917
|
DECLARE_CONCRETE_INSTRUCTION(CheckMap)
|
@@ -1806,8 +1935,6 @@ class HCheckFunction: public HUnaryOperation {
|
|
1806
1935
|
SetFlag(kUseGVN);
|
1807
1936
|
}
|
1808
1937
|
|
1809
|
-
virtual bool IsCheckInstruction() const { return true; }
|
1810
|
-
|
1811
1938
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1812
1939
|
return Representation::Tagged();
|
1813
1940
|
}
|
@@ -1835,8 +1962,8 @@ class HCheckFunction: public HUnaryOperation {
|
|
1835
1962
|
|
1836
1963
|
class HCheckInstanceType: public HUnaryOperation {
|
1837
1964
|
public:
|
1838
|
-
static HCheckInstanceType*
|
1839
|
-
return new HCheckInstanceType(value,
|
1965
|
+
static HCheckInstanceType* NewIsSpecObject(HValue* value) {
|
1966
|
+
return new HCheckInstanceType(value, IS_SPEC_OBJECT);
|
1840
1967
|
}
|
1841
1968
|
static HCheckInstanceType* NewIsJSArray(HValue* value) {
|
1842
1969
|
return new HCheckInstanceType(value, IS_JS_ARRAY);
|
@@ -1848,24 +1975,11 @@ class HCheckInstanceType: public HUnaryOperation {
|
|
1848
1975
|
return new HCheckInstanceType(value, IS_SYMBOL);
|
1849
1976
|
}
|
1850
1977
|
|
1851
|
-
virtual bool IsCheckInstruction() const { return true; }
|
1852
|
-
|
1853
1978
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1854
1979
|
return Representation::Tagged();
|
1855
1980
|
}
|
1856
1981
|
|
1857
|
-
|
1858
|
-
virtual void Verify();
|
1859
|
-
#endif
|
1860
|
-
|
1861
|
-
virtual HValue* Canonicalize() {
|
1862
|
-
if (!value()->type().IsUninitialized() &&
|
1863
|
-
value()->type().IsString() &&
|
1864
|
-
check_ == IS_STRING) {
|
1865
|
-
return NULL;
|
1866
|
-
}
|
1867
|
-
return this;
|
1868
|
-
}
|
1982
|
+
virtual HValue* Canonicalize();
|
1869
1983
|
|
1870
1984
|
bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
|
1871
1985
|
void GetCheckInterval(InstanceType* first, InstanceType* last);
|
@@ -1884,7 +1998,7 @@ class HCheckInstanceType: public HUnaryOperation {
|
|
1884
1998
|
|
1885
1999
|
private:
|
1886
2000
|
enum Check {
|
1887
|
-
|
2001
|
+
IS_SPEC_OBJECT,
|
1888
2002
|
IS_JS_ARRAY,
|
1889
2003
|
IS_STRING,
|
1890
2004
|
IS_SYMBOL,
|
@@ -1908,8 +2022,6 @@ class HCheckNonSmi: public HUnaryOperation {
|
|
1908
2022
|
SetFlag(kUseGVN);
|
1909
2023
|
}
|
1910
2024
|
|
1911
|
-
virtual bool IsCheckInstruction() const { return true; }
|
1912
|
-
|
1913
2025
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1914
2026
|
return Representation::Tagged();
|
1915
2027
|
}
|
@@ -1947,8 +2059,6 @@ class HCheckPrototypeMaps: public HTemplateInstruction<0> {
|
|
1947
2059
|
SetFlag(kDependsOnMaps);
|
1948
2060
|
}
|
1949
2061
|
|
1950
|
-
virtual bool IsCheckInstruction() const { return true; }
|
1951
|
-
|
1952
2062
|
#ifdef DEBUG
|
1953
2063
|
virtual void Verify();
|
1954
2064
|
#endif
|
@@ -1989,8 +2099,6 @@ class HCheckSmi: public HUnaryOperation {
|
|
1989
2099
|
SetFlag(kUseGVN);
|
1990
2100
|
}
|
1991
2101
|
|
1992
|
-
virtual bool IsCheckInstruction() const { return true; }
|
1993
|
-
|
1994
2102
|
virtual Representation RequiredInputRepresentation(int index) const {
|
1995
2103
|
return Representation::Tagged();
|
1996
2104
|
}
|
@@ -2205,16 +2313,18 @@ class HConstant: public HTemplateInstruction<0> {
|
|
2205
2313
|
};
|
2206
2314
|
|
2207
2315
|
|
2208
|
-
class HBinaryOperation: public HTemplateInstruction<
|
2316
|
+
class HBinaryOperation: public HTemplateInstruction<3> {
|
2209
2317
|
public:
|
2210
|
-
HBinaryOperation(HValue* left, HValue* right) {
|
2318
|
+
HBinaryOperation(HValue* context, HValue* left, HValue* right) {
|
2211
2319
|
ASSERT(left != NULL && right != NULL);
|
2212
|
-
SetOperandAt(0,
|
2213
|
-
SetOperandAt(1,
|
2320
|
+
SetOperandAt(0, context);
|
2321
|
+
SetOperandAt(1, left);
|
2322
|
+
SetOperandAt(2, right);
|
2214
2323
|
}
|
2215
2324
|
|
2216
|
-
HValue*
|
2217
|
-
HValue*
|
2325
|
+
HValue* context() { return OperandAt(0); }
|
2326
|
+
HValue* left() { return OperandAt(1); }
|
2327
|
+
HValue* right() { return OperandAt(2); }
|
2218
2328
|
|
2219
2329
|
// TODO(kasperl): Move these helpers to the IA-32 Lithium
|
2220
2330
|
// instruction sequence builder.
|
@@ -2330,25 +2440,23 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> {
|
|
2330
2440
|
};
|
2331
2441
|
|
2332
2442
|
|
2333
|
-
class HBoundsCheck: public
|
2443
|
+
class HBoundsCheck: public HTemplateInstruction<2> {
|
2334
2444
|
public:
|
2335
|
-
HBoundsCheck(HValue* index, HValue* length)
|
2336
|
-
|
2445
|
+
HBoundsCheck(HValue* index, HValue* length) {
|
2446
|
+
SetOperandAt(0, index);
|
2447
|
+
SetOperandAt(1, length);
|
2448
|
+
set_representation(Representation::Integer32());
|
2337
2449
|
SetFlag(kUseGVN);
|
2338
2450
|
}
|
2339
2451
|
|
2340
|
-
virtual bool IsCheckInstruction() const { return true; }
|
2341
|
-
|
2342
2452
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2343
2453
|
return Representation::Integer32();
|
2344
2454
|
}
|
2345
2455
|
|
2346
|
-
|
2347
|
-
virtual void Verify();
|
2348
|
-
#endif
|
2456
|
+
virtual void PrintDataTo(StringStream* stream);
|
2349
2457
|
|
2350
|
-
HValue* index() { return
|
2351
|
-
HValue* length() { return
|
2458
|
+
HValue* index() { return OperandAt(0); }
|
2459
|
+
HValue* length() { return OperandAt(1); }
|
2352
2460
|
|
2353
2461
|
DECLARE_CONCRETE_INSTRUCTION(BoundsCheck)
|
2354
2462
|
|
@@ -2359,15 +2467,17 @@ class HBoundsCheck: public HBinaryOperation {
|
|
2359
2467
|
|
2360
2468
|
class HBitwiseBinaryOperation: public HBinaryOperation {
|
2361
2469
|
public:
|
2362
|
-
HBitwiseBinaryOperation(HValue* left, HValue* right)
|
2363
|
-
: HBinaryOperation(left, right) {
|
2470
|
+
HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right)
|
2471
|
+
: HBinaryOperation(context, left, right) {
|
2364
2472
|
set_representation(Representation::Tagged());
|
2365
2473
|
SetFlag(kFlexibleRepresentation);
|
2366
2474
|
SetAllSideEffects();
|
2367
2475
|
}
|
2368
2476
|
|
2369
2477
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2370
|
-
return
|
2478
|
+
return index == 0
|
2479
|
+
? Representation::Tagged()
|
2480
|
+
: representation();
|
2371
2481
|
}
|
2372
2482
|
|
2373
2483
|
virtual void RepresentationChanged(Representation to) {
|
@@ -2387,8 +2497,8 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
|
|
2387
2497
|
|
2388
2498
|
class HArithmeticBinaryOperation: public HBinaryOperation {
|
2389
2499
|
public:
|
2390
|
-
HArithmeticBinaryOperation(HValue* left, HValue* right)
|
2391
|
-
: HBinaryOperation(left, right) {
|
2500
|
+
HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right)
|
2501
|
+
: HBinaryOperation(context, left, right) {
|
2392
2502
|
set_representation(Representation::Tagged());
|
2393
2503
|
SetFlag(kFlexibleRepresentation);
|
2394
2504
|
SetAllSideEffects();
|
@@ -2403,8 +2513,11 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
|
|
2403
2513
|
|
2404
2514
|
virtual HType CalculateInferredType();
|
2405
2515
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2406
|
-
return
|
2516
|
+
return index == 0
|
2517
|
+
? Representation::Tagged()
|
2518
|
+
: representation();
|
2407
2519
|
}
|
2520
|
+
|
2408
2521
|
virtual Representation InferredRepresentation() {
|
2409
2522
|
if (left()->representation().Equals(right()->representation())) {
|
2410
2523
|
return left()->representation();
|
@@ -2414,208 +2527,186 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
|
|
2414
2527
|
};
|
2415
2528
|
|
2416
2529
|
|
2417
|
-
class
|
2530
|
+
class HCompareGeneric: public HBinaryOperation {
|
2418
2531
|
public:
|
2419
|
-
|
2420
|
-
|
2532
|
+
HCompareGeneric(HValue* context,
|
2533
|
+
HValue* left,
|
2534
|
+
HValue* right,
|
2535
|
+
Token::Value token)
|
2536
|
+
: HBinaryOperation(context, left, right), token_(token) {
|
2421
2537
|
ASSERT(Token::IsCompareOp(token));
|
2422
2538
|
set_representation(Representation::Tagged());
|
2423
2539
|
SetAllSideEffects();
|
2424
2540
|
}
|
2425
2541
|
|
2426
|
-
void SetInputRepresentation(Representation r);
|
2427
|
-
|
2428
|
-
virtual bool EmitAtUses() {
|
2429
|
-
return !HasSideEffects() && !HasMultipleUses();
|
2430
|
-
}
|
2431
|
-
|
2432
2542
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2433
|
-
return
|
2543
|
+
return Representation::Tagged();
|
2434
2544
|
}
|
2545
|
+
|
2435
2546
|
Representation GetInputRepresentation() const {
|
2436
|
-
return
|
2547
|
+
return Representation::Tagged();
|
2437
2548
|
}
|
2549
|
+
|
2438
2550
|
Token::Value token() const { return token_; }
|
2439
2551
|
virtual void PrintDataTo(StringStream* stream);
|
2440
2552
|
|
2441
2553
|
virtual HType CalculateInferredType();
|
2442
2554
|
|
2443
|
-
|
2444
|
-
return HValue::Hashcode() * 7 + token_;
|
2445
|
-
}
|
2446
|
-
|
2447
|
-
DECLARE_CONCRETE_INSTRUCTION(Compare)
|
2448
|
-
|
2449
|
-
protected:
|
2450
|
-
virtual bool DataEquals(HValue* other) {
|
2451
|
-
HCompare* comp = HCompare::cast(other);
|
2452
|
-
return token_ == comp->token();
|
2453
|
-
}
|
2555
|
+
DECLARE_CONCRETE_INSTRUCTION(CompareGeneric)
|
2454
2556
|
|
2455
2557
|
private:
|
2456
|
-
Representation input_representation_;
|
2457
2558
|
Token::Value token_;
|
2458
2559
|
};
|
2459
2560
|
|
2460
2561
|
|
2461
|
-
class
|
2562
|
+
class HCompareIDAndBranch: public HTemplateControlInstruction<2, 2> {
|
2462
2563
|
public:
|
2463
|
-
|
2464
|
-
:
|
2465
|
-
|
2466
|
-
|
2467
|
-
|
2564
|
+
HCompareIDAndBranch(HValue* left, HValue* right, Token::Value token)
|
2565
|
+
: token_(token) {
|
2566
|
+
ASSERT(Token::IsCompareOp(token));
|
2567
|
+
SetOperandAt(0, left);
|
2568
|
+
SetOperandAt(1, right);
|
2468
2569
|
}
|
2469
2570
|
|
2470
|
-
|
2471
|
-
|
2571
|
+
HValue* left() { return OperandAt(0); }
|
2572
|
+
HValue* right() { return OperandAt(1); }
|
2573
|
+
Token::Value token() const { return token_; }
|
2574
|
+
|
2575
|
+
void SetInputRepresentation(Representation r);
|
2576
|
+
Representation GetInputRepresentation() const {
|
2577
|
+
return input_representation_;
|
2472
2578
|
}
|
2473
2579
|
|
2474
2580
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2475
|
-
return
|
2581
|
+
return input_representation_;
|
2476
2582
|
}
|
2477
|
-
virtual
|
2583
|
+
virtual void PrintDataTo(StringStream* stream);
|
2478
2584
|
|
2479
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
2585
|
+
DECLARE_CONCRETE_INSTRUCTION(CompareIDAndBranch)
|
2480
2586
|
|
2481
|
-
|
2482
|
-
|
2587
|
+
private:
|
2588
|
+
Representation input_representation_;
|
2589
|
+
Token::Value token_;
|
2483
2590
|
};
|
2484
2591
|
|
2485
2592
|
|
2486
|
-
class
|
2593
|
+
class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> {
|
2487
2594
|
public:
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2491
|
-
set_representation(Representation::Tagged());
|
2492
|
-
SetFlag(kUseGVN);
|
2493
|
-
SetFlag(kDependsOnMaps);
|
2595
|
+
HCompareObjectEqAndBranch(HValue* left, HValue* right) {
|
2596
|
+
SetOperandAt(0, left);
|
2597
|
+
SetOperandAt(1, right);
|
2494
2598
|
}
|
2495
2599
|
|
2496
|
-
|
2497
|
-
|
2498
|
-
virtual bool EmitAtUses() {
|
2499
|
-
return !HasSideEffects() && !HasMultipleUses();
|
2500
|
-
}
|
2600
|
+
HValue* left() { return OperandAt(0); }
|
2601
|
+
HValue* right() { return OperandAt(1); }
|
2501
2602
|
|
2502
2603
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2503
2604
|
return Representation::Tagged();
|
2504
2605
|
}
|
2505
2606
|
|
2506
|
-
|
2507
|
-
|
2508
|
-
DECLARE_CONCRETE_INSTRUCTION(CompareSymbolEq);
|
2509
|
-
|
2510
|
-
protected:
|
2511
|
-
virtual bool DataEquals(HValue* other) {
|
2512
|
-
return op_ == HCompareSymbolEq::cast(other)->op_;
|
2513
|
-
}
|
2514
|
-
|
2515
|
-
private:
|
2516
|
-
const Token::Value op_;
|
2607
|
+
DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch)
|
2517
2608
|
};
|
2518
2609
|
|
2519
2610
|
|
2520
|
-
class
|
2611
|
+
class HCompareConstantEqAndBranch: public HUnaryControlInstruction {
|
2521
2612
|
public:
|
2522
|
-
|
2523
|
-
|
2524
|
-
|
2613
|
+
HCompareConstantEqAndBranch(HValue* left, int right, Token::Value op)
|
2614
|
+
: HUnaryControlInstruction(left, NULL, NULL), op_(op), right_(right) {
|
2615
|
+
ASSERT(op == Token::EQ_STRICT);
|
2525
2616
|
}
|
2526
2617
|
|
2527
|
-
|
2528
|
-
|
2529
|
-
}
|
2618
|
+
Token::Value op() const { return op_; }
|
2619
|
+
HValue* left() { return value(); }
|
2620
|
+
int right() const { return right_; }
|
2530
2621
|
|
2531
2622
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2532
|
-
return Representation::
|
2623
|
+
return Representation::Integer32();
|
2533
2624
|
}
|
2534
|
-
|
2625
|
+
|
2626
|
+
DECLARE_CONCRETE_INSTRUCTION(CompareConstantEqAndBranch);
|
2627
|
+
|
2628
|
+
private:
|
2629
|
+
const Token::Value op_;
|
2630
|
+
const int right_;
|
2535
2631
|
};
|
2536
2632
|
|
2537
2633
|
|
2538
|
-
class
|
2634
|
+
class HIsNullAndBranch: public HUnaryControlInstruction {
|
2539
2635
|
public:
|
2540
|
-
|
2541
|
-
:
|
2636
|
+
HIsNullAndBranch(HValue* value, bool is_strict)
|
2637
|
+
: HUnaryControlInstruction(value, NULL, NULL), is_strict_(is_strict) { }
|
2542
2638
|
|
2543
2639
|
bool is_strict() const { return is_strict_; }
|
2544
2640
|
|
2545
|
-
|
2546
|
-
|
2547
|
-
protected:
|
2548
|
-
virtual bool DataEquals(HValue* other) {
|
2549
|
-
HIsNull* b = HIsNull::cast(other);
|
2550
|
-
return is_strict_ == b->is_strict();
|
2641
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2642
|
+
return Representation::Tagged();
|
2551
2643
|
}
|
2552
2644
|
|
2645
|
+
DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch)
|
2646
|
+
|
2553
2647
|
private:
|
2554
2648
|
bool is_strict_;
|
2555
2649
|
};
|
2556
2650
|
|
2557
2651
|
|
2558
|
-
class
|
2652
|
+
class HIsObjectAndBranch: public HUnaryControlInstruction {
|
2559
2653
|
public:
|
2560
|
-
explicit
|
2654
|
+
explicit HIsObjectAndBranch(HValue* value)
|
2655
|
+
: HUnaryControlInstruction(value, NULL, NULL) { }
|
2561
2656
|
|
2562
|
-
|
2657
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2658
|
+
return Representation::Tagged();
|
2659
|
+
}
|
2563
2660
|
|
2564
|
-
|
2565
|
-
virtual bool DataEquals(HValue* other) { return true; }
|
2661
|
+
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch)
|
2566
2662
|
};
|
2567
2663
|
|
2568
2664
|
|
2569
|
-
class
|
2665
|
+
class HIsSmiAndBranch: public HUnaryControlInstruction {
|
2570
2666
|
public:
|
2571
|
-
explicit
|
2667
|
+
explicit HIsSmiAndBranch(HValue* value)
|
2668
|
+
: HUnaryControlInstruction(value, NULL, NULL) { }
|
2572
2669
|
|
2573
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
2670
|
+
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch)
|
2671
|
+
|
2672
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2673
|
+
return Representation::Tagged();
|
2674
|
+
}
|
2574
2675
|
|
2575
2676
|
protected:
|
2576
2677
|
virtual bool DataEquals(HValue* other) { return true; }
|
2577
2678
|
};
|
2578
2679
|
|
2579
2680
|
|
2580
|
-
class
|
2681
|
+
class HIsUndetectableAndBranch: public HUnaryControlInstruction {
|
2581
2682
|
public:
|
2582
|
-
explicit
|
2683
|
+
explicit HIsUndetectableAndBranch(HValue* value)
|
2684
|
+
: HUnaryControlInstruction(value, NULL, NULL) { }
|
2583
2685
|
|
2584
|
-
|
2686
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2687
|
+
return Representation::Tagged();
|
2688
|
+
}
|
2585
2689
|
|
2586
|
-
|
2587
|
-
virtual bool DataEquals(HValue* other) { return true; }
|
2690
|
+
DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch)
|
2588
2691
|
};
|
2589
2692
|
|
2590
2693
|
|
2591
|
-
class
|
2694
|
+
class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> {
|
2592
2695
|
public:
|
2593
|
-
HIsConstructCall() {
|
2594
|
-
set_representation(Representation::Tagged());
|
2595
|
-
SetFlag(kUseGVN);
|
2596
|
-
}
|
2597
|
-
|
2598
|
-
virtual bool EmitAtUses() {
|
2599
|
-
return !HasSideEffects() && !HasMultipleUses();
|
2600
|
-
}
|
2601
|
-
|
2602
2696
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2603
2697
|
return Representation::None();
|
2604
2698
|
}
|
2605
2699
|
|
2606
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
2607
|
-
|
2608
|
-
protected:
|
2609
|
-
virtual bool DataEquals(HValue* other) { return true; }
|
2700
|
+
DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch)
|
2610
2701
|
};
|
2611
2702
|
|
2612
2703
|
|
2613
|
-
class
|
2704
|
+
class HHasInstanceTypeAndBranch: public HUnaryControlInstruction {
|
2614
2705
|
public:
|
2615
|
-
|
2616
|
-
:
|
2617
|
-
|
2618
|
-
:
|
2706
|
+
HHasInstanceTypeAndBranch(HValue* value, InstanceType type)
|
2707
|
+
: HUnaryControlInstruction(value, NULL, NULL), from_(type), to_(type) { }
|
2708
|
+
HHasInstanceTypeAndBranch(HValue* value, InstanceType from, InstanceType to)
|
2709
|
+
: HUnaryControlInstruction(value, NULL, NULL), from_(from), to_(to) {
|
2619
2710
|
ASSERT(to == LAST_TYPE); // Others not implemented yet in backend.
|
2620
2711
|
}
|
2621
2712
|
|
@@ -2624,34 +2715,41 @@ class HHasInstanceType: public HUnaryPredicate {
|
|
2624
2715
|
|
2625
2716
|
virtual void PrintDataTo(StringStream* stream);
|
2626
2717
|
|
2627
|
-
|
2628
|
-
|
2629
|
-
protected:
|
2630
|
-
virtual bool DataEquals(HValue* other) {
|
2631
|
-
HHasInstanceType* b = HHasInstanceType::cast(other);
|
2632
|
-
return (from_ == b->from()) && (to_ == b->to());
|
2718
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2719
|
+
return Representation::Tagged();
|
2633
2720
|
}
|
2634
2721
|
|
2722
|
+
DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch)
|
2723
|
+
|
2635
2724
|
private:
|
2636
2725
|
InstanceType from_;
|
2637
2726
|
InstanceType to_; // Inclusive range, not all combinations work.
|
2638
2727
|
};
|
2639
2728
|
|
2640
2729
|
|
2641
|
-
class
|
2730
|
+
class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction {
|
2642
2731
|
public:
|
2643
|
-
explicit
|
2732
|
+
explicit HHasCachedArrayIndexAndBranch(HValue* value)
|
2733
|
+
: HUnaryControlInstruction(value, NULL, NULL) { }
|
2644
2734
|
|
2645
|
-
|
2735
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2736
|
+
return Representation::Tagged();
|
2737
|
+
}
|
2646
2738
|
|
2647
|
-
|
2648
|
-
virtual bool DataEquals(HValue* other) { return true; }
|
2739
|
+
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch)
|
2649
2740
|
};
|
2650
2741
|
|
2651
2742
|
|
2652
|
-
class HGetCachedArrayIndex: public
|
2743
|
+
class HGetCachedArrayIndex: public HUnaryOperation {
|
2653
2744
|
public:
|
2654
|
-
explicit HGetCachedArrayIndex(HValue* value) :
|
2745
|
+
explicit HGetCachedArrayIndex(HValue* value) : HUnaryOperation(value) {
|
2746
|
+
set_representation(Representation::Tagged());
|
2747
|
+
SetFlag(kUseGVN);
|
2748
|
+
}
|
2749
|
+
|
2750
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2751
|
+
return Representation::Tagged();
|
2752
|
+
}
|
2655
2753
|
|
2656
2754
|
DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex)
|
2657
2755
|
|
@@ -2660,42 +2758,40 @@ class HGetCachedArrayIndex: public HUnaryPredicate {
|
|
2660
2758
|
};
|
2661
2759
|
|
2662
2760
|
|
2663
|
-
class
|
2761
|
+
class HClassOfTestAndBranch: public HUnaryControlInstruction {
|
2664
2762
|
public:
|
2665
|
-
|
2666
|
-
:
|
2763
|
+
HClassOfTestAndBranch(HValue* value, Handle<String> class_name)
|
2764
|
+
: HUnaryControlInstruction(value, NULL, NULL),
|
2765
|
+
class_name_(class_name) { }
|
2766
|
+
|
2767
|
+
DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch)
|
2667
2768
|
|
2668
|
-
|
2769
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2770
|
+
return Representation::Tagged();
|
2771
|
+
}
|
2669
2772
|
|
2670
2773
|
virtual void PrintDataTo(StringStream* stream);
|
2671
2774
|
|
2672
2775
|
Handle<String> class_name() const { return class_name_; }
|
2673
2776
|
|
2674
|
-
protected:
|
2675
|
-
virtual bool DataEquals(HValue* other) {
|
2676
|
-
HClassOfTest* b = HClassOfTest::cast(other);
|
2677
|
-
return class_name_.is_identical_to(b->class_name_);
|
2678
|
-
}
|
2679
|
-
|
2680
2777
|
private:
|
2681
2778
|
Handle<String> class_name_;
|
2682
2779
|
};
|
2683
2780
|
|
2684
2781
|
|
2685
|
-
class
|
2782
|
+
class HTypeofIsAndBranch: public HUnaryControlInstruction {
|
2686
2783
|
public:
|
2687
|
-
|
2688
|
-
:
|
2784
|
+
HTypeofIsAndBranch(HValue* value, Handle<String> type_literal)
|
2785
|
+
: HUnaryControlInstruction(value, NULL, NULL),
|
2786
|
+
type_literal_(type_literal) { }
|
2689
2787
|
|
2690
2788
|
Handle<String> type_literal() { return type_literal_; }
|
2691
2789
|
virtual void PrintDataTo(StringStream* stream);
|
2692
2790
|
|
2693
|
-
DECLARE_CONCRETE_INSTRUCTION(
|
2791
|
+
DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch)
|
2694
2792
|
|
2695
|
-
|
2696
|
-
|
2697
|
-
HTypeofIs* b = HTypeofIs::cast(other);
|
2698
|
-
return type_literal_.is_identical_to(b->type_literal_);
|
2793
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
2794
|
+
return Representation::Tagged();
|
2699
2795
|
}
|
2700
2796
|
|
2701
2797
|
private:
|
@@ -2703,48 +2799,48 @@ class HTypeofIs: public HUnaryPredicate {
|
|
2703
2799
|
};
|
2704
2800
|
|
2705
2801
|
|
2706
|
-
class HInstanceOf: public
|
2802
|
+
class HInstanceOf: public HBinaryOperation {
|
2707
2803
|
public:
|
2708
|
-
HInstanceOf(HValue* context, HValue* left, HValue* right)
|
2709
|
-
|
2710
|
-
SetOperandAt(1, left);
|
2711
|
-
SetOperandAt(2, right);
|
2804
|
+
HInstanceOf(HValue* context, HValue* left, HValue* right)
|
2805
|
+
: HBinaryOperation(context, left, right) {
|
2712
2806
|
set_representation(Representation::Tagged());
|
2713
2807
|
SetAllSideEffects();
|
2714
2808
|
}
|
2715
2809
|
|
2716
|
-
HValue* context() { return OperandAt(0); }
|
2717
|
-
HValue* left() { return OperandAt(1); }
|
2718
|
-
HValue* right() { return OperandAt(2); }
|
2719
|
-
|
2720
|
-
virtual bool EmitAtUses() {
|
2721
|
-
return !HasSideEffects() && !HasMultipleUses();
|
2722
|
-
}
|
2723
|
-
|
2724
2810
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2725
2811
|
return Representation::Tagged();
|
2726
2812
|
}
|
2727
2813
|
|
2814
|
+
virtual HType CalculateInferredType();
|
2815
|
+
|
2728
2816
|
virtual void PrintDataTo(StringStream* stream);
|
2729
2817
|
|
2730
2818
|
DECLARE_CONCRETE_INSTRUCTION(InstanceOf)
|
2731
2819
|
};
|
2732
2820
|
|
2733
2821
|
|
2734
|
-
class HInstanceOfKnownGlobal: public
|
2822
|
+
class HInstanceOfKnownGlobal: public HTemplateInstruction<2> {
|
2735
2823
|
public:
|
2736
|
-
HInstanceOfKnownGlobal(HValue*
|
2737
|
-
|
2824
|
+
HInstanceOfKnownGlobal(HValue* context,
|
2825
|
+
HValue* left,
|
2826
|
+
Handle<JSFunction> right)
|
2827
|
+
: function_(right) {
|
2828
|
+
SetOperandAt(0, context);
|
2829
|
+
SetOperandAt(1, left);
|
2738
2830
|
set_representation(Representation::Tagged());
|
2739
2831
|
SetAllSideEffects();
|
2740
2832
|
}
|
2741
2833
|
|
2834
|
+
HValue* context() { return OperandAt(0); }
|
2835
|
+
HValue* left() { return OperandAt(1); }
|
2742
2836
|
Handle<JSFunction> function() { return function_; }
|
2743
2837
|
|
2744
2838
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2745
2839
|
return Representation::Tagged();
|
2746
2840
|
}
|
2747
2841
|
|
2842
|
+
virtual HType CalculateInferredType();
|
2843
|
+
|
2748
2844
|
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal)
|
2749
2845
|
|
2750
2846
|
private:
|
@@ -2752,16 +2848,22 @@ class HInstanceOfKnownGlobal: public HUnaryOperation {
|
|
2752
2848
|
};
|
2753
2849
|
|
2754
2850
|
|
2755
|
-
class HPower: public
|
2851
|
+
class HPower: public HTemplateInstruction<2> {
|
2756
2852
|
public:
|
2757
|
-
HPower(HValue* left, HValue* right)
|
2758
|
-
|
2853
|
+
HPower(HValue* left, HValue* right) {
|
2854
|
+
SetOperandAt(0, left);
|
2855
|
+
SetOperandAt(1, right);
|
2759
2856
|
set_representation(Representation::Double());
|
2760
2857
|
SetFlag(kUseGVN);
|
2761
2858
|
}
|
2762
2859
|
|
2860
|
+
HValue* left() { return OperandAt(0); }
|
2861
|
+
HValue* right() { return OperandAt(1); }
|
2862
|
+
|
2763
2863
|
virtual Representation RequiredInputRepresentation(int index) const {
|
2764
|
-
return
|
2864
|
+
return index == 0
|
2865
|
+
? Representation::Double()
|
2866
|
+
: Representation::None();
|
2765
2867
|
}
|
2766
2868
|
|
2767
2869
|
DECLARE_CONCRETE_INSTRUCTION(Power)
|
@@ -2773,7 +2875,8 @@ class HPower: public HBinaryOperation {
|
|
2773
2875
|
|
2774
2876
|
class HAdd: public HArithmeticBinaryOperation {
|
2775
2877
|
public:
|
2776
|
-
HAdd(HValue*
|
2878
|
+
HAdd(HValue* context, HValue* left, HValue* right)
|
2879
|
+
: HArithmeticBinaryOperation(context, left, right) {
|
2777
2880
|
SetFlag(kCanOverflow);
|
2778
2881
|
}
|
2779
2882
|
|
@@ -2798,7 +2901,8 @@ class HAdd: public HArithmeticBinaryOperation {
|
|
2798
2901
|
|
2799
2902
|
class HSub: public HArithmeticBinaryOperation {
|
2800
2903
|
public:
|
2801
|
-
HSub(HValue*
|
2904
|
+
HSub(HValue* context, HValue* left, HValue* right)
|
2905
|
+
: HArithmeticBinaryOperation(context, left, right) {
|
2802
2906
|
SetFlag(kCanOverflow);
|
2803
2907
|
}
|
2804
2908
|
|
@@ -2815,7 +2919,8 @@ class HSub: public HArithmeticBinaryOperation {
|
|
2815
2919
|
|
2816
2920
|
class HMul: public HArithmeticBinaryOperation {
|
2817
2921
|
public:
|
2818
|
-
HMul(HValue*
|
2922
|
+
HMul(HValue* context, HValue* left, HValue* right)
|
2923
|
+
: HArithmeticBinaryOperation(context, left, right) {
|
2819
2924
|
SetFlag(kCanOverflow);
|
2820
2925
|
}
|
2821
2926
|
|
@@ -2837,7 +2942,8 @@ class HMul: public HArithmeticBinaryOperation {
|
|
2837
2942
|
|
2838
2943
|
class HMod: public HArithmeticBinaryOperation {
|
2839
2944
|
public:
|
2840
|
-
HMod(HValue*
|
2945
|
+
HMod(HValue* context, HValue* left, HValue* right)
|
2946
|
+
: HArithmeticBinaryOperation(context, left, right) {
|
2841
2947
|
SetFlag(kCanBeDivByZero);
|
2842
2948
|
}
|
2843
2949
|
|
@@ -2864,7 +2970,8 @@ class HMod: public HArithmeticBinaryOperation {
|
|
2864
2970
|
|
2865
2971
|
class HDiv: public HArithmeticBinaryOperation {
|
2866
2972
|
public:
|
2867
|
-
HDiv(HValue*
|
2973
|
+
HDiv(HValue* context, HValue* left, HValue* right)
|
2974
|
+
: HArithmeticBinaryOperation(context, left, right) {
|
2868
2975
|
SetFlag(kCanBeDivByZero);
|
2869
2976
|
SetFlag(kCanOverflow);
|
2870
2977
|
}
|
@@ -2882,8 +2989,8 @@ class HDiv: public HArithmeticBinaryOperation {
|
|
2882
2989
|
|
2883
2990
|
class HBitAnd: public HBitwiseBinaryOperation {
|
2884
2991
|
public:
|
2885
|
-
HBitAnd(HValue* left, HValue* right)
|
2886
|
-
: HBitwiseBinaryOperation(left, right) { }
|
2992
|
+
HBitAnd(HValue* context, HValue* left, HValue* right)
|
2993
|
+
: HBitwiseBinaryOperation(context, left, right) { }
|
2887
2994
|
|
2888
2995
|
virtual bool IsCommutative() const { return true; }
|
2889
2996
|
virtual HType CalculateInferredType();
|
@@ -2899,8 +3006,8 @@ class HBitAnd: public HBitwiseBinaryOperation {
|
|
2899
3006
|
|
2900
3007
|
class HBitXor: public HBitwiseBinaryOperation {
|
2901
3008
|
public:
|
2902
|
-
HBitXor(HValue* left, HValue* right)
|
2903
|
-
: HBitwiseBinaryOperation(left, right) { }
|
3009
|
+
HBitXor(HValue* context, HValue* left, HValue* right)
|
3010
|
+
: HBitwiseBinaryOperation(context, left, right) { }
|
2904
3011
|
|
2905
3012
|
virtual bool IsCommutative() const { return true; }
|
2906
3013
|
virtual HType CalculateInferredType();
|
@@ -2914,8 +3021,8 @@ class HBitXor: public HBitwiseBinaryOperation {
|
|
2914
3021
|
|
2915
3022
|
class HBitOr: public HBitwiseBinaryOperation {
|
2916
3023
|
public:
|
2917
|
-
HBitOr(HValue* left, HValue* right)
|
2918
|
-
: HBitwiseBinaryOperation(left, right) { }
|
3024
|
+
HBitOr(HValue* context, HValue* left, HValue* right)
|
3025
|
+
: HBitwiseBinaryOperation(context, left, right) { }
|
2919
3026
|
|
2920
3027
|
virtual bool IsCommutative() const { return true; }
|
2921
3028
|
virtual HType CalculateInferredType();
|
@@ -2931,8 +3038,8 @@ class HBitOr: public HBitwiseBinaryOperation {
|
|
2931
3038
|
|
2932
3039
|
class HShl: public HBitwiseBinaryOperation {
|
2933
3040
|
public:
|
2934
|
-
HShl(HValue* left, HValue* right)
|
2935
|
-
: HBitwiseBinaryOperation(left, right) { }
|
3041
|
+
HShl(HValue* context, HValue* left, HValue* right)
|
3042
|
+
: HBitwiseBinaryOperation(context, left, right) { }
|
2936
3043
|
|
2937
3044
|
virtual Range* InferRange();
|
2938
3045
|
virtual HType CalculateInferredType();
|
@@ -2946,9 +3053,10 @@ class HShl: public HBitwiseBinaryOperation {
|
|
2946
3053
|
|
2947
3054
|
class HShr: public HBitwiseBinaryOperation {
|
2948
3055
|
public:
|
2949
|
-
HShr(HValue* left, HValue* right)
|
2950
|
-
: HBitwiseBinaryOperation(left, right) { }
|
3056
|
+
HShr(HValue* context, HValue* left, HValue* right)
|
3057
|
+
: HBitwiseBinaryOperation(context, left, right) { }
|
2951
3058
|
|
3059
|
+
virtual Range* InferRange();
|
2952
3060
|
virtual HType CalculateInferredType();
|
2953
3061
|
|
2954
3062
|
DECLARE_CONCRETE_INSTRUCTION(Shr)
|
@@ -2960,8 +3068,8 @@ class HShr: public HBitwiseBinaryOperation {
|
|
2960
3068
|
|
2961
3069
|
class HSar: public HBitwiseBinaryOperation {
|
2962
3070
|
public:
|
2963
|
-
HSar(HValue* left, HValue* right)
|
2964
|
-
: HBitwiseBinaryOperation(left, right) { }
|
3071
|
+
HSar(HValue* context, HValue* left, HValue* right)
|
3072
|
+
: HBitwiseBinaryOperation(context, left, right) { }
|
2965
3073
|
|
2966
3074
|
virtual Range* InferRange();
|
2967
3075
|
virtual HType CalculateInferredType();
|
@@ -3095,15 +3203,16 @@ class HLoadGlobalCell: public HTemplateInstruction<0> {
|
|
3095
3203
|
};
|
3096
3204
|
|
3097
3205
|
|
3098
|
-
class HLoadGlobalGeneric: public
|
3206
|
+
class HLoadGlobalGeneric: public HTemplateInstruction<2> {
|
3099
3207
|
public:
|
3100
3208
|
HLoadGlobalGeneric(HValue* context,
|
3101
3209
|
HValue* global_object,
|
3102
3210
|
Handle<Object> name,
|
3103
3211
|
bool for_typeof)
|
3104
|
-
:
|
3105
|
-
name_(name),
|
3212
|
+
: name_(name),
|
3106
3213
|
for_typeof_(for_typeof) {
|
3214
|
+
SetOperandAt(0, context);
|
3215
|
+
SetOperandAt(1, global_object);
|
3107
3216
|
set_representation(Representation::Tagged());
|
3108
3217
|
SetAllSideEffects();
|
3109
3218
|
}
|
@@ -3221,15 +3330,18 @@ class HLoadContextSlot: public HUnaryOperation {
|
|
3221
3330
|
|
3222
3331
|
|
3223
3332
|
static inline bool StoringValueNeedsWriteBarrier(HValue* value) {
|
3224
|
-
return !value->type().
|
3225
|
-
!
|
3333
|
+
return !value->type().IsBoolean()
|
3334
|
+
&& !value->type().IsSmi()
|
3335
|
+
&& !(value->IsConstant() && HConstant::cast(value)->InOldSpace());
|
3226
3336
|
}
|
3227
3337
|
|
3228
3338
|
|
3229
|
-
class HStoreContextSlot: public
|
3339
|
+
class HStoreContextSlot: public HTemplateInstruction<2> {
|
3230
3340
|
public:
|
3231
3341
|
HStoreContextSlot(HValue* context, int slot_index, HValue* value)
|
3232
|
-
:
|
3342
|
+
: slot_index_(slot_index) {
|
3343
|
+
SetOperandAt(0, context);
|
3344
|
+
SetOperandAt(1, value);
|
3233
3345
|
SetFlag(kChangesContextSlots);
|
3234
3346
|
}
|
3235
3347
|
|
@@ -3293,14 +3405,16 @@ class HLoadNamedField: public HUnaryOperation {
|
|
3293
3405
|
};
|
3294
3406
|
|
3295
3407
|
|
3296
|
-
class HLoadNamedFieldPolymorphic: public
|
3408
|
+
class HLoadNamedFieldPolymorphic: public HTemplateInstruction<2> {
|
3297
3409
|
public:
|
3298
|
-
HLoadNamedFieldPolymorphic(HValue*
|
3299
|
-
|
3410
|
+
HLoadNamedFieldPolymorphic(HValue* context,
|
3411
|
+
HValue* object,
|
3412
|
+
SmallMapList* types,
|
3300
3413
|
Handle<String> name);
|
3301
3414
|
|
3302
|
-
HValue*
|
3303
|
-
|
3415
|
+
HValue* context() { return OperandAt(0); }
|
3416
|
+
HValue* object() { return OperandAt(1); }
|
3417
|
+
SmallMapList* types() { return &types_; }
|
3304
3418
|
Handle<String> name() { return name_; }
|
3305
3419
|
bool need_generic() { return need_generic_; }
|
3306
3420
|
|
@@ -3308,6 +3422,8 @@ class HLoadNamedFieldPolymorphic: public HUnaryOperation {
|
|
3308
3422
|
return Representation::Tagged();
|
3309
3423
|
}
|
3310
3424
|
|
3425
|
+
virtual void PrintDataTo(StringStream* stream);
|
3426
|
+
|
3311
3427
|
DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic)
|
3312
3428
|
|
3313
3429
|
static const int kMaxLoadPolymorphism = 4;
|
@@ -3316,17 +3432,19 @@ class HLoadNamedFieldPolymorphic: public HUnaryOperation {
|
|
3316
3432
|
virtual bool DataEquals(HValue* value);
|
3317
3433
|
|
3318
3434
|
private:
|
3319
|
-
|
3435
|
+
SmallMapList types_;
|
3320
3436
|
Handle<String> name_;
|
3321
3437
|
bool need_generic_;
|
3322
3438
|
};
|
3323
3439
|
|
3324
3440
|
|
3325
3441
|
|
3326
|
-
class HLoadNamedGeneric: public
|
3442
|
+
class HLoadNamedGeneric: public HTemplateInstruction<2> {
|
3327
3443
|
public:
|
3328
3444
|
HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name)
|
3329
|
-
:
|
3445
|
+
: name_(name) {
|
3446
|
+
SetOperandAt(0, context);
|
3447
|
+
SetOperandAt(1, object);
|
3330
3448
|
set_representation(Representation::Tagged());
|
3331
3449
|
SetAllSideEffects();
|
3332
3450
|
}
|
@@ -3339,6 +3457,8 @@ class HLoadNamedGeneric: public HBinaryOperation {
|
|
3339
3457
|
return Representation::Tagged();
|
3340
3458
|
}
|
3341
3459
|
|
3460
|
+
virtual void PrintDataTo(StringStream* stream);
|
3461
|
+
|
3342
3462
|
DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
|
3343
3463
|
|
3344
3464
|
private:
|
@@ -3368,9 +3488,11 @@ class HLoadFunctionPrototype: public HUnaryOperation {
|
|
3368
3488
|
};
|
3369
3489
|
|
3370
3490
|
|
3371
|
-
class HLoadKeyedFastElement: public
|
3491
|
+
class HLoadKeyedFastElement: public HTemplateInstruction<2> {
|
3372
3492
|
public:
|
3373
|
-
HLoadKeyedFastElement(HValue* obj, HValue* key)
|
3493
|
+
HLoadKeyedFastElement(HValue* obj, HValue* key) {
|
3494
|
+
SetOperandAt(0, obj);
|
3495
|
+
SetOperandAt(1, key);
|
3374
3496
|
set_representation(Representation::Tagged());
|
3375
3497
|
SetFlag(kDependsOnArrayElements);
|
3376
3498
|
SetFlag(kUseGVN);
|
@@ -3381,8 +3503,9 @@ class HLoadKeyedFastElement: public HBinaryOperation {
|
|
3381
3503
|
|
3382
3504
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3383
3505
|
// The key is supposed to be Integer32.
|
3384
|
-
return
|
3385
|
-
|
3506
|
+
return index == 0
|
3507
|
+
? Representation::Tagged()
|
3508
|
+
: Representation::Integer32();
|
3386
3509
|
}
|
3387
3510
|
|
3388
3511
|
virtual void PrintDataTo(StringStream* stream);
|
@@ -3396,15 +3519,47 @@ class HLoadKeyedFastElement: public HBinaryOperation {
|
|
3396
3519
|
};
|
3397
3520
|
|
3398
3521
|
|
3399
|
-
class
|
3522
|
+
class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> {
|
3523
|
+
public:
|
3524
|
+
HLoadKeyedFastDoubleElement(HValue* elements, HValue* key) {
|
3525
|
+
SetOperandAt(0, elements);
|
3526
|
+
SetOperandAt(1, key);
|
3527
|
+
set_representation(Representation::Double());
|
3528
|
+
SetFlag(kDependsOnDoubleArrayElements);
|
3529
|
+
SetFlag(kUseGVN);
|
3530
|
+
}
|
3531
|
+
|
3532
|
+
HValue* elements() { return OperandAt(0); }
|
3533
|
+
HValue* key() { return OperandAt(1); }
|
3534
|
+
|
3535
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
3536
|
+
// The key is supposed to be Integer32.
|
3537
|
+
return index == 0
|
3538
|
+
? Representation::Tagged()
|
3539
|
+
: Representation::Integer32();
|
3540
|
+
}
|
3541
|
+
|
3542
|
+
virtual void PrintDataTo(StringStream* stream);
|
3543
|
+
|
3544
|
+
bool RequiresHoleCheck() const;
|
3545
|
+
|
3546
|
+
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement)
|
3547
|
+
|
3548
|
+
protected:
|
3549
|
+
virtual bool DataEquals(HValue* other) { return true; }
|
3550
|
+
};
|
3551
|
+
|
3552
|
+
|
3553
|
+
class HLoadKeyedSpecializedArrayElement: public HTemplateInstruction<2> {
|
3400
3554
|
public:
|
3401
3555
|
HLoadKeyedSpecializedArrayElement(HValue* external_elements,
|
3402
3556
|
HValue* key,
|
3403
|
-
|
3404
|
-
:
|
3405
|
-
|
3406
|
-
|
3407
|
-
|
3557
|
+
JSObject::ElementsKind elements_kind)
|
3558
|
+
: elements_kind_(elements_kind) {
|
3559
|
+
SetOperandAt(0, external_elements);
|
3560
|
+
SetOperandAt(1, key);
|
3561
|
+
if (elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS ||
|
3562
|
+
elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS) {
|
3408
3563
|
set_representation(Representation::Double());
|
3409
3564
|
} else {
|
3410
3565
|
set_representation(Representation::Integer32());
|
@@ -3420,13 +3575,14 @@ class HLoadKeyedSpecializedArrayElement: public HBinaryOperation {
|
|
3420
3575
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3421
3576
|
// The key is supposed to be Integer32, but the base pointer
|
3422
3577
|
// for the element load is a naked pointer.
|
3423
|
-
return
|
3424
|
-
|
3578
|
+
return index == 0
|
3579
|
+
? Representation::External()
|
3580
|
+
: Representation::Integer32();
|
3425
3581
|
}
|
3426
3582
|
|
3427
3583
|
HValue* external_pointer() { return OperandAt(0); }
|
3428
3584
|
HValue* key() { return OperandAt(1); }
|
3429
|
-
|
3585
|
+
JSObject::ElementsKind elements_kind() const { return elements_kind_; }
|
3430
3586
|
|
3431
3587
|
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement)
|
3432
3588
|
|
@@ -3435,11 +3591,11 @@ class HLoadKeyedSpecializedArrayElement: public HBinaryOperation {
|
|
3435
3591
|
if (!other->IsLoadKeyedSpecializedArrayElement()) return false;
|
3436
3592
|
HLoadKeyedSpecializedArrayElement* cast_other =
|
3437
3593
|
HLoadKeyedSpecializedArrayElement::cast(other);
|
3438
|
-
return
|
3594
|
+
return elements_kind_ == cast_other->elements_kind();
|
3439
3595
|
}
|
3440
3596
|
|
3441
3597
|
private:
|
3442
|
-
|
3598
|
+
JSObject::ElementsKind elements_kind_;
|
3443
3599
|
};
|
3444
3600
|
|
3445
3601
|
|
@@ -3467,17 +3623,18 @@ class HLoadKeyedGeneric: public HTemplateInstruction<3> {
|
|
3467
3623
|
};
|
3468
3624
|
|
3469
3625
|
|
3470
|
-
class HStoreNamedField: public
|
3626
|
+
class HStoreNamedField: public HTemplateInstruction<2> {
|
3471
3627
|
public:
|
3472
3628
|
HStoreNamedField(HValue* obj,
|
3473
3629
|
Handle<String> name,
|
3474
3630
|
HValue* val,
|
3475
3631
|
bool in_object,
|
3476
3632
|
int offset)
|
3477
|
-
:
|
3478
|
-
name_(name),
|
3633
|
+
: name_(name),
|
3479
3634
|
is_in_object_(in_object),
|
3480
3635
|
offset_(offset) {
|
3636
|
+
SetOperandAt(0, obj);
|
3637
|
+
SetOperandAt(1, val);
|
3481
3638
|
if (is_in_object_) {
|
3482
3639
|
SetFlag(kChangesInobjectFields);
|
3483
3640
|
} else {
|
@@ -3559,7 +3716,8 @@ class HStoreKeyedFastElement: public HTemplateInstruction<3> {
|
|
3559
3716
|
|
3560
3717
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3561
3718
|
// The key is supposed to be Integer32.
|
3562
|
-
return
|
3719
|
+
return index == 1
|
3720
|
+
? Representation::Integer32()
|
3563
3721
|
: Representation::Tagged();
|
3564
3722
|
}
|
3565
3723
|
|
@@ -3577,13 +3735,48 @@ class HStoreKeyedFastElement: public HTemplateInstruction<3> {
|
|
3577
3735
|
};
|
3578
3736
|
|
3579
3737
|
|
3738
|
+
class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> {
|
3739
|
+
public:
|
3740
|
+
HStoreKeyedFastDoubleElement(HValue* elements,
|
3741
|
+
HValue* key,
|
3742
|
+
HValue* val) {
|
3743
|
+
SetOperandAt(0, elements);
|
3744
|
+
SetOperandAt(1, key);
|
3745
|
+
SetOperandAt(2, val);
|
3746
|
+
SetFlag(kChangesDoubleArrayElements);
|
3747
|
+
}
|
3748
|
+
|
3749
|
+
virtual Representation RequiredInputRepresentation(int index) const {
|
3750
|
+
if (index == 1) {
|
3751
|
+
return Representation::Integer32();
|
3752
|
+
} else if (index == 2) {
|
3753
|
+
return Representation::Double();
|
3754
|
+
} else {
|
3755
|
+
return Representation::Tagged();
|
3756
|
+
}
|
3757
|
+
}
|
3758
|
+
|
3759
|
+
HValue* elements() { return OperandAt(0); }
|
3760
|
+
HValue* key() { return OperandAt(1); }
|
3761
|
+
HValue* value() { return OperandAt(2); }
|
3762
|
+
|
3763
|
+
bool NeedsWriteBarrier() {
|
3764
|
+
return StoringValueNeedsWriteBarrier(value());
|
3765
|
+
}
|
3766
|
+
|
3767
|
+
virtual void PrintDataTo(StringStream* stream);
|
3768
|
+
|
3769
|
+
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement)
|
3770
|
+
};
|
3771
|
+
|
3772
|
+
|
3580
3773
|
class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> {
|
3581
3774
|
public:
|
3582
3775
|
HStoreKeyedSpecializedArrayElement(HValue* external_elements,
|
3583
3776
|
HValue* key,
|
3584
3777
|
HValue* val,
|
3585
|
-
|
3586
|
-
:
|
3778
|
+
JSObject::ElementsKind elements_kind)
|
3779
|
+
: elements_kind_(elements_kind) {
|
3587
3780
|
SetFlag(kChangesSpecializedArrayElements);
|
3588
3781
|
SetOperandAt(0, external_elements);
|
3589
3782
|
SetOperandAt(1, key);
|
@@ -3596,8 +3789,10 @@ class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> {
|
|
3596
3789
|
if (index == 0) {
|
3597
3790
|
return Representation::External();
|
3598
3791
|
} else {
|
3599
|
-
|
3600
|
-
|
3792
|
+
bool float_or_double_elements =
|
3793
|
+
elements_kind() == JSObject::EXTERNAL_FLOAT_ELEMENTS ||
|
3794
|
+
elements_kind() == JSObject::EXTERNAL_DOUBLE_ELEMENTS;
|
3795
|
+
if (index == 2 && float_or_double_elements) {
|
3601
3796
|
return Representation::Double();
|
3602
3797
|
} else {
|
3603
3798
|
return Representation::Integer32();
|
@@ -3608,12 +3803,12 @@ class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> {
|
|
3608
3803
|
HValue* external_pointer() { return OperandAt(0); }
|
3609
3804
|
HValue* key() { return OperandAt(1); }
|
3610
3805
|
HValue* value() { return OperandAt(2); }
|
3611
|
-
|
3806
|
+
JSObject::ElementsKind elements_kind() const { return elements_kind_; }
|
3612
3807
|
|
3613
3808
|
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement)
|
3614
3809
|
|
3615
3810
|
private:
|
3616
|
-
|
3811
|
+
JSObject::ElementsKind elements_kind_;
|
3617
3812
|
};
|
3618
3813
|
|
3619
3814
|
|
@@ -3653,7 +3848,8 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> {
|
|
3653
3848
|
|
3654
3849
|
class HStringAdd: public HBinaryOperation {
|
3655
3850
|
public:
|
3656
|
-
HStringAdd(HValue*
|
3851
|
+
HStringAdd(HValue* context, HValue* left, HValue* right)
|
3852
|
+
: HBinaryOperation(context, left, right) {
|
3657
3853
|
set_representation(Representation::Tagged());
|
3658
3854
|
SetFlag(kUseGVN);
|
3659
3855
|
SetFlag(kDependsOnMaps);
|
@@ -3674,10 +3870,12 @@ class HStringAdd: public HBinaryOperation {
|
|
3674
3870
|
};
|
3675
3871
|
|
3676
3872
|
|
3677
|
-
class HStringCharCodeAt: public
|
3873
|
+
class HStringCharCodeAt: public HTemplateInstruction<3> {
|
3678
3874
|
public:
|
3679
|
-
HStringCharCodeAt(HValue* string, HValue* index)
|
3680
|
-
|
3875
|
+
HStringCharCodeAt(HValue* context, HValue* string, HValue* index) {
|
3876
|
+
SetOperandAt(0, context);
|
3877
|
+
SetOperandAt(1, string);
|
3878
|
+
SetOperandAt(2, index);
|
3681
3879
|
set_representation(Representation::Integer32());
|
3682
3880
|
SetFlag(kUseGVN);
|
3683
3881
|
SetFlag(kDependsOnMaps);
|
@@ -3685,12 +3883,14 @@ class HStringCharCodeAt: public HBinaryOperation {
|
|
3685
3883
|
|
3686
3884
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3687
3885
|
// The index is supposed to be Integer32.
|
3688
|
-
return
|
3886
|
+
return index == 2
|
3887
|
+
? Representation::Integer32()
|
3689
3888
|
: Representation::Tagged();
|
3690
3889
|
}
|
3691
3890
|
|
3692
|
-
HValue*
|
3693
|
-
HValue*
|
3891
|
+
HValue* context() { return OperandAt(0); }
|
3892
|
+
HValue* string() { return OperandAt(1); }
|
3893
|
+
HValue* index() { return OperandAt(2); }
|
3694
3894
|
|
3695
3895
|
DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt)
|
3696
3896
|
|
@@ -3703,17 +3903,24 @@ class HStringCharCodeAt: public HBinaryOperation {
|
|
3703
3903
|
};
|
3704
3904
|
|
3705
3905
|
|
3706
|
-
class HStringCharFromCode: public
|
3906
|
+
class HStringCharFromCode: public HTemplateInstruction<2> {
|
3707
3907
|
public:
|
3708
|
-
|
3709
|
-
|
3908
|
+
HStringCharFromCode(HValue* context, HValue* char_code) {
|
3909
|
+
SetOperandAt(0, context);
|
3910
|
+
SetOperandAt(1, char_code);
|
3911
|
+
set_representation(Representation::Tagged());
|
3710
3912
|
SetFlag(kUseGVN);
|
3711
3913
|
}
|
3712
3914
|
|
3713
3915
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3714
|
-
return
|
3916
|
+
return index == 0
|
3917
|
+
? Representation::Tagged()
|
3918
|
+
: Representation::Integer32();
|
3715
3919
|
}
|
3716
3920
|
|
3921
|
+
HValue* context() { return OperandAt(0); }
|
3922
|
+
HValue* value() { return OperandAt(1); }
|
3923
|
+
|
3717
3924
|
virtual bool DataEquals(HValue* other) { return true; }
|
3718
3925
|
|
3719
3926
|
DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode)
|
@@ -3765,23 +3972,27 @@ class HMaterializedLiteral: public HTemplateInstruction<V> {
|
|
3765
3972
|
};
|
3766
3973
|
|
3767
3974
|
|
3768
|
-
class HArrayLiteral: public HMaterializedLiteral<
|
3975
|
+
class HArrayLiteral: public HMaterializedLiteral<1> {
|
3769
3976
|
public:
|
3770
|
-
HArrayLiteral(
|
3977
|
+
HArrayLiteral(HValue* context,
|
3978
|
+
Handle<FixedArray> constant_elements,
|
3771
3979
|
int length,
|
3772
3980
|
int literal_index,
|
3773
3981
|
int depth)
|
3774
|
-
: HMaterializedLiteral<
|
3982
|
+
: HMaterializedLiteral<1>(literal_index, depth),
|
3775
3983
|
length_(length),
|
3776
|
-
constant_elements_(constant_elements) {
|
3984
|
+
constant_elements_(constant_elements) {
|
3985
|
+
SetOperandAt(0, context);
|
3986
|
+
}
|
3777
3987
|
|
3988
|
+
HValue* context() { return OperandAt(0); }
|
3778
3989
|
Handle<FixedArray> constant_elements() const { return constant_elements_; }
|
3779
3990
|
int length() const { return length_; }
|
3780
3991
|
|
3781
3992
|
bool IsCopyOnWrite() const;
|
3782
3993
|
|
3783
3994
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3784
|
-
return Representation::
|
3995
|
+
return Representation::Tagged();
|
3785
3996
|
}
|
3786
3997
|
|
3787
3998
|
DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral)
|
@@ -3827,20 +4038,24 @@ class HObjectLiteral: public HMaterializedLiteral<1> {
|
|
3827
4038
|
};
|
3828
4039
|
|
3829
4040
|
|
3830
|
-
class HRegExpLiteral: public HMaterializedLiteral<
|
4041
|
+
class HRegExpLiteral: public HMaterializedLiteral<1> {
|
3831
4042
|
public:
|
3832
|
-
HRegExpLiteral(
|
4043
|
+
HRegExpLiteral(HValue* context,
|
4044
|
+
Handle<String> pattern,
|
3833
4045
|
Handle<String> flags,
|
3834
4046
|
int literal_index)
|
3835
|
-
: HMaterializedLiteral<
|
4047
|
+
: HMaterializedLiteral<1>(literal_index, 0),
|
3836
4048
|
pattern_(pattern),
|
3837
|
-
flags_(flags) {
|
4049
|
+
flags_(flags) {
|
4050
|
+
SetOperandAt(0, context);
|
4051
|
+
}
|
3838
4052
|
|
4053
|
+
HValue* context() { return OperandAt(0); }
|
3839
4054
|
Handle<String> pattern() { return pattern_; }
|
3840
4055
|
Handle<String> flags() { return flags_; }
|
3841
4056
|
|
3842
4057
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3843
|
-
return Representation::
|
4058
|
+
return Representation::Tagged();
|
3844
4059
|
}
|
3845
4060
|
|
3846
4061
|
DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral)
|
@@ -3851,15 +4066,20 @@ class HRegExpLiteral: public HMaterializedLiteral<0> {
|
|
3851
4066
|
};
|
3852
4067
|
|
3853
4068
|
|
3854
|
-
class HFunctionLiteral: public HTemplateInstruction<
|
4069
|
+
class HFunctionLiteral: public HTemplateInstruction<1> {
|
3855
4070
|
public:
|
3856
|
-
HFunctionLiteral(
|
4071
|
+
HFunctionLiteral(HValue* context,
|
4072
|
+
Handle<SharedFunctionInfo> shared,
|
4073
|
+
bool pretenure)
|
3857
4074
|
: shared_info_(shared), pretenure_(pretenure) {
|
4075
|
+
SetOperandAt(0, context);
|
3858
4076
|
set_representation(Representation::Tagged());
|
3859
4077
|
}
|
3860
4078
|
|
4079
|
+
HValue* context() { return OperandAt(0); }
|
4080
|
+
|
3861
4081
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3862
|
-
return Representation::
|
4082
|
+
return Representation::Tagged();
|
3863
4083
|
}
|
3864
4084
|
|
3865
4085
|
DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral)
|
@@ -3873,12 +4093,17 @@ class HFunctionLiteral: public HTemplateInstruction<0> {
|
|
3873
4093
|
};
|
3874
4094
|
|
3875
4095
|
|
3876
|
-
class HTypeof: public
|
4096
|
+
class HTypeof: public HTemplateInstruction<2> {
|
3877
4097
|
public:
|
3878
|
-
explicit HTypeof(HValue*
|
4098
|
+
explicit HTypeof(HValue* context, HValue* value) {
|
4099
|
+
SetOperandAt(0, context);
|
4100
|
+
SetOperandAt(1, value);
|
3879
4101
|
set_representation(Representation::Tagged());
|
3880
4102
|
}
|
3881
4103
|
|
4104
|
+
HValue* context() { return OperandAt(0); }
|
4105
|
+
HValue* value() { return OperandAt(1); }
|
4106
|
+
|
3882
4107
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3883
4108
|
return Representation::Tagged();
|
3884
4109
|
}
|
@@ -3921,8 +4146,8 @@ class HValueOf: public HUnaryOperation {
|
|
3921
4146
|
|
3922
4147
|
class HDeleteProperty: public HBinaryOperation {
|
3923
4148
|
public:
|
3924
|
-
HDeleteProperty(HValue* obj, HValue* key)
|
3925
|
-
: HBinaryOperation(obj, key) {
|
4149
|
+
HDeleteProperty(HValue* context, HValue* obj, HValue* key)
|
4150
|
+
: HBinaryOperation(context, obj, key) {
|
3926
4151
|
set_representation(Representation::Tagged());
|
3927
4152
|
SetAllSideEffects();
|
3928
4153
|
}
|
@@ -3931,6 +4156,8 @@ class HDeleteProperty: public HBinaryOperation {
|
|
3931
4156
|
return Representation::Tagged();
|
3932
4157
|
}
|
3933
4158
|
|
4159
|
+
virtual HType CalculateInferredType();
|
4160
|
+
|
3934
4161
|
DECLARE_CONCRETE_INSTRUCTION(DeleteProperty)
|
3935
4162
|
|
3936
4163
|
HValue* object() { return left(); }
|
@@ -3938,17 +4165,19 @@ class HDeleteProperty: public HBinaryOperation {
|
|
3938
4165
|
};
|
3939
4166
|
|
3940
4167
|
|
3941
|
-
class HIn: public HTemplateInstruction<
|
4168
|
+
class HIn: public HTemplateInstruction<3> {
|
3942
4169
|
public:
|
3943
|
-
HIn(HValue* key, HValue* object) {
|
3944
|
-
SetOperandAt(0,
|
3945
|
-
SetOperandAt(1,
|
4170
|
+
HIn(HValue* context, HValue* key, HValue* object) {
|
4171
|
+
SetOperandAt(0, context);
|
4172
|
+
SetOperandAt(1, key);
|
4173
|
+
SetOperandAt(2, object);
|
3946
4174
|
set_representation(Representation::Tagged());
|
3947
4175
|
SetAllSideEffects();
|
3948
4176
|
}
|
3949
4177
|
|
3950
|
-
HValue*
|
3951
|
-
HValue*
|
4178
|
+
HValue* context() { return OperandAt(0); }
|
4179
|
+
HValue* key() { return OperandAt(1); }
|
4180
|
+
HValue* object() { return OperandAt(2); }
|
3952
4181
|
|
3953
4182
|
virtual Representation RequiredInputRepresentation(int index) const {
|
3954
4183
|
return Representation::Tagged();
|