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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2011 the V8 project authors. All rights reserved.
|
|
2
2
|
// Redistribution and use in source and binary forms, with or without
|
|
3
3
|
// modification, are permitted provided that the following conditions are
|
|
4
4
|
// met:
|
|
@@ -44,7 +44,7 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
|
|
|
44
44
|
int day = kNone;
|
|
45
45
|
|
|
46
46
|
if (named_month_ == kNone) {
|
|
47
|
-
if (index_ == 3 && !IsDay(comp_[0])) {
|
|
47
|
+
if (is_iso_date_ || (index_ == 3 && !IsDay(comp_[0]))) {
|
|
48
48
|
// YMD
|
|
49
49
|
year = comp_[0];
|
|
50
50
|
month = comp_[1];
|
|
@@ -71,8 +71,10 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
if (
|
|
75
|
-
|
|
74
|
+
if (!is_iso_date_) {
|
|
75
|
+
if (Between(year, 0, 49)) year += 2000;
|
|
76
|
+
else if (Between(year, 50, 99)) year += 1900;
|
|
77
|
+
}
|
|
76
78
|
|
|
77
79
|
if (!Smi::IsValid(year) || !IsMonth(month) || !IsDay(day)) return false;
|
|
78
80
|
|
|
@@ -151,6 +153,7 @@ const int8_t DateParser::KeywordTable::
|
|
|
151
153
|
{'m', 's', 't', DateParser::TIME_ZONE_NAME, -7},
|
|
152
154
|
{'p', 'd', 't', DateParser::TIME_ZONE_NAME, -7},
|
|
153
155
|
{'p', 's', 't', DateParser::TIME_ZONE_NAME, -8},
|
|
156
|
+
{'t', '\0', '\0', DateParser::TIME_SEPARATOR, 0},
|
|
154
157
|
{'\0', '\0', '\0', DateParser::INVALID, 0},
|
|
155
158
|
};
|
|
156
159
|
|
|
@@ -175,4 +178,35 @@ int DateParser::KeywordTable::Lookup(const uint32_t* pre, int len) {
|
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
|
|
181
|
+
int DateParser::ReadMilliseconds(DateToken token) {
|
|
182
|
+
// Read first three significant digits of the original numeral,
|
|
183
|
+
// as inferred from the value and the number of digits.
|
|
184
|
+
// I.e., use the number of digits to see if there were
|
|
185
|
+
// leading zeros.
|
|
186
|
+
int number = token.number();
|
|
187
|
+
int length = token.length();
|
|
188
|
+
if (length < 3) {
|
|
189
|
+
// Less than three digits. Multiply to put most significant digit
|
|
190
|
+
// in hundreds position.
|
|
191
|
+
if (length == 1) {
|
|
192
|
+
number *= 100;
|
|
193
|
+
} else if (length == 2) {
|
|
194
|
+
number *= 10;
|
|
195
|
+
}
|
|
196
|
+
} else if (length > 3) {
|
|
197
|
+
if (length > kMaxSignificantDigits) length = kMaxSignificantDigits;
|
|
198
|
+
// More than three digits. Divide by 10^(length - 3) to get three
|
|
199
|
+
// most significant digits.
|
|
200
|
+
int factor = 1;
|
|
201
|
+
do {
|
|
202
|
+
ASSERT(factor <= 100000000); // factor won't overflow.
|
|
203
|
+
factor *= 10;
|
|
204
|
+
length--;
|
|
205
|
+
} while (length > 3);
|
|
206
|
+
number /= factor;
|
|
207
|
+
}
|
|
208
|
+
return number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
178
212
|
} } // namespace v8::internal
|
|
@@ -61,9 +61,14 @@ class DateParser : public AllStatic {
|
|
|
61
61
|
static inline bool Between(int x, int lo, int hi) {
|
|
62
62
|
return static_cast<unsigned>(x - lo) <= static_cast<unsigned>(hi - lo);
|
|
63
63
|
}
|
|
64
|
+
|
|
64
65
|
// Indicates a missing value.
|
|
65
66
|
static const int kNone = kMaxInt;
|
|
66
67
|
|
|
68
|
+
// Maximal number of digits used to build the value of a numeral.
|
|
69
|
+
// Remaining digits are ignored.
|
|
70
|
+
static const int kMaxSignificantDigits = 9;
|
|
71
|
+
|
|
67
72
|
// InputReader provides basic string parsing and character classification.
|
|
68
73
|
template <typename Char>
|
|
69
74
|
class InputReader BASE_EMBEDDED {
|
|
@@ -71,32 +76,28 @@ class DateParser : public AllStatic {
|
|
|
71
76
|
InputReader(UnicodeCache* unicode_cache, Vector<Char> s)
|
|
72
77
|
: index_(0),
|
|
73
78
|
buffer_(s),
|
|
74
|
-
has_read_number_(false),
|
|
75
79
|
unicode_cache_(unicode_cache) {
|
|
76
80
|
Next();
|
|
77
81
|
}
|
|
78
82
|
|
|
83
|
+
int position() { return index_; }
|
|
84
|
+
|
|
79
85
|
// Advance to the next character of the string.
|
|
80
|
-
void Next() {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
int ReadUnsignedNumber() {
|
|
84
|
-
has_read_number_ = true;
|
|
85
|
-
int n;
|
|
86
|
-
for (n = 0; IsAsciiDigit() && n < kMaxInt / 10 - 1; Next()) {
|
|
87
|
-
n = n * 10 + ch_ - '0';
|
|
88
|
-
}
|
|
89
|
-
return n;
|
|
86
|
+
void Next() {
|
|
87
|
+
ch_ = (index_ < buffer_.length()) ? buffer_[index_] : 0;
|
|
88
|
+
index_++;
|
|
90
89
|
}
|
|
91
90
|
|
|
92
|
-
// Read a string of digits
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
// Read a string of digits as an unsigned number. Cap value at
|
|
92
|
+
// kMaxSignificantDigits, but skip remaining digits if the numeral
|
|
93
|
+
// is longer.
|
|
94
|
+
int ReadUnsignedNumeral() {
|
|
96
95
|
int n = 0;
|
|
97
|
-
int
|
|
98
|
-
|
|
99
|
-
n = n
|
|
96
|
+
int i = 0;
|
|
97
|
+
while (IsAsciiDigit()) {
|
|
98
|
+
if (i < kMaxSignificantDigits) n = n * 10 + ch_ - '0';
|
|
99
|
+
i++;
|
|
100
|
+
Next();
|
|
100
101
|
}
|
|
101
102
|
return n;
|
|
102
103
|
}
|
|
@@ -151,18 +152,138 @@ class DateParser : public AllStatic {
|
|
|
151
152
|
// Return 1 for '+' and -1 for '-'.
|
|
152
153
|
int GetAsciiSignValue() const { return 44 - static_cast<int>(ch_); }
|
|
153
154
|
|
|
154
|
-
// Indicates whether any (possibly empty!) numbers have been read.
|
|
155
|
-
bool HasReadNumber() const { return has_read_number_; }
|
|
156
|
-
|
|
157
155
|
private:
|
|
158
156
|
int index_;
|
|
159
157
|
Vector<Char> buffer_;
|
|
160
|
-
bool has_read_number_;
|
|
161
158
|
uint32_t ch_;
|
|
162
159
|
UnicodeCache* unicode_cache_;
|
|
163
160
|
};
|
|
164
161
|
|
|
165
|
-
enum KeywordType {
|
|
162
|
+
enum KeywordType {
|
|
163
|
+
INVALID, MONTH_NAME, TIME_ZONE_NAME, TIME_SEPARATOR, AM_PM
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
struct DateToken {
|
|
167
|
+
public:
|
|
168
|
+
bool IsInvalid() { return tag_ == kInvalidTokenTag; }
|
|
169
|
+
bool IsUnknown() { return tag_ == kUnknownTokenTag; }
|
|
170
|
+
bool IsNumber() { return tag_ == kNumberTag; }
|
|
171
|
+
bool IsSymbol() { return tag_ == kSymbolTag; }
|
|
172
|
+
bool IsWhiteSpace() { return tag_ == kWhiteSpaceTag; }
|
|
173
|
+
bool IsEndOfInput() { return tag_ == kEndOfInputTag; }
|
|
174
|
+
bool IsKeyword() { return tag_ >= kKeywordTagStart; }
|
|
175
|
+
|
|
176
|
+
int length() { return length_; }
|
|
177
|
+
|
|
178
|
+
int number() {
|
|
179
|
+
ASSERT(IsNumber());
|
|
180
|
+
return value_;
|
|
181
|
+
}
|
|
182
|
+
KeywordType keyword_type() {
|
|
183
|
+
ASSERT(IsKeyword());
|
|
184
|
+
return static_cast<KeywordType>(tag_);
|
|
185
|
+
}
|
|
186
|
+
int keyword_value() {
|
|
187
|
+
ASSERT(IsKeyword());
|
|
188
|
+
return value_;
|
|
189
|
+
}
|
|
190
|
+
char symbol() {
|
|
191
|
+
ASSERT(IsSymbol());
|
|
192
|
+
return static_cast<char>(value_);
|
|
193
|
+
}
|
|
194
|
+
bool IsSymbol(char symbol) {
|
|
195
|
+
return IsSymbol() && this->symbol() == symbol;
|
|
196
|
+
}
|
|
197
|
+
bool IsKeywordType(KeywordType tag) {
|
|
198
|
+
return tag_ == tag;
|
|
199
|
+
}
|
|
200
|
+
bool IsFixedLengthNumber(int length) {
|
|
201
|
+
return IsNumber() && length_ == length;
|
|
202
|
+
}
|
|
203
|
+
bool IsAsciiSign() {
|
|
204
|
+
return tag_ == kSymbolTag && (value_ == '-' || value_ == '+');
|
|
205
|
+
}
|
|
206
|
+
int ascii_sign() {
|
|
207
|
+
ASSERT(IsAsciiSign());
|
|
208
|
+
return 44 - value_;
|
|
209
|
+
}
|
|
210
|
+
bool IsKeywordZ() {
|
|
211
|
+
return IsKeywordType(TIME_ZONE_NAME) && length_ == 1 && value_ == 0;
|
|
212
|
+
}
|
|
213
|
+
bool IsUnknown(int character) {
|
|
214
|
+
return IsUnknown() && value_ == character;
|
|
215
|
+
}
|
|
216
|
+
// Factory functions.
|
|
217
|
+
static DateToken Keyword(KeywordType tag, int value, int length) {
|
|
218
|
+
return DateToken(tag, length, value);
|
|
219
|
+
}
|
|
220
|
+
static DateToken Number(int value, int length) {
|
|
221
|
+
return DateToken(kNumberTag, length, value);
|
|
222
|
+
}
|
|
223
|
+
static DateToken Symbol(char symbol) {
|
|
224
|
+
return DateToken(kSymbolTag, 1, symbol);
|
|
225
|
+
}
|
|
226
|
+
static DateToken EndOfInput() {
|
|
227
|
+
return DateToken(kEndOfInputTag, 0, -1);
|
|
228
|
+
}
|
|
229
|
+
static DateToken WhiteSpace(int length) {
|
|
230
|
+
return DateToken(kWhiteSpaceTag, length, -1);
|
|
231
|
+
}
|
|
232
|
+
static DateToken Unknown() {
|
|
233
|
+
return DateToken(kUnknownTokenTag, 1, -1);
|
|
234
|
+
}
|
|
235
|
+
static DateToken Invalid() {
|
|
236
|
+
return DateToken(kInvalidTokenTag, 0, -1);
|
|
237
|
+
}
|
|
238
|
+
private:
|
|
239
|
+
enum TagType {
|
|
240
|
+
kInvalidTokenTag = -6,
|
|
241
|
+
kUnknownTokenTag = -5,
|
|
242
|
+
kWhiteSpaceTag = -4,
|
|
243
|
+
kNumberTag = -3,
|
|
244
|
+
kSymbolTag = -2,
|
|
245
|
+
kEndOfInputTag = -1,
|
|
246
|
+
kKeywordTagStart = 0
|
|
247
|
+
};
|
|
248
|
+
DateToken(int tag, int length, int value)
|
|
249
|
+
: tag_(tag),
|
|
250
|
+
length_(length),
|
|
251
|
+
value_(value) { }
|
|
252
|
+
|
|
253
|
+
int tag_;
|
|
254
|
+
int length_; // Number of characters.
|
|
255
|
+
int value_;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
template <typename Char>
|
|
259
|
+
class DateStringTokenizer {
|
|
260
|
+
public:
|
|
261
|
+
explicit DateStringTokenizer(InputReader<Char>* in)
|
|
262
|
+
: in_(in), next_(Scan()) { }
|
|
263
|
+
DateToken Next() {
|
|
264
|
+
DateToken result = next_;
|
|
265
|
+
next_ = Scan();
|
|
266
|
+
return result;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
DateToken Peek() {
|
|
270
|
+
return next_;
|
|
271
|
+
}
|
|
272
|
+
bool SkipSymbol(char symbol) {
|
|
273
|
+
if (next_.IsSymbol(symbol)) {
|
|
274
|
+
next_ = Scan();
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
private:
|
|
280
|
+
DateToken Scan();
|
|
281
|
+
|
|
282
|
+
InputReader<Char>* in_;
|
|
283
|
+
DateToken next_;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
static int ReadMilliseconds(DateToken number);
|
|
166
287
|
|
|
167
288
|
// KeywordTable maps names of months, time zones, am/pm to numbers.
|
|
168
289
|
class KeywordTable : public AllStatic {
|
|
@@ -201,6 +322,7 @@ class DateParser : public AllStatic {
|
|
|
201
322
|
}
|
|
202
323
|
bool IsUTC() const { return hour_ == 0 && minute_ == 0; }
|
|
203
324
|
bool Write(FixedArray* output);
|
|
325
|
+
bool IsEmpty() { return hour_ == kNone; }
|
|
204
326
|
private:
|
|
205
327
|
int sign_;
|
|
206
328
|
int hour_;
|
|
@@ -228,10 +350,10 @@ class DateParser : public AllStatic {
|
|
|
228
350
|
bool Write(FixedArray* output);
|
|
229
351
|
|
|
230
352
|
static bool IsMinute(int x) { return Between(x, 0, 59); }
|
|
231
|
-
private:
|
|
232
353
|
static bool IsHour(int x) { return Between(x, 0, 23); }
|
|
233
|
-
static bool IsHour12(int x) { return Between(x, 0, 12); }
|
|
234
354
|
static bool IsSecond(int x) { return Between(x, 0, 59); }
|
|
355
|
+
private:
|
|
356
|
+
static bool IsHour12(int x) { return Between(x, 0, 12); }
|
|
235
357
|
static bool IsMillisecond(int x) { return Between(x, 0, 999); }
|
|
236
358
|
|
|
237
359
|
static const int kSize = 4;
|
|
@@ -242,22 +364,42 @@ class DateParser : public AllStatic {
|
|
|
242
364
|
|
|
243
365
|
class DayComposer BASE_EMBEDDED {
|
|
244
366
|
public:
|
|
245
|
-
DayComposer() : index_(0), named_month_(kNone) {}
|
|
367
|
+
DayComposer() : index_(0), named_month_(kNone), is_iso_date_(false) {}
|
|
246
368
|
bool IsEmpty() const { return index_ == 0; }
|
|
247
369
|
bool Add(int n) {
|
|
248
|
-
|
|
370
|
+
if (index_ < kSize) {
|
|
371
|
+
comp_[index_] = n;
|
|
372
|
+
index_++;
|
|
373
|
+
return true;
|
|
374
|
+
}
|
|
375
|
+
return false;
|
|
249
376
|
}
|
|
250
377
|
void SetNamedMonth(int n) { named_month_ = n; }
|
|
251
378
|
bool Write(FixedArray* output);
|
|
252
|
-
|
|
379
|
+
void set_iso_date() { is_iso_date_ = true; }
|
|
253
380
|
static bool IsMonth(int x) { return Between(x, 1, 12); }
|
|
254
381
|
static bool IsDay(int x) { return Between(x, 1, 31); }
|
|
255
382
|
|
|
383
|
+
private:
|
|
256
384
|
static const int kSize = 3;
|
|
257
385
|
int comp_[kSize];
|
|
258
386
|
int index_;
|
|
259
387
|
int named_month_;
|
|
388
|
+
// If set, ensures that data is always parsed in year-month-date order.
|
|
389
|
+
bool is_iso_date_;
|
|
260
390
|
};
|
|
391
|
+
|
|
392
|
+
// Tries to parse an ES5 Date Time String. Returns the next token
|
|
393
|
+
// to continue with in the legacy date string parser. If parsing is
|
|
394
|
+
// complete, returns DateToken::EndOfInput(). If terminally unsuccessful,
|
|
395
|
+
// returns DateToken::Invalid(). Otherwise parsing continues in the
|
|
396
|
+
// legacy parser.
|
|
397
|
+
template <typename Char>
|
|
398
|
+
static DateParser::DateToken ParseES5DateTime(
|
|
399
|
+
DateStringTokenizer<Char>* scanner,
|
|
400
|
+
DayComposer* day,
|
|
401
|
+
TimeComposer* time,
|
|
402
|
+
TimeZoneComposer* tz);
|
|
261
403
|
};
|
|
262
404
|
|
|
263
405
|
|
|
@@ -116,8 +116,8 @@ void DebuggerAgent::CreateSession(Socket* client) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
// Create a new session and hook up the debug message handler.
|
|
119
|
-
session_ = new DebuggerAgentSession(
|
|
120
|
-
|
|
119
|
+
session_ = new DebuggerAgentSession(this, client);
|
|
120
|
+
isolate_->debugger()->SetMessageHandler(DebuggerAgentMessageHandler);
|
|
121
121
|
session_->Start();
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -203,7 +203,9 @@ void DebuggerAgentSession::Run() {
|
|
|
203
203
|
|
|
204
204
|
// Send the request received to the debugger.
|
|
205
205
|
v8::Debug::SendCommand(reinterpret_cast<const uint16_t *>(temp.start()),
|
|
206
|
-
len
|
|
206
|
+
len,
|
|
207
|
+
NULL,
|
|
208
|
+
reinterpret_cast<v8::Isolate*>(agent_->isolate()));
|
|
207
209
|
|
|
208
210
|
if (is_closing_session) {
|
|
209
211
|
// Session is closed.
|
|
@@ -43,24 +43,27 @@ class DebuggerAgentSession;
|
|
|
43
43
|
// handles connection from a remote debugger.
|
|
44
44
|
class DebuggerAgent: public Thread {
|
|
45
45
|
public:
|
|
46
|
-
DebuggerAgent(
|
|
47
|
-
: Thread(
|
|
46
|
+
DebuggerAgent(const char* name, int port)
|
|
47
|
+
: Thread(name),
|
|
48
|
+
isolate_(Isolate::Current()),
|
|
48
49
|
name_(StrDup(name)), port_(port),
|
|
49
50
|
server_(OS::CreateSocket()), terminate_(false),
|
|
50
51
|
session_access_(OS::CreateMutex()), session_(NULL),
|
|
51
52
|
terminate_now_(OS::CreateSemaphore(0)),
|
|
52
53
|
listening_(OS::CreateSemaphore(0)) {
|
|
53
|
-
ASSERT(
|
|
54
|
-
|
|
54
|
+
ASSERT(isolate_->debugger_agent_instance() == NULL);
|
|
55
|
+
isolate_->set_debugger_agent_instance(this);
|
|
55
56
|
}
|
|
56
57
|
~DebuggerAgent() {
|
|
57
|
-
|
|
58
|
+
isolate_->set_debugger_agent_instance(NULL);
|
|
58
59
|
delete server_;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
void Shutdown();
|
|
62
63
|
void WaitUntilListening();
|
|
63
64
|
|
|
65
|
+
Isolate* isolate() { return isolate_; }
|
|
66
|
+
|
|
64
67
|
private:
|
|
65
68
|
void Run();
|
|
66
69
|
void CreateSession(Socket* socket);
|
|
@@ -68,6 +71,7 @@ class DebuggerAgent: public Thread {
|
|
|
68
71
|
void CloseSession();
|
|
69
72
|
void OnSessionClosed(DebuggerAgentSession* session);
|
|
70
73
|
|
|
74
|
+
Isolate* isolate_;
|
|
71
75
|
SmartPointer<const char> name_; // Name of the embedding application.
|
|
72
76
|
int port_; // Port to use for the agent.
|
|
73
77
|
Socket* server_; // Server socket for listen/accept.
|
|
@@ -88,8 +92,8 @@ class DebuggerAgent: public Thread {
|
|
|
88
92
|
// debugger and sends debugger events/responses to the remote debugger.
|
|
89
93
|
class DebuggerAgentSession: public Thread {
|
|
90
94
|
public:
|
|
91
|
-
DebuggerAgentSession(
|
|
92
|
-
: Thread(
|
|
95
|
+
DebuggerAgentSession(DebuggerAgent* agent, Socket* client)
|
|
96
|
+
: Thread("v8:DbgAgntSessn"),
|
|
93
97
|
agent_(agent), client_(client) {}
|
|
94
98
|
|
|
95
99
|
void DebuggerMessage(Vector<uint16_t> message);
|
|
@@ -68,7 +68,8 @@ Debug.ScriptCompilationType = { Host: 0,
|
|
|
68
68
|
|
|
69
69
|
// The different script break point types.
|
|
70
70
|
Debug.ScriptBreakPointType = { ScriptId: 0,
|
|
71
|
-
ScriptName: 1
|
|
71
|
+
ScriptName: 1,
|
|
72
|
+
ScriptRegExp: 2 };
|
|
72
73
|
|
|
73
74
|
function ScriptTypeFlag(type) {
|
|
74
75
|
return (1 << type);
|
|
@@ -255,8 +256,12 @@ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
|
|
|
255
256
|
this.type_ = type;
|
|
256
257
|
if (type == Debug.ScriptBreakPointType.ScriptId) {
|
|
257
258
|
this.script_id_ = script_id_or_name;
|
|
258
|
-
} else
|
|
259
|
+
} else if (type == Debug.ScriptBreakPointType.ScriptName) {
|
|
259
260
|
this.script_name_ = script_id_or_name;
|
|
261
|
+
} else if (type == Debug.ScriptBreakPointType.ScriptRegExp) {
|
|
262
|
+
this.script_regexp_object_ = new RegExp(script_id_or_name);
|
|
263
|
+
} else {
|
|
264
|
+
throw new Error("Unexpected breakpoint type " + type);
|
|
260
265
|
}
|
|
261
266
|
this.line_ = opt_line || 0;
|
|
262
267
|
this.column_ = opt_column;
|
|
@@ -309,6 +314,11 @@ ScriptBreakPoint.prototype.script_name = function() {
|
|
|
309
314
|
};
|
|
310
315
|
|
|
311
316
|
|
|
317
|
+
ScriptBreakPoint.prototype.script_regexp_object = function() {
|
|
318
|
+
return this.script_regexp_object_;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
|
|
312
322
|
ScriptBreakPoint.prototype.line = function() {
|
|
313
323
|
return this.line_;
|
|
314
324
|
};
|
|
@@ -384,10 +394,19 @@ ScriptBreakPoint.prototype.setIgnoreCount = function(ignoreCount) {
|
|
|
384
394
|
ScriptBreakPoint.prototype.matchesScript = function(script) {
|
|
385
395
|
if (this.type_ == Debug.ScriptBreakPointType.ScriptId) {
|
|
386
396
|
return this.script_id_ == script.id;
|
|
387
|
-
} else {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
397
|
+
} else {
|
|
398
|
+
// We might want to account columns here as well.
|
|
399
|
+
if (!(script.line_offset <= this.line_ &&
|
|
400
|
+
this.line_ < script.line_offset + script.lineCount())) {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
if (this.type_ == Debug.ScriptBreakPointType.ScriptName) {
|
|
404
|
+
return this.script_name_ == script.nameOrSourceURL();
|
|
405
|
+
} else if (this.type_ == Debug.ScriptBreakPointType.ScriptRegExp) {
|
|
406
|
+
return this.script_regexp_object_.test(script.nameOrSourceURL());
|
|
407
|
+
} else {
|
|
408
|
+
throw new Error("Unexpected breakpoint type " + this.type_);
|
|
409
|
+
}
|
|
391
410
|
}
|
|
392
411
|
};
|
|
393
412
|
|
|
@@ -431,7 +450,8 @@ ScriptBreakPoint.prototype.set = function (script) {
|
|
|
431
450
|
}
|
|
432
451
|
var actual_location = script.locationFromPosition(actual_position, true);
|
|
433
452
|
break_point.actual_location = { line: actual_location.line,
|
|
434
|
-
column: actual_location.column
|
|
453
|
+
column: actual_location.column,
|
|
454
|
+
script_id: script.id };
|
|
435
455
|
this.break_points_.push(break_point);
|
|
436
456
|
return break_point;
|
|
437
457
|
};
|
|
@@ -644,7 +664,8 @@ Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
|
|
|
644
664
|
actual_position += this.sourcePosition(func);
|
|
645
665
|
var actual_location = script.locationFromPosition(actual_position, true);
|
|
646
666
|
break_point.actual_location = { line: actual_location.line,
|
|
647
|
-
column: actual_location.column
|
|
667
|
+
column: actual_location.column,
|
|
668
|
+
script_id: script.id };
|
|
648
669
|
break_point.setCondition(opt_condition);
|
|
649
670
|
return break_point.number();
|
|
650
671
|
}
|
|
@@ -799,6 +820,15 @@ Debug.setScriptBreakPointByName = function(script_name,
|
|
|
799
820
|
}
|
|
800
821
|
|
|
801
822
|
|
|
823
|
+
Debug.setScriptBreakPointByRegExp = function(script_regexp,
|
|
824
|
+
opt_line, opt_column,
|
|
825
|
+
opt_condition, opt_groupId) {
|
|
826
|
+
return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptRegExp,
|
|
827
|
+
script_regexp, opt_line, opt_column,
|
|
828
|
+
opt_condition, opt_groupId);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
|
|
802
832
|
Debug.enableScriptBreakPoint = function(break_point_number) {
|
|
803
833
|
var script_break_point = this.findScriptBreakPoint(break_point_number, false);
|
|
804
834
|
script_break_point.enable();
|
|
@@ -1549,11 +1579,6 @@ DebugCommandProcessor.prototype.setBreakPointRequest_ =
|
|
|
1549
1579
|
response.failed('Missing argument "type" or "target"');
|
|
1550
1580
|
return;
|
|
1551
1581
|
}
|
|
1552
|
-
if (type != 'function' && type != 'handle' &&
|
|
1553
|
-
type != 'script' && type != 'scriptId') {
|
|
1554
|
-
response.failed('Illegal type "' + type + '"');
|
|
1555
|
-
return;
|
|
1556
|
-
}
|
|
1557
1582
|
|
|
1558
1583
|
// Either function or script break point.
|
|
1559
1584
|
var break_point_number;
|
|
@@ -1598,9 +1623,16 @@ DebugCommandProcessor.prototype.setBreakPointRequest_ =
|
|
|
1598
1623
|
break_point_number =
|
|
1599
1624
|
Debug.setScriptBreakPointByName(target, line, column, condition,
|
|
1600
1625
|
groupId);
|
|
1601
|
-
} else
|
|
1626
|
+
} else if (type == 'scriptId') {
|
|
1602
1627
|
break_point_number =
|
|
1603
1628
|
Debug.setScriptBreakPointById(target, line, column, condition, groupId);
|
|
1629
|
+
} else if (type == 'scriptRegExp') {
|
|
1630
|
+
break_point_number =
|
|
1631
|
+
Debug.setScriptBreakPointByRegExp(target, line, column, condition,
|
|
1632
|
+
groupId);
|
|
1633
|
+
} else {
|
|
1634
|
+
response.failed('Illegal type "' + type + '"');
|
|
1635
|
+
return;
|
|
1604
1636
|
}
|
|
1605
1637
|
|
|
1606
1638
|
// Set additional break point properties.
|
|
@@ -1621,9 +1653,14 @@ DebugCommandProcessor.prototype.setBreakPointRequest_ =
|
|
|
1621
1653
|
if (break_point.type() == Debug.ScriptBreakPointType.ScriptId) {
|
|
1622
1654
|
response.body.type = 'scriptId';
|
|
1623
1655
|
response.body.script_id = break_point.script_id();
|
|
1624
|
-
} else {
|
|
1656
|
+
} else if (break_point.type() == Debug.ScriptBreakPointType.ScriptName) {
|
|
1625
1657
|
response.body.type = 'scriptName';
|
|
1626
1658
|
response.body.script_name = break_point.script_name();
|
|
1659
|
+
} else if (break_point.type() == Debug.ScriptBreakPointType.ScriptRegExp) {
|
|
1660
|
+
response.body.type = 'scriptRegExp';
|
|
1661
|
+
response.body.script_regexp = break_point.script_regexp_object().source;
|
|
1662
|
+
} else {
|
|
1663
|
+
throw new Error("Internal error: Unexpected breakpoint type: " + break_point.type());
|
|
1627
1664
|
}
|
|
1628
1665
|
response.body.line = break_point.line();
|
|
1629
1666
|
response.body.column = break_point.column();
|
|
@@ -1753,9 +1790,14 @@ DebugCommandProcessor.prototype.listBreakpointsRequest_ = function(request, resp
|
|
|
1753
1790
|
if (break_point.type() == Debug.ScriptBreakPointType.ScriptId) {
|
|
1754
1791
|
description.type = 'scriptId';
|
|
1755
1792
|
description.script_id = break_point.script_id();
|
|
1756
|
-
} else {
|
|
1793
|
+
} else if (break_point.type() == Debug.ScriptBreakPointType.ScriptName) {
|
|
1757
1794
|
description.type = 'scriptName';
|
|
1758
1795
|
description.script_name = break_point.script_name();
|
|
1796
|
+
} else if (break_point.type() == Debug.ScriptBreakPointType.ScriptRegExp) {
|
|
1797
|
+
description.type = 'scriptRegExp';
|
|
1798
|
+
description.script_regexp = break_point.script_regexp_object().source;
|
|
1799
|
+
} else {
|
|
1800
|
+
throw new Error("Internal error: Unexpected breakpoint type: " + break_point.type());
|
|
1759
1801
|
}
|
|
1760
1802
|
array.push(description);
|
|
1761
1803
|
}
|
|
@@ -1796,7 +1838,7 @@ DebugCommandProcessor.prototype.setExceptionBreakRequest_ =
|
|
|
1796
1838
|
enabled = !Debug.isBreakOnException();
|
|
1797
1839
|
} else if (type == 'uncaught') {
|
|
1798
1840
|
enabled = !Debug.isBreakOnUncaughtException();
|
|
1799
|
-
}
|
|
1841
|
+
}
|
|
1800
1842
|
|
|
1801
1843
|
// Pull out and check the 'enabled' argument if present:
|
|
1802
1844
|
if (!IS_UNDEFINED(request.arguments.enabled)) {
|
|
@@ -1980,22 +2022,22 @@ DebugCommandProcessor.prototype.evaluateRequest_ = function(request, response) {
|
|
|
1980
2022
|
if (!IS_UNDEFINED(frame) && global) {
|
|
1981
2023
|
return response.failed('Arguments "frame" and "global" are exclusive');
|
|
1982
2024
|
}
|
|
1983
|
-
|
|
2025
|
+
|
|
1984
2026
|
var additional_context_object;
|
|
1985
2027
|
if (additional_context) {
|
|
1986
2028
|
additional_context_object = {};
|
|
1987
2029
|
for (var i = 0; i < additional_context.length; i++) {
|
|
1988
2030
|
var mapping = additional_context[i];
|
|
1989
2031
|
if (!IS_STRING(mapping.name) || !IS_NUMBER(mapping.handle)) {
|
|
1990
|
-
return response.failed("Context element #" + i +
|
|
2032
|
+
return response.failed("Context element #" + i +
|
|
1991
2033
|
" must contain name:string and handle:number");
|
|
1992
|
-
}
|
|
2034
|
+
}
|
|
1993
2035
|
var context_value_mirror = LookupMirror(mapping.handle);
|
|
1994
2036
|
if (!context_value_mirror) {
|
|
1995
2037
|
return response.failed("Context object '" + mapping.name +
|
|
1996
2038
|
"' #" + mapping.handle + "# not found");
|
|
1997
2039
|
}
|
|
1998
|
-
additional_context_object[mapping.name] = context_value_mirror.value();
|
|
2040
|
+
additional_context_object[mapping.name] = context_value_mirror.value();
|
|
1999
2041
|
}
|
|
2000
2042
|
}
|
|
2001
2043
|
|
|
@@ -2269,21 +2311,10 @@ DebugCommandProcessor.prototype.versionRequest_ = function(request, response) {
|
|
|
2269
2311
|
|
|
2270
2312
|
|
|
2271
2313
|
DebugCommandProcessor.prototype.profileRequest_ = function(request, response) {
|
|
2272
|
-
if (!request.arguments) {
|
|
2273
|
-
return response.failed('Missing arguments');
|
|
2274
|
-
}
|
|
2275
|
-
var modules = parseInt(request.arguments.modules);
|
|
2276
|
-
if (isNaN(modules)) {
|
|
2277
|
-
return response.failed('Modules is not an integer');
|
|
2278
|
-
}
|
|
2279
|
-
var tag = parseInt(request.arguments.tag);
|
|
2280
|
-
if (isNaN(tag)) {
|
|
2281
|
-
tag = 0;
|
|
2282
|
-
}
|
|
2283
2314
|
if (request.arguments.command == 'resume') {
|
|
2284
|
-
%ProfilerResume(
|
|
2315
|
+
%ProfilerResume();
|
|
2285
2316
|
} else if (request.arguments.command == 'pause') {
|
|
2286
|
-
%ProfilerPause(
|
|
2317
|
+
%ProfilerPause();
|
|
2287
2318
|
} else {
|
|
2288
2319
|
return response.failed('Unknown command');
|
|
2289
2320
|
}
|