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
@@ -97,7 +97,7 @@ class LCodeGen BASE_EMBEDDED {
|
|
97
97
|
void DoDeferredNumberTagI(LNumberTagI* instr);
|
98
98
|
void DoDeferredTaggedToI(LTaggedToI* instr);
|
99
99
|
void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr);
|
100
|
-
void DoDeferredStackCheck(
|
100
|
+
void DoDeferredStackCheck(LStackCheck* instr);
|
101
101
|
void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
|
102
102
|
void DoDeferredStringCharFromCode(LStringCharFromCode* instr);
|
103
103
|
void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
|
@@ -166,11 +166,6 @@ class LCodeGen BASE_EMBEDDED {
|
|
166
166
|
bool GenerateRelocPadding();
|
167
167
|
bool GenerateSafepointTable();
|
168
168
|
|
169
|
-
enum ContextMode {
|
170
|
-
RESTORE_CONTEXT,
|
171
|
-
CONTEXT_ADJUSTED
|
172
|
-
};
|
173
|
-
|
174
169
|
enum SafepointMode {
|
175
170
|
RECORD_SIMPLE_SAFEPOINT,
|
176
171
|
RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS
|
@@ -178,31 +173,28 @@ class LCodeGen BASE_EMBEDDED {
|
|
178
173
|
|
179
174
|
void CallCode(Handle<Code> code,
|
180
175
|
RelocInfo::Mode mode,
|
181
|
-
LInstruction* instr
|
182
|
-
ContextMode context_mode);
|
176
|
+
LInstruction* instr);
|
183
177
|
|
184
178
|
void CallCodeGeneric(Handle<Code> code,
|
185
179
|
RelocInfo::Mode mode,
|
186
180
|
LInstruction* instr,
|
187
|
-
ContextMode context_mode,
|
188
181
|
SafepointMode safepoint_mode);
|
189
182
|
|
190
183
|
void CallRuntime(const Runtime::Function* fun,
|
191
184
|
int argc,
|
192
|
-
LInstruction* instr
|
193
|
-
ContextMode context_mode);
|
185
|
+
LInstruction* instr);
|
194
186
|
|
195
187
|
void CallRuntime(Runtime::FunctionId id,
|
196
188
|
int argc,
|
197
|
-
LInstruction* instr
|
198
|
-
ContextMode context_mode) {
|
189
|
+
LInstruction* instr) {
|
199
190
|
const Runtime::Function* function = Runtime::FunctionForId(id);
|
200
|
-
CallRuntime(function, argc, instr
|
191
|
+
CallRuntime(function, argc, instr);
|
201
192
|
}
|
202
193
|
|
203
194
|
void CallRuntimeFromDeferred(Runtime::FunctionId id,
|
204
195
|
int argc,
|
205
|
-
LInstruction* instr
|
196
|
+
LInstruction* instr,
|
197
|
+
LOperand* context);
|
206
198
|
|
207
199
|
// Generate a direct call to a known function. Expects the function
|
208
200
|
// to be in edi.
|
@@ -230,9 +222,10 @@ class LCodeGen BASE_EMBEDDED {
|
|
230
222
|
Register ToRegister(int index) const;
|
231
223
|
XMMRegister ToDoubleRegister(int index) const;
|
232
224
|
int ToInteger32(LConstantOperand* op) const;
|
233
|
-
Operand
|
234
|
-
|
235
|
-
|
225
|
+
Operand BuildFastArrayOperand(LOperand* elements_pointer,
|
226
|
+
LOperand* key,
|
227
|
+
JSObject::ElementsKind elements_kind,
|
228
|
+
uint32_t offset);
|
236
229
|
|
237
230
|
// Specific math operations - used from DoUnaryMathOperation.
|
238
231
|
void EmitIntegerMathAbs(LUnaryMathOperation* instr);
|
@@ -256,12 +249,18 @@ class LCodeGen BASE_EMBEDDED {
|
|
256
249
|
int arguments,
|
257
250
|
int deoptimization_index);
|
258
251
|
void RecordPosition(int position);
|
252
|
+
int LastSafepointEnd() {
|
253
|
+
return static_cast<int>(safepoints_.GetPcAfterGap());
|
254
|
+
}
|
259
255
|
|
260
256
|
static Condition TokenToCondition(Token::Value op, bool is_unsigned);
|
261
|
-
void EmitGoto(int block
|
257
|
+
void EmitGoto(int block);
|
262
258
|
void EmitBranch(int left_block, int right_block, Condition cc);
|
263
259
|
void EmitCmpI(LOperand* left, LOperand* right);
|
264
|
-
void EmitNumberUntagD(Register input,
|
260
|
+
void EmitNumberUntagD(Register input,
|
261
|
+
XMMRegister result,
|
262
|
+
bool deoptimize_on_undefined,
|
263
|
+
LEnvironment* env);
|
265
264
|
|
266
265
|
// Emits optimized code for typeof x == "y". Modifies input register.
|
267
266
|
// Returns the condition on which a final split to
|
@@ -274,7 +273,6 @@ class LCodeGen BASE_EMBEDDED {
|
|
274
273
|
// true and false label should be made, to optimize fallthrough.
|
275
274
|
Condition EmitIsObject(Register input,
|
276
275
|
Register temp1,
|
277
|
-
Register temp2,
|
278
276
|
Label* is_not_object,
|
279
277
|
Label* is_object);
|
280
278
|
|
@@ -305,8 +305,13 @@ void LGapResolver::EmitMove(int index) {
|
|
305
305
|
} else if (source->IsConstantOperand()) {
|
306
306
|
ASSERT(destination->IsRegister() || destination->IsStackSlot());
|
307
307
|
Immediate src = cgen_->ToImmediate(source);
|
308
|
-
|
309
|
-
|
308
|
+
if (destination->IsRegister()) {
|
309
|
+
Register dst = cgen_->ToRegister(destination);
|
310
|
+
__ Set(dst, src);
|
311
|
+
} else {
|
312
|
+
Operand dst = cgen_->ToOperand(destination);
|
313
|
+
__ Set(dst, src);
|
314
|
+
}
|
310
315
|
|
311
316
|
} else if (source->IsDoubleRegister()) {
|
312
317
|
XMMRegister src = cgen_->ToDoubleRegister(source);
|
@@ -78,13 +78,13 @@ void LInstruction::VerifyCall() {
|
|
78
78
|
ASSERT(Output() == NULL ||
|
79
79
|
LUnallocated::cast(Output())->HasFixedPolicy() ||
|
80
80
|
!LUnallocated::cast(Output())->HasRegisterPolicy());
|
81
|
-
for (UseIterator it(this); it.
|
82
|
-
LUnallocated* operand = LUnallocated::cast(it.
|
81
|
+
for (UseIterator it(this); !it.Done(); it.Advance()) {
|
82
|
+
LUnallocated* operand = LUnallocated::cast(it.Current());
|
83
83
|
ASSERT(operand->HasFixedPolicy() ||
|
84
84
|
operand->IsUsedAtStart());
|
85
85
|
}
|
86
|
-
for (TempIterator it(this); it.
|
87
|
-
LUnallocated* operand = LUnallocated::cast(it.
|
86
|
+
for (TempIterator it(this); !it.Done(); it.Advance()) {
|
87
|
+
LUnallocated* operand = LUnallocated::cast(it.Current());
|
88
88
|
ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy());
|
89
89
|
}
|
90
90
|
}
|
@@ -113,21 +113,18 @@ void LInstruction::PrintTo(StringStream* stream) {
|
|
113
113
|
template<int R, int I, int T>
|
114
114
|
void LTemplateInstruction<R, I, T>::PrintDataTo(StringStream* stream) {
|
115
115
|
stream->Add("= ");
|
116
|
-
inputs_.
|
116
|
+
for (int i = 0; i < inputs_.length(); i++) {
|
117
|
+
if (i > 0) stream->Add(" ");
|
118
|
+
inputs_[i]->PrintTo(stream);
|
119
|
+
}
|
117
120
|
}
|
118
121
|
|
119
122
|
|
120
123
|
template<int R, int I, int T>
|
121
124
|
void LTemplateInstruction<R, I, T>::PrintOutputOperandTo(StringStream* stream) {
|
122
|
-
results_.
|
123
|
-
}
|
124
|
-
|
125
|
-
|
126
|
-
template<typename T, int N>
|
127
|
-
void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
|
128
|
-
for (int i = 0; i < N; i++) {
|
125
|
+
for (int i = 0; i < results_.length(); i++) {
|
129
126
|
if (i > 0) stream->Add(" ");
|
130
|
-
|
127
|
+
results_[i]->PrintTo(stream);
|
131
128
|
}
|
132
129
|
}
|
133
130
|
|
@@ -270,12 +267,6 @@ void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
|
270
267
|
}
|
271
268
|
|
272
269
|
|
273
|
-
void LTypeofIs::PrintDataTo(StringStream* stream) {
|
274
|
-
InputAt(0)->PrintTo(stream);
|
275
|
-
stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
|
276
|
-
}
|
277
|
-
|
278
|
-
|
279
270
|
void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
280
271
|
stream->Add("if typeof ");
|
281
272
|
InputAt(0)->PrintTo(stream);
|
@@ -347,13 +338,6 @@ void LCallNew::PrintDataTo(StringStream* stream) {
|
|
347
338
|
}
|
348
339
|
|
349
340
|
|
350
|
-
void LClassOfTest::PrintDataTo(StringStream* stream) {
|
351
|
-
stream->Add("= class_of_test(");
|
352
|
-
InputAt(0)->PrintTo(stream);
|
353
|
-
stream->Add(", \"%o\")", *hydrogen()->class_name());
|
354
|
-
}
|
355
|
-
|
356
|
-
|
357
341
|
void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
358
342
|
arguments()->PrintTo(stream);
|
359
343
|
|
@@ -394,8 +378,7 @@ void LChunk::MarkEmptyBlocks() {
|
|
394
378
|
LLabel* label = LLabel::cast(first_instr);
|
395
379
|
if (last_instr->IsGoto()) {
|
396
380
|
LGoto* goto_instr = LGoto::cast(last_instr);
|
397
|
-
if (
|
398
|
-
label->IsRedundant() &&
|
381
|
+
if (label->IsRedundant() &&
|
399
382
|
!label->is_loop_header()) {
|
400
383
|
bool can_eliminate = true;
|
401
384
|
for (int i = first + 1; i < last && can_eliminate; ++i) {
|
@@ -446,6 +429,15 @@ void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
|
|
446
429
|
}
|
447
430
|
|
448
431
|
|
432
|
+
void LStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) {
|
433
|
+
elements()->PrintTo(stream);
|
434
|
+
stream->Add("[");
|
435
|
+
key()->PrintTo(stream);
|
436
|
+
stream->Add("] <- ");
|
437
|
+
value()->PrintTo(stream);
|
438
|
+
}
|
439
|
+
|
440
|
+
|
449
441
|
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
450
442
|
object()->PrintTo(stream);
|
451
443
|
stream->Add("[");
|
@@ -804,6 +796,11 @@ LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
|
|
804
796
|
}
|
805
797
|
|
806
798
|
|
799
|
+
LInstruction* LChunkBuilder::DoSoftDeoptimize(HSoftDeoptimize* instr) {
|
800
|
+
return AssignEnvironment(new LDeoptimize);
|
801
|
+
}
|
802
|
+
|
803
|
+
|
807
804
|
LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
|
808
805
|
return AssignEnvironment(new LDeoptimize);
|
809
806
|
}
|
@@ -823,9 +820,10 @@ LInstruction* LChunkBuilder::DoBit(Token::Value op,
|
|
823
820
|
ASSERT(instr->left()->representation().IsTagged());
|
824
821
|
ASSERT(instr->right()->representation().IsTagged());
|
825
822
|
|
823
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
826
824
|
LOperand* left = UseFixed(instr->left(), edx);
|
827
825
|
LOperand* right = UseFixed(instr->right(), eax);
|
828
|
-
LArithmeticT* result = new LArithmeticT(op, left, right);
|
826
|
+
LArithmeticT* result = new LArithmeticT(op, context, left, right);
|
829
827
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
830
828
|
}
|
831
829
|
}
|
@@ -837,18 +835,19 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
|
837
835
|
ASSERT(instr->left()->representation().IsTagged());
|
838
836
|
ASSERT(instr->right()->representation().IsTagged());
|
839
837
|
|
838
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
840
839
|
LOperand* left = UseFixed(instr->left(), edx);
|
841
840
|
LOperand* right = UseFixed(instr->right(), eax);
|
842
|
-
LArithmeticT* result = new LArithmeticT(op, left, right);
|
841
|
+
LArithmeticT* result = new LArithmeticT(op, context, left, right);
|
843
842
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
844
843
|
}
|
845
844
|
|
846
845
|
ASSERT(instr->representation().IsInteger32());
|
847
|
-
ASSERT(instr->
|
848
|
-
ASSERT(instr->
|
849
|
-
LOperand* left = UseRegisterAtStart(instr->
|
846
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
847
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
848
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
850
849
|
|
851
|
-
HValue* right_value = instr->
|
850
|
+
HValue* right_value = instr->right();
|
852
851
|
LOperand* right = NULL;
|
853
852
|
int constant_value = 0;
|
854
853
|
if (right_value->IsConstant()) {
|
@@ -902,12 +901,15 @@ LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
|
|
902
901
|
HValue* right = instr->right();
|
903
902
|
ASSERT(left->representation().IsTagged());
|
904
903
|
ASSERT(right->representation().IsTagged());
|
904
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
905
905
|
LOperand* left_operand = UseFixed(left, edx);
|
906
906
|
LOperand* right_operand = UseFixed(right, eax);
|
907
|
-
LArithmeticT* result =
|
907
|
+
LArithmeticT* result =
|
908
|
+
new LArithmeticT(op, context, left_operand, right_operand);
|
908
909
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
909
910
|
}
|
910
911
|
|
912
|
+
|
911
913
|
void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
|
912
914
|
ASSERT(is_building());
|
913
915
|
current_block_ = block;
|
@@ -984,18 +986,7 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
|
984
986
|
if (FLAG_stress_environments && !instr->HasEnvironment()) {
|
985
987
|
instr = AssignEnvironment(instr);
|
986
988
|
}
|
987
|
-
|
988
|
-
ASSERT(instr->IsControl());
|
989
|
-
HTest* test = HTest::cast(current);
|
990
|
-
instr->set_hydrogen_value(test->value());
|
991
|
-
HBasicBlock* first = test->FirstSuccessor();
|
992
|
-
HBasicBlock* second = test->SecondSuccessor();
|
993
|
-
ASSERT(first != NULL && second != NULL);
|
994
|
-
instr->SetBranchTargets(first->block_id(), second->block_id());
|
995
|
-
} else {
|
996
|
-
instr->set_hydrogen_value(current);
|
997
|
-
}
|
998
|
-
|
989
|
+
instr->set_hydrogen_value(current);
|
999
990
|
chunk_->AddInstruction(instr, current_block_);
|
1000
991
|
}
|
1001
992
|
current_instruction_ = old_current;
|
@@ -1036,112 +1027,27 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
|
|
1036
1027
|
|
1037
1028
|
|
1038
1029
|
LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
1039
|
-
|
1040
|
-
instr->include_stack_check());
|
1041
|
-
return (instr->include_stack_check())
|
1042
|
-
? AssignPointerMap(result)
|
1043
|
-
: result;
|
1030
|
+
return new LGoto(instr->FirstSuccessor()->block_id());
|
1044
1031
|
}
|
1045
1032
|
|
1046
1033
|
|
1047
|
-
LInstruction* LChunkBuilder::
|
1034
|
+
LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
1048
1035
|
HValue* v = instr->value();
|
1049
|
-
if (
|
1050
|
-
|
1051
|
-
|
1052
|
-
HClassOfTest* compare = HClassOfTest::cast(v);
|
1053
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1054
|
-
return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
|
1055
|
-
TempRegister(),
|
1056
|
-
TempRegister());
|
1057
|
-
} else if (v->IsCompare()) {
|
1058
|
-
HCompare* compare = HCompare::cast(v);
|
1059
|
-
Token::Value op = compare->token();
|
1060
|
-
HValue* left = compare->left();
|
1061
|
-
HValue* right = compare->right();
|
1062
|
-
Representation r = compare->GetInputRepresentation();
|
1063
|
-
if (r.IsInteger32()) {
|
1064
|
-
ASSERT(left->representation().IsInteger32());
|
1065
|
-
ASSERT(right->representation().IsInteger32());
|
1066
|
-
return new LCmpIDAndBranch(UseRegisterAtStart(left),
|
1067
|
-
UseOrConstantAtStart(right));
|
1068
|
-
} else if (r.IsDouble()) {
|
1069
|
-
ASSERT(left->representation().IsDouble());
|
1070
|
-
ASSERT(right->representation().IsDouble());
|
1071
|
-
return new LCmpIDAndBranch(UseRegisterAtStart(left),
|
1072
|
-
UseRegisterAtStart(right));
|
1073
|
-
} else {
|
1074
|
-
ASSERT(left->representation().IsTagged());
|
1075
|
-
ASSERT(right->representation().IsTagged());
|
1076
|
-
bool reversed = op == Token::GT || op == Token::LTE;
|
1077
|
-
LOperand* left_operand = UseFixed(left, reversed ? eax : edx);
|
1078
|
-
LOperand* right_operand = UseFixed(right, reversed ? edx : eax);
|
1079
|
-
LCmpTAndBranch* result = new LCmpTAndBranch(left_operand, right_operand);
|
1080
|
-
return MarkAsCall(result, instr);
|
1081
|
-
}
|
1082
|
-
} else if (v->IsIsSmi()) {
|
1083
|
-
HIsSmi* compare = HIsSmi::cast(v);
|
1084
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1085
|
-
return new LIsSmiAndBranch(Use(compare->value()));
|
1086
|
-
} else if (v->IsIsUndetectable()) {
|
1087
|
-
HIsUndetectable* compare = HIsUndetectable::cast(v);
|
1088
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1089
|
-
return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()),
|
1090
|
-
TempRegister());
|
1091
|
-
} else if (v->IsHasInstanceType()) {
|
1092
|
-
HHasInstanceType* compare = HHasInstanceType::cast(v);
|
1093
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1094
|
-
return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()),
|
1095
|
-
TempRegister());
|
1096
|
-
} else if (v->IsHasCachedArrayIndex()) {
|
1097
|
-
HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v);
|
1098
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1099
|
-
return new LHasCachedArrayIndexAndBranch(
|
1100
|
-
UseRegisterAtStart(compare->value()));
|
1101
|
-
} else if (v->IsIsNull()) {
|
1102
|
-
HIsNull* compare = HIsNull::cast(v);
|
1103
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1104
|
-
// We only need a temp register for non-strict compare.
|
1105
|
-
LOperand* temp = compare->is_strict() ? NULL : TempRegister();
|
1106
|
-
return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp);
|
1107
|
-
} else if (v->IsIsObject()) {
|
1108
|
-
HIsObject* compare = HIsObject::cast(v);
|
1109
|
-
ASSERT(compare->value()->representation().IsTagged());
|
1110
|
-
LOperand* temp1 = TempRegister();
|
1111
|
-
LOperand* temp2 = TempRegister();
|
1112
|
-
return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
|
1113
|
-
temp1,
|
1114
|
-
temp2);
|
1115
|
-
} else if (v->IsCompareJSObjectEq()) {
|
1116
|
-
HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
|
1117
|
-
return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
|
1118
|
-
UseRegisterAtStart(compare->right()));
|
1119
|
-
} else if (v->IsCompareSymbolEq()) {
|
1120
|
-
HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
|
1121
|
-
return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
|
1122
|
-
UseRegisterAtStart(compare->right()));
|
1123
|
-
} else if (v->IsInstanceOf()) {
|
1124
|
-
HInstanceOf* instance_of = HInstanceOf::cast(v);
|
1125
|
-
LOperand* left = UseFixed(instance_of->left(), InstanceofStub::left());
|
1126
|
-
LOperand* right = UseFixed(instance_of->right(), InstanceofStub::right());
|
1127
|
-
LOperand* context = UseFixed(instance_of->context(), esi);
|
1128
|
-
LInstanceOfAndBranch* result =
|
1129
|
-
new LInstanceOfAndBranch(context, left, right);
|
1130
|
-
return MarkAsCall(result, instr);
|
1131
|
-
} else if (v->IsTypeofIs()) {
|
1132
|
-
HTypeofIs* typeof_is = HTypeofIs::cast(v);
|
1133
|
-
return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
|
1134
|
-
} else if (v->IsIsConstructCall()) {
|
1135
|
-
return new LIsConstructCallAndBranch(TempRegister());
|
1136
|
-
} else if (v->IsConstant()) {
|
1036
|
+
if (v->EmitAtUses()) {
|
1037
|
+
ASSERT(v->IsConstant());
|
1038
|
+
ASSERT(!v->representation().IsDouble());
|
1137
1039
|
HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
|
1138
1040
|
? instr->FirstSuccessor()
|
1139
1041
|
: instr->SecondSuccessor();
|
1140
1042
|
return new LGoto(successor->block_id());
|
1141
|
-
} else {
|
1142
|
-
Abort("Undefined compare before branch");
|
1143
|
-
return NULL;
|
1144
1043
|
}
|
1044
|
+
ToBooleanStub::Types expected = instr->expected_input_types();
|
1045
|
+
// We need a temporary register when we have to access the map *or* we have
|
1046
|
+
// no type info yet, in which case we handle all cases (including the ones
|
1047
|
+
// involving maps).
|
1048
|
+
bool needs_temp = expected.NeedsMap() || expected.IsEmpty();
|
1049
|
+
LOperand* temp = needs_temp ? TempRegister() : NULL;
|
1050
|
+
return AssignEnvironment(new LBranch(UseRegister(v), temp));
|
1145
1051
|
}
|
1146
1052
|
|
1147
1053
|
|
@@ -1175,7 +1081,8 @@ LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
|
|
1175
1081
|
HInstanceOfKnownGlobal* instr) {
|
1176
1082
|
LInstanceOfKnownGlobal* result =
|
1177
1083
|
new LInstanceOfKnownGlobal(
|
1178
|
-
UseFixed(instr->
|
1084
|
+
UseFixed(instr->context(), esi),
|
1085
|
+
UseFixed(instr->left(), InstanceofStub::left()),
|
1179
1086
|
FixedTemp(edi));
|
1180
1087
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
1181
1088
|
}
|
@@ -1203,6 +1110,11 @@ LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
|
|
1203
1110
|
}
|
1204
1111
|
|
1205
1112
|
|
1113
|
+
LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
|
1114
|
+
return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction);
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
|
1206
1118
|
LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
1207
1119
|
return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext);
|
1208
1120
|
}
|
@@ -1247,16 +1159,19 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
|
1247
1159
|
if (op == kMathLog) {
|
1248
1160
|
ASSERT(instr->representation().IsDouble());
|
1249
1161
|
ASSERT(instr->value()->representation().IsDouble());
|
1162
|
+
LOperand* context = UseAny(instr->context()); // Not actually used.
|
1250
1163
|
LOperand* input = UseRegisterAtStart(instr->value());
|
1251
|
-
LUnaryMathOperation* result = new LUnaryMathOperation(input);
|
1164
|
+
LUnaryMathOperation* result = new LUnaryMathOperation(context, input);
|
1252
1165
|
return DefineSameAsFirst(result);
|
1253
1166
|
} else if (op == kMathSin || op == kMathCos) {
|
1167
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
1254
1168
|
LOperand* input = UseFixedDouble(instr->value(), xmm1);
|
1255
|
-
LUnaryMathOperation* result = new LUnaryMathOperation(input);
|
1169
|
+
LUnaryMathOperation* result = new LUnaryMathOperation(context, input);
|
1256
1170
|
return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
|
1257
1171
|
} else {
|
1258
1172
|
LOperand* input = UseRegisterAtStart(instr->value());
|
1259
|
-
|
1173
|
+
LOperand* context = UseAny(instr->context()); // Deferred use by MathAbs.
|
1174
|
+
LUnaryMathOperation* result = new LUnaryMathOperation(context, input);
|
1260
1175
|
switch (op) {
|
1261
1176
|
case kMathAbs:
|
1262
1177
|
return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
@@ -1327,7 +1242,8 @@ LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
|
|
1327
1242
|
|
1328
1243
|
LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
|
1329
1244
|
argument_count_ -= instr->argument_count();
|
1330
|
-
|
1245
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
1246
|
+
return MarkAsCall(DefineFixed(new LCallRuntime(context), eax), instr);
|
1331
1247
|
}
|
1332
1248
|
|
1333
1249
|
|
@@ -1507,88 +1423,86 @@ LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
|
1507
1423
|
}
|
1508
1424
|
|
1509
1425
|
|
1510
|
-
LInstruction* LChunkBuilder::
|
1426
|
+
LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
1511
1427
|
Token::Value op = instr->token();
|
1428
|
+
ASSERT(instr->left()->representation().IsTagged());
|
1429
|
+
ASSERT(instr->right()->representation().IsTagged());
|
1430
|
+
bool reversed = (op == Token::GT || op == Token::LTE);
|
1431
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
1432
|
+
LOperand* left = UseFixed(instr->left(), reversed ? eax : edx);
|
1433
|
+
LOperand* right = UseFixed(instr->right(), reversed ? edx : eax);
|
1434
|
+
LCmpT* result = new LCmpT(context, left, right);
|
1435
|
+
return MarkAsCall(DefineFixed(result, eax), instr);
|
1436
|
+
}
|
1437
|
+
|
1438
|
+
|
1439
|
+
LInstruction* LChunkBuilder::DoCompareIDAndBranch(
|
1440
|
+
HCompareIDAndBranch* instr) {
|
1512
1441
|
Representation r = instr->GetInputRepresentation();
|
1513
1442
|
if (r.IsInteger32()) {
|
1514
1443
|
ASSERT(instr->left()->representation().IsInteger32());
|
1515
1444
|
ASSERT(instr->right()->representation().IsInteger32());
|
1516
1445
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1517
1446
|
LOperand* right = UseOrConstantAtStart(instr->right());
|
1518
|
-
return
|
1519
|
-
} else
|
1447
|
+
return new LCmpIDAndBranch(left, right);
|
1448
|
+
} else {
|
1449
|
+
ASSERT(r.IsDouble());
|
1520
1450
|
ASSERT(instr->left()->representation().IsDouble());
|
1521
1451
|
ASSERT(instr->right()->representation().IsDouble());
|
1522
1452
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1523
1453
|
LOperand* right = UseRegisterAtStart(instr->right());
|
1524
|
-
return
|
1525
|
-
} else {
|
1526
|
-
ASSERT(instr->left()->representation().IsTagged());
|
1527
|
-
ASSERT(instr->right()->representation().IsTagged());
|
1528
|
-
bool reversed = (op == Token::GT || op == Token::LTE);
|
1529
|
-
LOperand* left = UseFixed(instr->left(), reversed ? eax : edx);
|
1530
|
-
LOperand* right = UseFixed(instr->right(), reversed ? edx : eax);
|
1531
|
-
LCmpT* result = new LCmpT(left, right);
|
1532
|
-
return MarkAsCall(DefineFixed(result, eax), instr);
|
1454
|
+
return new LCmpIDAndBranch(left, right);
|
1533
1455
|
}
|
1534
1456
|
}
|
1535
1457
|
|
1536
1458
|
|
1537
|
-
LInstruction* LChunkBuilder::
|
1538
|
-
|
1459
|
+
LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
|
1460
|
+
HCompareObjectEqAndBranch* instr) {
|
1539
1461
|
LOperand* left = UseRegisterAtStart(instr->left());
|
1540
|
-
LOperand* right =
|
1541
|
-
|
1542
|
-
return DefineAsRegister(result);
|
1462
|
+
LOperand* right = UseAtStart(instr->right());
|
1463
|
+
return new LCmpObjectEqAndBranch(left, right);
|
1543
1464
|
}
|
1544
1465
|
|
1545
1466
|
|
1546
|
-
LInstruction* LChunkBuilder::
|
1547
|
-
|
1548
|
-
|
1549
|
-
LOperand* right = UseRegisterAtStart(instr->right());
|
1550
|
-
LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
|
1551
|
-
return DefineAsRegister(result);
|
1467
|
+
LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch(
|
1468
|
+
HCompareConstantEqAndBranch* instr) {
|
1469
|
+
return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value()));
|
1552
1470
|
}
|
1553
1471
|
|
1554
1472
|
|
1555
|
-
LInstruction* LChunkBuilder::
|
1556
|
-
|
1557
|
-
LOperand*
|
1558
|
-
|
1559
|
-
return DefineAsRegister(new LIsNull(value));
|
1473
|
+
LInstruction* LChunkBuilder::DoIsNullAndBranch(HIsNullAndBranch* instr) {
|
1474
|
+
// We only need a temp register for non-strict compare.
|
1475
|
+
LOperand* temp = instr->is_strict() ? NULL : TempRegister();
|
1476
|
+
return new LIsNullAndBranch(UseRegisterAtStart(instr->value()), temp);
|
1560
1477
|
}
|
1561
1478
|
|
1562
1479
|
|
1563
|
-
LInstruction* LChunkBuilder::
|
1480
|
+
LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
|
1564
1481
|
ASSERT(instr->value()->representation().IsTagged());
|
1565
|
-
LOperand*
|
1566
|
-
|
1567
|
-
return DefineAsRegister(new LIsObject(value, TempRegister()));
|
1482
|
+
LOperand* temp = TempRegister();
|
1483
|
+
return new LIsObjectAndBranch(UseRegister(instr->value()), temp);
|
1568
1484
|
}
|
1569
1485
|
|
1570
1486
|
|
1571
|
-
LInstruction* LChunkBuilder::
|
1487
|
+
LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) {
|
1572
1488
|
ASSERT(instr->value()->representation().IsTagged());
|
1573
|
-
|
1574
|
-
|
1575
|
-
return DefineAsRegister(new LIsSmi(value));
|
1489
|
+
return new LIsSmiAndBranch(Use(instr->value()));
|
1576
1490
|
}
|
1577
1491
|
|
1578
1492
|
|
1579
|
-
LInstruction* LChunkBuilder::
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1493
|
+
LInstruction* LChunkBuilder::DoIsUndetectableAndBranch(
|
1494
|
+
HIsUndetectableAndBranch* instr) {
|
1495
|
+
ASSERT(instr ->value()->representation().IsTagged());
|
1496
|
+
return new LIsUndetectableAndBranch(UseRegisterAtStart(instr->value()),
|
1497
|
+
TempRegister());
|
1584
1498
|
}
|
1585
1499
|
|
1586
1500
|
|
1587
|
-
LInstruction* LChunkBuilder::
|
1501
|
+
LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
|
1502
|
+
HHasInstanceTypeAndBranch* instr) {
|
1588
1503
|
ASSERT(instr->value()->representation().IsTagged());
|
1589
|
-
|
1590
|
-
|
1591
|
-
return DefineAsRegister(new LHasInstanceType(value));
|
1504
|
+
return new LHasInstanceTypeAndBranch(UseRegisterAtStart(instr->value()),
|
1505
|
+
TempRegister());
|
1592
1506
|
}
|
1593
1507
|
|
1594
1508
|
|
@@ -1601,20 +1515,20 @@ LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
|
|
1601
1515
|
}
|
1602
1516
|
|
1603
1517
|
|
1604
|
-
LInstruction* LChunkBuilder::
|
1605
|
-
|
1518
|
+
LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
|
1519
|
+
HHasCachedArrayIndexAndBranch* instr) {
|
1606
1520
|
ASSERT(instr->value()->representation().IsTagged());
|
1607
|
-
|
1608
|
-
|
1609
|
-
return DefineAsRegister(new LHasCachedArrayIndex(value));
|
1521
|
+
return new LHasCachedArrayIndexAndBranch(
|
1522
|
+
UseRegisterAtStart(instr->value()));
|
1610
1523
|
}
|
1611
1524
|
|
1612
1525
|
|
1613
|
-
LInstruction* LChunkBuilder::
|
1526
|
+
LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
|
1527
|
+
HClassOfTestAndBranch* instr) {
|
1614
1528
|
ASSERT(instr->value()->representation().IsTagged());
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1529
|
+
return new LClassOfTestAndBranch(UseTempRegister(instr->value()),
|
1530
|
+
TempRegister(),
|
1531
|
+
TempRegister());
|
1618
1532
|
}
|
1619
1533
|
|
1620
1534
|
|
@@ -1624,16 +1538,16 @@ LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
|
|
1624
1538
|
}
|
1625
1539
|
|
1626
1540
|
|
1627
|
-
LInstruction* LChunkBuilder::
|
1541
|
+
LInstruction* LChunkBuilder::DoFixedArrayBaseLength(
|
1542
|
+
HFixedArrayBaseLength* instr) {
|
1628
1543
|
LOperand* array = UseRegisterAtStart(instr->value());
|
1629
|
-
return DefineAsRegister(new
|
1544
|
+
return DefineAsRegister(new LFixedArrayBaseLength(array));
|
1630
1545
|
}
|
1631
1546
|
|
1632
1547
|
|
1633
|
-
LInstruction* LChunkBuilder::
|
1634
|
-
|
1635
|
-
|
1636
|
-
return DefineAsRegister(new LExternalArrayLength(array));
|
1548
|
+
LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) {
|
1549
|
+
LOperand* object = UseRegisterAtStart(instr->value());
|
1550
|
+
return DefineAsRegister(new LElementsKind(object));
|
1637
1551
|
}
|
1638
1552
|
|
1639
1553
|
|
@@ -1645,8 +1559,9 @@ LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
|
|
1645
1559
|
|
1646
1560
|
|
1647
1561
|
LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
|
1648
|
-
return AssignEnvironment(new LBoundsCheck(
|
1649
|
-
|
1562
|
+
return AssignEnvironment(new LBoundsCheck(
|
1563
|
+
UseRegisterOrConstantAtStart(instr->index()),
|
1564
|
+
UseAtStart(instr->length())));
|
1650
1565
|
}
|
1651
1566
|
|
1652
1567
|
|
@@ -1658,8 +1573,14 @@ LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) {
|
|
1658
1573
|
|
1659
1574
|
|
1660
1575
|
LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
|
1576
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
1661
1577
|
LOperand* value = UseFixed(instr->value(), eax);
|
1662
|
-
return MarkAsCall(new LThrow(value), instr);
|
1578
|
+
return MarkAsCall(new LThrow(context, value), instr);
|
1579
|
+
}
|
1580
|
+
|
1581
|
+
|
1582
|
+
LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) {
|
1583
|
+
return NULL;
|
1663
1584
|
}
|
1664
1585
|
|
1665
1586
|
|
@@ -1684,8 +1605,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|
1684
1605
|
LOperand* value = UseRegister(instr->value());
|
1685
1606
|
bool needs_check = !instr->value()->type().IsSmi();
|
1686
1607
|
if (needs_check) {
|
1608
|
+
bool truncating = instr->CanTruncateToInt32();
|
1687
1609
|
LOperand* xmm_temp =
|
1688
|
-
(
|
1610
|
+
(truncating && CpuFeatures::IsSupported(SSE3))
|
1689
1611
|
? NULL
|
1690
1612
|
: FixedTemp(xmm1);
|
1691
1613
|
LTaggedToI* res = new LTaggedToI(value, xmm_temp);
|
@@ -1705,8 +1627,8 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|
1705
1627
|
return AssignPointerMap(Define(result, result_temp));
|
1706
1628
|
} else {
|
1707
1629
|
ASSERT(to.IsInteger32());
|
1708
|
-
bool
|
1709
|
-
|
1630
|
+
bool truncating = instr->CanTruncateToInt32();
|
1631
|
+
bool needs_temp = truncating && !CpuFeatures::IsSupported(SSE3);
|
1710
1632
|
LOperand* value = needs_temp ?
|
1711
1633
|
UseTempRegister(instr->value()) : UseRegister(instr->value());
|
1712
1634
|
LOperand* temp = needs_temp ? TempRegister() : NULL;
|
@@ -1733,7 +1655,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|
1733
1655
|
|
1734
1656
|
|
1735
1657
|
LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) {
|
1736
|
-
LOperand* value =
|
1658
|
+
LOperand* value = UseAtStart(instr->value());
|
1737
1659
|
return AssignEnvironment(new LCheckNonSmi(value));
|
1738
1660
|
}
|
1739
1661
|
|
@@ -1754,13 +1676,13 @@ LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
|
|
1754
1676
|
|
1755
1677
|
|
1756
1678
|
LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
|
1757
|
-
LOperand* value =
|
1679
|
+
LOperand* value = UseAtStart(instr->value());
|
1758
1680
|
return AssignEnvironment(new LCheckSmi(value));
|
1759
1681
|
}
|
1760
1682
|
|
1761
1683
|
|
1762
1684
|
LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
|
1763
|
-
LOperand* value =
|
1685
|
+
LOperand* value = UseAtStart(instr->value());
|
1764
1686
|
return AssignEnvironment(new LCheckFunction(value));
|
1765
1687
|
}
|
1766
1688
|
|
@@ -1793,6 +1715,34 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
|
1793
1715
|
}
|
1794
1716
|
|
1795
1717
|
|
1718
|
+
LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) {
|
1719
|
+
HValue* value = instr->value();
|
1720
|
+
Representation input_rep = value->representation();
|
1721
|
+
|
1722
|
+
LInstruction* result;
|
1723
|
+
if (input_rep.IsDouble()) {
|
1724
|
+
LOperand* reg = UseRegister(value);
|
1725
|
+
LOperand* temp_reg =
|
1726
|
+
CpuFeatures::IsSupported(SSE3) ? NULL : TempRegister();
|
1727
|
+
result = DefineAsRegister(new LDoubleToI(reg, temp_reg));
|
1728
|
+
} else if (input_rep.IsInteger32()) {
|
1729
|
+
// Canonicalization should already have removed the hydrogen instruction in
|
1730
|
+
// this case, since it is a noop.
|
1731
|
+
UNREACHABLE();
|
1732
|
+
return NULL;
|
1733
|
+
} else {
|
1734
|
+
ASSERT(input_rep.IsTagged());
|
1735
|
+
LOperand* reg = UseRegister(value);
|
1736
|
+
// Register allocator doesn't (yet) support allocation of double
|
1737
|
+
// temps. Reserve xmm1 explicitly.
|
1738
|
+
LOperand* xmm_temp =
|
1739
|
+
CpuFeatures::IsSupported(SSE3) ? NULL : FixedTemp(xmm1);
|
1740
|
+
result = DefineSameAsFirst(new LTaggedToI(reg, xmm_temp));
|
1741
|
+
}
|
1742
|
+
return AssignEnvironment(result);
|
1743
|
+
}
|
1744
|
+
|
1745
|
+
|
1796
1746
|
LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
|
1797
1747
|
return new LReturn(UseFixed(instr->value(), eax));
|
1798
1748
|
}
|
@@ -1883,13 +1833,16 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
|
1883
1833
|
LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
|
1884
1834
|
HLoadNamedFieldPolymorphic* instr) {
|
1885
1835
|
ASSERT(instr->representation().IsTagged());
|
1836
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
1886
1837
|
if (instr->need_generic()) {
|
1887
1838
|
LOperand* obj = UseFixed(instr->object(), eax);
|
1888
|
-
LLoadNamedFieldPolymorphic* result =
|
1839
|
+
LLoadNamedFieldPolymorphic* result =
|
1840
|
+
new LLoadNamedFieldPolymorphic(context, obj);
|
1889
1841
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
1890
1842
|
} else {
|
1891
1843
|
LOperand* obj = UseRegisterAtStart(instr->object());
|
1892
|
-
LLoadNamedFieldPolymorphic* result =
|
1844
|
+
LLoadNamedFieldPolymorphic* result =
|
1845
|
+
new LLoadNamedFieldPolymorphic(context, obj);
|
1893
1846
|
return AssignEnvironment(DefineAsRegister(result));
|
1894
1847
|
}
|
1895
1848
|
}
|
@@ -1929,21 +1882,35 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
|
|
1929
1882
|
ASSERT(instr->representation().IsTagged());
|
1930
1883
|
ASSERT(instr->key()->representation().IsInteger32());
|
1931
1884
|
LOperand* obj = UseRegisterAtStart(instr->object());
|
1932
|
-
LOperand* key =
|
1885
|
+
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1933
1886
|
LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
|
1934
|
-
return AssignEnvironment(
|
1887
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1888
|
+
}
|
1889
|
+
|
1890
|
+
|
1891
|
+
LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement(
|
1892
|
+
HLoadKeyedFastDoubleElement* instr) {
|
1893
|
+
ASSERT(instr->representation().IsDouble());
|
1894
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1895
|
+
LOperand* elements = UseRegisterAtStart(instr->elements());
|
1896
|
+
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1897
|
+
LLoadKeyedFastDoubleElement* result =
|
1898
|
+
new LLoadKeyedFastDoubleElement(elements, key);
|
1899
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1935
1900
|
}
|
1936
1901
|
|
1937
1902
|
|
1938
1903
|
LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
|
1939
1904
|
HLoadKeyedSpecializedArrayElement* instr) {
|
1940
|
-
|
1905
|
+
JSObject::ElementsKind elements_kind = instr->elements_kind();
|
1941
1906
|
Representation representation(instr->representation());
|
1942
1907
|
ASSERT(
|
1943
|
-
(representation.IsInteger32() &&
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1908
|
+
(representation.IsInteger32() &&
|
1909
|
+
(elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) &&
|
1910
|
+
(elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1911
|
+
(representation.IsDouble() &&
|
1912
|
+
((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) ||
|
1913
|
+
(elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS))));
|
1947
1914
|
ASSERT(instr->key()->representation().IsInteger32());
|
1948
1915
|
LOperand* external_pointer = UseRegister(instr->external_pointer());
|
1949
1916
|
LOperand* key = UseRegisterOrConstant(instr->key());
|
@@ -1953,7 +1920,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
|
|
1953
1920
|
LInstruction* load_instr = DefineAsRegister(result);
|
1954
1921
|
// An unsigned int array load might overflow and cause a deopt, make sure it
|
1955
1922
|
// has an environment.
|
1956
|
-
return (
|
1923
|
+
return (elements_kind == JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS)
|
1957
1924
|
? AssignEnvironment(load_instr)
|
1958
1925
|
: load_instr;
|
1959
1926
|
}
|
@@ -1988,24 +1955,40 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
|
|
1988
1955
|
}
|
1989
1956
|
|
1990
1957
|
|
1958
|
+
LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement(
|
1959
|
+
HStoreKeyedFastDoubleElement* instr) {
|
1960
|
+
ASSERT(instr->value()->representation().IsDouble());
|
1961
|
+
ASSERT(instr->elements()->representation().IsTagged());
|
1962
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1963
|
+
|
1964
|
+
LOperand* elements = UseRegisterAtStart(instr->elements());
|
1965
|
+
LOperand* val = UseTempRegister(instr->value());
|
1966
|
+
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1967
|
+
|
1968
|
+
return new LStoreKeyedFastDoubleElement(elements, key, val);
|
1969
|
+
}
|
1970
|
+
|
1971
|
+
|
1991
1972
|
LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
|
1992
1973
|
HStoreKeyedSpecializedArrayElement* instr) {
|
1993
1974
|
Representation representation(instr->value()->representation());
|
1994
|
-
|
1995
|
-
|
1996
|
-
(representation.IsInteger32() &&
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
1975
|
+
JSObject::ElementsKind elements_kind = instr->elements_kind();
|
1976
|
+
ASSERT(
|
1977
|
+
(representation.IsInteger32() &&
|
1978
|
+
(elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) &&
|
1979
|
+
(elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1980
|
+
(representation.IsDouble() &&
|
1981
|
+
((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) ||
|
1982
|
+
(elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS))));
|
2000
1983
|
ASSERT(instr->external_pointer()->representation().IsExternal());
|
2001
1984
|
ASSERT(instr->key()->representation().IsInteger32());
|
2002
1985
|
|
2003
1986
|
LOperand* external_pointer = UseRegister(instr->external_pointer());
|
2004
1987
|
LOperand* key = UseRegisterOrConstant(instr->key());
|
2005
1988
|
LOperand* val = NULL;
|
2006
|
-
if (
|
2007
|
-
|
2008
|
-
|
1989
|
+
if (elements_kind == JSObject::EXTERNAL_BYTE_ELEMENTS ||
|
1990
|
+
elements_kind == JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS ||
|
1991
|
+
elements_kind == JSObject::EXTERNAL_PIXEL_ELEMENTS) {
|
2009
1992
|
// We need a byte register in this case for the value.
|
2010
1993
|
val = UseFixed(instr->value(), eax);
|
2011
1994
|
} else {
|
@@ -2066,23 +2049,27 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
|
2066
2049
|
|
2067
2050
|
|
2068
2051
|
LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
|
2052
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2069
2053
|
LOperand* left = UseOrConstantAtStart(instr->left());
|
2070
2054
|
LOperand* right = UseOrConstantAtStart(instr->right());
|
2071
|
-
|
2055
|
+
LStringAdd* string_add = new LStringAdd(context, left, right);
|
2056
|
+
return MarkAsCall(DefineFixed(string_add, eax), instr);
|
2072
2057
|
}
|
2073
2058
|
|
2074
2059
|
|
2075
2060
|
LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
|
2076
|
-
LOperand* string =
|
2077
|
-
LOperand* index =
|
2078
|
-
|
2061
|
+
LOperand* string = UseTempRegister(instr->string());
|
2062
|
+
LOperand* index = UseTempRegister(instr->index());
|
2063
|
+
LOperand* context = UseAny(instr->context());
|
2064
|
+
LStringCharCodeAt* result = new LStringCharCodeAt(context, string, index);
|
2079
2065
|
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
2080
2066
|
}
|
2081
2067
|
|
2082
2068
|
|
2083
2069
|
LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
|
2084
2070
|
LOperand* char_code = UseRegister(instr->value());
|
2085
|
-
|
2071
|
+
LOperand* context = UseAny(instr->context());
|
2072
|
+
LStringCharFromCode* result = new LStringCharFromCode(context, char_code);
|
2086
2073
|
return AssignPointerMap(DefineAsRegister(result));
|
2087
2074
|
}
|
2088
2075
|
|
@@ -2094,7 +2081,8 @@ LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
|
|
2094
2081
|
|
2095
2082
|
|
2096
2083
|
LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
|
2097
|
-
|
2084
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2085
|
+
return MarkAsCall(DefineFixed(new LArrayLiteral(context), eax), instr);
|
2098
2086
|
}
|
2099
2087
|
|
2100
2088
|
|
@@ -2105,19 +2093,22 @@ LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) {
|
|
2105
2093
|
|
2106
2094
|
|
2107
2095
|
LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) {
|
2108
|
-
|
2096
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2097
|
+
return MarkAsCall(DefineFixed(new LRegExpLiteral(context), eax), instr);
|
2109
2098
|
}
|
2110
2099
|
|
2111
2100
|
|
2112
2101
|
LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
|
2113
|
-
|
2102
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2103
|
+
return MarkAsCall(DefineFixed(new LFunctionLiteral(context), eax), instr);
|
2114
2104
|
}
|
2115
2105
|
|
2116
2106
|
|
2117
2107
|
LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2108
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2109
|
+
LOperand* object = UseAtStart(instr->object());
|
2110
|
+
LOperand* key = UseOrConstantAtStart(instr->key());
|
2111
|
+
LDeleteProperty* result = new LDeleteProperty(context, object, key);
|
2121
2112
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
2122
2113
|
}
|
2123
2114
|
|
@@ -2137,6 +2128,10 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
|
2137
2128
|
|
2138
2129
|
LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
2139
2130
|
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
|
2131
|
+
if (spill_index > LUnallocated::kMaxFixedIndex) {
|
2132
|
+
Abort("Too many spill slots needed for OSR");
|
2133
|
+
spill_index = 0;
|
2134
|
+
}
|
2140
2135
|
return DefineAsSpilled(new LUnknownOSRValue, spill_index);
|
2141
2136
|
}
|
2142
2137
|
|
@@ -2175,18 +2170,21 @@ LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
|
|
2175
2170
|
|
2176
2171
|
|
2177
2172
|
LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
2178
|
-
|
2173
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2174
|
+
LOperand* value = UseAtStart(instr->value());
|
2175
|
+
LTypeof* result = new LTypeof(context, value);
|
2179
2176
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
2180
2177
|
}
|
2181
2178
|
|
2182
2179
|
|
2183
|
-
LInstruction* LChunkBuilder::
|
2184
|
-
return
|
2180
|
+
LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) {
|
2181
|
+
return new LTypeofIsAndBranch(UseTempRegister(instr->value()));
|
2185
2182
|
}
|
2186
2183
|
|
2187
2184
|
|
2188
|
-
LInstruction* LChunkBuilder::
|
2189
|
-
|
2185
|
+
LInstruction* LChunkBuilder::DoIsConstructCallAndBranch(
|
2186
|
+
HIsConstructCallAndBranch* instr) {
|
2187
|
+
return new LIsConstructCallAndBranch(TempRegister());
|
2190
2188
|
}
|
2191
2189
|
|
2192
2190
|
|
@@ -2223,7 +2221,14 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
|
2223
2221
|
|
2224
2222
|
|
2225
2223
|
LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
|
2226
|
-
|
2224
|
+
if (instr->is_function_entry()) {
|
2225
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2226
|
+
return MarkAsCall(new LStackCheck(context), instr);
|
2227
|
+
} else {
|
2228
|
+
ASSERT(instr->is_backwards_branch());
|
2229
|
+
LOperand* context = UseAny(instr->context());
|
2230
|
+
return AssignEnvironment(AssignPointerMap(new LStackCheck(context)));
|
2231
|
+
}
|
2227
2232
|
}
|
2228
2233
|
|
2229
2234
|
|
@@ -2232,7 +2237,6 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
|
2232
2237
|
HConstant* undefined = graph()->GetConstantUndefined();
|
2233
2238
|
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
|
2234
2239
|
instr->function(),
|
2235
|
-
HEnvironment::LITHIUM,
|
2236
2240
|
undefined,
|
2237
2241
|
instr->call_kind());
|
2238
2242
|
current_block_->UpdateEnvironment(inner);
|
@@ -2249,9 +2253,10 @@ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
|
|
2249
2253
|
|
2250
2254
|
|
2251
2255
|
LInstruction* LChunkBuilder::DoIn(HIn* instr) {
|
2256
|
+
LOperand* context = UseFixed(instr->context(), esi);
|
2252
2257
|
LOperand* key = UseOrConstantAtStart(instr->key());
|
2253
2258
|
LOperand* object = UseOrConstantAtStart(instr->object());
|
2254
|
-
LIn* result = new LIn(key, object);
|
2259
|
+
LIn* result = new LIn(context, key, object);
|
2255
2260
|
return MarkAsCall(DefineFixed(result, eax), instr);
|
2256
2261
|
}
|
2257
2262
|
|