libv8 3.3.10.4 → 3.5.10.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/libv8/scons/CHANGES.txt +24 -231
- data/lib/libv8/scons/LICENSE.txt +1 -1
- data/lib/libv8/scons/MANIFEST +0 -1
- data/lib/libv8/scons/PKG-INFO +1 -1
- data/lib/libv8/scons/README.txt +9 -9
- data/lib/libv8/scons/RELEASE.txt +75 -77
- data/lib/libv8/scons/engine/SCons/Action.py +6 -22
- data/lib/libv8/scons/engine/SCons/Builder.py +2 -2
- data/lib/libv8/scons/engine/SCons/CacheDir.py +2 -2
- data/lib/libv8/scons/engine/SCons/Debug.py +2 -2
- data/lib/libv8/scons/engine/SCons/Defaults.py +10 -24
- data/lib/libv8/scons/engine/SCons/Environment.py +19 -118
- data/lib/libv8/scons/engine/SCons/Errors.py +2 -2
- data/lib/libv8/scons/engine/SCons/Executor.py +2 -2
- data/lib/libv8/scons/engine/SCons/Job.py +2 -2
- data/lib/libv8/scons/engine/SCons/Memoize.py +2 -2
- data/lib/libv8/scons/engine/SCons/Node/Alias.py +2 -2
- data/lib/libv8/scons/engine/SCons/Node/FS.py +121 -281
- data/lib/libv8/scons/engine/SCons/Node/Python.py +2 -2
- data/lib/libv8/scons/engine/SCons/Node/__init__.py +5 -6
- data/lib/libv8/scons/engine/SCons/Options/BoolOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/EnumOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/ListOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/PackageOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/PathOption.py +2 -2
- data/lib/libv8/scons/engine/SCons/Options/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/PathList.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/aix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/cygwin.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/darwin.py +3 -27
- data/lib/libv8/scons/engine/SCons/Platform/hpux.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/irix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/os2.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/posix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/sunos.py +2 -2
- data/lib/libv8/scons/engine/SCons/Platform/win32.py +2 -2
- data/lib/libv8/scons/engine/SCons/SConf.py +2 -2
- data/lib/libv8/scons/engine/SCons/SConsign.py +3 -9
- data/lib/libv8/scons/engine/SCons/Scanner/C.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/D.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/Dir.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/Fortran.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/IDL.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/LaTeX.py +2 -5
- data/lib/libv8/scons/engine/SCons/Scanner/Prog.py +2 -2
- data/lib/libv8/scons/engine/SCons/Scanner/RC.py +3 -3
- data/lib/libv8/scons/engine/SCons/Scanner/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Script/Interactive.py +2 -2
- data/lib/libv8/scons/engine/SCons/Script/Main.py +11 -82
- data/lib/libv8/scons/engine/SCons/Script/SConsOptions.py +5 -5
- data/lib/libv8/scons/engine/SCons/Script/SConscript.py +2 -2
- data/lib/libv8/scons/engine/SCons/Script/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Sig.py +2 -2
- data/lib/libv8/scons/engine/SCons/Subst.py +2 -2
- data/lib/libv8/scons/engine/SCons/Taskmaster.py +2 -10
- data/lib/libv8/scons/engine/SCons/Tool/386asm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/BitKeeper.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/CVS.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/FortranCommon.py +2 -19
- data/lib/libv8/scons/engine/SCons/Tool/JavaCommon.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/arch.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/common.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/netframework.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/sdk.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vc.py +6 -9
- data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vs.py +2 -29
- data/lib/libv8/scons/engine/SCons/Tool/Perforce.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/PharLapCommon.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/RCS.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/SCCS.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/Subversion.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/__init__.py +3 -3
- data/lib/libv8/scons/engine/SCons/Tool/aixc++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/aixcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/aixf77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/aixlink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/applelink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/as.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/bcc32.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/c++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/cc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/cvf.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/default.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/dmd.py +7 -24
- data/lib/libv8/scons/engine/SCons/Tool/dvi.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/dvipdf.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/dvips.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/f77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/f90.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/f95.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/filesystem.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/fortran.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/g++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/g77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/gas.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/gcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/gfortran.py +3 -3
- data/lib/libv8/scons/engine/SCons/Tool/gnulink.py +3 -2
- data/lib/libv8/scons/engine/SCons/Tool/gs.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/hpc++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/hpcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/hplink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/icc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/icl.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ifl.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ifort.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ilink.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/ilink32.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/install.py +3 -57
- data/lib/libv8/scons/engine/SCons/Tool/intelc.py +25 -65
- data/lib/libv8/scons/engine/SCons/Tool/ipkg.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/jar.py +3 -9
- data/lib/libv8/scons/engine/SCons/Tool/javac.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/javah.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/latex.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/lex.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/link.py +5 -6
- data/lib/libv8/scons/engine/SCons/Tool/linkloc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/m4.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/masm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/midl.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/mingw.py +10 -31
- data/lib/libv8/scons/engine/SCons/Tool/mslib.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/mslink.py +9 -61
- data/lib/libv8/scons/engine/SCons/Tool/mssdk.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/msvc.py +11 -21
- data/lib/libv8/scons/engine/SCons/Tool/msvs.py +59 -477
- data/lib/libv8/scons/engine/SCons/Tool/mwcc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/mwld.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/nasm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/ipk.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/msi.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/rpm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_tarbz2.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_targz.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/src_zip.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/tarbz2.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/targz.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/packaging/zip.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/pdf.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/pdflatex.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/pdftex.py +2 -3
- data/lib/libv8/scons/engine/SCons/Tool/qt.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/rmic.py +3 -9
- data/lib/libv8/scons/engine/SCons/Tool/rpcgen.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/rpm.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgiar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgic++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgicc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sgilink.py +3 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunc++.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/suncc.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunf77.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunf90.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunf95.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/sunlink.py +3 -2
- data/lib/libv8/scons/engine/SCons/Tool/swig.py +5 -6
- data/lib/libv8/scons/engine/SCons/Tool/tar.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/tex.py +43 -96
- data/lib/libv8/scons/engine/SCons/Tool/textfile.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/tlib.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/wix.py +2 -2
- data/lib/libv8/scons/engine/SCons/Tool/yacc.py +2 -12
- data/lib/libv8/scons/engine/SCons/Tool/zip.py +2 -2
- data/lib/libv8/scons/engine/SCons/Util.py +3 -3
- data/lib/libv8/scons/engine/SCons/Variables/BoolVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/EnumVariable.py +3 -3
- data/lib/libv8/scons/engine/SCons/Variables/ListVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/PackageVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/PathVariable.py +2 -2
- data/lib/libv8/scons/engine/SCons/Variables/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/Warnings.py +2 -2
- data/lib/libv8/scons/engine/SCons/__init__.py +6 -6
- data/lib/libv8/scons/engine/SCons/compat/__init__.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_builtins.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_collections.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_dbm.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_hashlib.py +2 -2
- data/lib/libv8/scons/engine/SCons/compat/_scons_io.py +2 -2
- data/lib/libv8/scons/engine/SCons/cpp.py +2 -2
- data/lib/libv8/scons/engine/SCons/dblite.py +1 -4
- data/lib/libv8/scons/engine/SCons/exitfuncs.py +2 -2
- data/lib/libv8/scons/scons-time.1 +3 -3
- data/lib/libv8/scons/scons.1 +1164 -1170
- data/lib/libv8/scons/sconsign.1 +3 -3
- data/lib/libv8/scons/script/scons +22 -22
- data/lib/libv8/scons/script/scons-time +2 -2
- data/lib/libv8/scons/script/scons.bat +4 -7
- data/lib/libv8/scons/script/sconsign +20 -21
- data/lib/libv8/scons/setup.cfg +1 -0
- data/lib/libv8/scons/setup.py +40 -38
- data/lib/libv8/v8/.gitignore +1 -1
- data/lib/libv8/v8/AUTHORS +2 -0
- data/lib/libv8/v8/ChangeLog +387 -0
- data/lib/libv8/v8/Makefile +171 -0
- data/lib/libv8/v8/SConstruct +124 -51
- data/lib/libv8/v8/build/README.txt +31 -14
- data/lib/libv8/v8/build/all.gyp +11 -4
- data/lib/libv8/v8/build/armu.gypi +6 -2
- data/lib/libv8/v8/build/common.gypi +240 -94
- data/lib/libv8/v8/build/gyp_v8 +32 -4
- data/lib/libv8/v8/build/standalone.gypi +200 -0
- data/lib/libv8/v8/include/v8-debug.h +0 -0
- data/lib/libv8/v8/include/v8-profiler.h +8 -11
- data/lib/libv8/v8/include/v8.h +191 -108
- data/lib/libv8/v8/preparser/SConscript +2 -2
- data/lib/libv8/v8/preparser/preparser-process.cc +3 -3
- data/lib/libv8/v8/preparser/preparser.gyp +42 -0
- data/lib/libv8/v8/src/SConscript +33 -8
- data/lib/libv8/v8/src/accessors.cc +77 -43
- data/lib/libv8/v8/src/api.cc +393 -191
- data/lib/libv8/v8/src/api.h +4 -8
- data/lib/libv8/v8/src/apinatives.js +15 -3
- data/lib/libv8/v8/src/arguments.h +8 -0
- data/lib/libv8/v8/src/arm/assembler-arm.cc +120 -120
- data/lib/libv8/v8/src/arm/assembler-arm.h +92 -43
- data/lib/libv8/v8/src/arm/builtins-arm.cc +32 -39
- data/lib/libv8/v8/src/arm/code-stubs-arm.cc +572 -351
- data/lib/libv8/v8/src/arm/code-stubs-arm.h +8 -77
- data/lib/libv8/v8/src/arm/codegen-arm.h +0 -2
- data/lib/libv8/v8/src/arm/deoptimizer-arm.cc +50 -30
- data/lib/libv8/v8/src/arm/disasm-arm.cc +1 -1
- data/lib/libv8/v8/src/arm/frames-arm.h +9 -5
- data/lib/libv8/v8/src/arm/full-codegen-arm.cc +331 -432
- data/lib/libv8/v8/src/arm/ic-arm.cc +192 -124
- data/lib/libv8/v8/src/arm/lithium-arm.cc +216 -232
- data/lib/libv8/v8/src/arm/lithium-arm.h +106 -259
- data/lib/libv8/v8/src/arm/lithium-codegen-arm.cc +633 -642
- data/lib/libv8/v8/src/arm/lithium-codegen-arm.h +4 -4
- data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.cc +1 -3
- data/lib/libv8/v8/src/arm/macro-assembler-arm.cc +260 -185
- data/lib/libv8/v8/src/arm/macro-assembler-arm.h +45 -25
- data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.cc +25 -13
- data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.h +3 -0
- data/lib/libv8/v8/src/arm/stub-cache-arm.cc +413 -226
- data/lib/libv8/v8/src/array.js +38 -18
- data/lib/libv8/v8/src/assembler.cc +12 -5
- data/lib/libv8/v8/src/assembler.h +15 -9
- data/lib/libv8/v8/src/ast-inl.h +34 -25
- data/lib/libv8/v8/src/ast.cc +141 -72
- data/lib/libv8/v8/src/ast.h +255 -181
- data/lib/libv8/v8/src/bignum.cc +3 -4
- data/lib/libv8/v8/src/bootstrapper.cc +55 -11
- data/lib/libv8/v8/src/bootstrapper.h +3 -2
- data/lib/libv8/v8/src/builtins.cc +8 -2
- data/lib/libv8/v8/src/builtins.h +4 -0
- data/lib/libv8/v8/src/cached-powers.cc +8 -4
- data/lib/libv8/v8/src/checks.h +3 -3
- data/lib/libv8/v8/src/code-stubs.cc +173 -28
- data/lib/libv8/v8/src/code-stubs.h +104 -148
- data/lib/libv8/v8/src/codegen.cc +8 -8
- data/lib/libv8/v8/src/compilation-cache.cc +2 -47
- data/lib/libv8/v8/src/compilation-cache.h +0 -10
- data/lib/libv8/v8/src/compiler.cc +27 -16
- data/lib/libv8/v8/src/compiler.h +13 -18
- data/lib/libv8/v8/src/contexts.cc +107 -72
- data/lib/libv8/v8/src/contexts.h +70 -34
- data/lib/libv8/v8/src/conversions-inl.h +572 -14
- data/lib/libv8/v8/src/conversions.cc +9 -707
- data/lib/libv8/v8/src/conversions.h +23 -12
- data/lib/libv8/v8/src/cpu-profiler-inl.h +2 -19
- data/lib/libv8/v8/src/cpu-profiler.cc +4 -21
- data/lib/libv8/v8/src/cpu-profiler.h +8 -17
- data/lib/libv8/v8/src/d8-debug.cc +5 -3
- data/lib/libv8/v8/src/d8-debug.h +6 -7
- data/lib/libv8/v8/src/d8-posix.cc +1 -10
- data/lib/libv8/v8/src/d8.cc +721 -219
- data/lib/libv8/v8/src/d8.gyp +37 -12
- data/lib/libv8/v8/src/d8.h +141 -19
- data/lib/libv8/v8/src/d8.js +17 -8
- data/lib/libv8/v8/src/date.js +16 -5
- data/lib/libv8/v8/src/dateparser-inl.h +242 -39
- data/lib/libv8/v8/src/dateparser.cc +38 -4
- data/lib/libv8/v8/src/dateparser.h +170 -28
- data/lib/libv8/v8/src/debug-agent.cc +5 -3
- data/lib/libv8/v8/src/debug-agent.h +11 -7
- data/lib/libv8/v8/src/debug-debugger.js +65 -34
- data/lib/libv8/v8/src/debug.cc +30 -60
- data/lib/libv8/v8/src/debug.h +5 -3
- data/lib/libv8/v8/src/deoptimizer.cc +227 -10
- data/lib/libv8/v8/src/deoptimizer.h +133 -9
- data/lib/libv8/v8/src/disassembler.cc +22 -14
- data/lib/libv8/v8/src/diy-fp.cc +4 -3
- data/lib/libv8/v8/src/diy-fp.h +3 -3
- data/lib/libv8/v8/src/elements.cc +634 -0
- data/lib/libv8/v8/src/elements.h +95 -0
- data/lib/libv8/v8/src/execution.cc +5 -21
- data/lib/libv8/v8/src/extensions/experimental/break-iterator.cc +3 -1
- data/lib/libv8/v8/src/extensions/experimental/break-iterator.h +1 -1
- data/lib/libv8/v8/src/extensions/experimental/collator.cc +6 -2
- data/lib/libv8/v8/src/extensions/experimental/collator.h +1 -2
- data/lib/libv8/v8/src/extensions/experimental/datetime-format.cc +384 -0
- data/lib/libv8/v8/src/extensions/experimental/datetime-format.h +83 -0
- data/lib/libv8/v8/src/extensions/experimental/experimental.gyp +18 -7
- data/lib/libv8/v8/src/extensions/experimental/i18n-extension.cc +12 -16
- data/lib/libv8/v8/src/extensions/experimental/i18n-extension.h +1 -1
- data/lib/libv8/v8/src/extensions/experimental/i18n-js2c.py +126 -0
- data/lib/libv8/v8/src/extensions/experimental/i18n-locale.cc +3 -4
- data/lib/libv8/v8/src/extensions/experimental/i18n-locale.h +1 -1
- data/lib/libv8/v8/src/{shell.h → extensions/experimental/i18n-natives.h} +8 -20
- data/lib/libv8/v8/src/extensions/experimental/i18n-utils.cc +45 -1
- data/lib/libv8/v8/src/extensions/experimental/i18n-utils.h +21 -1
- data/lib/libv8/v8/src/extensions/experimental/i18n.js +211 -11
- data/lib/libv8/v8/src/extensions/experimental/language-matcher.cc +4 -3
- data/lib/libv8/v8/src/extensions/experimental/language-matcher.h +1 -1
- data/lib/libv8/v8/src/extensions/experimental/number-format.cc +374 -0
- data/lib/libv8/v8/src/extensions/experimental/number-format.h +71 -0
- data/lib/libv8/v8/src/factory.cc +89 -18
- data/lib/libv8/v8/src/factory.h +36 -8
- data/lib/libv8/v8/src/flag-definitions.h +11 -44
- data/lib/libv8/v8/src/frames-inl.h +8 -1
- data/lib/libv8/v8/src/frames.cc +39 -3
- data/lib/libv8/v8/src/frames.h +10 -3
- data/lib/libv8/v8/src/full-codegen.cc +311 -293
- data/lib/libv8/v8/src/full-codegen.h +183 -143
- data/lib/libv8/v8/src/func-name-inferrer.cc +29 -15
- data/lib/libv8/v8/src/func-name-inferrer.h +19 -9
- data/lib/libv8/v8/src/gdb-jit.cc +658 -55
- data/lib/libv8/v8/src/gdb-jit.h +6 -2
- data/lib/libv8/v8/src/global-handles.cc +368 -312
- data/lib/libv8/v8/src/global-handles.h +29 -36
- data/lib/libv8/v8/src/globals.h +3 -1
- data/lib/libv8/v8/src/handles.cc +43 -69
- data/lib/libv8/v8/src/handles.h +21 -16
- data/lib/libv8/v8/src/heap-inl.h +11 -13
- data/lib/libv8/v8/src/heap-profiler.cc +0 -999
- data/lib/libv8/v8/src/heap-profiler.h +0 -303
- data/lib/libv8/v8/src/heap.cc +366 -141
- data/lib/libv8/v8/src/heap.h +87 -26
- data/lib/libv8/v8/src/hydrogen-instructions.cc +192 -81
- data/lib/libv8/v8/src/hydrogen-instructions.h +711 -482
- data/lib/libv8/v8/src/hydrogen.cc +1146 -629
- data/lib/libv8/v8/src/hydrogen.h +100 -64
- data/lib/libv8/v8/src/ia32/assembler-ia32.cc +19 -0
- data/lib/libv8/v8/src/ia32/assembler-ia32.h +15 -2
- data/lib/libv8/v8/src/ia32/builtins-ia32.cc +34 -39
- data/lib/libv8/v8/src/ia32/code-stubs-ia32.cc +675 -377
- data/lib/libv8/v8/src/ia32/code-stubs-ia32.h +8 -69
- data/lib/libv8/v8/src/ia32/codegen-ia32.cc +1 -0
- data/lib/libv8/v8/src/ia32/codegen-ia32.h +0 -2
- data/lib/libv8/v8/src/ia32/cpu-ia32.cc +3 -2
- data/lib/libv8/v8/src/ia32/deoptimizer-ia32.cc +28 -3
- data/lib/libv8/v8/src/ia32/disasm-ia32.cc +21 -10
- data/lib/libv8/v8/src/ia32/frames-ia32.h +6 -5
- data/lib/libv8/v8/src/ia32/full-codegen-ia32.cc +459 -465
- data/lib/libv8/v8/src/ia32/ic-ia32.cc +196 -147
- data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.cc +575 -650
- data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.h +19 -21
- data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.cc +7 -2
- data/lib/libv8/v8/src/ia32/lithium-ia32.cc +261 -256
- data/lib/libv8/v8/src/ia32/lithium-ia32.h +234 -335
- data/lib/libv8/v8/src/ia32/macro-assembler-ia32.cc +224 -67
- data/lib/libv8/v8/src/ia32/macro-assembler-ia32.h +63 -19
- data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.cc +22 -8
- data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.h +3 -0
- data/lib/libv8/v8/src/ia32/stub-cache-ia32.cc +380 -239
- data/lib/libv8/v8/src/ic.cc +198 -234
- data/lib/libv8/v8/src/ic.h +32 -30
- data/lib/libv8/v8/src/interpreter-irregexp.cc +6 -4
- data/lib/libv8/v8/src/isolate.cc +112 -95
- data/lib/libv8/v8/src/isolate.h +55 -71
- data/lib/libv8/v8/src/json-parser.h +486 -48
- data/lib/libv8/v8/src/json.js +28 -23
- data/lib/libv8/v8/src/jsregexp.cc +163 -208
- data/lib/libv8/v8/src/jsregexp.h +0 -1
- data/lib/libv8/v8/src/lithium-allocator-inl.h +29 -27
- data/lib/libv8/v8/src/lithium-allocator.cc +22 -17
- data/lib/libv8/v8/src/lithium-allocator.h +8 -8
- data/lib/libv8/v8/src/lithium.cc +16 -11
- data/lib/libv8/v8/src/lithium.h +31 -34
- data/lib/libv8/v8/src/liveedit.cc +111 -15
- data/lib/libv8/v8/src/liveedit.h +3 -4
- data/lib/libv8/v8/src/liveobjectlist.cc +116 -80
- data/lib/libv8/v8/src/liveobjectlist.h +2 -2
- data/lib/libv8/v8/src/log-inl.h +0 -4
- data/lib/libv8/v8/src/log-utils.cc +25 -143
- data/lib/libv8/v8/src/log-utils.h +13 -92
- data/lib/libv8/v8/src/log.cc +26 -249
- data/lib/libv8/v8/src/log.h +6 -17
- data/lib/libv8/v8/src/macros.py +9 -6
- data/lib/libv8/v8/src/mark-compact.cc +276 -56
- data/lib/libv8/v8/src/mark-compact.h +20 -0
- data/lib/libv8/v8/src/messages.js +93 -39
- data/lib/libv8/v8/src/mips/assembler-mips-inl.h +9 -3
- data/lib/libv8/v8/src/mips/assembler-mips.cc +297 -189
- data/lib/libv8/v8/src/mips/assembler-mips.h +121 -54
- data/lib/libv8/v8/src/mips/builtins-mips.cc +23 -24
- data/lib/libv8/v8/src/mips/code-stubs-mips.cc +484 -263
- data/lib/libv8/v8/src/mips/code-stubs-mips.h +8 -83
- data/lib/libv8/v8/src/mips/codegen-mips.h +0 -2
- data/lib/libv8/v8/src/mips/constants-mips.h +37 -11
- data/lib/libv8/v8/src/mips/deoptimizer-mips.cc +6 -1
- data/lib/libv8/v8/src/mips/frames-mips.h +8 -7
- data/lib/libv8/v8/src/mips/full-codegen-mips.cc +258 -419
- data/lib/libv8/v8/src/mips/ic-mips.cc +181 -121
- data/lib/libv8/v8/src/mips/macro-assembler-mips.cc +640 -382
- data/lib/libv8/v8/src/mips/macro-assembler-mips.h +94 -89
- data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.cc +23 -10
- data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.h +6 -1
- data/lib/libv8/v8/src/mips/simulator-mips.cc +249 -49
- data/lib/libv8/v8/src/mips/simulator-mips.h +25 -1
- data/lib/libv8/v8/src/mips/stub-cache-mips.cc +373 -161
- data/lib/libv8/v8/src/mirror-debugger.js +55 -8
- data/lib/libv8/v8/src/misc-intrinsics.h +89 -0
- data/lib/libv8/v8/src/mksnapshot.cc +36 -4
- data/lib/libv8/v8/src/natives.h +5 -2
- data/lib/libv8/v8/src/objects-debug.cc +73 -6
- data/lib/libv8/v8/src/objects-inl.h +529 -164
- data/lib/libv8/v8/src/objects-printer.cc +67 -12
- data/lib/libv8/v8/src/objects-visiting.cc +13 -2
- data/lib/libv8/v8/src/objects-visiting.h +41 -1
- data/lib/libv8/v8/src/objects.cc +2200 -1177
- data/lib/libv8/v8/src/objects.h +912 -283
- data/lib/libv8/v8/src/parser.cc +566 -371
- data/lib/libv8/v8/src/parser.h +35 -33
- data/lib/libv8/v8/src/platform-cygwin.cc +10 -25
- data/lib/libv8/v8/src/platform-freebsd.cc +4 -29
- data/lib/libv8/v8/src/platform-linux.cc +60 -57
- data/lib/libv8/v8/src/platform-macos.cc +4 -27
- data/lib/libv8/v8/src/platform-nullos.cc +3 -16
- data/lib/libv8/v8/src/platform-openbsd.cc +247 -85
- data/lib/libv8/v8/src/platform-posix.cc +43 -1
- data/lib/libv8/v8/src/platform-solaris.cc +151 -112
- data/lib/libv8/v8/src/platform-tls.h +1 -1
- data/lib/libv8/v8/src/platform-win32.cc +65 -39
- data/lib/libv8/v8/src/platform.h +17 -14
- data/lib/libv8/v8/src/preparse-data-format.h +2 -2
- data/lib/libv8/v8/src/preparse-data.h +8 -2
- data/lib/libv8/v8/src/preparser-api.cc +2 -18
- data/lib/libv8/v8/src/preparser.cc +106 -65
- data/lib/libv8/v8/src/preparser.h +26 -5
- data/lib/libv8/v8/src/prettyprinter.cc +25 -43
- data/lib/libv8/v8/src/profile-generator-inl.h +0 -4
- data/lib/libv8/v8/src/profile-generator.cc +213 -34
- data/lib/libv8/v8/src/profile-generator.h +9 -9
- data/lib/libv8/v8/src/property.h +1 -0
- data/lib/libv8/v8/src/proxy.js +74 -4
- data/lib/libv8/v8/src/regexp-macro-assembler.cc +10 -6
- data/lib/libv8/v8/src/regexp.js +16 -11
- data/lib/libv8/v8/src/rewriter.cc +24 -133
- data/lib/libv8/v8/src/runtime-profiler.cc +27 -151
- data/lib/libv8/v8/src/runtime-profiler.h +5 -31
- data/lib/libv8/v8/src/runtime.cc +1450 -681
- data/lib/libv8/v8/src/runtime.h +47 -31
- data/lib/libv8/v8/src/runtime.js +2 -1
- data/lib/libv8/v8/src/scanner-base.cc +358 -220
- data/lib/libv8/v8/src/scanner-base.h +30 -138
- data/lib/libv8/v8/src/scanner.cc +0 -18
- data/lib/libv8/v8/src/scanner.h +0 -15
- data/lib/libv8/v8/src/scopeinfo.cc +3 -1
- data/lib/libv8/v8/src/scopeinfo.h +1 -6
- data/lib/libv8/v8/src/scopes.cc +243 -253
- data/lib/libv8/v8/src/scopes.h +58 -109
- data/lib/libv8/v8/src/serialize.cc +12 -54
- data/lib/libv8/v8/src/serialize.h +47 -0
- data/lib/libv8/v8/src/small-pointer-list.h +25 -0
- data/lib/libv8/v8/src/spaces-inl.h +4 -50
- data/lib/libv8/v8/src/spaces.cc +64 -131
- data/lib/libv8/v8/src/spaces.h +19 -70
- data/lib/libv8/v8/src/string-stream.cc +3 -1
- data/lib/libv8/v8/src/string.js +10 -6
- data/lib/libv8/v8/src/strtod.cc +7 -3
- data/lib/libv8/v8/src/stub-cache.cc +59 -129
- data/lib/libv8/v8/src/stub-cache.h +42 -54
- data/lib/libv8/v8/src/third_party/valgrind/valgrind.h +1447 -1339
- data/lib/libv8/v8/src/token.cc +4 -4
- data/lib/libv8/v8/src/token.h +6 -5
- data/lib/libv8/v8/src/type-info.cc +173 -129
- data/lib/libv8/v8/src/type-info.h +40 -22
- data/lib/libv8/v8/src/utils.cc +25 -304
- data/lib/libv8/v8/src/utils.h +118 -3
- data/lib/libv8/v8/src/v8-counters.h +3 -6
- data/lib/libv8/v8/src/v8.cc +34 -27
- data/lib/libv8/v8/src/v8.h +7 -7
- data/lib/libv8/v8/src/v8conversions.cc +129 -0
- data/lib/libv8/v8/src/v8conversions.h +60 -0
- data/lib/libv8/v8/src/v8globals.h +15 -6
- data/lib/libv8/v8/src/v8natives.js +300 -78
- data/lib/libv8/v8/src/v8threads.cc +14 -6
- data/lib/libv8/v8/src/v8threads.h +4 -1
- data/lib/libv8/v8/src/v8utils.cc +360 -0
- data/lib/libv8/v8/src/v8utils.h +17 -66
- data/lib/libv8/v8/src/variables.cc +7 -12
- data/lib/libv8/v8/src/variables.h +12 -10
- data/lib/libv8/v8/src/version.cc +2 -2
- data/lib/libv8/v8/src/vm-state-inl.h +0 -41
- data/lib/libv8/v8/src/vm-state.h +0 -11
- data/lib/libv8/v8/src/weakmap.js +103 -0
- data/lib/libv8/v8/src/x64/assembler-x64.h +6 -3
- data/lib/libv8/v8/src/x64/builtins-x64.cc +25 -22
- data/lib/libv8/v8/src/x64/code-stubs-x64.cc +523 -250
- data/lib/libv8/v8/src/x64/code-stubs-x64.h +8 -71
- data/lib/libv8/v8/src/x64/codegen-x64.cc +1 -0
- data/lib/libv8/v8/src/x64/codegen-x64.h +0 -2
- data/lib/libv8/v8/src/x64/cpu-x64.cc +2 -1
- data/lib/libv8/v8/src/x64/deoptimizer-x64.cc +40 -8
- data/lib/libv8/v8/src/x64/disasm-x64.cc +12 -10
- data/lib/libv8/v8/src/x64/frames-x64.h +7 -6
- data/lib/libv8/v8/src/x64/full-codegen-x64.cc +310 -415
- data/lib/libv8/v8/src/x64/ic-x64.cc +180 -117
- data/lib/libv8/v8/src/x64/lithium-codegen-x64.cc +411 -523
- data/lib/libv8/v8/src/x64/lithium-codegen-x64.h +11 -6
- data/lib/libv8/v8/src/x64/lithium-x64.cc +191 -216
- data/lib/libv8/v8/src/x64/lithium-x64.h +112 -263
- data/lib/libv8/v8/src/x64/macro-assembler-x64.cc +177 -61
- data/lib/libv8/v8/src/x64/macro-assembler-x64.h +23 -7
- data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.cc +21 -9
- data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.h +6 -0
- data/lib/libv8/v8/src/x64/stub-cache-x64.cc +273 -107
- data/lib/libv8/v8/src/zone.cc +31 -22
- data/lib/libv8/v8/src/zone.h +12 -6
- data/lib/libv8/v8/tools/codemap.js +8 -0
- data/lib/libv8/v8/tools/gcmole/Makefile +43 -0
- data/lib/libv8/v8/tools/gcmole/gcmole.lua +0 -2
- data/lib/libv8/v8/tools/gdb-v8-support.py +154 -0
- data/lib/libv8/v8/tools/grokdump.py +44 -35
- data/lib/libv8/v8/tools/gyp/v8.gyp +94 -248
- data/lib/libv8/v8/tools/js2c.py +83 -52
- data/lib/libv8/v8/tools/linux-tick-processor +4 -6
- data/lib/libv8/v8/tools/ll_prof.py +3 -3
- data/lib/libv8/v8/tools/oom_dump/README +3 -1
- data/lib/libv8/v8/tools/presubmit.py +11 -4
- data/lib/libv8/v8/tools/profile.js +46 -2
- data/lib/libv8/v8/tools/splaytree.js +11 -0
- data/lib/libv8/v8/tools/stats-viewer.py +15 -11
- data/lib/libv8/v8/tools/test-wrapper-gypbuild.py +227 -0
- data/lib/libv8/v8/tools/test.py +28 -8
- data/lib/libv8/v8/tools/tickprocessor.js +0 -16
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +2 -2
- metadata +31 -19
- data/lib/libv8/scons/engine/SCons/Tool/f03.py +0 -63
- data/lib/libv8/v8/src/json-parser.cc +0 -504
data/lib/libv8/v8/src/codegen.cc
CHANGED
|
@@ -169,9 +169,6 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
|
|
|
169
169
|
#endif // ENABLE_DISASSEMBLER
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
#ifdef ENABLE_LOGGING_AND_PROFILING
|
|
173
|
-
|
|
174
|
-
static Vector<const char> kRegexp = CStrVector("regexp");
|
|
175
172
|
|
|
176
173
|
bool CodeGenerator::ShouldGenerateLog(Expression* type) {
|
|
177
174
|
ASSERT(type != NULL);
|
|
@@ -181,14 +178,12 @@ bool CodeGenerator::ShouldGenerateLog(Expression* type) {
|
|
|
181
178
|
}
|
|
182
179
|
Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
|
|
183
180
|
if (FLAG_log_regexp) {
|
|
184
|
-
if (name->IsEqualTo(
|
|
181
|
+
if (name->IsEqualTo(CStrVector("regexp")))
|
|
185
182
|
return true;
|
|
186
183
|
}
|
|
187
184
|
return false;
|
|
188
185
|
}
|
|
189
186
|
|
|
190
|
-
#endif
|
|
191
|
-
|
|
192
187
|
|
|
193
188
|
bool CodeGenerator::RecordPositions(MacroAssembler* masm,
|
|
194
189
|
int pos,
|
|
@@ -209,9 +204,14 @@ void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
|
|
|
209
204
|
case READ_ELEMENT:
|
|
210
205
|
GenerateReadElement(masm);
|
|
211
206
|
break;
|
|
212
|
-
case
|
|
207
|
+
case NEW_NON_STRICT_FAST:
|
|
208
|
+
GenerateNewNonStrictFast(masm);
|
|
209
|
+
break;
|
|
210
|
+
case NEW_NON_STRICT_SLOW:
|
|
211
|
+
GenerateNewNonStrictSlow(masm);
|
|
212
|
+
break;
|
|
213
213
|
case NEW_STRICT:
|
|
214
|
-
|
|
214
|
+
GenerateNewStrict(masm);
|
|
215
215
|
break;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -52,8 +52,7 @@ CompilationCache::CompilationCache(Isolate* isolate)
|
|
|
52
52
|
eval_global_(isolate, kEvalGlobalGenerations),
|
|
53
53
|
eval_contextual_(isolate, kEvalContextualGenerations),
|
|
54
54
|
reg_exp_(isolate, kRegExpGenerations),
|
|
55
|
-
enabled_(true)
|
|
56
|
-
eager_optimizing_set_(NULL) {
|
|
55
|
+
enabled_(true) {
|
|
57
56
|
CompilationSubCache* subcaches[kSubCacheCount] =
|
|
58
57
|
{&script_, &eval_global_, &eval_contextual_, ®_exp_};
|
|
59
58
|
for (int i = 0; i < kSubCacheCount; ++i) {
|
|
@@ -62,10 +61,7 @@ CompilationCache::CompilationCache(Isolate* isolate)
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
|
|
65
|
-
CompilationCache::~CompilationCache() {
|
|
66
|
-
delete eager_optimizing_set_;
|
|
67
|
-
eager_optimizing_set_ = NULL;
|
|
68
|
-
}
|
|
64
|
+
CompilationCache::~CompilationCache() {}
|
|
69
65
|
|
|
70
66
|
|
|
71
67
|
static Handle<CompilationCacheTable> AllocateTable(Isolate* isolate, int size) {
|
|
@@ -457,47 +453,6 @@ void CompilationCache::PutRegExp(Handle<String> source,
|
|
|
457
453
|
}
|
|
458
454
|
|
|
459
455
|
|
|
460
|
-
static bool SourceHashCompare(void* key1, void* key2) {
|
|
461
|
-
return key1 == key2;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
HashMap* CompilationCache::EagerOptimizingSet() {
|
|
466
|
-
if (eager_optimizing_set_ == NULL) {
|
|
467
|
-
eager_optimizing_set_ = new HashMap(&SourceHashCompare);
|
|
468
|
-
}
|
|
469
|
-
return eager_optimizing_set_;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
bool CompilationCache::ShouldOptimizeEagerly(Handle<JSFunction> function) {
|
|
474
|
-
if (FLAG_opt_eagerly) return true;
|
|
475
|
-
uint32_t hash = function->SourceHash();
|
|
476
|
-
void* key = reinterpret_cast<void*>(hash);
|
|
477
|
-
return EagerOptimizingSet()->Lookup(key, hash, false) != NULL;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
void CompilationCache::MarkForEagerOptimizing(Handle<JSFunction> function) {
|
|
482
|
-
uint32_t hash = function->SourceHash();
|
|
483
|
-
void* key = reinterpret_cast<void*>(hash);
|
|
484
|
-
EagerOptimizingSet()->Lookup(key, hash, true);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
void CompilationCache::MarkForLazyOptimizing(Handle<JSFunction> function) {
|
|
489
|
-
uint32_t hash = function->SourceHash();
|
|
490
|
-
void* key = reinterpret_cast<void*>(hash);
|
|
491
|
-
EagerOptimizingSet()->Remove(key, hash);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
void CompilationCache::ResetEagerOptimizingData() {
|
|
496
|
-
HashMap* set = EagerOptimizingSet();
|
|
497
|
-
if (set->occupancy() > 0) set->Clear();
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
|
|
501
456
|
void CompilationCache::Clear() {
|
|
502
457
|
for (int i = 0; i < kSubCacheCount; i++) {
|
|
503
458
|
subcaches_[i]->Clear();
|
|
@@ -223,14 +223,6 @@ class CompilationCache {
|
|
|
223
223
|
JSRegExp::Flags flags,
|
|
224
224
|
Handle<FixedArray> data);
|
|
225
225
|
|
|
226
|
-
// Support for eager optimization tracking.
|
|
227
|
-
bool ShouldOptimizeEagerly(Handle<JSFunction> function);
|
|
228
|
-
void MarkForEagerOptimizing(Handle<JSFunction> function);
|
|
229
|
-
void MarkForLazyOptimizing(Handle<JSFunction> function);
|
|
230
|
-
|
|
231
|
-
// Reset the eager optimization tracking data.
|
|
232
|
-
void ResetEagerOptimizingData();
|
|
233
|
-
|
|
234
226
|
// Clear the cache - also used to initialize the cache at startup.
|
|
235
227
|
void Clear();
|
|
236
228
|
|
|
@@ -274,8 +266,6 @@ class CompilationCache {
|
|
|
274
266
|
// Current enable state of the compilation cache.
|
|
275
267
|
bool enabled_;
|
|
276
268
|
|
|
277
|
-
HashMap* eager_optimizing_set_;
|
|
278
|
-
|
|
279
269
|
friend class Isolate;
|
|
280
270
|
|
|
281
271
|
DISALLOW_COPY_AND_ASSIGN(CompilationCache);
|
|
@@ -109,8 +109,6 @@ void CompilationInfo::DisableOptimization() {
|
|
|
109
109
|
void CompilationInfo::AbortOptimization() {
|
|
110
110
|
Handle<Code> code(shared_info()->code());
|
|
111
111
|
SetCode(code);
|
|
112
|
-
Isolate* isolate = code->GetIsolate();
|
|
113
|
-
isolate->compilation_cache()->MarkForLazyOptimizing(closure());
|
|
114
112
|
}
|
|
115
113
|
|
|
116
114
|
|
|
@@ -213,10 +211,12 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
|
|
|
213
211
|
//
|
|
214
212
|
// The encoding is as a signed value, with parameters and receiver using
|
|
215
213
|
// the negative indices and locals the non-negative ones.
|
|
216
|
-
const int
|
|
214
|
+
const int parameter_limit = -LUnallocated::kMinFixedIndex;
|
|
215
|
+
const int locals_limit = LUnallocated::kMaxFixedIndex;
|
|
217
216
|
Scope* scope = info->scope();
|
|
218
|
-
if ((scope->num_parameters() + 1) >
|
|
219
|
-
|
|
217
|
+
if ((scope->num_parameters() + 1) > parameter_limit ||
|
|
218
|
+
(info->osr_ast_id() != AstNode::kNoNumber &&
|
|
219
|
+
scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) {
|
|
220
220
|
info->AbortOptimization();
|
|
221
221
|
Handle<JSFunction> closure = info->closure();
|
|
222
222
|
info->shared_info()->DisableOptimization(*closure);
|
|
@@ -338,7 +338,7 @@ bool Compiler::MakeCodeForLiveEdit(CompilationInfo* info) {
|
|
|
338
338
|
|
|
339
339
|
static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
|
|
340
340
|
Isolate* isolate = info->isolate();
|
|
341
|
-
|
|
341
|
+
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
|
342
342
|
PostponeInterruptsScope postpone(isolate);
|
|
343
343
|
|
|
344
344
|
ASSERT(!isolate->global_context().is_null());
|
|
@@ -411,7 +411,8 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
|
|
|
411
411
|
String::cast(script->name())));
|
|
412
412
|
GDBJIT(AddCode(Handle<String>(String::cast(script->name())),
|
|
413
413
|
script,
|
|
414
|
-
info->code()
|
|
414
|
+
info->code(),
|
|
415
|
+
info));
|
|
415
416
|
} else {
|
|
416
417
|
PROFILE(isolate, CodeCreateEvent(
|
|
417
418
|
info->is_eval()
|
|
@@ -420,7 +421,7 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
|
|
|
420
421
|
*info->code(),
|
|
421
422
|
*result,
|
|
422
423
|
isolate->heap()->empty_string()));
|
|
423
|
-
GDBJIT(AddCode(Handle<String>(), script, info->code()));
|
|
424
|
+
GDBJIT(AddCode(Handle<String>(), script, info->code(), info));
|
|
424
425
|
}
|
|
425
426
|
|
|
426
427
|
// Hint to the runtime system used when allocating space for initial
|
|
@@ -477,15 +478,21 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
|
|
|
477
478
|
// that would be compiled lazily anyway, so we skip the preparse step
|
|
478
479
|
// in that case too.
|
|
479
480
|
ScriptDataImpl* pre_data = input_pre_data;
|
|
481
|
+
bool harmony_block_scoping = natives != NATIVES_CODE &&
|
|
482
|
+
FLAG_harmony_block_scoping;
|
|
480
483
|
if (pre_data == NULL
|
|
481
484
|
&& source_length >= FLAG_min_preparse_length) {
|
|
482
485
|
if (source->IsExternalTwoByteString()) {
|
|
483
486
|
ExternalTwoByteStringUC16CharacterStream stream(
|
|
484
487
|
Handle<ExternalTwoByteString>::cast(source), 0, source->length());
|
|
485
|
-
pre_data = ParserApi::PartialPreParse(&stream,
|
|
488
|
+
pre_data = ParserApi::PartialPreParse(&stream,
|
|
489
|
+
extension,
|
|
490
|
+
harmony_block_scoping);
|
|
486
491
|
} else {
|
|
487
492
|
GenericStringUC16CharacterStream stream(source, 0, source->length());
|
|
488
|
-
pre_data = ParserApi::PartialPreParse(&stream,
|
|
493
|
+
pre_data = ParserApi::PartialPreParse(&stream,
|
|
494
|
+
extension,
|
|
495
|
+
harmony_block_scoping);
|
|
489
496
|
}
|
|
490
497
|
}
|
|
491
498
|
|
|
@@ -508,7 +515,9 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
|
|
|
508
515
|
info.MarkAsGlobal();
|
|
509
516
|
info.SetExtension(extension);
|
|
510
517
|
info.SetPreParseData(pre_data);
|
|
511
|
-
if (natives == NATIVES_CODE)
|
|
518
|
+
if (natives == NATIVES_CODE) {
|
|
519
|
+
info.MarkAsAllowingNativesSyntax();
|
|
520
|
+
}
|
|
512
521
|
result = MakeFunctionInfo(&info);
|
|
513
522
|
if (extension == NULL && !result.is_null()) {
|
|
514
523
|
compilation_cache->PutScript(source, result);
|
|
@@ -572,7 +581,7 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
|
|
|
572
581
|
bool Compiler::CompileLazy(CompilationInfo* info) {
|
|
573
582
|
Isolate* isolate = info->isolate();
|
|
574
583
|
|
|
575
|
-
|
|
584
|
+
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
|
576
585
|
|
|
577
586
|
// The VM is in the COMPILER state until exiting this function.
|
|
578
587
|
VMState state(isolate, COMPILER);
|
|
@@ -613,6 +622,7 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
|
|
|
613
622
|
RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared);
|
|
614
623
|
|
|
615
624
|
if (info->IsOptimizing()) {
|
|
625
|
+
ASSERT(shared->scope_info() != SerializedScopeInfo::Empty());
|
|
616
626
|
function->ReplaceCode(*code);
|
|
617
627
|
} else {
|
|
618
628
|
// Update the shared function info with the compiled code and the
|
|
@@ -654,9 +664,6 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
|
|
|
654
664
|
CompilationInfo optimized(function);
|
|
655
665
|
optimized.SetOptimizing(AstNode::kNoNumber);
|
|
656
666
|
return CompileLazy(&optimized);
|
|
657
|
-
} else if (isolate->compilation_cache()->ShouldOptimizeEagerly(
|
|
658
|
-
function)) {
|
|
659
|
-
isolate->runtime_profiler()->OptimizeSoon(*function);
|
|
660
667
|
}
|
|
661
668
|
}
|
|
662
669
|
}
|
|
@@ -735,6 +742,7 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
|
|
|
735
742
|
function_info->set_start_position(lit->start_position());
|
|
736
743
|
function_info->set_end_position(lit->end_position());
|
|
737
744
|
function_info->set_is_expression(lit->is_expression());
|
|
745
|
+
function_info->set_is_anonymous(lit->is_anonymous());
|
|
738
746
|
function_info->set_is_toplevel(is_toplevel);
|
|
739
747
|
function_info->set_inferred_name(*lit->inferred_name());
|
|
740
748
|
function_info->SetThisPropertyAssignmentsInfo(
|
|
@@ -742,6 +750,8 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
|
|
|
742
750
|
*lit->this_property_assignments());
|
|
743
751
|
function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
|
|
744
752
|
function_info->set_strict_mode(lit->strict_mode());
|
|
753
|
+
function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
|
|
754
|
+
function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
|
|
745
755
|
}
|
|
746
756
|
|
|
747
757
|
|
|
@@ -780,7 +790,8 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
|
|
|
780
790
|
|
|
781
791
|
GDBJIT(AddCode(Handle<String>(shared->DebugName()),
|
|
782
792
|
Handle<Script>(info->script()),
|
|
783
|
-
Handle<Code>(info->code())
|
|
793
|
+
Handle<Code>(info->code()),
|
|
794
|
+
info));
|
|
784
795
|
}
|
|
785
796
|
|
|
786
797
|
} } // namespace v8::internal
|
data/lib/libv8/v8/src/compiler.h
CHANGED
|
@@ -89,6 +89,12 @@ class CompilationInfo BASE_EMBEDDED {
|
|
|
89
89
|
bool allows_natives_syntax() const {
|
|
90
90
|
return IsNativesSyntaxAllowed::decode(flags_);
|
|
91
91
|
}
|
|
92
|
+
void MarkAsNative() {
|
|
93
|
+
flags_ |= IsNative::encode(true);
|
|
94
|
+
}
|
|
95
|
+
bool is_native() const {
|
|
96
|
+
return IsNative::decode(flags_);
|
|
97
|
+
}
|
|
92
98
|
void SetFunction(FunctionLiteral* literal) {
|
|
93
99
|
ASSERT(function_ == NULL);
|
|
94
100
|
function_ = literal;
|
|
@@ -167,6 +173,10 @@ class CompilationInfo BASE_EMBEDDED {
|
|
|
167
173
|
|
|
168
174
|
void Initialize(Mode mode) {
|
|
169
175
|
mode_ = V8::UseCrankshaft() ? mode : NONOPT;
|
|
176
|
+
ASSERT(!script_.is_null());
|
|
177
|
+
if (script_->type()->value() == Script::TYPE_NATIVE) {
|
|
178
|
+
MarkAsNative();
|
|
179
|
+
}
|
|
170
180
|
if (!shared_info_.is_null() && shared_info_->strict_mode()) {
|
|
171
181
|
MarkAsStrictMode();
|
|
172
182
|
}
|
|
@@ -191,6 +201,9 @@ class CompilationInfo BASE_EMBEDDED {
|
|
|
191
201
|
class IsStrictMode: public BitField<bool, 4, 1> {};
|
|
192
202
|
// Native syntax (%-stuff) allowed?
|
|
193
203
|
class IsNativesSyntaxAllowed: public BitField<bool, 5, 1> {};
|
|
204
|
+
// Is this a function from our natives.
|
|
205
|
+
class IsNative: public BitField<bool, 6, 1> {};
|
|
206
|
+
|
|
194
207
|
|
|
195
208
|
unsigned flags_;
|
|
196
209
|
|
|
@@ -289,24 +302,6 @@ class Compiler : public AllStatic {
|
|
|
289
302
|
};
|
|
290
303
|
|
|
291
304
|
|
|
292
|
-
// During compilation we need a global list of handles to constants
|
|
293
|
-
// for frame elements. When the zone gets deleted, we make sure to
|
|
294
|
-
// clear this list of handles as well.
|
|
295
|
-
class CompilationZoneScope : public ZoneScope {
|
|
296
|
-
public:
|
|
297
|
-
CompilationZoneScope(Isolate* isolate, ZoneScopeMode mode)
|
|
298
|
-
: ZoneScope(isolate, mode) {}
|
|
299
|
-
|
|
300
|
-
virtual ~CompilationZoneScope() {
|
|
301
|
-
if (ShouldDeleteOnExit()) {
|
|
302
|
-
Isolate* isolate = Isolate::Current();
|
|
303
|
-
isolate->frame_element_constant_list()->Clear();
|
|
304
|
-
isolate->result_constant_list()->Clear();
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
|
|
310
305
|
} } // namespace v8::internal
|
|
311
306
|
|
|
312
307
|
#endif // V8_COMPILER_H_
|
|
@@ -34,6 +34,16 @@
|
|
|
34
34
|
namespace v8 {
|
|
35
35
|
namespace internal {
|
|
36
36
|
|
|
37
|
+
Context* Context::declaration_context() {
|
|
38
|
+
Context* current = this;
|
|
39
|
+
while (!current->IsFunctionContext() && !current->IsGlobalContext()) {
|
|
40
|
+
current = current->previous();
|
|
41
|
+
ASSERT(current->closure() == closure());
|
|
42
|
+
}
|
|
43
|
+
return current;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
37
47
|
JSBuiltinsObject* Context::builtins() {
|
|
38
48
|
GlobalObject* object = global();
|
|
39
49
|
if (object->IsJSGlobalObject()) {
|
|
@@ -74,14 +84,18 @@ void Context::set_global_proxy(JSObject* object) {
|
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
|
|
77
|
-
Handle<Object> Context::Lookup(Handle<String> name,
|
|
78
|
-
|
|
87
|
+
Handle<Object> Context::Lookup(Handle<String> name,
|
|
88
|
+
ContextLookupFlags flags,
|
|
89
|
+
int* index_,
|
|
90
|
+
PropertyAttributes* attributes,
|
|
91
|
+
BindingFlags* binding_flags) {
|
|
79
92
|
Isolate* isolate = GetIsolate();
|
|
80
93
|
Handle<Context> context(this, isolate);
|
|
81
94
|
|
|
82
95
|
bool follow_context_chain = (flags & FOLLOW_CONTEXT_CHAIN) != 0;
|
|
83
96
|
*index_ = -1;
|
|
84
97
|
*attributes = ABSENT;
|
|
98
|
+
*binding_flags = MISSING_BINDING;
|
|
85
99
|
|
|
86
100
|
if (FLAG_trace_contexts) {
|
|
87
101
|
PrintF("Context::Lookup(");
|
|
@@ -96,40 +110,65 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
|
|
|
96
110
|
PrintF("\n");
|
|
97
111
|
}
|
|
98
112
|
|
|
99
|
-
//
|
|
100
|
-
if (context->has_extension()) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
// Check extension/with/global object.
|
|
114
|
+
if (!context->IsBlockContext() && context->has_extension()) {
|
|
115
|
+
if (context->IsCatchContext()) {
|
|
116
|
+
// Catch contexts have the variable name in the extension slot.
|
|
117
|
+
if (name->Equals(String::cast(context->extension()))) {
|
|
118
|
+
if (FLAG_trace_contexts) {
|
|
119
|
+
PrintF("=> found in catch context\n");
|
|
120
|
+
}
|
|
121
|
+
*index_ = Context::THROWN_OBJECT_INDEX;
|
|
122
|
+
*attributes = NONE;
|
|
123
|
+
*binding_flags = MUTABLE_IS_INITIALIZED;
|
|
124
|
+
return context;
|
|
125
|
+
}
|
|
109
126
|
} else {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
127
|
+
ASSERT(context->IsGlobalContext() ||
|
|
128
|
+
context->IsFunctionContext() ||
|
|
129
|
+
context->IsWithContext());
|
|
130
|
+
// Global, function, and with contexts may have an object in the
|
|
131
|
+
// extension slot.
|
|
132
|
+
Handle<JSObject> extension(JSObject::cast(context->extension()),
|
|
133
|
+
isolate);
|
|
134
|
+
// Context extension objects needs to behave as if they have no
|
|
135
|
+
// prototype. So even if we want to follow prototype chains, we
|
|
136
|
+
// need to only do a local lookup for context extension objects.
|
|
137
|
+
if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0 ||
|
|
138
|
+
extension->IsJSContextExtensionObject()) {
|
|
139
|
+
*attributes = extension->GetLocalPropertyAttribute(*name);
|
|
140
|
+
} else {
|
|
141
|
+
*attributes = extension->GetPropertyAttribute(*name);
|
|
142
|
+
}
|
|
143
|
+
if (*attributes != ABSENT) {
|
|
144
|
+
// property found
|
|
145
|
+
if (FLAG_trace_contexts) {
|
|
146
|
+
PrintF("=> found property in context object %p\n",
|
|
147
|
+
reinterpret_cast<void*>(*extension));
|
|
148
|
+
}
|
|
149
|
+
return extension;
|
|
117
150
|
}
|
|
118
|
-
return extension;
|
|
119
151
|
}
|
|
120
152
|
}
|
|
121
153
|
|
|
122
|
-
|
|
123
|
-
|
|
154
|
+
// Check serialized scope information of functions and blocks. Only
|
|
155
|
+
// functions can have parameters, and a function name.
|
|
156
|
+
if (context->IsFunctionContext() || context->IsBlockContext()) {
|
|
157
|
+
// We may have context-local slots. Check locals in the context.
|
|
158
|
+
Handle<SerializedScopeInfo> scope_info;
|
|
159
|
+
if (context->IsFunctionContext()) {
|
|
160
|
+
scope_info = Handle<SerializedScopeInfo>(
|
|
161
|
+
context->closure()->shared()->scope_info(), isolate);
|
|
162
|
+
} else {
|
|
163
|
+
ASSERT(context->IsBlockContext());
|
|
164
|
+
scope_info = Handle<SerializedScopeInfo>(
|
|
165
|
+
SerializedScopeInfo::cast(context->extension()), isolate);
|
|
166
|
+
}
|
|
124
167
|
|
|
125
|
-
// check non-parameter locals in context
|
|
126
|
-
Handle<SerializedScopeInfo> scope_info(
|
|
127
|
-
context->closure()->shared()->scope_info(), isolate);
|
|
128
168
|
Variable::Mode mode;
|
|
129
169
|
int index = scope_info->ContextSlotIndex(*name, &mode);
|
|
130
170
|
ASSERT(index < 0 || index >= MIN_CONTEXT_SLOTS);
|
|
131
171
|
if (index >= 0) {
|
|
132
|
-
// slot found
|
|
133
172
|
if (FLAG_trace_contexts) {
|
|
134
173
|
PrintF("=> found local in context slot %d (mode = %d)\n",
|
|
135
174
|
index, mode);
|
|
@@ -142,62 +181,54 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
|
|
|
142
181
|
// declared variables that were introduced through declaration nodes)
|
|
143
182
|
// must not appear here.
|
|
144
183
|
switch (mode) {
|
|
145
|
-
case Variable::INTERNAL: //
|
|
146
|
-
case Variable::VAR:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
case Variable::
|
|
151
|
-
|
|
184
|
+
case Variable::INTERNAL: // Fall through.
|
|
185
|
+
case Variable::VAR:
|
|
186
|
+
*attributes = NONE;
|
|
187
|
+
*binding_flags = MUTABLE_IS_INITIALIZED;
|
|
188
|
+
break;
|
|
189
|
+
case Variable::LET:
|
|
190
|
+
*attributes = NONE;
|
|
191
|
+
*binding_flags = MUTABLE_CHECK_INITIALIZED;
|
|
192
|
+
break;
|
|
193
|
+
case Variable::CONST:
|
|
194
|
+
*attributes = READ_ONLY;
|
|
195
|
+
*binding_flags = IMMUTABLE_CHECK_INITIALIZED;
|
|
196
|
+
break;
|
|
197
|
+
case Variable::DYNAMIC:
|
|
198
|
+
case Variable::DYNAMIC_GLOBAL:
|
|
199
|
+
case Variable::DYNAMIC_LOCAL:
|
|
200
|
+
case Variable::TEMPORARY:
|
|
201
|
+
UNREACHABLE();
|
|
202
|
+
break;
|
|
152
203
|
}
|
|
153
204
|
return context;
|
|
154
205
|
}
|
|
155
206
|
|
|
156
|
-
//
|
|
157
|
-
|
|
158
|
-
if (param_index >= 0) {
|
|
159
|
-
// slot found.
|
|
160
|
-
int index = scope_info->ContextSlotIndex(
|
|
161
|
-
isolate->heap()->arguments_shadow_symbol(), NULL);
|
|
162
|
-
ASSERT(index >= 0); // arguments must exist and be in the heap context
|
|
163
|
-
Handle<JSObject> arguments(JSObject::cast(context->get(index)),
|
|
164
|
-
isolate);
|
|
165
|
-
if (FLAG_trace_contexts) {
|
|
166
|
-
PrintF("=> found parameter %d in arguments object\n", param_index);
|
|
167
|
-
}
|
|
168
|
-
*index_ = param_index;
|
|
169
|
-
*attributes = NONE;
|
|
170
|
-
return arguments;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// check intermediate context (holding only the function name variable)
|
|
207
|
+
// Check the slot corresponding to the intermediate context holding
|
|
208
|
+
// only the function name variable.
|
|
174
209
|
if (follow_context_chain) {
|
|
175
210
|
int index = scope_info->FunctionContextSlotIndex(*name);
|
|
176
211
|
if (index >= 0) {
|
|
177
|
-
// slot found
|
|
178
212
|
if (FLAG_trace_contexts) {
|
|
179
213
|
PrintF("=> found intermediate function in context slot %d\n",
|
|
180
214
|
index);
|
|
181
215
|
}
|
|
182
216
|
*index_ = index;
|
|
183
217
|
*attributes = READ_ONLY;
|
|
218
|
+
*binding_flags = IMMUTABLE_IS_INITIALIZED;
|
|
184
219
|
return context;
|
|
185
220
|
}
|
|
186
221
|
}
|
|
187
222
|
}
|
|
188
223
|
|
|
189
|
-
//
|
|
224
|
+
// Proceed with the previous context.
|
|
190
225
|
if (context->IsGlobalContext()) {
|
|
191
226
|
follow_context_chain = false;
|
|
192
|
-
} else if (context->is_function_context()) {
|
|
193
|
-
context = Handle<Context>(Context::cast(context->closure()->context()),
|
|
194
|
-
isolate);
|
|
195
227
|
} else {
|
|
196
228
|
context = Handle<Context>(context->previous(), isolate);
|
|
197
229
|
}
|
|
198
230
|
} while (follow_context_chain);
|
|
199
231
|
|
|
200
|
-
// slot not found
|
|
201
232
|
if (FLAG_trace_contexts) {
|
|
202
233
|
PrintF("=> no property/slot found\n");
|
|
203
234
|
}
|
|
@@ -212,11 +243,12 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
|
|
|
212
243
|
// before the global context and check that there are no context
|
|
213
244
|
// extension objects (conservative check for with statements).
|
|
214
245
|
while (!context->IsGlobalContext()) {
|
|
215
|
-
// Check if the context is a
|
|
246
|
+
// Check if the context is a catch or with context, or has introduced
|
|
247
|
+
// bindings by calling non-strict eval.
|
|
216
248
|
if (context->has_extension()) return false;
|
|
217
249
|
|
|
218
250
|
// Not a with context so it must be a function context.
|
|
219
|
-
ASSERT(context->
|
|
251
|
+
ASSERT(context->IsFunctionContext());
|
|
220
252
|
|
|
221
253
|
// Check non-parameter locals.
|
|
222
254
|
Handle<SerializedScopeInfo> scope_info(
|
|
@@ -233,7 +265,7 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
|
|
|
233
265
|
// Check context only holding the function name variable.
|
|
234
266
|
index = scope_info->FunctionContextSlotIndex(*name);
|
|
235
267
|
if (index >= 0) return false;
|
|
236
|
-
context =
|
|
268
|
+
context = context->previous();
|
|
237
269
|
}
|
|
238
270
|
|
|
239
271
|
// No local or potential with statement found so the variable is
|
|
@@ -244,21 +276,24 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
|
|
|
244
276
|
|
|
245
277
|
void Context::ComputeEvalScopeInfo(bool* outer_scope_calls_eval,
|
|
246
278
|
bool* outer_scope_calls_non_strict_eval) {
|
|
279
|
+
// Skip up the context chain checking all the function contexts to see
|
|
280
|
+
// whether they call eval.
|
|
247
281
|
Context* context = this;
|
|
248
|
-
while (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
282
|
+
while (!context->IsGlobalContext()) {
|
|
283
|
+
if (context->IsFunctionContext()) {
|
|
284
|
+
Handle<SerializedScopeInfo> scope_info(
|
|
285
|
+
context->closure()->shared()->scope_info());
|
|
286
|
+
if (scope_info->CallsEval()) {
|
|
287
|
+
*outer_scope_calls_eval = true;
|
|
288
|
+
if (!scope_info->IsStrictMode()) {
|
|
289
|
+
// No need to go further since the answers will not change from
|
|
290
|
+
// here.
|
|
291
|
+
*outer_scope_calls_non_strict_eval = true;
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
258
294
|
}
|
|
259
295
|
}
|
|
260
|
-
|
|
261
|
-
context = Context::cast(context->closure()->context());
|
|
296
|
+
context = context->previous();
|
|
262
297
|
}
|
|
263
298
|
}
|
|
264
299
|
|