therubyracer 0.9.0beta4 → 0.9.0beta5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/.gitignore +1 -0
- data/Rakefile +0 -11
- data/ext/v8/extconf.rb +9 -9
- data/ext/v8/v8_external.cpp +40 -10
- data/lib/v8/cli.rb +2 -1
- data/lib/v8/version.rb +1 -1
- data/spec/redjs/.gitignore +1 -0
- data/therubyracer.gemspec +2 -3
- metadata +33 -779
- data/ext/v8/upstream/Makefile +0 -38
- data/ext/v8/upstream/detect_cpu.rb +0 -27
- data/ext/v8/upstream/fpic-on-linux-amd64.patch +0 -13
- data/ext/v8/upstream/scons/CHANGES.txt +0 -5183
- data/ext/v8/upstream/scons/LICENSE.txt +0 -20
- data/ext/v8/upstream/scons/MANIFEST +0 -202
- data/ext/v8/upstream/scons/PKG-INFO +0 -13
- data/ext/v8/upstream/scons/README.txt +0 -273
- data/ext/v8/upstream/scons/RELEASE.txt +0 -1040
- data/ext/v8/upstream/scons/engine/SCons/Action.py +0 -1256
- data/ext/v8/upstream/scons/engine/SCons/Builder.py +0 -868
- data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +0 -217
- data/ext/v8/upstream/scons/engine/SCons/Conftest.py +0 -794
- data/ext/v8/upstream/scons/engine/SCons/Debug.py +0 -237
- data/ext/v8/upstream/scons/engine/SCons/Defaults.py +0 -485
- data/ext/v8/upstream/scons/engine/SCons/Environment.py +0 -2327
- data/ext/v8/upstream/scons/engine/SCons/Errors.py +0 -207
- data/ext/v8/upstream/scons/engine/SCons/Executor.py +0 -636
- data/ext/v8/upstream/scons/engine/SCons/Job.py +0 -435
- data/ext/v8/upstream/scons/engine/SCons/Memoize.py +0 -292
- data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +0 -153
- data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +0 -3220
- data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +0 -128
- data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +0 -1341
- data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +0 -76
- data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +0 -74
- data/ext/v8/upstream/scons/engine/SCons/PathList.py +0 -232
- data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +0 -236
- data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +0 -70
- data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +0 -55
- data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +0 -46
- data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +0 -46
- data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +0 -264
- data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +0 -386
- data/ext/v8/upstream/scons/engine/SCons/SConf.py +0 -1038
- data/ext/v8/upstream/scons/engine/SCons/SConsign.py +0 -381
- data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +0 -132
- data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +0 -74
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +0 -111
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +0 -320
- data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +0 -48
- data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +0 -378
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +0 -103
- data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +0 -55
- data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +0 -415
- data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +0 -386
- data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +0 -1360
- data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +0 -944
- data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +0 -642
- data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +0 -414
- data/ext/v8/upstream/scons/engine/SCons/Sig.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Subst.py +0 -911
- data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +0 -1030
- data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +0 -61
- data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +0 -65
- data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +0 -73
- data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +0 -247
- data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +0 -324
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +0 -56
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +0 -61
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +0 -210
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +0 -84
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +0 -321
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +0 -367
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +0 -497
- data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +0 -104
- data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +0 -138
- data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +0 -71
- data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +0 -675
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +0 -82
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +0 -74
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +0 -80
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +0 -76
- data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +0 -71
- data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +0 -78
- data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +0 -82
- data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +0 -99
- data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +0 -114
- data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +0 -224
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +0 -125
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +0 -94
- data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +0 -62
- data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +0 -62
- data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +0 -98
- data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +0 -90
- data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +0 -73
- data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +0 -80
- data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +0 -81
- data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +0 -85
- data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +0 -77
- data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +0 -59
- data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +0 -52
- data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +0 -72
- data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +0 -90
- data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +0 -59
- data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +0 -60
- data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +0 -229
- data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +0 -490
- data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +0 -71
- data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +0 -110
- data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +0 -234
- data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +0 -138
- data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +0 -79
- data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +0 -99
- data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +0 -121
- data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +0 -112
- data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +0 -77
- data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +0 -90
- data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +0 -159
- data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +0 -266
- data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +0 -269
- data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +0 -1439
- data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +0 -208
- data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +0 -107
- data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +0 -72
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +0 -314
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +0 -185
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +0 -526
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +0 -367
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +0 -43
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +0 -43
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +0 -43
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +0 -78
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +0 -83
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +0 -108
- data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +0 -336
- data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +0 -121
- data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +0 -70
- data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +0 -132
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +0 -68
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +0 -67
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +0 -142
- data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +0 -77
- data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +0 -186
- data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +0 -73
- data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +0 -805
- data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +0 -175
- data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +0 -100
- data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +0 -131
- data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +0 -100
- data/ext/v8/upstream/scons/engine/SCons/Util.py +0 -1645
- data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +0 -91
- data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +0 -107
- data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +0 -139
- data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +0 -109
- data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +0 -147
- data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +0 -317
- data/ext/v8/upstream/scons/engine/SCons/Warnings.py +0 -228
- data/ext/v8/upstream/scons/engine/SCons/__init__.py +0 -49
- data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +0 -302
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +0 -98
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +0 -91
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +0 -124
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +0 -1725
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +0 -583
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +0 -176
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +0 -325
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +0 -1296
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +0 -382
- data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +0 -187
- data/ext/v8/upstream/scons/engine/SCons/cpp.py +0 -598
- data/ext/v8/upstream/scons/engine/SCons/dblite.py +0 -248
- data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +0 -77
- data/ext/v8/upstream/scons/os_spawnv_fix.diff +0 -83
- data/ext/v8/upstream/scons/scons-time.1 +0 -1017
- data/ext/v8/upstream/scons/scons.1 +0 -15179
- data/ext/v8/upstream/scons/sconsign.1 +0 -208
- data/ext/v8/upstream/scons/script/scons +0 -184
- data/ext/v8/upstream/scons/script/scons-time +0 -1529
- data/ext/v8/upstream/scons/script/scons.bat +0 -31
- data/ext/v8/upstream/scons/script/sconsign +0 -508
- data/ext/v8/upstream/scons/setup.cfg +0 -6
- data/ext/v8/upstream/scons/setup.py +0 -427
- data/ext/v8/upstream/v8/.gitignore +0 -33
- data/ext/v8/upstream/v8/AUTHORS +0 -42
- data/ext/v8/upstream/v8/ChangeLog +0 -2663
- data/ext/v8/upstream/v8/LICENSE +0 -52
- data/ext/v8/upstream/v8/LICENSE.strongtalk +0 -29
- data/ext/v8/upstream/v8/LICENSE.v8 +0 -26
- data/ext/v8/upstream/v8/LICENSE.valgrind +0 -45
- data/ext/v8/upstream/v8/SConstruct +0 -1473
- data/ext/v8/upstream/v8/build/README.txt +0 -25
- data/ext/v8/upstream/v8/build/all.gyp +0 -18
- data/ext/v8/upstream/v8/build/armu.gypi +0 -32
- data/ext/v8/upstream/v8/build/common.gypi +0 -82
- data/ext/v8/upstream/v8/build/gyp_v8 +0 -145
- data/ext/v8/upstream/v8/include/v8-debug.h +0 -394
- data/ext/v8/upstream/v8/include/v8-preparser.h +0 -116
- data/ext/v8/upstream/v8/include/v8-profiler.h +0 -505
- data/ext/v8/upstream/v8/include/v8-testing.h +0 -104
- data/ext/v8/upstream/v8/include/v8.h +0 -4000
- data/ext/v8/upstream/v8/include/v8stdint.h +0 -53
- data/ext/v8/upstream/v8/preparser/SConscript +0 -38
- data/ext/v8/upstream/v8/preparser/preparser-process.cc +0 -169
- data/ext/v8/upstream/v8/src/SConscript +0 -380
- data/ext/v8/upstream/v8/src/accessors.cc +0 -766
- data/ext/v8/upstream/v8/src/accessors.h +0 -121
- data/ext/v8/upstream/v8/src/allocation-inl.h +0 -49
- data/ext/v8/upstream/v8/src/allocation.cc +0 -122
- data/ext/v8/upstream/v8/src/allocation.h +0 -143
- data/ext/v8/upstream/v8/src/api.cc +0 -5678
- data/ext/v8/upstream/v8/src/api.h +0 -572
- data/ext/v8/upstream/v8/src/apinatives.js +0 -110
- data/ext/v8/upstream/v8/src/apiutils.h +0 -73
- data/ext/v8/upstream/v8/src/arguments.h +0 -116
- data/ext/v8/upstream/v8/src/arm/assembler-arm-inl.h +0 -353
- data/ext/v8/upstream/v8/src/arm/assembler-arm.cc +0 -2877
- data/ext/v8/upstream/v8/src/arm/assembler-arm.h +0 -1382
- data/ext/v8/upstream/v8/src/arm/builtins-arm.cc +0 -1634
- data/ext/v8/upstream/v8/src/arm/code-stubs-arm.cc +0 -6917
- data/ext/v8/upstream/v8/src/arm/code-stubs-arm.h +0 -623
- data/ext/v8/upstream/v8/src/arm/codegen-arm-inl.h +0 -48
- data/ext/v8/upstream/v8/src/arm/codegen-arm.cc +0 -7437
- data/ext/v8/upstream/v8/src/arm/codegen-arm.h +0 -595
- data/ext/v8/upstream/v8/src/arm/constants-arm.cc +0 -152
- data/ext/v8/upstream/v8/src/arm/constants-arm.h +0 -778
- data/ext/v8/upstream/v8/src/arm/cpu-arm.cc +0 -149
- data/ext/v8/upstream/v8/src/arm/debug-arm.cc +0 -317
- data/ext/v8/upstream/v8/src/arm/deoptimizer-arm.cc +0 -737
- data/ext/v8/upstream/v8/src/arm/disasm-arm.cc +0 -1503
- data/ext/v8/upstream/v8/src/arm/frames-arm.cc +0 -45
- data/ext/v8/upstream/v8/src/arm/frames-arm.h +0 -168
- data/ext/v8/upstream/v8/src/arm/full-codegen-arm.cc +0 -4374
- data/ext/v8/upstream/v8/src/arm/ic-arm.cc +0 -1793
- data/ext/v8/upstream/v8/src/arm/jump-target-arm.cc +0 -174
- data/ext/v8/upstream/v8/src/arm/lithium-arm.cc +0 -2120
- data/ext/v8/upstream/v8/src/arm/lithium-arm.h +0 -2179
- data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.cc +0 -4132
- data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.h +0 -329
- data/ext/v8/upstream/v8/src/arm/lithium-gap-resolver-arm.cc +0 -305
- data/ext/v8/upstream/v8/src/arm/lithium-gap-resolver-arm.h +0 -84
- data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.cc +0 -2939
- data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.h +0 -1071
- data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.cc +0 -1287
- data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.h +0 -253
- data/ext/v8/upstream/v8/src/arm/register-allocator-arm-inl.h +0 -100
- data/ext/v8/upstream/v8/src/arm/register-allocator-arm.cc +0 -63
- data/ext/v8/upstream/v8/src/arm/register-allocator-arm.h +0 -44
- data/ext/v8/upstream/v8/src/arm/simulator-arm.cc +0 -3288
- data/ext/v8/upstream/v8/src/arm/simulator-arm.h +0 -413
- data/ext/v8/upstream/v8/src/arm/stub-cache-arm.cc +0 -4034
- data/ext/v8/upstream/v8/src/arm/virtual-frame-arm-inl.h +0 -59
- data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.cc +0 -843
- data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.h +0 -523
- data/ext/v8/upstream/v8/src/array.js +0 -1249
- data/ext/v8/upstream/v8/src/assembler.cc +0 -1067
- data/ext/v8/upstream/v8/src/assembler.h +0 -823
- data/ext/v8/upstream/v8/src/ast-inl.h +0 -112
- data/ext/v8/upstream/v8/src/ast.cc +0 -1078
- data/ext/v8/upstream/v8/src/ast.h +0 -2234
- data/ext/v8/upstream/v8/src/atomicops.h +0 -167
- data/ext/v8/upstream/v8/src/atomicops_internals_arm_gcc.h +0 -145
- data/ext/v8/upstream/v8/src/atomicops_internals_mips_gcc.h +0 -169
- data/ext/v8/upstream/v8/src/atomicops_internals_x86_gcc.cc +0 -126
- data/ext/v8/upstream/v8/src/atomicops_internals_x86_gcc.h +0 -287
- data/ext/v8/upstream/v8/src/atomicops_internals_x86_macosx.h +0 -301
- data/ext/v8/upstream/v8/src/atomicops_internals_x86_msvc.h +0 -203
- data/ext/v8/upstream/v8/src/bignum-dtoa.cc +0 -655
- data/ext/v8/upstream/v8/src/bignum-dtoa.h +0 -81
- data/ext/v8/upstream/v8/src/bignum.cc +0 -768
- data/ext/v8/upstream/v8/src/bignum.h +0 -140
- data/ext/v8/upstream/v8/src/bootstrapper.cc +0 -2138
- data/ext/v8/upstream/v8/src/bootstrapper.h +0 -185
- data/ext/v8/upstream/v8/src/builtins.cc +0 -1708
- data/ext/v8/upstream/v8/src/builtins.h +0 -368
- data/ext/v8/upstream/v8/src/bytecodes-irregexp.h +0 -105
- data/ext/v8/upstream/v8/src/cached-powers.cc +0 -177
- data/ext/v8/upstream/v8/src/cached-powers.h +0 -65
- data/ext/v8/upstream/v8/src/char-predicates-inl.h +0 -94
- data/ext/v8/upstream/v8/src/char-predicates.h +0 -65
- data/ext/v8/upstream/v8/src/checks.cc +0 -110
- data/ext/v8/upstream/v8/src/checks.h +0 -296
- data/ext/v8/upstream/v8/src/circular-queue-inl.h +0 -53
- data/ext/v8/upstream/v8/src/circular-queue.cc +0 -122
- data/ext/v8/upstream/v8/src/circular-queue.h +0 -103
- data/ext/v8/upstream/v8/src/code-stubs.cc +0 -240
- data/ext/v8/upstream/v8/src/code-stubs.h +0 -971
- data/ext/v8/upstream/v8/src/code.h +0 -68
- data/ext/v8/upstream/v8/src/codegen-inl.h +0 -68
- data/ext/v8/upstream/v8/src/codegen.cc +0 -505
- data/ext/v8/upstream/v8/src/codegen.h +0 -245
- data/ext/v8/upstream/v8/src/compilation-cache.cc +0 -540
- data/ext/v8/upstream/v8/src/compilation-cache.h +0 -287
- data/ext/v8/upstream/v8/src/compiler.cc +0 -792
- data/ext/v8/upstream/v8/src/compiler.h +0 -307
- data/ext/v8/upstream/v8/src/contexts.cc +0 -327
- data/ext/v8/upstream/v8/src/contexts.h +0 -382
- data/ext/v8/upstream/v8/src/conversions-inl.h +0 -110
- data/ext/v8/upstream/v8/src/conversions.cc +0 -1125
- data/ext/v8/upstream/v8/src/conversions.h +0 -122
- data/ext/v8/upstream/v8/src/counters.cc +0 -93
- data/ext/v8/upstream/v8/src/counters.h +0 -254
- data/ext/v8/upstream/v8/src/cpu-profiler-inl.h +0 -101
- data/ext/v8/upstream/v8/src/cpu-profiler.cc +0 -606
- data/ext/v8/upstream/v8/src/cpu-profiler.h +0 -305
- data/ext/v8/upstream/v8/src/cpu.h +0 -67
- data/ext/v8/upstream/v8/src/d8-debug.cc +0 -367
- data/ext/v8/upstream/v8/src/d8-debug.h +0 -158
- data/ext/v8/upstream/v8/src/d8-posix.cc +0 -695
- data/ext/v8/upstream/v8/src/d8-readline.cc +0 -128
- data/ext/v8/upstream/v8/src/d8-windows.cc +0 -42
- data/ext/v8/upstream/v8/src/d8.cc +0 -796
- data/ext/v8/upstream/v8/src/d8.gyp +0 -88
- data/ext/v8/upstream/v8/src/d8.h +0 -231
- data/ext/v8/upstream/v8/src/d8.js +0 -2798
- data/ext/v8/upstream/v8/src/data-flow.cc +0 -545
- data/ext/v8/upstream/v8/src/data-flow.h +0 -379
- data/ext/v8/upstream/v8/src/date.js +0 -1103
- data/ext/v8/upstream/v8/src/dateparser-inl.h +0 -125
- data/ext/v8/upstream/v8/src/dateparser.cc +0 -178
- data/ext/v8/upstream/v8/src/dateparser.h +0 -265
- data/ext/v8/upstream/v8/src/debug-agent.cc +0 -447
- data/ext/v8/upstream/v8/src/debug-agent.h +0 -129
- data/ext/v8/upstream/v8/src/debug-debugger.js +0 -2569
- data/ext/v8/upstream/v8/src/debug.cc +0 -3188
- data/ext/v8/upstream/v8/src/debug.h +0 -1055
- data/ext/v8/upstream/v8/src/deoptimizer.cc +0 -1296
- data/ext/v8/upstream/v8/src/deoptimizer.h +0 -629
- data/ext/v8/upstream/v8/src/disasm.h +0 -80
- data/ext/v8/upstream/v8/src/disassembler.cc +0 -339
- data/ext/v8/upstream/v8/src/disassembler.h +0 -56
- data/ext/v8/upstream/v8/src/diy-fp.cc +0 -58
- data/ext/v8/upstream/v8/src/diy-fp.h +0 -117
- data/ext/v8/upstream/v8/src/double.h +0 -238
- data/ext/v8/upstream/v8/src/dtoa.cc +0 -103
- data/ext/v8/upstream/v8/src/dtoa.h +0 -85
- data/ext/v8/upstream/v8/src/execution.cc +0 -791
- data/ext/v8/upstream/v8/src/execution.h +0 -291
- data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.cc +0 -250
- data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.h +0 -89
- data/ext/v8/upstream/v8/src/extensions/experimental/experimental.gyp +0 -55
- data/ext/v8/upstream/v8/src/extensions/experimental/i18n-extension.cc +0 -284
- data/ext/v8/upstream/v8/src/extensions/experimental/i18n-extension.h +0 -64
- data/ext/v8/upstream/v8/src/extensions/externalize-string-extension.cc +0 -141
- data/ext/v8/upstream/v8/src/extensions/externalize-string-extension.h +0 -50
- data/ext/v8/upstream/v8/src/extensions/gc-extension.cc +0 -58
- data/ext/v8/upstream/v8/src/extensions/gc-extension.h +0 -49
- data/ext/v8/upstream/v8/src/factory.cc +0 -1194
- data/ext/v8/upstream/v8/src/factory.h +0 -436
- data/ext/v8/upstream/v8/src/fast-dtoa.cc +0 -736
- data/ext/v8/upstream/v8/src/fast-dtoa.h +0 -83
- data/ext/v8/upstream/v8/src/fixed-dtoa.cc +0 -405
- data/ext/v8/upstream/v8/src/fixed-dtoa.h +0 -55
- data/ext/v8/upstream/v8/src/flag-definitions.h +0 -556
- data/ext/v8/upstream/v8/src/flags.cc +0 -551
- data/ext/v8/upstream/v8/src/flags.h +0 -79
- data/ext/v8/upstream/v8/src/frame-element.cc +0 -37
- data/ext/v8/upstream/v8/src/frame-element.h +0 -269
- data/ext/v8/upstream/v8/src/frames-inl.h +0 -236
- data/ext/v8/upstream/v8/src/frames.cc +0 -1273
- data/ext/v8/upstream/v8/src/frames.h +0 -854
- data/ext/v8/upstream/v8/src/full-codegen.cc +0 -1385
- data/ext/v8/upstream/v8/src/full-codegen.h +0 -753
- data/ext/v8/upstream/v8/src/func-name-inferrer.cc +0 -91
- data/ext/v8/upstream/v8/src/func-name-inferrer.h +0 -111
- data/ext/v8/upstream/v8/src/gdb-jit.cc +0 -1548
- data/ext/v8/upstream/v8/src/gdb-jit.h +0 -138
- data/ext/v8/upstream/v8/src/global-handles.cc +0 -596
- data/ext/v8/upstream/v8/src/global-handles.h +0 -239
- data/ext/v8/upstream/v8/src/globals.h +0 -325
- data/ext/v8/upstream/v8/src/handles-inl.h +0 -177
- data/ext/v8/upstream/v8/src/handles.cc +0 -965
- data/ext/v8/upstream/v8/src/handles.h +0 -372
- data/ext/v8/upstream/v8/src/hashmap.cc +0 -230
- data/ext/v8/upstream/v8/src/hashmap.h +0 -121
- data/ext/v8/upstream/v8/src/heap-inl.h +0 -703
- data/ext/v8/upstream/v8/src/heap-profiler.cc +0 -1173
- data/ext/v8/upstream/v8/src/heap-profiler.h +0 -396
- data/ext/v8/upstream/v8/src/heap.cc +0 -5856
- data/ext/v8/upstream/v8/src/heap.h +0 -2264
- data/ext/v8/upstream/v8/src/hydrogen-instructions.cc +0 -1639
- data/ext/v8/upstream/v8/src/hydrogen-instructions.h +0 -3657
- data/ext/v8/upstream/v8/src/hydrogen.cc +0 -6011
- data/ext/v8/upstream/v8/src/hydrogen.h +0 -1137
- data/ext/v8/upstream/v8/src/ia32/assembler-ia32-inl.h +0 -430
- data/ext/v8/upstream/v8/src/ia32/assembler-ia32.cc +0 -2846
- data/ext/v8/upstream/v8/src/ia32/assembler-ia32.h +0 -1159
- data/ext/v8/upstream/v8/src/ia32/builtins-ia32.cc +0 -1596
- data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.cc +0 -6549
- data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.h +0 -495
- data/ext/v8/upstream/v8/src/ia32/codegen-ia32-inl.h +0 -46
- data/ext/v8/upstream/v8/src/ia32/codegen-ia32.cc +0 -10385
- data/ext/v8/upstream/v8/src/ia32/codegen-ia32.h +0 -801
- data/ext/v8/upstream/v8/src/ia32/cpu-ia32.cc +0 -88
- data/ext/v8/upstream/v8/src/ia32/debug-ia32.cc +0 -312
- data/ext/v8/upstream/v8/src/ia32/deoptimizer-ia32.cc +0 -774
- data/ext/v8/upstream/v8/src/ia32/disasm-ia32.cc +0 -1620
- data/ext/v8/upstream/v8/src/ia32/frames-ia32.cc +0 -45
- data/ext/v8/upstream/v8/src/ia32/frames-ia32.h +0 -140
- data/ext/v8/upstream/v8/src/ia32/full-codegen-ia32.cc +0 -4357
- data/ext/v8/upstream/v8/src/ia32/ic-ia32.cc +0 -1779
- data/ext/v8/upstream/v8/src/ia32/jump-target-ia32.cc +0 -437
- data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.cc +0 -4158
- data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.h +0 -318
- data/ext/v8/upstream/v8/src/ia32/lithium-gap-resolver-ia32.cc +0 -466
- data/ext/v8/upstream/v8/src/ia32/lithium-gap-resolver-ia32.h +0 -110
- data/ext/v8/upstream/v8/src/ia32/lithium-ia32.cc +0 -2181
- data/ext/v8/upstream/v8/src/ia32/lithium-ia32.h +0 -2235
- data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.cc +0 -2056
- data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.h +0 -807
- data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.cc +0 -1264
- data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.h +0 -216
- data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32-inl.h +0 -82
- data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32.cc +0 -157
- data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32.h +0 -43
- data/ext/v8/upstream/v8/src/ia32/simulator-ia32.cc +0 -30
- data/ext/v8/upstream/v8/src/ia32/simulator-ia32.h +0 -72
- data/ext/v8/upstream/v8/src/ia32/stub-cache-ia32.cc +0 -3711
- data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.cc +0 -1366
- data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.h +0 -650
- data/ext/v8/upstream/v8/src/ic-inl.h +0 -130
- data/ext/v8/upstream/v8/src/ic.cc +0 -2389
- data/ext/v8/upstream/v8/src/ic.h +0 -675
- data/ext/v8/upstream/v8/src/inspector.cc +0 -63
- data/ext/v8/upstream/v8/src/inspector.h +0 -62
- data/ext/v8/upstream/v8/src/interpreter-irregexp.cc +0 -659
- data/ext/v8/upstream/v8/src/interpreter-irregexp.h +0 -49
- data/ext/v8/upstream/v8/src/isolate.cc +0 -883
- data/ext/v8/upstream/v8/src/isolate.h +0 -1306
- data/ext/v8/upstream/v8/src/json.js +0 -342
- data/ext/v8/upstream/v8/src/jsregexp.cc +0 -5371
- data/ext/v8/upstream/v8/src/jsregexp.h +0 -1483
- data/ext/v8/upstream/v8/src/jump-target-heavy-inl.h +0 -51
- data/ext/v8/upstream/v8/src/jump-target-heavy.cc +0 -427
- data/ext/v8/upstream/v8/src/jump-target-heavy.h +0 -238
- data/ext/v8/upstream/v8/src/jump-target-inl.h +0 -48
- data/ext/v8/upstream/v8/src/jump-target-light-inl.h +0 -56
- data/ext/v8/upstream/v8/src/jump-target-light.cc +0 -111
- data/ext/v8/upstream/v8/src/jump-target-light.h +0 -193
- data/ext/v8/upstream/v8/src/jump-target.cc +0 -91
- data/ext/v8/upstream/v8/src/jump-target.h +0 -90
- data/ext/v8/upstream/v8/src/list-inl.h +0 -206
- data/ext/v8/upstream/v8/src/list.h +0 -164
- data/ext/v8/upstream/v8/src/lithium-allocator-inl.h +0 -142
- data/ext/v8/upstream/v8/src/lithium-allocator.cc +0 -2105
- data/ext/v8/upstream/v8/src/lithium-allocator.h +0 -630
- data/ext/v8/upstream/v8/src/lithium.cc +0 -169
- data/ext/v8/upstream/v8/src/lithium.h +0 -592
- data/ext/v8/upstream/v8/src/liveedit-debugger.js +0 -1082
- data/ext/v8/upstream/v8/src/liveedit.cc +0 -1693
- data/ext/v8/upstream/v8/src/liveedit.h +0 -179
- data/ext/v8/upstream/v8/src/liveobjectlist-inl.h +0 -126
- data/ext/v8/upstream/v8/src/liveobjectlist.cc +0 -2589
- data/ext/v8/upstream/v8/src/liveobjectlist.h +0 -322
- data/ext/v8/upstream/v8/src/log-inl.h +0 -59
- data/ext/v8/upstream/v8/src/log-utils.cc +0 -423
- data/ext/v8/upstream/v8/src/log-utils.h +0 -229
- data/ext/v8/upstream/v8/src/log.cc +0 -1666
- data/ext/v8/upstream/v8/src/log.h +0 -446
- data/ext/v8/upstream/v8/src/macro-assembler.h +0 -120
- data/ext/v8/upstream/v8/src/macros.py +0 -178
- data/ext/v8/upstream/v8/src/mark-compact.cc +0 -3092
- data/ext/v8/upstream/v8/src/mark-compact.h +0 -506
- data/ext/v8/upstream/v8/src/math.js +0 -264
- data/ext/v8/upstream/v8/src/messages.cc +0 -166
- data/ext/v8/upstream/v8/src/messages.h +0 -114
- data/ext/v8/upstream/v8/src/messages.js +0 -1090
- data/ext/v8/upstream/v8/src/mips/assembler-mips-inl.h +0 -335
- data/ext/v8/upstream/v8/src/mips/assembler-mips.cc +0 -2093
- data/ext/v8/upstream/v8/src/mips/assembler-mips.h +0 -1066
- data/ext/v8/upstream/v8/src/mips/builtins-mips.cc +0 -148
- data/ext/v8/upstream/v8/src/mips/code-stubs-mips.cc +0 -752
- data/ext/v8/upstream/v8/src/mips/code-stubs-mips.h +0 -511
- data/ext/v8/upstream/v8/src/mips/codegen-mips-inl.h +0 -64
- data/ext/v8/upstream/v8/src/mips/codegen-mips.cc +0 -1213
- data/ext/v8/upstream/v8/src/mips/codegen-mips.h +0 -633
- data/ext/v8/upstream/v8/src/mips/constants-mips.cc +0 -352
- data/ext/v8/upstream/v8/src/mips/constants-mips.h +0 -723
- data/ext/v8/upstream/v8/src/mips/cpu-mips.cc +0 -90
- data/ext/v8/upstream/v8/src/mips/debug-mips.cc +0 -155
- data/ext/v8/upstream/v8/src/mips/deoptimizer-mips.cc +0 -91
- data/ext/v8/upstream/v8/src/mips/disasm-mips.cc +0 -1023
- data/ext/v8/upstream/v8/src/mips/frames-mips.cc +0 -48
- data/ext/v8/upstream/v8/src/mips/frames-mips.h +0 -179
- data/ext/v8/upstream/v8/src/mips/full-codegen-mips.cc +0 -727
- data/ext/v8/upstream/v8/src/mips/ic-mips.cc +0 -244
- data/ext/v8/upstream/v8/src/mips/jump-target-mips.cc +0 -80
- data/ext/v8/upstream/v8/src/mips/lithium-codegen-mips.h +0 -65
- data/ext/v8/upstream/v8/src/mips/lithium-mips.h +0 -304
- data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.cc +0 -3327
- data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.h +0 -1058
- data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.cc +0 -478
- data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.h +0 -250
- data/ext/v8/upstream/v8/src/mips/register-allocator-mips-inl.h +0 -134
- data/ext/v8/upstream/v8/src/mips/register-allocator-mips.cc +0 -63
- data/ext/v8/upstream/v8/src/mips/register-allocator-mips.h +0 -47
- data/ext/v8/upstream/v8/src/mips/simulator-mips.cc +0 -2438
- data/ext/v8/upstream/v8/src/mips/simulator-mips.h +0 -394
- data/ext/v8/upstream/v8/src/mips/stub-cache-mips.cc +0 -601
- data/ext/v8/upstream/v8/src/mips/virtual-frame-mips-inl.h +0 -58
- data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.cc +0 -307
- data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.h +0 -530
- data/ext/v8/upstream/v8/src/mirror-debugger.js +0 -2381
- data/ext/v8/upstream/v8/src/mksnapshot.cc +0 -256
- data/ext/v8/upstream/v8/src/natives.h +0 -63
- data/ext/v8/upstream/v8/src/objects-debug.cc +0 -722
- data/ext/v8/upstream/v8/src/objects-inl.h +0 -4166
- data/ext/v8/upstream/v8/src/objects-printer.cc +0 -801
- data/ext/v8/upstream/v8/src/objects-visiting.cc +0 -142
- data/ext/v8/upstream/v8/src/objects-visiting.h +0 -422
- data/ext/v8/upstream/v8/src/objects.cc +0 -10296
- data/ext/v8/upstream/v8/src/objects.h +0 -6662
- data/ext/v8/upstream/v8/src/parser.cc +0 -5168
- data/ext/v8/upstream/v8/src/parser.h +0 -823
- data/ext/v8/upstream/v8/src/platform-cygwin.cc +0 -811
- data/ext/v8/upstream/v8/src/platform-freebsd.cc +0 -854
- data/ext/v8/upstream/v8/src/platform-linux.cc +0 -1120
- data/ext/v8/upstream/v8/src/platform-macos.cc +0 -865
- data/ext/v8/upstream/v8/src/platform-nullos.cc +0 -504
- data/ext/v8/upstream/v8/src/platform-openbsd.cc +0 -672
- data/ext/v8/upstream/v8/src/platform-posix.cc +0 -424
- data/ext/v8/upstream/v8/src/platform-solaris.cc +0 -796
- data/ext/v8/upstream/v8/src/platform-tls-mac.h +0 -62
- data/ext/v8/upstream/v8/src/platform-tls-win32.h +0 -62
- data/ext/v8/upstream/v8/src/platform-tls.h +0 -50
- data/ext/v8/upstream/v8/src/platform-win32.cc +0 -2072
- data/ext/v8/upstream/v8/src/platform.h +0 -693
- data/ext/v8/upstream/v8/src/preparse-data.cc +0 -185
- data/ext/v8/upstream/v8/src/preparse-data.h +0 -249
- data/ext/v8/upstream/v8/src/preparser-api.cc +0 -219
- data/ext/v8/upstream/v8/src/preparser.cc +0 -1205
- data/ext/v8/upstream/v8/src/preparser.h +0 -278
- data/ext/v8/upstream/v8/src/prettyprinter.cc +0 -1530
- data/ext/v8/upstream/v8/src/prettyprinter.h +0 -223
- data/ext/v8/upstream/v8/src/profile-generator-inl.h +0 -128
- data/ext/v8/upstream/v8/src/profile-generator.cc +0 -3095
- data/ext/v8/upstream/v8/src/profile-generator.h +0 -1125
- data/ext/v8/upstream/v8/src/property.cc +0 -102
- data/ext/v8/upstream/v8/src/property.h +0 -348
- data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp-inl.h +0 -78
- data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp.cc +0 -470
- data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp.h +0 -142
- data/ext/v8/upstream/v8/src/regexp-macro-assembler-tracer.cc +0 -373
- data/ext/v8/upstream/v8/src/regexp-macro-assembler-tracer.h +0 -104
- data/ext/v8/upstream/v8/src/regexp-macro-assembler.cc +0 -266
- data/ext/v8/upstream/v8/src/regexp-macro-assembler.h +0 -236
- data/ext/v8/upstream/v8/src/regexp-stack.cc +0 -111
- data/ext/v8/upstream/v8/src/regexp-stack.h +0 -147
- data/ext/v8/upstream/v8/src/regexp.js +0 -483
- data/ext/v8/upstream/v8/src/register-allocator-inl.h +0 -141
- data/ext/v8/upstream/v8/src/register-allocator.cc +0 -98
- data/ext/v8/upstream/v8/src/register-allocator.h +0 -310
- data/ext/v8/upstream/v8/src/rewriter.cc +0 -1024
- data/ext/v8/upstream/v8/src/rewriter.h +0 -59
- data/ext/v8/upstream/v8/src/runtime-profiler.cc +0 -478
- data/ext/v8/upstream/v8/src/runtime-profiler.h +0 -192
- data/ext/v8/upstream/v8/src/runtime.cc +0 -11949
- data/ext/v8/upstream/v8/src/runtime.h +0 -643
- data/ext/v8/upstream/v8/src/runtime.js +0 -643
- data/ext/v8/upstream/v8/src/safepoint-table.cc +0 -256
- data/ext/v8/upstream/v8/src/safepoint-table.h +0 -269
- data/ext/v8/upstream/v8/src/scanner-base.cc +0 -964
- data/ext/v8/upstream/v8/src/scanner-base.h +0 -664
- data/ext/v8/upstream/v8/src/scanner.cc +0 -584
- data/ext/v8/upstream/v8/src/scanner.h +0 -196
- data/ext/v8/upstream/v8/src/scopeinfo.cc +0 -631
- data/ext/v8/upstream/v8/src/scopeinfo.h +0 -249
- data/ext/v8/upstream/v8/src/scopes.cc +0 -1093
- data/ext/v8/upstream/v8/src/scopes.h +0 -508
- data/ext/v8/upstream/v8/src/serialize.cc +0 -1574
- data/ext/v8/upstream/v8/src/serialize.h +0 -589
- data/ext/v8/upstream/v8/src/shell.h +0 -55
- data/ext/v8/upstream/v8/src/simulator.h +0 -43
- data/ext/v8/upstream/v8/src/small-pointer-list.h +0 -163
- data/ext/v8/upstream/v8/src/smart-pointer.h +0 -109
- data/ext/v8/upstream/v8/src/snapshot-common.cc +0 -82
- data/ext/v8/upstream/v8/src/snapshot-empty.cc +0 -50
- data/ext/v8/upstream/v8/src/snapshot.h +0 -73
- data/ext/v8/upstream/v8/src/spaces-inl.h +0 -529
- data/ext/v8/upstream/v8/src/spaces.cc +0 -3147
- data/ext/v8/upstream/v8/src/spaces.h +0 -2368
- data/ext/v8/upstream/v8/src/splay-tree-inl.h +0 -310
- data/ext/v8/upstream/v8/src/splay-tree.h +0 -203
- data/ext/v8/upstream/v8/src/string-search.cc +0 -41
- data/ext/v8/upstream/v8/src/string-search.h +0 -568
- data/ext/v8/upstream/v8/src/string-stream.cc +0 -592
- data/ext/v8/upstream/v8/src/string-stream.h +0 -191
- data/ext/v8/upstream/v8/src/string.js +0 -915
- data/ext/v8/upstream/v8/src/strtod.cc +0 -440
- data/ext/v8/upstream/v8/src/strtod.h +0 -40
- data/ext/v8/upstream/v8/src/stub-cache.cc +0 -1940
- data/ext/v8/upstream/v8/src/stub-cache.h +0 -866
- data/ext/v8/upstream/v8/src/third_party/valgrind/valgrind.h +0 -3925
- data/ext/v8/upstream/v8/src/token.cc +0 -63
- data/ext/v8/upstream/v8/src/token.h +0 -288
- data/ext/v8/upstream/v8/src/top.cc +0 -983
- data/ext/v8/upstream/v8/src/type-info.cc +0 -472
- data/ext/v8/upstream/v8/src/type-info.h +0 -290
- data/ext/v8/upstream/v8/src/unbound-queue-inl.h +0 -95
- data/ext/v8/upstream/v8/src/unbound-queue.h +0 -67
- data/ext/v8/upstream/v8/src/unicode-inl.h +0 -238
- data/ext/v8/upstream/v8/src/unicode.cc +0 -1624
- data/ext/v8/upstream/v8/src/unicode.h +0 -280
- data/ext/v8/upstream/v8/src/uri.js +0 -402
- data/ext/v8/upstream/v8/src/utils.cc +0 -371
- data/ext/v8/upstream/v8/src/utils.h +0 -796
- data/ext/v8/upstream/v8/src/v8-counters.cc +0 -62
- data/ext/v8/upstream/v8/src/v8-counters.h +0 -311
- data/ext/v8/upstream/v8/src/v8.cc +0 -215
- data/ext/v8/upstream/v8/src/v8.h +0 -130
- data/ext/v8/upstream/v8/src/v8checks.h +0 -64
- data/ext/v8/upstream/v8/src/v8dll-main.cc +0 -39
- data/ext/v8/upstream/v8/src/v8globals.h +0 -486
- data/ext/v8/upstream/v8/src/v8memory.h +0 -82
- data/ext/v8/upstream/v8/src/v8natives.js +0 -1293
- data/ext/v8/upstream/v8/src/v8preparserdll-main.cc +0 -39
- data/ext/v8/upstream/v8/src/v8threads.cc +0 -453
- data/ext/v8/upstream/v8/src/v8threads.h +0 -164
- data/ext/v8/upstream/v8/src/v8utils.h +0 -317
- data/ext/v8/upstream/v8/src/variables.cc +0 -132
- data/ext/v8/upstream/v8/src/variables.h +0 -212
- data/ext/v8/upstream/v8/src/version.cc +0 -116
- data/ext/v8/upstream/v8/src/version.h +0 -68
- data/ext/v8/upstream/v8/src/virtual-frame-heavy-inl.h +0 -190
- data/ext/v8/upstream/v8/src/virtual-frame-heavy.cc +0 -312
- data/ext/v8/upstream/v8/src/virtual-frame-inl.h +0 -39
- data/ext/v8/upstream/v8/src/virtual-frame-light-inl.h +0 -171
- data/ext/v8/upstream/v8/src/virtual-frame-light.cc +0 -52
- data/ext/v8/upstream/v8/src/virtual-frame.cc +0 -49
- data/ext/v8/upstream/v8/src/virtual-frame.h +0 -59
- data/ext/v8/upstream/v8/src/vm-state-inl.h +0 -138
- data/ext/v8/upstream/v8/src/vm-state.h +0 -70
- data/ext/v8/upstream/v8/src/win32-headers.h +0 -96
- data/ext/v8/upstream/v8/src/x64/assembler-x64-inl.h +0 -456
- data/ext/v8/upstream/v8/src/x64/assembler-x64.cc +0 -2954
- data/ext/v8/upstream/v8/src/x64/assembler-x64.h +0 -1630
- data/ext/v8/upstream/v8/src/x64/builtins-x64.cc +0 -1493
- data/ext/v8/upstream/v8/src/x64/code-stubs-x64.cc +0 -5132
- data/ext/v8/upstream/v8/src/x64/code-stubs-x64.h +0 -477
- data/ext/v8/upstream/v8/src/x64/codegen-x64-inl.h +0 -46
- data/ext/v8/upstream/v8/src/x64/codegen-x64.cc +0 -8843
- data/ext/v8/upstream/v8/src/x64/codegen-x64.h +0 -753
- data/ext/v8/upstream/v8/src/x64/cpu-x64.cc +0 -88
- data/ext/v8/upstream/v8/src/x64/debug-x64.cc +0 -318
- data/ext/v8/upstream/v8/src/x64/deoptimizer-x64.cc +0 -815
- data/ext/v8/upstream/v8/src/x64/disasm-x64.cc +0 -1752
- data/ext/v8/upstream/v8/src/x64/frames-x64.cc +0 -45
- data/ext/v8/upstream/v8/src/x64/frames-x64.h +0 -130
- data/ext/v8/upstream/v8/src/x64/full-codegen-x64.cc +0 -4339
- data/ext/v8/upstream/v8/src/x64/ic-x64.cc +0 -1752
- data/ext/v8/upstream/v8/src/x64/jump-target-x64.cc +0 -437
- data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.cc +0 -3970
- data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.h +0 -318
- data/ext/v8/upstream/v8/src/x64/lithium-gap-resolver-x64.cc +0 -320
- data/ext/v8/upstream/v8/src/x64/lithium-gap-resolver-x64.h +0 -74
- data/ext/v8/upstream/v8/src/x64/lithium-x64.cc +0 -2115
- data/ext/v8/upstream/v8/src/x64/lithium-x64.h +0 -2161
- data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.cc +0 -2911
- data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.h +0 -1984
- data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.cc +0 -1398
- data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.h +0 -282
- data/ext/v8/upstream/v8/src/x64/register-allocator-x64-inl.h +0 -87
- data/ext/v8/upstream/v8/src/x64/register-allocator-x64.cc +0 -95
- data/ext/v8/upstream/v8/src/x64/register-allocator-x64.h +0 -43
- data/ext/v8/upstream/v8/src/x64/simulator-x64.cc +0 -27
- data/ext/v8/upstream/v8/src/x64/simulator-x64.h +0 -71
- data/ext/v8/upstream/v8/src/x64/stub-cache-x64.cc +0 -3460
- data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.cc +0 -1296
- data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.h +0 -597
- data/ext/v8/upstream/v8/src/zone-inl.h +0 -129
- data/ext/v8/upstream/v8/src/zone.cc +0 -196
- data/ext/v8/upstream/v8/src/zone.h +0 -236
- data/ext/v8/upstream/v8/tools/codemap.js +0 -265
- data/ext/v8/upstream/v8/tools/consarray.js +0 -93
- data/ext/v8/upstream/v8/tools/csvparser.js +0 -78
- data/ext/v8/upstream/v8/tools/disasm.py +0 -92
- data/ext/v8/upstream/v8/tools/freebsd-tick-processor +0 -10
- data/ext/v8/upstream/v8/tools/gc-nvp-trace-processor.py +0 -328
- data/ext/v8/upstream/v8/tools/generate-ten-powers.scm +0 -286
- data/ext/v8/upstream/v8/tools/grokdump.py +0 -840
- data/ext/v8/upstream/v8/tools/gyp/v8.gyp +0 -844
- data/ext/v8/upstream/v8/tools/js2c.py +0 -380
- data/ext/v8/upstream/v8/tools/jsmin.py +0 -280
- data/ext/v8/upstream/v8/tools/linux-tick-processor +0 -35
- data/ext/v8/upstream/v8/tools/ll_prof.py +0 -919
- data/ext/v8/upstream/v8/tools/logreader.js +0 -185
- data/ext/v8/upstream/v8/tools/mac-nm +0 -18
- data/ext/v8/upstream/v8/tools/mac-tick-processor +0 -6
- data/ext/v8/upstream/v8/tools/oom_dump/README +0 -31
- data/ext/v8/upstream/v8/tools/oom_dump/SConstruct +0 -42
- data/ext/v8/upstream/v8/tools/oom_dump/oom_dump.cc +0 -288
- data/ext/v8/upstream/v8/tools/presubmit.py +0 -305
- data/ext/v8/upstream/v8/tools/process-heap-prof.py +0 -120
- data/ext/v8/upstream/v8/tools/profile.js +0 -751
- data/ext/v8/upstream/v8/tools/profile_view.js +0 -219
- data/ext/v8/upstream/v8/tools/run-valgrind.py +0 -77
- data/ext/v8/upstream/v8/tools/splaytree.js +0 -316
- data/ext/v8/upstream/v8/tools/stats-viewer.py +0 -468
- data/ext/v8/upstream/v8/tools/test.py +0 -1490
- data/ext/v8/upstream/v8/tools/tickprocessor-driver.js +0 -59
- data/ext/v8/upstream/v8/tools/tickprocessor.js +0 -877
- data/ext/v8/upstream/v8/tools/utils.py +0 -96
- data/ext/v8/upstream/v8/tools/visual_studio/README.txt +0 -70
- data/ext/v8/upstream/v8/tools/visual_studio/arm.vsprops +0 -14
- data/ext/v8/upstream/v8/tools/visual_studio/common.vsprops +0 -34
- data/ext/v8/upstream/v8/tools/visual_studio/d8.vcproj +0 -193
- data/ext/v8/upstream/v8/tools/visual_studio/d8_arm.vcproj +0 -193
- data/ext/v8/upstream/v8/tools/visual_studio/d8_x64.vcproj +0 -209
- data/ext/v8/upstream/v8/tools/visual_studio/d8js2c.cmd +0 -6
- data/ext/v8/upstream/v8/tools/visual_studio/debug.vsprops +0 -17
- data/ext/v8/upstream/v8/tools/visual_studio/ia32.vsprops +0 -17
- data/ext/v8/upstream/v8/tools/visual_studio/js2c.cmd +0 -6
- data/ext/v8/upstream/v8/tools/visual_studio/release.vsprops +0 -24
- data/ext/v8/upstream/v8/tools/visual_studio/v8.sln +0 -101
- data/ext/v8/upstream/v8/tools/visual_studio/v8.vcproj +0 -227
- data/ext/v8/upstream/v8/tools/visual_studio/v8_arm.sln +0 -74
- data/ext/v8/upstream/v8/tools/visual_studio/v8_arm.vcproj +0 -227
- data/ext/v8/upstream/v8/tools/visual_studio/v8_base.vcproj +0 -1308
- data/ext/v8/upstream/v8/tools/visual_studio/v8_base_arm.vcproj +0 -1238
- data/ext/v8/upstream/v8/tools/visual_studio/v8_base_x64.vcproj +0 -1300
- data/ext/v8/upstream/v8/tools/visual_studio/v8_cctest.vcproj +0 -265
- data/ext/v8/upstream/v8/tools/visual_studio/v8_cctest_arm.vcproj +0 -249
- data/ext/v8/upstream/v8/tools/visual_studio/v8_cctest_x64.vcproj +0 -257
- data/ext/v8/upstream/v8/tools/visual_studio/v8_mksnapshot.vcproj +0 -145
- data/ext/v8/upstream/v8/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -145
- data/ext/v8/upstream/v8/tools/visual_studio/v8_process_sample.vcproj +0 -145
- data/ext/v8/upstream/v8/tools/visual_studio/v8_process_sample_arm.vcproj +0 -145
- data/ext/v8/upstream/v8/tools/visual_studio/v8_process_sample_x64.vcproj +0 -161
- data/ext/v8/upstream/v8/tools/visual_studio/v8_shell_sample.vcproj +0 -147
- data/ext/v8/upstream/v8/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -147
- data/ext/v8/upstream/v8/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -163
- data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot.vcproj +0 -142
- data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot_cc.vcproj +0 -92
- data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -92
- data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot_x64.vcproj +0 -142
- data/ext/v8/upstream/v8/tools/visual_studio/v8_x64.sln +0 -101
- data/ext/v8/upstream/v8/tools/visual_studio/v8_x64.vcproj +0 -227
- data/ext/v8/upstream/v8/tools/visual_studio/x64.vsprops +0 -18
- data/ext/v8/upstream/v8/tools/windows-tick-processor.bat +0 -30
@@ -1,1296 +0,0 @@
|
|
1
|
-
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#include "v8.h"
|
29
|
-
|
30
|
-
#include "codegen.h"
|
31
|
-
#include "deoptimizer.h"
|
32
|
-
#include "disasm.h"
|
33
|
-
#include "full-codegen.h"
|
34
|
-
#include "global-handles.h"
|
35
|
-
#include "macro-assembler.h"
|
36
|
-
#include "prettyprinter.h"
|
37
|
-
|
38
|
-
|
39
|
-
namespace v8 {
|
40
|
-
namespace internal {
|
41
|
-
|
42
|
-
DeoptimizerData::DeoptimizerData() {
|
43
|
-
eager_deoptimization_entry_code_ = NULL;
|
44
|
-
lazy_deoptimization_entry_code_ = NULL;
|
45
|
-
current_ = NULL;
|
46
|
-
deoptimizing_code_list_ = NULL;
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
DeoptimizerData::~DeoptimizerData() {
|
51
|
-
if (eager_deoptimization_entry_code_ != NULL) {
|
52
|
-
eager_deoptimization_entry_code_->Free(EXECUTABLE);
|
53
|
-
eager_deoptimization_entry_code_ = NULL;
|
54
|
-
}
|
55
|
-
if (lazy_deoptimization_entry_code_ != NULL) {
|
56
|
-
lazy_deoptimization_entry_code_->Free(EXECUTABLE);
|
57
|
-
lazy_deoptimization_entry_code_ = NULL;
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
Deoptimizer* Deoptimizer::New(JSFunction* function,
|
62
|
-
BailoutType type,
|
63
|
-
unsigned bailout_id,
|
64
|
-
Address from,
|
65
|
-
int fp_to_sp_delta,
|
66
|
-
Isolate* isolate) {
|
67
|
-
ASSERT(isolate == Isolate::Current());
|
68
|
-
Deoptimizer* deoptimizer = new Deoptimizer(isolate,
|
69
|
-
function,
|
70
|
-
type,
|
71
|
-
bailout_id,
|
72
|
-
from,
|
73
|
-
fp_to_sp_delta);
|
74
|
-
ASSERT(isolate->deoptimizer_data()->current_ == NULL);
|
75
|
-
isolate->deoptimizer_data()->current_ = deoptimizer;
|
76
|
-
return deoptimizer;
|
77
|
-
}
|
78
|
-
|
79
|
-
|
80
|
-
Deoptimizer* Deoptimizer::Grab(Isolate* isolate) {
|
81
|
-
ASSERT(isolate == Isolate::Current());
|
82
|
-
Deoptimizer* result = isolate->deoptimizer_data()->current_;
|
83
|
-
ASSERT(result != NULL);
|
84
|
-
result->DeleteFrameDescriptions();
|
85
|
-
isolate->deoptimizer_data()->current_ = NULL;
|
86
|
-
return result;
|
87
|
-
}
|
88
|
-
|
89
|
-
|
90
|
-
void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
|
91
|
-
int count,
|
92
|
-
BailoutType type) {
|
93
|
-
TableEntryGenerator generator(masm, type, count);
|
94
|
-
generator.Generate();
|
95
|
-
}
|
96
|
-
|
97
|
-
|
98
|
-
class DeoptimizingVisitor : public OptimizedFunctionVisitor {
|
99
|
-
public:
|
100
|
-
virtual void EnterContext(Context* context) {
|
101
|
-
if (FLAG_trace_deopt) {
|
102
|
-
PrintF("[deoptimize context: %" V8PRIxPTR "]\n",
|
103
|
-
reinterpret_cast<intptr_t>(context));
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
virtual void VisitFunction(JSFunction* function) {
|
108
|
-
Deoptimizer::DeoptimizeFunction(function);
|
109
|
-
}
|
110
|
-
|
111
|
-
virtual void LeaveContext(Context* context) {
|
112
|
-
context->ClearOptimizedFunctions();
|
113
|
-
}
|
114
|
-
};
|
115
|
-
|
116
|
-
|
117
|
-
void Deoptimizer::DeoptimizeAll() {
|
118
|
-
AssertNoAllocation no_allocation;
|
119
|
-
|
120
|
-
if (FLAG_trace_deopt) {
|
121
|
-
PrintF("[deoptimize all contexts]\n");
|
122
|
-
}
|
123
|
-
|
124
|
-
DeoptimizingVisitor visitor;
|
125
|
-
VisitAllOptimizedFunctions(&visitor);
|
126
|
-
}
|
127
|
-
|
128
|
-
|
129
|
-
void Deoptimizer::DeoptimizeGlobalObject(JSObject* object) {
|
130
|
-
AssertNoAllocation no_allocation;
|
131
|
-
|
132
|
-
DeoptimizingVisitor visitor;
|
133
|
-
VisitAllOptimizedFunctionsForGlobalObject(object, &visitor);
|
134
|
-
}
|
135
|
-
|
136
|
-
|
137
|
-
void Deoptimizer::VisitAllOptimizedFunctionsForContext(
|
138
|
-
Context* context, OptimizedFunctionVisitor* visitor) {
|
139
|
-
AssertNoAllocation no_allocation;
|
140
|
-
|
141
|
-
ASSERT(context->IsGlobalContext());
|
142
|
-
|
143
|
-
visitor->EnterContext(context);
|
144
|
-
// Run through the list of optimized functions and deoptimize them.
|
145
|
-
Object* element = context->OptimizedFunctionsListHead();
|
146
|
-
while (!element->IsUndefined()) {
|
147
|
-
JSFunction* element_function = JSFunction::cast(element);
|
148
|
-
// Get the next link before deoptimizing as deoptimizing will clear the
|
149
|
-
// next link.
|
150
|
-
element = element_function->next_function_link();
|
151
|
-
visitor->VisitFunction(element_function);
|
152
|
-
}
|
153
|
-
visitor->LeaveContext(context);
|
154
|
-
}
|
155
|
-
|
156
|
-
|
157
|
-
void Deoptimizer::VisitAllOptimizedFunctionsForGlobalObject(
|
158
|
-
JSObject* object, OptimizedFunctionVisitor* visitor) {
|
159
|
-
AssertNoAllocation no_allocation;
|
160
|
-
|
161
|
-
if (object->IsJSGlobalProxy()) {
|
162
|
-
Object* proto = object->GetPrototype();
|
163
|
-
ASSERT(proto->IsJSGlobalObject());
|
164
|
-
VisitAllOptimizedFunctionsForContext(
|
165
|
-
GlobalObject::cast(proto)->global_context(), visitor);
|
166
|
-
} else if (object->IsGlobalObject()) {
|
167
|
-
VisitAllOptimizedFunctionsForContext(
|
168
|
-
GlobalObject::cast(object)->global_context(), visitor);
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
|
173
|
-
void Deoptimizer::VisitAllOptimizedFunctions(
|
174
|
-
OptimizedFunctionVisitor* visitor) {
|
175
|
-
AssertNoAllocation no_allocation;
|
176
|
-
|
177
|
-
// Run through the list of all global contexts and deoptimize.
|
178
|
-
Object* global = Isolate::Current()->heap()->global_contexts_list();
|
179
|
-
while (!global->IsUndefined()) {
|
180
|
-
VisitAllOptimizedFunctionsForGlobalObject(Context::cast(global)->global(),
|
181
|
-
visitor);
|
182
|
-
global = Context::cast(global)->get(Context::NEXT_CONTEXT_LINK);
|
183
|
-
}
|
184
|
-
}
|
185
|
-
|
186
|
-
|
187
|
-
void Deoptimizer::HandleWeakDeoptimizedCode(
|
188
|
-
v8::Persistent<v8::Value> obj, void* data) {
|
189
|
-
DeoptimizingCodeListNode* node =
|
190
|
-
reinterpret_cast<DeoptimizingCodeListNode*>(data);
|
191
|
-
RemoveDeoptimizingCode(*node->code());
|
192
|
-
#ifdef DEBUG
|
193
|
-
node = Isolate::Current()->deoptimizer_data()->deoptimizing_code_list_;
|
194
|
-
while (node != NULL) {
|
195
|
-
ASSERT(node != reinterpret_cast<DeoptimizingCodeListNode*>(data));
|
196
|
-
node = node->next();
|
197
|
-
}
|
198
|
-
#endif
|
199
|
-
}
|
200
|
-
|
201
|
-
|
202
|
-
void Deoptimizer::ComputeOutputFrames(Deoptimizer* deoptimizer) {
|
203
|
-
deoptimizer->DoComputeOutputFrames();
|
204
|
-
}
|
205
|
-
|
206
|
-
|
207
|
-
Deoptimizer::Deoptimizer(Isolate* isolate,
|
208
|
-
JSFunction* function,
|
209
|
-
BailoutType type,
|
210
|
-
unsigned bailout_id,
|
211
|
-
Address from,
|
212
|
-
int fp_to_sp_delta)
|
213
|
-
: isolate_(isolate),
|
214
|
-
function_(function),
|
215
|
-
bailout_id_(bailout_id),
|
216
|
-
bailout_type_(type),
|
217
|
-
from_(from),
|
218
|
-
fp_to_sp_delta_(fp_to_sp_delta),
|
219
|
-
output_count_(0),
|
220
|
-
output_(NULL),
|
221
|
-
integer32_values_(NULL),
|
222
|
-
double_values_(NULL) {
|
223
|
-
if (FLAG_trace_deopt && type != OSR) {
|
224
|
-
PrintF("**** DEOPT: ");
|
225
|
-
function->PrintName();
|
226
|
-
PrintF(" at bailout #%u, address 0x%" V8PRIxPTR ", frame size %d\n",
|
227
|
-
bailout_id,
|
228
|
-
reinterpret_cast<intptr_t>(from),
|
229
|
-
fp_to_sp_delta - (2 * kPointerSize));
|
230
|
-
} else if (FLAG_trace_osr && type == OSR) {
|
231
|
-
PrintF("**** OSR: ");
|
232
|
-
function->PrintName();
|
233
|
-
PrintF(" at ast id #%u, address 0x%" V8PRIxPTR ", frame size %d\n",
|
234
|
-
bailout_id,
|
235
|
-
reinterpret_cast<intptr_t>(from),
|
236
|
-
fp_to_sp_delta - (2 * kPointerSize));
|
237
|
-
}
|
238
|
-
// Find the optimized code.
|
239
|
-
if (type == EAGER) {
|
240
|
-
ASSERT(from == NULL);
|
241
|
-
optimized_code_ = function_->code();
|
242
|
-
} else if (type == LAZY) {
|
243
|
-
optimized_code_ = FindDeoptimizingCodeFromAddress(from);
|
244
|
-
ASSERT(optimized_code_ != NULL);
|
245
|
-
} else if (type == OSR) {
|
246
|
-
// The function has already been optimized and we're transitioning
|
247
|
-
// from the unoptimized shared version to the optimized one in the
|
248
|
-
// function. The return address (from) points to unoptimized code.
|
249
|
-
optimized_code_ = function_->code();
|
250
|
-
ASSERT(optimized_code_->kind() == Code::OPTIMIZED_FUNCTION);
|
251
|
-
ASSERT(!optimized_code_->contains(from));
|
252
|
-
}
|
253
|
-
ASSERT(HEAP->allow_allocation(false));
|
254
|
-
unsigned size = ComputeInputFrameSize();
|
255
|
-
input_ = new(size) FrameDescription(size, function);
|
256
|
-
}
|
257
|
-
|
258
|
-
|
259
|
-
Deoptimizer::~Deoptimizer() {
|
260
|
-
ASSERT(input_ == NULL && output_ == NULL);
|
261
|
-
delete[] integer32_values_;
|
262
|
-
delete[] double_values_;
|
263
|
-
}
|
264
|
-
|
265
|
-
|
266
|
-
void Deoptimizer::DeleteFrameDescriptions() {
|
267
|
-
delete input_;
|
268
|
-
for (int i = 0; i < output_count_; ++i) {
|
269
|
-
if (output_[i] != input_) delete output_[i];
|
270
|
-
}
|
271
|
-
delete[] output_;
|
272
|
-
input_ = NULL;
|
273
|
-
output_ = NULL;
|
274
|
-
ASSERT(!HEAP->allow_allocation(true));
|
275
|
-
}
|
276
|
-
|
277
|
-
|
278
|
-
Address Deoptimizer::GetDeoptimizationEntry(int id, BailoutType type) {
|
279
|
-
ASSERT(id >= 0);
|
280
|
-
if (id >= kNumberOfEntries) return NULL;
|
281
|
-
LargeObjectChunk* base = NULL;
|
282
|
-
DeoptimizerData* data = Isolate::Current()->deoptimizer_data();
|
283
|
-
if (type == EAGER) {
|
284
|
-
if (data->eager_deoptimization_entry_code_ == NULL) {
|
285
|
-
data->eager_deoptimization_entry_code_ = CreateCode(type);
|
286
|
-
}
|
287
|
-
base = data->eager_deoptimization_entry_code_;
|
288
|
-
} else {
|
289
|
-
if (data->lazy_deoptimization_entry_code_ == NULL) {
|
290
|
-
data->lazy_deoptimization_entry_code_ = CreateCode(type);
|
291
|
-
}
|
292
|
-
base = data->lazy_deoptimization_entry_code_;
|
293
|
-
}
|
294
|
-
return
|
295
|
-
static_cast<Address>(base->GetStartAddress()) + (id * table_entry_size_);
|
296
|
-
}
|
297
|
-
|
298
|
-
|
299
|
-
int Deoptimizer::GetDeoptimizationId(Address addr, BailoutType type) {
|
300
|
-
LargeObjectChunk* base = NULL;
|
301
|
-
DeoptimizerData* data = Isolate::Current()->deoptimizer_data();
|
302
|
-
if (type == EAGER) {
|
303
|
-
base = data->eager_deoptimization_entry_code_;
|
304
|
-
} else {
|
305
|
-
base = data->lazy_deoptimization_entry_code_;
|
306
|
-
}
|
307
|
-
if (base == NULL ||
|
308
|
-
addr < base->GetStartAddress() ||
|
309
|
-
addr >= base->GetStartAddress() +
|
310
|
-
(kNumberOfEntries * table_entry_size_)) {
|
311
|
-
return kNotDeoptimizationEntry;
|
312
|
-
}
|
313
|
-
ASSERT_EQ(0,
|
314
|
-
static_cast<int>(addr - base->GetStartAddress()) % table_entry_size_);
|
315
|
-
return static_cast<int>(addr - base->GetStartAddress()) / table_entry_size_;
|
316
|
-
}
|
317
|
-
|
318
|
-
|
319
|
-
int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
|
320
|
-
unsigned id,
|
321
|
-
SharedFunctionInfo* shared) {
|
322
|
-
// TODO(kasperl): For now, we do a simple linear search for the PC
|
323
|
-
// offset associated with the given node id. This should probably be
|
324
|
-
// changed to a binary search.
|
325
|
-
int length = data->DeoptPoints();
|
326
|
-
Smi* smi_id = Smi::FromInt(id);
|
327
|
-
for (int i = 0; i < length; i++) {
|
328
|
-
if (data->AstId(i) == smi_id) {
|
329
|
-
return data->PcAndState(i)->value();
|
330
|
-
}
|
331
|
-
}
|
332
|
-
PrintF("[couldn't find pc offset for node=%u]\n", id);
|
333
|
-
PrintF("[method: %s]\n", *shared->DebugName()->ToCString());
|
334
|
-
// Print the source code if available.
|
335
|
-
HeapStringAllocator string_allocator;
|
336
|
-
StringStream stream(&string_allocator);
|
337
|
-
shared->SourceCodePrint(&stream, -1);
|
338
|
-
PrintF("[source:\n%s\n]", *stream.ToCString());
|
339
|
-
|
340
|
-
UNREACHABLE();
|
341
|
-
return -1;
|
342
|
-
}
|
343
|
-
|
344
|
-
|
345
|
-
int Deoptimizer::GetDeoptimizedCodeCount(Isolate* isolate) {
|
346
|
-
int length = 0;
|
347
|
-
DeoptimizingCodeListNode* node =
|
348
|
-
isolate->deoptimizer_data()->deoptimizing_code_list_;
|
349
|
-
while (node != NULL) {
|
350
|
-
length++;
|
351
|
-
node = node->next();
|
352
|
-
}
|
353
|
-
return length;
|
354
|
-
}
|
355
|
-
|
356
|
-
|
357
|
-
void Deoptimizer::DoComputeOutputFrames() {
|
358
|
-
if (bailout_type_ == OSR) {
|
359
|
-
DoComputeOsrOutputFrame();
|
360
|
-
return;
|
361
|
-
}
|
362
|
-
|
363
|
-
// Print some helpful diagnostic information.
|
364
|
-
int64_t start = OS::Ticks();
|
365
|
-
if (FLAG_trace_deopt) {
|
366
|
-
PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ",
|
367
|
-
(bailout_type_ == LAZY ? " (lazy)" : ""),
|
368
|
-
reinterpret_cast<intptr_t>(function_));
|
369
|
-
function_->PrintName();
|
370
|
-
PrintF(" @%d]\n", bailout_id_);
|
371
|
-
}
|
372
|
-
|
373
|
-
// Determine basic deoptimization information. The optimized frame is
|
374
|
-
// described by the input data.
|
375
|
-
DeoptimizationInputData* input_data =
|
376
|
-
DeoptimizationInputData::cast(optimized_code_->deoptimization_data());
|
377
|
-
unsigned node_id = input_data->AstId(bailout_id_)->value();
|
378
|
-
ByteArray* translations = input_data->TranslationByteArray();
|
379
|
-
unsigned translation_index =
|
380
|
-
input_data->TranslationIndex(bailout_id_)->value();
|
381
|
-
|
382
|
-
// Do the input frame to output frame(s) translation.
|
383
|
-
TranslationIterator iterator(translations, translation_index);
|
384
|
-
Translation::Opcode opcode =
|
385
|
-
static_cast<Translation::Opcode>(iterator.Next());
|
386
|
-
ASSERT(Translation::BEGIN == opcode);
|
387
|
-
USE(opcode);
|
388
|
-
// Read the number of output frames and allocate an array for their
|
389
|
-
// descriptions.
|
390
|
-
int count = iterator.Next();
|
391
|
-
ASSERT(output_ == NULL);
|
392
|
-
output_ = new FrameDescription*[count];
|
393
|
-
// Per-frame lists of untagged and unboxed int32 and double values.
|
394
|
-
integer32_values_ = new List<ValueDescriptionInteger32>[count];
|
395
|
-
double_values_ = new List<ValueDescriptionDouble>[count];
|
396
|
-
for (int i = 0; i < count; ++i) {
|
397
|
-
output_[i] = NULL;
|
398
|
-
integer32_values_[i].Initialize(0);
|
399
|
-
double_values_[i].Initialize(0);
|
400
|
-
}
|
401
|
-
output_count_ = count;
|
402
|
-
|
403
|
-
// Translate each output frame.
|
404
|
-
for (int i = 0; i < count; ++i) {
|
405
|
-
DoComputeFrame(&iterator, i);
|
406
|
-
}
|
407
|
-
|
408
|
-
// Print some helpful diagnostic information.
|
409
|
-
if (FLAG_trace_deopt) {
|
410
|
-
double ms = static_cast<double>(OS::Ticks() - start) / 1000;
|
411
|
-
int index = output_count_ - 1; // Index of the topmost frame.
|
412
|
-
JSFunction* function = output_[index]->GetFunction();
|
413
|
-
PrintF("[deoptimizing: end 0x%08" V8PRIxPTR " ",
|
414
|
-
reinterpret_cast<intptr_t>(function));
|
415
|
-
function->PrintName();
|
416
|
-
PrintF(" => node=%u, pc=0x%08" V8PRIxPTR ", state=%s, took %0.3f ms]\n",
|
417
|
-
node_id,
|
418
|
-
output_[index]->GetPc(),
|
419
|
-
FullCodeGenerator::State2String(
|
420
|
-
static_cast<FullCodeGenerator::State>(
|
421
|
-
output_[index]->GetState()->value())),
|
422
|
-
ms);
|
423
|
-
}
|
424
|
-
}
|
425
|
-
|
426
|
-
|
427
|
-
void Deoptimizer::InsertHeapNumberValues(int index, JavaScriptFrame* frame) {
|
428
|
-
// We need to adjust the stack index by one for the top-most frame.
|
429
|
-
int extra_slot_count = (index == output_count() - 1) ? 1 : 0;
|
430
|
-
List<ValueDescriptionInteger32>* ints = &integer32_values_[index];
|
431
|
-
for (int i = 0; i < ints->length(); i++) {
|
432
|
-
ValueDescriptionInteger32 value = ints->at(i);
|
433
|
-
double val = static_cast<double>(value.int32_value());
|
434
|
-
InsertHeapNumberValue(frame, value.stack_index(), val, extra_slot_count);
|
435
|
-
}
|
436
|
-
|
437
|
-
// Iterate over double values and convert them to a heap number.
|
438
|
-
List<ValueDescriptionDouble>* doubles = &double_values_[index];
|
439
|
-
for (int i = 0; i < doubles->length(); ++i) {
|
440
|
-
ValueDescriptionDouble value = doubles->at(i);
|
441
|
-
InsertHeapNumberValue(frame, value.stack_index(), value.double_value(),
|
442
|
-
extra_slot_count);
|
443
|
-
}
|
444
|
-
}
|
445
|
-
|
446
|
-
|
447
|
-
void Deoptimizer::InsertHeapNumberValue(JavaScriptFrame* frame,
|
448
|
-
int stack_index,
|
449
|
-
double val,
|
450
|
-
int extra_slot_count) {
|
451
|
-
// Add one to the TOS index to take the 'state' pushed before jumping
|
452
|
-
// to the stub that calls Runtime::NotifyDeoptimized into account.
|
453
|
-
int tos_index = stack_index + extra_slot_count;
|
454
|
-
int index = (frame->ComputeExpressionsCount() - 1) - tos_index;
|
455
|
-
if (FLAG_trace_deopt) PrintF("Allocating a new heap number: %e\n", val);
|
456
|
-
Handle<Object> num = isolate_->factory()->NewNumber(val);
|
457
|
-
frame->SetExpression(index, *num);
|
458
|
-
}
|
459
|
-
|
460
|
-
|
461
|
-
void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
|
462
|
-
int frame_index,
|
463
|
-
unsigned output_offset) {
|
464
|
-
disasm::NameConverter converter;
|
465
|
-
// A GC-safe temporary placeholder that we can put in the output frame.
|
466
|
-
const intptr_t kPlaceholder = reinterpret_cast<intptr_t>(Smi::FromInt(0));
|
467
|
-
|
468
|
-
// Ignore commands marked as duplicate and act on the first non-duplicate.
|
469
|
-
Translation::Opcode opcode =
|
470
|
-
static_cast<Translation::Opcode>(iterator->Next());
|
471
|
-
while (opcode == Translation::DUPLICATE) {
|
472
|
-
opcode = static_cast<Translation::Opcode>(iterator->Next());
|
473
|
-
iterator->Skip(Translation::NumberOfOperandsFor(opcode));
|
474
|
-
opcode = static_cast<Translation::Opcode>(iterator->Next());
|
475
|
-
}
|
476
|
-
|
477
|
-
switch (opcode) {
|
478
|
-
case Translation::BEGIN:
|
479
|
-
case Translation::FRAME:
|
480
|
-
case Translation::DUPLICATE:
|
481
|
-
UNREACHABLE();
|
482
|
-
return;
|
483
|
-
|
484
|
-
case Translation::REGISTER: {
|
485
|
-
int input_reg = iterator->Next();
|
486
|
-
intptr_t input_value = input_->GetRegister(input_reg);
|
487
|
-
if (FLAG_trace_deopt) {
|
488
|
-
PrintF(
|
489
|
-
" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" V8PRIxPTR " ; %s\n",
|
490
|
-
output_[frame_index]->GetTop() + output_offset,
|
491
|
-
output_offset,
|
492
|
-
input_value,
|
493
|
-
converter.NameOfCPURegister(input_reg));
|
494
|
-
}
|
495
|
-
output_[frame_index]->SetFrameSlot(output_offset, input_value);
|
496
|
-
return;
|
497
|
-
}
|
498
|
-
|
499
|
-
case Translation::INT32_REGISTER: {
|
500
|
-
int input_reg = iterator->Next();
|
501
|
-
intptr_t value = input_->GetRegister(input_reg);
|
502
|
-
bool is_smi = Smi::IsValid(value);
|
503
|
-
unsigned output_index = output_offset / kPointerSize;
|
504
|
-
if (FLAG_trace_deopt) {
|
505
|
-
PrintF(
|
506
|
-
" 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n",
|
507
|
-
output_[frame_index]->GetTop() + output_offset,
|
508
|
-
output_offset,
|
509
|
-
value,
|
510
|
-
converter.NameOfCPURegister(input_reg),
|
511
|
-
is_smi ? "smi" : "heap number");
|
512
|
-
}
|
513
|
-
if (is_smi) {
|
514
|
-
intptr_t tagged_value =
|
515
|
-
reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
|
516
|
-
output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
|
517
|
-
} else {
|
518
|
-
// We save the untagged value on the side and store a GC-safe
|
519
|
-
// temporary placeholder in the frame.
|
520
|
-
AddInteger32Value(frame_index,
|
521
|
-
output_index,
|
522
|
-
static_cast<int32_t>(value));
|
523
|
-
output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
|
524
|
-
}
|
525
|
-
return;
|
526
|
-
}
|
527
|
-
|
528
|
-
case Translation::DOUBLE_REGISTER: {
|
529
|
-
int input_reg = iterator->Next();
|
530
|
-
double value = input_->GetDoubleRegister(input_reg);
|
531
|
-
unsigned output_index = output_offset / kPointerSize;
|
532
|
-
if (FLAG_trace_deopt) {
|
533
|
-
PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; %s\n",
|
534
|
-
output_[frame_index]->GetTop() + output_offset,
|
535
|
-
output_offset,
|
536
|
-
value,
|
537
|
-
DoubleRegister::AllocationIndexToString(input_reg));
|
538
|
-
}
|
539
|
-
// We save the untagged value on the side and store a GC-safe
|
540
|
-
// temporary placeholder in the frame.
|
541
|
-
AddDoubleValue(frame_index, output_index, value);
|
542
|
-
output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
|
543
|
-
return;
|
544
|
-
}
|
545
|
-
|
546
|
-
case Translation::STACK_SLOT: {
|
547
|
-
int input_slot_index = iterator->Next();
|
548
|
-
unsigned input_offset =
|
549
|
-
input_->GetOffsetFromSlotIndex(this, input_slot_index);
|
550
|
-
intptr_t input_value = input_->GetFrameSlot(input_offset);
|
551
|
-
if (FLAG_trace_deopt) {
|
552
|
-
PrintF(" 0x%08" V8PRIxPTR ": ",
|
553
|
-
output_[frame_index]->GetTop() + output_offset);
|
554
|
-
PrintF("[top + %d] <- 0x%08" V8PRIxPTR " ; [esp + %d]\n",
|
555
|
-
output_offset,
|
556
|
-
input_value,
|
557
|
-
input_offset);
|
558
|
-
}
|
559
|
-
output_[frame_index]->SetFrameSlot(output_offset, input_value);
|
560
|
-
return;
|
561
|
-
}
|
562
|
-
|
563
|
-
case Translation::INT32_STACK_SLOT: {
|
564
|
-
int input_slot_index = iterator->Next();
|
565
|
-
unsigned input_offset =
|
566
|
-
input_->GetOffsetFromSlotIndex(this, input_slot_index);
|
567
|
-
intptr_t value = input_->GetFrameSlot(input_offset);
|
568
|
-
bool is_smi = Smi::IsValid(value);
|
569
|
-
unsigned output_index = output_offset / kPointerSize;
|
570
|
-
if (FLAG_trace_deopt) {
|
571
|
-
PrintF(" 0x%08" V8PRIxPTR ": ",
|
572
|
-
output_[frame_index]->GetTop() + output_offset);
|
573
|
-
PrintF("[top + %d] <- %" V8PRIdPTR " ; [esp + %d] (%s)\n",
|
574
|
-
output_offset,
|
575
|
-
value,
|
576
|
-
input_offset,
|
577
|
-
is_smi ? "smi" : "heap number");
|
578
|
-
}
|
579
|
-
if (is_smi) {
|
580
|
-
intptr_t tagged_value =
|
581
|
-
reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
|
582
|
-
output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
|
583
|
-
} else {
|
584
|
-
// We save the untagged value on the side and store a GC-safe
|
585
|
-
// temporary placeholder in the frame.
|
586
|
-
AddInteger32Value(frame_index,
|
587
|
-
output_index,
|
588
|
-
static_cast<int32_t>(value));
|
589
|
-
output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
|
590
|
-
}
|
591
|
-
return;
|
592
|
-
}
|
593
|
-
|
594
|
-
case Translation::DOUBLE_STACK_SLOT: {
|
595
|
-
int input_slot_index = iterator->Next();
|
596
|
-
unsigned input_offset =
|
597
|
-
input_->GetOffsetFromSlotIndex(this, input_slot_index);
|
598
|
-
double value = input_->GetDoubleFrameSlot(input_offset);
|
599
|
-
unsigned output_index = output_offset / kPointerSize;
|
600
|
-
if (FLAG_trace_deopt) {
|
601
|
-
PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; [esp + %d]\n",
|
602
|
-
output_[frame_index]->GetTop() + output_offset,
|
603
|
-
output_offset,
|
604
|
-
value,
|
605
|
-
input_offset);
|
606
|
-
}
|
607
|
-
// We save the untagged value on the side and store a GC-safe
|
608
|
-
// temporary placeholder in the frame.
|
609
|
-
AddDoubleValue(frame_index, output_index, value);
|
610
|
-
output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
|
611
|
-
return;
|
612
|
-
}
|
613
|
-
|
614
|
-
case Translation::LITERAL: {
|
615
|
-
Object* literal = ComputeLiteral(iterator->Next());
|
616
|
-
if (FLAG_trace_deopt) {
|
617
|
-
PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- ",
|
618
|
-
output_[frame_index]->GetTop() + output_offset,
|
619
|
-
output_offset);
|
620
|
-
literal->ShortPrint();
|
621
|
-
PrintF(" ; literal\n");
|
622
|
-
}
|
623
|
-
intptr_t value = reinterpret_cast<intptr_t>(literal);
|
624
|
-
output_[frame_index]->SetFrameSlot(output_offset, value);
|
625
|
-
return;
|
626
|
-
}
|
627
|
-
|
628
|
-
case Translation::ARGUMENTS_OBJECT: {
|
629
|
-
// Use the arguments marker value as a sentinel and fill in the arguments
|
630
|
-
// object after the deoptimized frame is built.
|
631
|
-
ASSERT(frame_index == 0); // Only supported for first frame.
|
632
|
-
if (FLAG_trace_deopt) {
|
633
|
-
PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- ",
|
634
|
-
output_[frame_index]->GetTop() + output_offset,
|
635
|
-
output_offset);
|
636
|
-
isolate_->heap()->arguments_marker()->ShortPrint();
|
637
|
-
PrintF(" ; arguments object\n");
|
638
|
-
}
|
639
|
-
intptr_t value = reinterpret_cast<intptr_t>(
|
640
|
-
isolate_->heap()->arguments_marker());
|
641
|
-
output_[frame_index]->SetFrameSlot(output_offset, value);
|
642
|
-
return;
|
643
|
-
}
|
644
|
-
}
|
645
|
-
}
|
646
|
-
|
647
|
-
|
648
|
-
bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator,
|
649
|
-
int* input_offset) {
|
650
|
-
disasm::NameConverter converter;
|
651
|
-
FrameDescription* output = output_[0];
|
652
|
-
|
653
|
-
// The input values are all part of the unoptimized frame so they
|
654
|
-
// are all tagged pointers.
|
655
|
-
uintptr_t input_value = input_->GetFrameSlot(*input_offset);
|
656
|
-
Object* input_object = reinterpret_cast<Object*>(input_value);
|
657
|
-
|
658
|
-
Translation::Opcode opcode =
|
659
|
-
static_cast<Translation::Opcode>(iterator->Next());
|
660
|
-
bool duplicate = (opcode == Translation::DUPLICATE);
|
661
|
-
if (duplicate) {
|
662
|
-
opcode = static_cast<Translation::Opcode>(iterator->Next());
|
663
|
-
}
|
664
|
-
|
665
|
-
switch (opcode) {
|
666
|
-
case Translation::BEGIN:
|
667
|
-
case Translation::FRAME:
|
668
|
-
case Translation::DUPLICATE:
|
669
|
-
UNREACHABLE(); // Malformed input.
|
670
|
-
return false;
|
671
|
-
|
672
|
-
case Translation::REGISTER: {
|
673
|
-
int output_reg = iterator->Next();
|
674
|
-
if (FLAG_trace_osr) {
|
675
|
-
PrintF(" %s <- 0x%08" V8PRIxPTR " ; [sp + %d]\n",
|
676
|
-
converter.NameOfCPURegister(output_reg),
|
677
|
-
input_value,
|
678
|
-
*input_offset);
|
679
|
-
}
|
680
|
-
output->SetRegister(output_reg, input_value);
|
681
|
-
break;
|
682
|
-
}
|
683
|
-
|
684
|
-
case Translation::INT32_REGISTER: {
|
685
|
-
// Abort OSR if we don't have a number.
|
686
|
-
if (!input_object->IsNumber()) return false;
|
687
|
-
|
688
|
-
int output_reg = iterator->Next();
|
689
|
-
int int32_value = input_object->IsSmi()
|
690
|
-
? Smi::cast(input_object)->value()
|
691
|
-
: FastD2I(input_object->Number());
|
692
|
-
// Abort the translation if the conversion lost information.
|
693
|
-
if (!input_object->IsSmi() &&
|
694
|
-
FastI2D(int32_value) != input_object->Number()) {
|
695
|
-
if (FLAG_trace_osr) {
|
696
|
-
PrintF("**** %g could not be converted to int32 ****\n",
|
697
|
-
input_object->Number());
|
698
|
-
}
|
699
|
-
return false;
|
700
|
-
}
|
701
|
-
if (FLAG_trace_osr) {
|
702
|
-
PrintF(" %s <- %d (int32) ; [sp + %d]\n",
|
703
|
-
converter.NameOfCPURegister(output_reg),
|
704
|
-
int32_value,
|
705
|
-
*input_offset);
|
706
|
-
}
|
707
|
-
output->SetRegister(output_reg, int32_value);
|
708
|
-
break;
|
709
|
-
}
|
710
|
-
|
711
|
-
case Translation::DOUBLE_REGISTER: {
|
712
|
-
// Abort OSR if we don't have a number.
|
713
|
-
if (!input_object->IsNumber()) return false;
|
714
|
-
|
715
|
-
int output_reg = iterator->Next();
|
716
|
-
double double_value = input_object->Number();
|
717
|
-
if (FLAG_trace_osr) {
|
718
|
-
PrintF(" %s <- %g (double) ; [sp + %d]\n",
|
719
|
-
DoubleRegister::AllocationIndexToString(output_reg),
|
720
|
-
double_value,
|
721
|
-
*input_offset);
|
722
|
-
}
|
723
|
-
output->SetDoubleRegister(output_reg, double_value);
|
724
|
-
break;
|
725
|
-
}
|
726
|
-
|
727
|
-
case Translation::STACK_SLOT: {
|
728
|
-
int output_index = iterator->Next();
|
729
|
-
unsigned output_offset =
|
730
|
-
output->GetOffsetFromSlotIndex(this, output_index);
|
731
|
-
if (FLAG_trace_osr) {
|
732
|
-
PrintF(" [sp + %d] <- 0x%08" V8PRIxPTR " ; [sp + %d]\n",
|
733
|
-
output_offset,
|
734
|
-
input_value,
|
735
|
-
*input_offset);
|
736
|
-
}
|
737
|
-
output->SetFrameSlot(output_offset, input_value);
|
738
|
-
break;
|
739
|
-
}
|
740
|
-
|
741
|
-
case Translation::INT32_STACK_SLOT: {
|
742
|
-
// Abort OSR if we don't have a number.
|
743
|
-
if (!input_object->IsNumber()) return false;
|
744
|
-
|
745
|
-
int output_index = iterator->Next();
|
746
|
-
unsigned output_offset =
|
747
|
-
output->GetOffsetFromSlotIndex(this, output_index);
|
748
|
-
int int32_value = input_object->IsSmi()
|
749
|
-
? Smi::cast(input_object)->value()
|
750
|
-
: DoubleToInt32(input_object->Number());
|
751
|
-
// Abort the translation if the conversion lost information.
|
752
|
-
if (!input_object->IsSmi() &&
|
753
|
-
FastI2D(int32_value) != input_object->Number()) {
|
754
|
-
if (FLAG_trace_osr) {
|
755
|
-
PrintF("**** %g could not be converted to int32 ****\n",
|
756
|
-
input_object->Number());
|
757
|
-
}
|
758
|
-
return false;
|
759
|
-
}
|
760
|
-
if (FLAG_trace_osr) {
|
761
|
-
PrintF(" [sp + %d] <- %d (int32) ; [sp + %d]\n",
|
762
|
-
output_offset,
|
763
|
-
int32_value,
|
764
|
-
*input_offset);
|
765
|
-
}
|
766
|
-
output->SetFrameSlot(output_offset, int32_value);
|
767
|
-
break;
|
768
|
-
}
|
769
|
-
|
770
|
-
case Translation::DOUBLE_STACK_SLOT: {
|
771
|
-
static const int kLowerOffset = 0 * kPointerSize;
|
772
|
-
static const int kUpperOffset = 1 * kPointerSize;
|
773
|
-
|
774
|
-
// Abort OSR if we don't have a number.
|
775
|
-
if (!input_object->IsNumber()) return false;
|
776
|
-
|
777
|
-
int output_index = iterator->Next();
|
778
|
-
unsigned output_offset =
|
779
|
-
output->GetOffsetFromSlotIndex(this, output_index);
|
780
|
-
double double_value = input_object->Number();
|
781
|
-
uint64_t int_value = BitCast<uint64_t, double>(double_value);
|
782
|
-
int32_t lower = static_cast<int32_t>(int_value);
|
783
|
-
int32_t upper = static_cast<int32_t>(int_value >> kBitsPerInt);
|
784
|
-
if (FLAG_trace_osr) {
|
785
|
-
PrintF(" [sp + %d] <- 0x%08x (upper bits of %g) ; [sp + %d]\n",
|
786
|
-
output_offset + kUpperOffset,
|
787
|
-
upper,
|
788
|
-
double_value,
|
789
|
-
*input_offset);
|
790
|
-
PrintF(" [sp + %d] <- 0x%08x (lower bits of %g) ; [sp + %d]\n",
|
791
|
-
output_offset + kLowerOffset,
|
792
|
-
lower,
|
793
|
-
double_value,
|
794
|
-
*input_offset);
|
795
|
-
}
|
796
|
-
output->SetFrameSlot(output_offset + kLowerOffset, lower);
|
797
|
-
output->SetFrameSlot(output_offset + kUpperOffset, upper);
|
798
|
-
break;
|
799
|
-
}
|
800
|
-
|
801
|
-
case Translation::LITERAL: {
|
802
|
-
// Just ignore non-materialized literals.
|
803
|
-
iterator->Next();
|
804
|
-
break;
|
805
|
-
}
|
806
|
-
|
807
|
-
case Translation::ARGUMENTS_OBJECT: {
|
808
|
-
// Optimized code assumes that the argument object has not been
|
809
|
-
// materialized and so bypasses it when doing arguments access.
|
810
|
-
// We should have bailed out before starting the frame
|
811
|
-
// translation.
|
812
|
-
UNREACHABLE();
|
813
|
-
return false;
|
814
|
-
}
|
815
|
-
}
|
816
|
-
|
817
|
-
if (!duplicate) *input_offset -= kPointerSize;
|
818
|
-
return true;
|
819
|
-
}
|
820
|
-
|
821
|
-
|
822
|
-
void Deoptimizer::PatchStackCheckCode(Code* unoptimized_code,
|
823
|
-
Code* check_code,
|
824
|
-
Code* replacement_code) {
|
825
|
-
// Iterate over the stack check table and patch every stack check
|
826
|
-
// call to an unconditional call to the replacement code.
|
827
|
-
ASSERT(unoptimized_code->kind() == Code::FUNCTION);
|
828
|
-
Address stack_check_cursor = unoptimized_code->instruction_start() +
|
829
|
-
unoptimized_code->stack_check_table_offset();
|
830
|
-
uint32_t table_length = Memory::uint32_at(stack_check_cursor);
|
831
|
-
stack_check_cursor += kIntSize;
|
832
|
-
for (uint32_t i = 0; i < table_length; ++i) {
|
833
|
-
uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
|
834
|
-
Address pc_after = unoptimized_code->instruction_start() + pc_offset;
|
835
|
-
PatchStackCheckCodeAt(pc_after, check_code, replacement_code);
|
836
|
-
stack_check_cursor += 2 * kIntSize;
|
837
|
-
}
|
838
|
-
}
|
839
|
-
|
840
|
-
|
841
|
-
void Deoptimizer::RevertStackCheckCode(Code* unoptimized_code,
|
842
|
-
Code* check_code,
|
843
|
-
Code* replacement_code) {
|
844
|
-
// Iterate over the stack check table and revert the patched
|
845
|
-
// stack check calls.
|
846
|
-
ASSERT(unoptimized_code->kind() == Code::FUNCTION);
|
847
|
-
Address stack_check_cursor = unoptimized_code->instruction_start() +
|
848
|
-
unoptimized_code->stack_check_table_offset();
|
849
|
-
uint32_t table_length = Memory::uint32_at(stack_check_cursor);
|
850
|
-
stack_check_cursor += kIntSize;
|
851
|
-
for (uint32_t i = 0; i < table_length; ++i) {
|
852
|
-
uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
|
853
|
-
Address pc_after = unoptimized_code->instruction_start() + pc_offset;
|
854
|
-
RevertStackCheckCodeAt(pc_after, check_code, replacement_code);
|
855
|
-
stack_check_cursor += 2 * kIntSize;
|
856
|
-
}
|
857
|
-
}
|
858
|
-
|
859
|
-
|
860
|
-
unsigned Deoptimizer::ComputeInputFrameSize() const {
|
861
|
-
unsigned fixed_size = ComputeFixedSize(function_);
|
862
|
-
// The fp-to-sp delta already takes the context and the function
|
863
|
-
// into account so we have to avoid double counting them (-2).
|
864
|
-
unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize);
|
865
|
-
#ifdef DEBUG
|
866
|
-
if (bailout_type_ == OSR) {
|
867
|
-
// TODO(kasperl): It would be nice if we could verify that the
|
868
|
-
// size matches with the stack height we can compute based on the
|
869
|
-
// environment at the OSR entry. The code for that his built into
|
870
|
-
// the DoComputeOsrOutputFrame function for now.
|
871
|
-
} else {
|
872
|
-
unsigned stack_slots = optimized_code_->stack_slots();
|
873
|
-
unsigned outgoing_size = ComputeOutgoingArgumentSize();
|
874
|
-
ASSERT(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size);
|
875
|
-
}
|
876
|
-
#endif
|
877
|
-
return result;
|
878
|
-
}
|
879
|
-
|
880
|
-
|
881
|
-
unsigned Deoptimizer::ComputeFixedSize(JSFunction* function) const {
|
882
|
-
// The fixed part of the frame consists of the return address, frame
|
883
|
-
// pointer, function, context, and all the incoming arguments.
|
884
|
-
static const unsigned kFixedSlotSize = 4 * kPointerSize;
|
885
|
-
return ComputeIncomingArgumentSize(function) + kFixedSlotSize;
|
886
|
-
}
|
887
|
-
|
888
|
-
|
889
|
-
unsigned Deoptimizer::ComputeIncomingArgumentSize(JSFunction* function) const {
|
890
|
-
// The incoming arguments is the values for formal parameters and
|
891
|
-
// the receiver. Every slot contains a pointer.
|
892
|
-
unsigned arguments = function->shared()->formal_parameter_count() + 1;
|
893
|
-
return arguments * kPointerSize;
|
894
|
-
}
|
895
|
-
|
896
|
-
|
897
|
-
unsigned Deoptimizer::ComputeOutgoingArgumentSize() const {
|
898
|
-
DeoptimizationInputData* data = DeoptimizationInputData::cast(
|
899
|
-
optimized_code_->deoptimization_data());
|
900
|
-
unsigned height = data->ArgumentsStackHeight(bailout_id_)->value();
|
901
|
-
return height * kPointerSize;
|
902
|
-
}
|
903
|
-
|
904
|
-
|
905
|
-
Object* Deoptimizer::ComputeLiteral(int index) const {
|
906
|
-
DeoptimizationInputData* data = DeoptimizationInputData::cast(
|
907
|
-
optimized_code_->deoptimization_data());
|
908
|
-
FixedArray* literals = data->LiteralArray();
|
909
|
-
return literals->get(index);
|
910
|
-
}
|
911
|
-
|
912
|
-
|
913
|
-
void Deoptimizer::AddInteger32Value(int frame_index,
|
914
|
-
int slot_index,
|
915
|
-
int32_t value) {
|
916
|
-
ValueDescriptionInteger32 value_desc(slot_index, value);
|
917
|
-
integer32_values_[frame_index].Add(value_desc);
|
918
|
-
}
|
919
|
-
|
920
|
-
|
921
|
-
void Deoptimizer::AddDoubleValue(int frame_index,
|
922
|
-
int slot_index,
|
923
|
-
double value) {
|
924
|
-
ValueDescriptionDouble value_desc(slot_index, value);
|
925
|
-
double_values_[frame_index].Add(value_desc);
|
926
|
-
}
|
927
|
-
|
928
|
-
|
929
|
-
LargeObjectChunk* Deoptimizer::CreateCode(BailoutType type) {
|
930
|
-
// We cannot run this if the serializer is enabled because this will
|
931
|
-
// cause us to emit relocation information for the external
|
932
|
-
// references. This is fine because the deoptimizer's code section
|
933
|
-
// isn't meant to be serialized at all.
|
934
|
-
ASSERT(!Serializer::enabled());
|
935
|
-
|
936
|
-
MacroAssembler masm(Isolate::Current(), NULL, 16 * KB);
|
937
|
-
masm.set_emit_debug_code(false);
|
938
|
-
GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type);
|
939
|
-
CodeDesc desc;
|
940
|
-
masm.GetCode(&desc);
|
941
|
-
ASSERT(desc.reloc_size == 0);
|
942
|
-
|
943
|
-
LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE);
|
944
|
-
memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
|
945
|
-
CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
|
946
|
-
return chunk;
|
947
|
-
}
|
948
|
-
|
949
|
-
|
950
|
-
Code* Deoptimizer::FindDeoptimizingCodeFromAddress(Address addr) {
|
951
|
-
DeoptimizingCodeListNode* node =
|
952
|
-
Isolate::Current()->deoptimizer_data()->deoptimizing_code_list_;
|
953
|
-
while (node != NULL) {
|
954
|
-
if (node->code()->contains(addr)) return *node->code();
|
955
|
-
node = node->next();
|
956
|
-
}
|
957
|
-
return NULL;
|
958
|
-
}
|
959
|
-
|
960
|
-
|
961
|
-
void Deoptimizer::RemoveDeoptimizingCode(Code* code) {
|
962
|
-
DeoptimizerData* data = Isolate::Current()->deoptimizer_data();
|
963
|
-
ASSERT(data->deoptimizing_code_list_ != NULL);
|
964
|
-
// Run through the code objects to find this one and remove it.
|
965
|
-
DeoptimizingCodeListNode* prev = NULL;
|
966
|
-
DeoptimizingCodeListNode* current = data->deoptimizing_code_list_;
|
967
|
-
while (current != NULL) {
|
968
|
-
if (*current->code() == code) {
|
969
|
-
// Unlink from list. If prev is NULL we are looking at the first element.
|
970
|
-
if (prev == NULL) {
|
971
|
-
data->deoptimizing_code_list_ = current->next();
|
972
|
-
} else {
|
973
|
-
prev->set_next(current->next());
|
974
|
-
}
|
975
|
-
delete current;
|
976
|
-
return;
|
977
|
-
}
|
978
|
-
// Move to next in list.
|
979
|
-
prev = current;
|
980
|
-
current = current->next();
|
981
|
-
}
|
982
|
-
// Deoptimizing code is removed through weak callback. Each object is expected
|
983
|
-
// to be removed once and only once.
|
984
|
-
UNREACHABLE();
|
985
|
-
}
|
986
|
-
|
987
|
-
|
988
|
-
FrameDescription::FrameDescription(uint32_t frame_size,
|
989
|
-
JSFunction* function)
|
990
|
-
: frame_size_(frame_size),
|
991
|
-
function_(function),
|
992
|
-
top_(kZapUint32),
|
993
|
-
pc_(kZapUint32),
|
994
|
-
fp_(kZapUint32) {
|
995
|
-
// Zap all the registers.
|
996
|
-
for (int r = 0; r < Register::kNumRegisters; r++) {
|
997
|
-
SetRegister(r, kZapUint32);
|
998
|
-
}
|
999
|
-
|
1000
|
-
// Zap all the slots.
|
1001
|
-
for (unsigned o = 0; o < frame_size; o += kPointerSize) {
|
1002
|
-
SetFrameSlot(o, kZapUint32);
|
1003
|
-
}
|
1004
|
-
}
|
1005
|
-
|
1006
|
-
|
1007
|
-
unsigned FrameDescription::GetOffsetFromSlotIndex(Deoptimizer* deoptimizer,
|
1008
|
-
int slot_index) {
|
1009
|
-
if (slot_index >= 0) {
|
1010
|
-
// Local or spill slots. Skip the fixed part of the frame
|
1011
|
-
// including all arguments.
|
1012
|
-
unsigned base = static_cast<unsigned>(
|
1013
|
-
GetFrameSize() - deoptimizer->ComputeFixedSize(GetFunction()));
|
1014
|
-
return base - ((slot_index + 1) * kPointerSize);
|
1015
|
-
} else {
|
1016
|
-
// Incoming parameter.
|
1017
|
-
unsigned base = static_cast<unsigned>(GetFrameSize() -
|
1018
|
-
deoptimizer->ComputeIncomingArgumentSize(GetFunction()));
|
1019
|
-
return base - ((slot_index + 1) * kPointerSize);
|
1020
|
-
}
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
|
1024
|
-
void TranslationBuffer::Add(int32_t value) {
|
1025
|
-
// Encode the sign bit in the least significant bit.
|
1026
|
-
bool is_negative = (value < 0);
|
1027
|
-
uint32_t bits = ((is_negative ? -value : value) << 1) |
|
1028
|
-
static_cast<int32_t>(is_negative);
|
1029
|
-
// Encode the individual bytes using the least significant bit of
|
1030
|
-
// each byte to indicate whether or not more bytes follow.
|
1031
|
-
do {
|
1032
|
-
uint32_t next = bits >> 7;
|
1033
|
-
contents_.Add(((bits << 1) & 0xFF) | (next != 0));
|
1034
|
-
bits = next;
|
1035
|
-
} while (bits != 0);
|
1036
|
-
}
|
1037
|
-
|
1038
|
-
|
1039
|
-
int32_t TranslationIterator::Next() {
|
1040
|
-
ASSERT(HasNext());
|
1041
|
-
// Run through the bytes until we reach one with a least significant
|
1042
|
-
// bit of zero (marks the end).
|
1043
|
-
uint32_t bits = 0;
|
1044
|
-
for (int i = 0; true; i += 7) {
|
1045
|
-
uint8_t next = buffer_->get(index_++);
|
1046
|
-
bits |= (next >> 1) << i;
|
1047
|
-
if ((next & 1) == 0) break;
|
1048
|
-
}
|
1049
|
-
// The bits encode the sign in the least significant bit.
|
1050
|
-
bool is_negative = (bits & 1) == 1;
|
1051
|
-
int32_t result = bits >> 1;
|
1052
|
-
return is_negative ? -result : result;
|
1053
|
-
}
|
1054
|
-
|
1055
|
-
|
1056
|
-
Handle<ByteArray> TranslationBuffer::CreateByteArray() {
|
1057
|
-
int length = contents_.length();
|
1058
|
-
Handle<ByteArray> result =
|
1059
|
-
Isolate::Current()->factory()->NewByteArray(length, TENURED);
|
1060
|
-
memcpy(result->GetDataStartAddress(), contents_.ToVector().start(), length);
|
1061
|
-
return result;
|
1062
|
-
}
|
1063
|
-
|
1064
|
-
|
1065
|
-
void Translation::BeginFrame(int node_id, int literal_id, unsigned height) {
|
1066
|
-
buffer_->Add(FRAME);
|
1067
|
-
buffer_->Add(node_id);
|
1068
|
-
buffer_->Add(literal_id);
|
1069
|
-
buffer_->Add(height);
|
1070
|
-
}
|
1071
|
-
|
1072
|
-
|
1073
|
-
void Translation::StoreRegister(Register reg) {
|
1074
|
-
buffer_->Add(REGISTER);
|
1075
|
-
buffer_->Add(reg.code());
|
1076
|
-
}
|
1077
|
-
|
1078
|
-
|
1079
|
-
void Translation::StoreInt32Register(Register reg) {
|
1080
|
-
buffer_->Add(INT32_REGISTER);
|
1081
|
-
buffer_->Add(reg.code());
|
1082
|
-
}
|
1083
|
-
|
1084
|
-
|
1085
|
-
void Translation::StoreDoubleRegister(DoubleRegister reg) {
|
1086
|
-
buffer_->Add(DOUBLE_REGISTER);
|
1087
|
-
buffer_->Add(DoubleRegister::ToAllocationIndex(reg));
|
1088
|
-
}
|
1089
|
-
|
1090
|
-
|
1091
|
-
void Translation::StoreStackSlot(int index) {
|
1092
|
-
buffer_->Add(STACK_SLOT);
|
1093
|
-
buffer_->Add(index);
|
1094
|
-
}
|
1095
|
-
|
1096
|
-
|
1097
|
-
void Translation::StoreInt32StackSlot(int index) {
|
1098
|
-
buffer_->Add(INT32_STACK_SLOT);
|
1099
|
-
buffer_->Add(index);
|
1100
|
-
}
|
1101
|
-
|
1102
|
-
|
1103
|
-
void Translation::StoreDoubleStackSlot(int index) {
|
1104
|
-
buffer_->Add(DOUBLE_STACK_SLOT);
|
1105
|
-
buffer_->Add(index);
|
1106
|
-
}
|
1107
|
-
|
1108
|
-
|
1109
|
-
void Translation::StoreLiteral(int literal_id) {
|
1110
|
-
buffer_->Add(LITERAL);
|
1111
|
-
buffer_->Add(literal_id);
|
1112
|
-
}
|
1113
|
-
|
1114
|
-
|
1115
|
-
void Translation::StoreArgumentsObject() {
|
1116
|
-
buffer_->Add(ARGUMENTS_OBJECT);
|
1117
|
-
}
|
1118
|
-
|
1119
|
-
|
1120
|
-
void Translation::MarkDuplicate() {
|
1121
|
-
buffer_->Add(DUPLICATE);
|
1122
|
-
}
|
1123
|
-
|
1124
|
-
|
1125
|
-
int Translation::NumberOfOperandsFor(Opcode opcode) {
|
1126
|
-
switch (opcode) {
|
1127
|
-
case ARGUMENTS_OBJECT:
|
1128
|
-
case DUPLICATE:
|
1129
|
-
return 0;
|
1130
|
-
case BEGIN:
|
1131
|
-
case REGISTER:
|
1132
|
-
case INT32_REGISTER:
|
1133
|
-
case DOUBLE_REGISTER:
|
1134
|
-
case STACK_SLOT:
|
1135
|
-
case INT32_STACK_SLOT:
|
1136
|
-
case DOUBLE_STACK_SLOT:
|
1137
|
-
case LITERAL:
|
1138
|
-
return 1;
|
1139
|
-
case FRAME:
|
1140
|
-
return 3;
|
1141
|
-
}
|
1142
|
-
UNREACHABLE();
|
1143
|
-
return -1;
|
1144
|
-
}
|
1145
|
-
|
1146
|
-
|
1147
|
-
#ifdef OBJECT_PRINT
|
1148
|
-
|
1149
|
-
const char* Translation::StringFor(Opcode opcode) {
|
1150
|
-
switch (opcode) {
|
1151
|
-
case BEGIN:
|
1152
|
-
return "BEGIN";
|
1153
|
-
case FRAME:
|
1154
|
-
return "FRAME";
|
1155
|
-
case REGISTER:
|
1156
|
-
return "REGISTER";
|
1157
|
-
case INT32_REGISTER:
|
1158
|
-
return "INT32_REGISTER";
|
1159
|
-
case DOUBLE_REGISTER:
|
1160
|
-
return "DOUBLE_REGISTER";
|
1161
|
-
case STACK_SLOT:
|
1162
|
-
return "STACK_SLOT";
|
1163
|
-
case INT32_STACK_SLOT:
|
1164
|
-
return "INT32_STACK_SLOT";
|
1165
|
-
case DOUBLE_STACK_SLOT:
|
1166
|
-
return "DOUBLE_STACK_SLOT";
|
1167
|
-
case LITERAL:
|
1168
|
-
return "LITERAL";
|
1169
|
-
case ARGUMENTS_OBJECT:
|
1170
|
-
return "ARGUMENTS_OBJECT";
|
1171
|
-
case DUPLICATE:
|
1172
|
-
return "DUPLICATE";
|
1173
|
-
}
|
1174
|
-
UNREACHABLE();
|
1175
|
-
return "";
|
1176
|
-
}
|
1177
|
-
|
1178
|
-
#endif
|
1179
|
-
|
1180
|
-
|
1181
|
-
DeoptimizingCodeListNode::DeoptimizingCodeListNode(Code* code): next_(NULL) {
|
1182
|
-
GlobalHandles* global_handles = Isolate::Current()->global_handles();
|
1183
|
-
// Globalize the code object and make it weak.
|
1184
|
-
code_ = Handle<Code>::cast(global_handles->Create(code));
|
1185
|
-
global_handles->MakeWeak(reinterpret_cast<Object**>(code_.location()),
|
1186
|
-
this,
|
1187
|
-
Deoptimizer::HandleWeakDeoptimizedCode);
|
1188
|
-
}
|
1189
|
-
|
1190
|
-
|
1191
|
-
DeoptimizingCodeListNode::~DeoptimizingCodeListNode() {
|
1192
|
-
GlobalHandles* global_handles = Isolate::Current()->global_handles();
|
1193
|
-
global_handles->Destroy(reinterpret_cast<Object**>(code_.location()));
|
1194
|
-
}
|
1195
|
-
|
1196
|
-
|
1197
|
-
// We can't intermix stack decoding and allocations because
|
1198
|
-
// deoptimization infrastracture is not GC safe.
|
1199
|
-
// Thus we build a temporary structure in malloced space.
|
1200
|
-
SlotRef SlotRef::ComputeSlotForNextArgument(TranslationIterator* iterator,
|
1201
|
-
DeoptimizationInputData* data,
|
1202
|
-
JavaScriptFrame* frame) {
|
1203
|
-
Translation::Opcode opcode =
|
1204
|
-
static_cast<Translation::Opcode>(iterator->Next());
|
1205
|
-
|
1206
|
-
switch (opcode) {
|
1207
|
-
case Translation::BEGIN:
|
1208
|
-
case Translation::FRAME:
|
1209
|
-
// Peeled off before getting here.
|
1210
|
-
break;
|
1211
|
-
|
1212
|
-
case Translation::ARGUMENTS_OBJECT:
|
1213
|
-
// This can be only emitted for local slots not for argument slots.
|
1214
|
-
break;
|
1215
|
-
|
1216
|
-
case Translation::REGISTER:
|
1217
|
-
case Translation::INT32_REGISTER:
|
1218
|
-
case Translation::DOUBLE_REGISTER:
|
1219
|
-
case Translation::DUPLICATE:
|
1220
|
-
// We are at safepoint which corresponds to call. All registers are
|
1221
|
-
// saved by caller so there would be no live registers at this
|
1222
|
-
// point. Thus these translation commands should not be used.
|
1223
|
-
break;
|
1224
|
-
|
1225
|
-
case Translation::STACK_SLOT: {
|
1226
|
-
int slot_index = iterator->Next();
|
1227
|
-
Address slot_addr = SlotAddress(frame, slot_index);
|
1228
|
-
return SlotRef(slot_addr, SlotRef::TAGGED);
|
1229
|
-
}
|
1230
|
-
|
1231
|
-
case Translation::INT32_STACK_SLOT: {
|
1232
|
-
int slot_index = iterator->Next();
|
1233
|
-
Address slot_addr = SlotAddress(frame, slot_index);
|
1234
|
-
return SlotRef(slot_addr, SlotRef::INT32);
|
1235
|
-
}
|
1236
|
-
|
1237
|
-
case Translation::DOUBLE_STACK_SLOT: {
|
1238
|
-
int slot_index = iterator->Next();
|
1239
|
-
Address slot_addr = SlotAddress(frame, slot_index);
|
1240
|
-
return SlotRef(slot_addr, SlotRef::DOUBLE);
|
1241
|
-
}
|
1242
|
-
|
1243
|
-
case Translation::LITERAL: {
|
1244
|
-
int literal_index = iterator->Next();
|
1245
|
-
return SlotRef(data->LiteralArray()->get(literal_index));
|
1246
|
-
}
|
1247
|
-
}
|
1248
|
-
|
1249
|
-
UNREACHABLE();
|
1250
|
-
return SlotRef();
|
1251
|
-
}
|
1252
|
-
|
1253
|
-
|
1254
|
-
void SlotRef::ComputeSlotMappingForArguments(JavaScriptFrame* frame,
|
1255
|
-
int inlined_frame_index,
|
1256
|
-
Vector<SlotRef>* args_slots) {
|
1257
|
-
AssertNoAllocation no_gc;
|
1258
|
-
int deopt_index = AstNode::kNoNumber;
|
1259
|
-
DeoptimizationInputData* data =
|
1260
|
-
static_cast<OptimizedFrame*>(frame)->GetDeoptimizationData(&deopt_index);
|
1261
|
-
TranslationIterator it(data->TranslationByteArray(),
|
1262
|
-
data->TranslationIndex(deopt_index)->value());
|
1263
|
-
Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next());
|
1264
|
-
ASSERT(opcode == Translation::BEGIN);
|
1265
|
-
int frame_count = it.Next();
|
1266
|
-
USE(frame_count);
|
1267
|
-
ASSERT(frame_count > inlined_frame_index);
|
1268
|
-
int frames_to_skip = inlined_frame_index;
|
1269
|
-
while (true) {
|
1270
|
-
opcode = static_cast<Translation::Opcode>(it.Next());
|
1271
|
-
// Skip over operands to advance to the next opcode.
|
1272
|
-
it.Skip(Translation::NumberOfOperandsFor(opcode));
|
1273
|
-
if (opcode == Translation::FRAME) {
|
1274
|
-
if (frames_to_skip == 0) {
|
1275
|
-
// We reached the frame corresponding to the inlined function
|
1276
|
-
// in question. Process the translation commands for the
|
1277
|
-
// arguments.
|
1278
|
-
//
|
1279
|
-
// Skip the translation command for the receiver.
|
1280
|
-
it.Skip(Translation::NumberOfOperandsFor(
|
1281
|
-
static_cast<Translation::Opcode>(it.Next())));
|
1282
|
-
// Compute slots for arguments.
|
1283
|
-
for (int i = 0; i < args_slots->length(); ++i) {
|
1284
|
-
(*args_slots)[i] = ComputeSlotForNextArgument(&it, data, frame);
|
1285
|
-
}
|
1286
|
-
return;
|
1287
|
-
}
|
1288
|
-
frames_to_skip--;
|
1289
|
-
}
|
1290
|
-
}
|
1291
|
-
|
1292
|
-
UNREACHABLE();
|
1293
|
-
}
|
1294
|
-
|
1295
|
-
|
1296
|
-
} } // namespace v8::internal
|