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
@@ -28,8 +28,6 @@
|
|
28
28
|
#ifndef V8_PROFILE_GENERATOR_H_
|
29
29
|
#define V8_PROFILE_GENERATOR_H_
|
30
30
|
|
31
|
-
#ifdef ENABLE_LOGGING_AND_PROFILING
|
32
|
-
|
33
31
|
#include "allocation.h"
|
34
32
|
#include "hashmap.h"
|
35
33
|
#include "../include/v8-profiler.h"
|
@@ -638,8 +636,7 @@ class HeapSnapshotsCollection;
|
|
638
636
|
class HeapSnapshot {
|
639
637
|
public:
|
640
638
|
enum Type {
|
641
|
-
kFull = v8::HeapSnapshot::kFull
|
642
|
-
kAggregated = v8::HeapSnapshot::kAggregated
|
639
|
+
kFull = v8::HeapSnapshot::kFull
|
643
640
|
};
|
644
641
|
|
645
642
|
HeapSnapshot(HeapSnapshotsCollection* collection,
|
@@ -859,6 +856,8 @@ class HeapObjectsSet {
|
|
859
856
|
void Clear();
|
860
857
|
bool Contains(Object* object);
|
861
858
|
void Insert(Object* obj);
|
859
|
+
const char* GetTag(Object* obj);
|
860
|
+
void SetTag(Object* obj, const char* tag);
|
862
861
|
|
863
862
|
private:
|
864
863
|
HashMap entries_;
|
@@ -920,6 +919,9 @@ class V8HeapExplorer : public HeapEntriesAllocator {
|
|
920
919
|
void AddRootEntries(SnapshotFillerInterface* filler);
|
921
920
|
int EstimateObjectsCount();
|
922
921
|
bool IterateAndExtractReferences(SnapshotFillerInterface* filler);
|
922
|
+
void TagGlobalObjects();
|
923
|
+
|
924
|
+
static String* GetConstructorName(JSObject* object);
|
923
925
|
|
924
926
|
static HeapObject* const kInternalRootObject;
|
925
927
|
|
@@ -971,13 +973,16 @@ class V8HeapExplorer : public HeapEntriesAllocator {
|
|
971
973
|
void SetRootShortcutReference(Object* child);
|
972
974
|
void SetRootGcRootsReference();
|
973
975
|
void SetGcRootsReference(Object* child);
|
976
|
+
void TagObject(Object* obj, const char* tag);
|
974
977
|
|
975
978
|
HeapEntry* GetEntry(Object* obj);
|
976
979
|
|
980
|
+
Heap* heap_;
|
977
981
|
HeapSnapshot* snapshot_;
|
978
982
|
HeapSnapshotsCollection* collection_;
|
979
983
|
SnapshottingProgressReportingInterface* progress_;
|
980
984
|
SnapshotFillerInterface* filler_;
|
985
|
+
HeapObjectsSet objects_tags_;
|
981
986
|
|
982
987
|
static HeapObject* const kGcRootsObject;
|
983
988
|
|
@@ -1116,11 +1121,6 @@ class HeapSnapshotJSONSerializer {
|
|
1116
1121
|
DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
|
1117
1122
|
};
|
1118
1123
|
|
1119
|
-
|
1120
|
-
String* GetConstructorNameForHeapProfile(JSObject* object);
|
1121
|
-
|
1122
1124
|
} } // namespace v8::internal
|
1123
1125
|
|
1124
|
-
#endif // ENABLE_LOGGING_AND_PROFILING
|
1125
|
-
|
1126
1126
|
#endif // V8_PROFILE_GENERATOR_H_
|
data/lib/libv8/v8/src/property.h
CHANGED
data/lib/libv8/v8/src/proxy.js
CHANGED
@@ -60,7 +60,9 @@ $Proxy.createFunction = function(handler, callTrap, constructTrap) {
|
|
60
60
|
}
|
61
61
|
|
62
62
|
$Proxy.create = function(handler, proto) {
|
63
|
-
if (!IS_SPEC_OBJECT(
|
63
|
+
if (!IS_SPEC_OBJECT(handler))
|
64
|
+
throw MakeTypeError("handler_non_object", ["create"])
|
65
|
+
if (!IS_SPEC_OBJECT(proto)) proto = null // Mozilla does this...
|
64
66
|
return %CreateJSProxy(handler, proto)
|
65
67
|
}
|
66
68
|
|
@@ -73,11 +75,79 @@ $Proxy.create = function(handler, proto) {
|
|
73
75
|
|
74
76
|
function DerivedGetTrap(receiver, name) {
|
75
77
|
var desc = this.getPropertyDescriptor(name)
|
76
|
-
if (IS_UNDEFINED(desc)) { return desc
|
78
|
+
if (IS_UNDEFINED(desc)) { return desc }
|
77
79
|
if ('value' in desc) {
|
78
80
|
return desc.value
|
79
81
|
} else {
|
80
|
-
if (IS_UNDEFINED(desc.get)) { return desc.get
|
81
|
-
|
82
|
+
if (IS_UNDEFINED(desc.get)) { return desc.get }
|
83
|
+
// The proposal says: desc.get.call(receiver)
|
84
|
+
return %_CallFunction(receiver, desc.get)
|
82
85
|
}
|
83
86
|
}
|
87
|
+
|
88
|
+
function DerivedSetTrap(receiver, name, val) {
|
89
|
+
var desc = this.getOwnPropertyDescriptor(name)
|
90
|
+
if (desc) {
|
91
|
+
if ('writable' in desc) {
|
92
|
+
if (desc.writable) {
|
93
|
+
desc.value = val
|
94
|
+
this.defineProperty(name, desc)
|
95
|
+
return true
|
96
|
+
} else {
|
97
|
+
return false
|
98
|
+
}
|
99
|
+
} else { // accessor
|
100
|
+
if (desc.set) {
|
101
|
+
// The proposal says: desc.set.call(receiver, val)
|
102
|
+
%_CallFunction(receiver, val, desc.set)
|
103
|
+
return true
|
104
|
+
} else {
|
105
|
+
return false
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
desc = this.getPropertyDescriptor(name)
|
110
|
+
if (desc) {
|
111
|
+
if ('writable' in desc) {
|
112
|
+
if (desc.writable) {
|
113
|
+
// fall through
|
114
|
+
} else {
|
115
|
+
return false
|
116
|
+
}
|
117
|
+
} else { // accessor
|
118
|
+
if (desc.set) {
|
119
|
+
// The proposal says: desc.set.call(receiver, val)
|
120
|
+
%_CallFunction(receiver, val, desc.set)
|
121
|
+
return true
|
122
|
+
} else {
|
123
|
+
return false
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
this.defineProperty(name, {
|
128
|
+
value: val,
|
129
|
+
writable: true,
|
130
|
+
enumerable: true,
|
131
|
+
configurable: true});
|
132
|
+
return true;
|
133
|
+
}
|
134
|
+
|
135
|
+
function DerivedHasTrap(name) {
|
136
|
+
return !!this.getPropertyDescriptor(name)
|
137
|
+
}
|
138
|
+
|
139
|
+
function DerivedHasOwnTrap(name) {
|
140
|
+
return !!this.getOwnPropertyDescriptor(name)
|
141
|
+
}
|
142
|
+
|
143
|
+
function DerivedKeysTrap() {
|
144
|
+
var names = this.getOwnPropertyNames()
|
145
|
+
var enumerableNames = []
|
146
|
+
for (var i = 0, count = 0; i < names.length; ++i) {
|
147
|
+
var name = names[i]
|
148
|
+
if (this.getOwnPropertyDescriptor(TO_STRING_INLINE(name)).enumerable) {
|
149
|
+
enumerableNames[count++] = names[i]
|
150
|
+
}
|
151
|
+
}
|
152
|
+
return enumerableNames
|
153
|
+
}
|
@@ -120,27 +120,31 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match(
|
|
120
120
|
String* subject_ptr = *subject;
|
121
121
|
// Character offsets into string.
|
122
122
|
int start_offset = previous_index;
|
123
|
-
int
|
123
|
+
int char_length = subject_ptr->length() - start_offset;
|
124
|
+
int slice_offset = 0;
|
124
125
|
|
125
|
-
// The string has been flattened, so
|
126
|
+
// The string has been flattened, so if it is a cons string it contains the
|
126
127
|
// full string in the first part.
|
127
128
|
if (StringShape(subject_ptr).IsCons()) {
|
128
129
|
ASSERT_EQ(0, ConsString::cast(subject_ptr)->second()->length());
|
129
130
|
subject_ptr = ConsString::cast(subject_ptr)->first();
|
131
|
+
} else if (StringShape(subject_ptr).IsSliced()) {
|
132
|
+
SlicedString* slice = SlicedString::cast(subject_ptr);
|
133
|
+
subject_ptr = slice->parent();
|
134
|
+
slice_offset = slice->offset();
|
130
135
|
}
|
131
136
|
// Ensure that an underlying string has the same ascii-ness.
|
132
137
|
bool is_ascii = subject_ptr->IsAsciiRepresentation();
|
133
138
|
ASSERT(subject_ptr->IsExternalString() || subject_ptr->IsSeqString());
|
134
139
|
// String is now either Sequential or External
|
135
140
|
int char_size_shift = is_ascii ? 0 : 1;
|
136
|
-
int char_length = end_offset - start_offset;
|
137
141
|
|
138
142
|
const byte* input_start =
|
139
|
-
StringCharacterPosition(subject_ptr, start_offset);
|
143
|
+
StringCharacterPosition(subject_ptr, start_offset + slice_offset);
|
140
144
|
int byte_length = char_length << char_size_shift;
|
141
145
|
const byte* input_end = input_start + byte_length;
|
142
146
|
Result res = Execute(*regexp_code,
|
143
|
-
|
147
|
+
*subject,
|
144
148
|
start_offset,
|
145
149
|
input_start,
|
146
150
|
input_end,
|
@@ -152,7 +156,7 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match(
|
|
152
156
|
|
153
157
|
NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Execute(
|
154
158
|
Code* code,
|
155
|
-
String* input,
|
159
|
+
String* input, // This needs to be the unpacked (sliced, cons) string.
|
156
160
|
int start_offset,
|
157
161
|
const byte* input_start,
|
158
162
|
const byte* input_end,
|
data/lib/libv8/v8/src/regexp.js
CHANGED
@@ -50,24 +50,29 @@ function DoConstructRegExp(object, pattern, flags) {
|
|
50
50
|
var global = false;
|
51
51
|
var ignoreCase = false;
|
52
52
|
var multiline = false;
|
53
|
-
|
54
53
|
for (var i = 0; i < flags.length; i++) {
|
55
54
|
var c = %_CallFunction(flags, i, StringCharAt);
|
56
55
|
switch (c) {
|
57
56
|
case 'g':
|
58
|
-
|
57
|
+
if (global) {
|
58
|
+
throw MakeSyntaxError("invalid_regexp_flags", [flags]);
|
59
|
+
}
|
59
60
|
global = true;
|
60
61
|
break;
|
61
62
|
case 'i':
|
63
|
+
if (ignoreCase) {
|
64
|
+
throw MakeSyntaxError("invalid_regexp_flags", [flags]);
|
65
|
+
}
|
62
66
|
ignoreCase = true;
|
63
67
|
break;
|
64
68
|
case 'm':
|
69
|
+
if (multiline) {
|
70
|
+
throw MakeSyntaxError("invalid_regexp_flags", [flags]);
|
71
|
+
}
|
65
72
|
multiline = true;
|
66
73
|
break;
|
67
74
|
default:
|
68
|
-
|
69
|
-
// JSC.
|
70
|
-
break;
|
75
|
+
throw MakeSyntaxError("invalid_regexp_flags", [flags]);
|
71
76
|
}
|
72
77
|
}
|
73
78
|
|
@@ -235,7 +240,7 @@ function RegExpTest(string) {
|
|
235
240
|
// Conversion is required by the ES5 specification (RegExp.prototype.exec
|
236
241
|
// algorithm, step 5) even if the value is discarded for non-global RegExps.
|
237
242
|
var i = TO_INTEGER(lastIndex);
|
238
|
-
|
243
|
+
|
239
244
|
if (this.global) {
|
240
245
|
if (i < 0 || i > string.length) {
|
241
246
|
this.lastIndex = 0;
|
@@ -250,11 +255,11 @@ function RegExpTest(string) {
|
|
250
255
|
}
|
251
256
|
lastMatchInfoOverride = null;
|
252
257
|
this.lastIndex = lastMatchInfo[CAPTURE1];
|
253
|
-
return true;
|
258
|
+
return true;
|
254
259
|
} else {
|
255
260
|
// Non-global regexp.
|
256
|
-
// Remove irrelevant preceeding '.*' in a non-global test regexp.
|
257
|
-
// The expression checks whether this.source starts with '.*' and
|
261
|
+
// Remove irrelevant preceeding '.*' in a non-global test regexp.
|
262
|
+
// The expression checks whether this.source starts with '.*' and
|
258
263
|
// that the third char is not a '?'.
|
259
264
|
if (%_StringCharCodeAt(this.source, 0) == 46 && // '.'
|
260
265
|
%_StringCharCodeAt(this.source, 1) == 42 && // '*'
|
@@ -262,14 +267,14 @@ function RegExpTest(string) {
|
|
262
267
|
if (!%_ObjectEquals(regexp_key, this)) {
|
263
268
|
regexp_key = this;
|
264
269
|
regexp_val = new $RegExp(SubString(this.source, 2, this.source.length),
|
265
|
-
(!this.ignoreCase
|
270
|
+
(!this.ignoreCase
|
266
271
|
? !this.multiline ? "" : "m"
|
267
272
|
: !this.multiline ? "i" : "im"));
|
268
273
|
}
|
269
274
|
if (%_RegExpExec(regexp_val, string, 0, lastMatchInfo) === null) {
|
270
275
|
return false;
|
271
276
|
}
|
272
|
-
}
|
277
|
+
}
|
273
278
|
%_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, string, lastIndex]);
|
274
279
|
// matchIndices is either null or the lastMatchInfo array.
|
275
280
|
var matchIndices = %_RegExpExec(this, string, 0, lastMatchInfo);
|
@@ -66,9 +66,13 @@ class Processor: public AstVisitor {
|
|
66
66
|
|
67
67
|
Expression* SetResult(Expression* value) {
|
68
68
|
result_assigned_ = true;
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
Zone* zone = isolate()->zone();
|
70
|
+
VariableProxy* result_proxy = new(zone) VariableProxy(isolate(), result_);
|
71
|
+
return new(zone) Assignment(isolate(),
|
72
|
+
Token::ASSIGN,
|
73
|
+
result_proxy,
|
74
|
+
value,
|
75
|
+
RelocInfo::kNoPosition);
|
72
76
|
}
|
73
77
|
|
74
78
|
// Node visitors.
|
@@ -193,141 +197,26 @@ void Processor::VisitBreakStatement(BreakStatement* node) {
|
|
193
197
|
}
|
194
198
|
|
195
199
|
|
200
|
+
void Processor::VisitWithStatement(WithStatement* node) {
|
201
|
+
bool set_after_body = is_set_;
|
202
|
+
Visit(node->statement());
|
203
|
+
is_set_ = is_set_ && set_after_body;
|
204
|
+
}
|
205
|
+
|
206
|
+
|
196
207
|
// Do nothing:
|
197
208
|
void Processor::VisitDeclaration(Declaration* node) {}
|
198
209
|
void Processor::VisitEmptyStatement(EmptyStatement* node) {}
|
199
210
|
void Processor::VisitReturnStatement(ReturnStatement* node) {}
|
200
|
-
void Processor::
|
201
|
-
void Processor::VisitWithExitStatement(WithExitStatement* node) {}
|
211
|
+
void Processor::VisitExitContextStatement(ExitContextStatement* node) {}
|
202
212
|
void Processor::VisitDebuggerStatement(DebuggerStatement* node) {}
|
203
213
|
|
204
214
|
|
205
215
|
// Expressions are never visited yet.
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
void Processor::VisitSharedFunctionInfoLiteral(
|
213
|
-
SharedFunctionInfoLiteral* node) {
|
214
|
-
USE(node);
|
215
|
-
UNREACHABLE();
|
216
|
-
}
|
217
|
-
|
218
|
-
|
219
|
-
void Processor::VisitConditional(Conditional* node) {
|
220
|
-
USE(node);
|
221
|
-
UNREACHABLE();
|
222
|
-
}
|
223
|
-
|
224
|
-
|
225
|
-
void Processor::VisitVariableProxy(VariableProxy* node) {
|
226
|
-
USE(node);
|
227
|
-
UNREACHABLE();
|
228
|
-
}
|
229
|
-
|
230
|
-
|
231
|
-
void Processor::VisitLiteral(Literal* node) {
|
232
|
-
USE(node);
|
233
|
-
UNREACHABLE();
|
234
|
-
}
|
235
|
-
|
236
|
-
|
237
|
-
void Processor::VisitRegExpLiteral(RegExpLiteral* node) {
|
238
|
-
USE(node);
|
239
|
-
UNREACHABLE();
|
240
|
-
}
|
241
|
-
|
242
|
-
|
243
|
-
void Processor::VisitArrayLiteral(ArrayLiteral* node) {
|
244
|
-
USE(node);
|
245
|
-
UNREACHABLE();
|
246
|
-
}
|
247
|
-
|
248
|
-
|
249
|
-
void Processor::VisitObjectLiteral(ObjectLiteral* node) {
|
250
|
-
USE(node);
|
251
|
-
UNREACHABLE();
|
252
|
-
}
|
253
|
-
|
254
|
-
|
255
|
-
void Processor::VisitCatchExtensionObject(CatchExtensionObject* node) {
|
256
|
-
USE(node);
|
257
|
-
UNREACHABLE();
|
258
|
-
}
|
259
|
-
|
260
|
-
|
261
|
-
void Processor::VisitAssignment(Assignment* node) {
|
262
|
-
USE(node);
|
263
|
-
UNREACHABLE();
|
264
|
-
}
|
265
|
-
|
266
|
-
|
267
|
-
void Processor::VisitThrow(Throw* node) {
|
268
|
-
USE(node);
|
269
|
-
UNREACHABLE();
|
270
|
-
}
|
271
|
-
|
272
|
-
|
273
|
-
void Processor::VisitProperty(Property* node) {
|
274
|
-
USE(node);
|
275
|
-
UNREACHABLE();
|
276
|
-
}
|
277
|
-
|
278
|
-
|
279
|
-
void Processor::VisitCall(Call* node) {
|
280
|
-
USE(node);
|
281
|
-
UNREACHABLE();
|
282
|
-
}
|
283
|
-
|
284
|
-
|
285
|
-
void Processor::VisitCallNew(CallNew* node) {
|
286
|
-
USE(node);
|
287
|
-
UNREACHABLE();
|
288
|
-
}
|
289
|
-
|
290
|
-
|
291
|
-
void Processor::VisitCallRuntime(CallRuntime* node) {
|
292
|
-
USE(node);
|
293
|
-
UNREACHABLE();
|
294
|
-
}
|
295
|
-
|
296
|
-
|
297
|
-
void Processor::VisitUnaryOperation(UnaryOperation* node) {
|
298
|
-
USE(node);
|
299
|
-
UNREACHABLE();
|
300
|
-
}
|
301
|
-
|
302
|
-
|
303
|
-
void Processor::VisitCountOperation(CountOperation* node) {
|
304
|
-
USE(node);
|
305
|
-
UNREACHABLE();
|
306
|
-
}
|
307
|
-
|
308
|
-
|
309
|
-
void Processor::VisitBinaryOperation(BinaryOperation* node) {
|
310
|
-
USE(node);
|
311
|
-
UNREACHABLE();
|
312
|
-
}
|
313
|
-
|
314
|
-
|
315
|
-
void Processor::VisitCompareOperation(CompareOperation* node) {
|
316
|
-
USE(node);
|
317
|
-
UNREACHABLE();
|
318
|
-
}
|
319
|
-
|
320
|
-
|
321
|
-
void Processor::VisitCompareToNull(CompareToNull* node) {
|
322
|
-
USE(node);
|
323
|
-
UNREACHABLE();
|
324
|
-
}
|
325
|
-
|
326
|
-
|
327
|
-
void Processor::VisitThisFunction(ThisFunction* node) {
|
328
|
-
USE(node);
|
329
|
-
UNREACHABLE();
|
330
|
-
}
|
216
|
+
#define DEF_VISIT(type) \
|
217
|
+
void Processor::Visit##type(type* expr) { UNREACHABLE(); }
|
218
|
+
EXPRESSION_NODE_LIST(DEF_VISIT)
|
219
|
+
#undef DEF_VISIT
|
331
220
|
|
332
221
|
|
333
222
|
// Assumes code has been parsed and scopes have been analyzed. Mutates the
|
@@ -337,7 +226,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
|
|
337
226
|
ASSERT(function != NULL);
|
338
227
|
Scope* scope = function->scope();
|
339
228
|
ASSERT(scope != NULL);
|
340
|
-
if (scope->
|
229
|
+
if (!scope->is_global_scope() && !scope->is_eval_scope()) return true;
|
341
230
|
|
342
231
|
ZoneList<Statement*>* body = function->body();
|
343
232
|
if (!body->is_empty()) {
|
@@ -348,8 +237,10 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
|
|
348
237
|
if (processor.HasStackOverflow()) return false;
|
349
238
|
|
350
239
|
if (processor.result_assigned()) {
|
351
|
-
|
352
|
-
|
240
|
+
Isolate* isolate = info->isolate();
|
241
|
+
Zone* zone = isolate->zone();
|
242
|
+
VariableProxy* result_proxy = new(zone) VariableProxy(isolate, result);
|
243
|
+
body->Add(new(zone) ReturnStatement(result_proxy));
|
353
244
|
}
|
354
245
|
}
|
355
246
|
|