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,1385 +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-inl.h"
|
31
|
-
#include "compiler.h"
|
32
|
-
#include "debug.h"
|
33
|
-
#include "full-codegen.h"
|
34
|
-
#include "liveedit.h"
|
35
|
-
#include "macro-assembler.h"
|
36
|
-
#include "prettyprinter.h"
|
37
|
-
#include "scopes.h"
|
38
|
-
#include "stub-cache.h"
|
39
|
-
|
40
|
-
namespace v8 {
|
41
|
-
namespace internal {
|
42
|
-
|
43
|
-
void BreakableStatementChecker::Check(Statement* stmt) {
|
44
|
-
Visit(stmt);
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
void BreakableStatementChecker::Check(Expression* expr) {
|
49
|
-
Visit(expr);
|
50
|
-
}
|
51
|
-
|
52
|
-
|
53
|
-
void BreakableStatementChecker::VisitDeclaration(Declaration* decl) {
|
54
|
-
}
|
55
|
-
|
56
|
-
|
57
|
-
void BreakableStatementChecker::VisitBlock(Block* stmt) {
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
void BreakableStatementChecker::VisitExpressionStatement(
|
62
|
-
ExpressionStatement* stmt) {
|
63
|
-
// Check if expression is breakable.
|
64
|
-
Visit(stmt->expression());
|
65
|
-
}
|
66
|
-
|
67
|
-
|
68
|
-
void BreakableStatementChecker::VisitEmptyStatement(EmptyStatement* stmt) {
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
void BreakableStatementChecker::VisitIfStatement(IfStatement* stmt) {
|
73
|
-
// If the condition is breakable the if statement is breakable.
|
74
|
-
Visit(stmt->condition());
|
75
|
-
}
|
76
|
-
|
77
|
-
|
78
|
-
void BreakableStatementChecker::VisitContinueStatement(
|
79
|
-
ContinueStatement* stmt) {
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
void BreakableStatementChecker::VisitBreakStatement(BreakStatement* stmt) {
|
84
|
-
}
|
85
|
-
|
86
|
-
|
87
|
-
void BreakableStatementChecker::VisitReturnStatement(ReturnStatement* stmt) {
|
88
|
-
// Return is breakable if the expression is.
|
89
|
-
Visit(stmt->expression());
|
90
|
-
}
|
91
|
-
|
92
|
-
|
93
|
-
void BreakableStatementChecker::VisitWithEnterStatement(
|
94
|
-
WithEnterStatement* stmt) {
|
95
|
-
Visit(stmt->expression());
|
96
|
-
}
|
97
|
-
|
98
|
-
|
99
|
-
void BreakableStatementChecker::VisitWithExitStatement(
|
100
|
-
WithExitStatement* stmt) {
|
101
|
-
}
|
102
|
-
|
103
|
-
|
104
|
-
void BreakableStatementChecker::VisitSwitchStatement(SwitchStatement* stmt) {
|
105
|
-
// Switch statements breakable if the tag expression is.
|
106
|
-
Visit(stmt->tag());
|
107
|
-
}
|
108
|
-
|
109
|
-
|
110
|
-
void BreakableStatementChecker::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
111
|
-
// Mark do while as breakable to avoid adding a break slot in front of it.
|
112
|
-
is_breakable_ = true;
|
113
|
-
}
|
114
|
-
|
115
|
-
|
116
|
-
void BreakableStatementChecker::VisitWhileStatement(WhileStatement* stmt) {
|
117
|
-
// Mark while statements breakable if the condition expression is.
|
118
|
-
Visit(stmt->cond());
|
119
|
-
}
|
120
|
-
|
121
|
-
|
122
|
-
void BreakableStatementChecker::VisitForStatement(ForStatement* stmt) {
|
123
|
-
// Mark for statements breakable if the condition expression is.
|
124
|
-
if (stmt->cond() != NULL) {
|
125
|
-
Visit(stmt->cond());
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
|
130
|
-
void BreakableStatementChecker::VisitForInStatement(ForInStatement* stmt) {
|
131
|
-
// Mark for in statements breakable if the enumerable expression is.
|
132
|
-
Visit(stmt->enumerable());
|
133
|
-
}
|
134
|
-
|
135
|
-
|
136
|
-
void BreakableStatementChecker::VisitTryCatchStatement(
|
137
|
-
TryCatchStatement* stmt) {
|
138
|
-
// Mark try catch as breakable to avoid adding a break slot in front of it.
|
139
|
-
is_breakable_ = true;
|
140
|
-
}
|
141
|
-
|
142
|
-
|
143
|
-
void BreakableStatementChecker::VisitTryFinallyStatement(
|
144
|
-
TryFinallyStatement* stmt) {
|
145
|
-
// Mark try finally as breakable to avoid adding a break slot in front of it.
|
146
|
-
is_breakable_ = true;
|
147
|
-
}
|
148
|
-
|
149
|
-
|
150
|
-
void BreakableStatementChecker::VisitDebuggerStatement(
|
151
|
-
DebuggerStatement* stmt) {
|
152
|
-
// The debugger statement is breakable.
|
153
|
-
is_breakable_ = true;
|
154
|
-
}
|
155
|
-
|
156
|
-
|
157
|
-
void BreakableStatementChecker::VisitFunctionLiteral(FunctionLiteral* expr) {
|
158
|
-
}
|
159
|
-
|
160
|
-
|
161
|
-
void BreakableStatementChecker::VisitSharedFunctionInfoLiteral(
|
162
|
-
SharedFunctionInfoLiteral* expr) {
|
163
|
-
}
|
164
|
-
|
165
|
-
|
166
|
-
void BreakableStatementChecker::VisitConditional(Conditional* expr) {
|
167
|
-
}
|
168
|
-
|
169
|
-
|
170
|
-
void BreakableStatementChecker::VisitVariableProxy(VariableProxy* expr) {
|
171
|
-
}
|
172
|
-
|
173
|
-
|
174
|
-
void BreakableStatementChecker::VisitLiteral(Literal* expr) {
|
175
|
-
}
|
176
|
-
|
177
|
-
|
178
|
-
void BreakableStatementChecker::VisitRegExpLiteral(RegExpLiteral* expr) {
|
179
|
-
}
|
180
|
-
|
181
|
-
|
182
|
-
void BreakableStatementChecker::VisitObjectLiteral(ObjectLiteral* expr) {
|
183
|
-
}
|
184
|
-
|
185
|
-
|
186
|
-
void BreakableStatementChecker::VisitArrayLiteral(ArrayLiteral* expr) {
|
187
|
-
}
|
188
|
-
|
189
|
-
|
190
|
-
void BreakableStatementChecker::VisitCatchExtensionObject(
|
191
|
-
CatchExtensionObject* expr) {
|
192
|
-
}
|
193
|
-
|
194
|
-
|
195
|
-
void BreakableStatementChecker::VisitAssignment(Assignment* expr) {
|
196
|
-
// If assigning to a property (including a global property) the assignment is
|
197
|
-
// breakable.
|
198
|
-
Variable* var = expr->target()->AsVariableProxy()->AsVariable();
|
199
|
-
Property* prop = expr->target()->AsProperty();
|
200
|
-
if (prop != NULL || (var != NULL && var->is_global())) {
|
201
|
-
is_breakable_ = true;
|
202
|
-
return;
|
203
|
-
}
|
204
|
-
|
205
|
-
// Otherwise the assignment is breakable if the assigned value is.
|
206
|
-
Visit(expr->value());
|
207
|
-
}
|
208
|
-
|
209
|
-
|
210
|
-
void BreakableStatementChecker::VisitThrow(Throw* expr) {
|
211
|
-
// Throw is breakable if the expression is.
|
212
|
-
Visit(expr->exception());
|
213
|
-
}
|
214
|
-
|
215
|
-
|
216
|
-
void BreakableStatementChecker::VisitIncrementOperation(
|
217
|
-
IncrementOperation* expr) {
|
218
|
-
UNREACHABLE();
|
219
|
-
}
|
220
|
-
|
221
|
-
|
222
|
-
void BreakableStatementChecker::VisitProperty(Property* expr) {
|
223
|
-
// Property load is breakable.
|
224
|
-
is_breakable_ = true;
|
225
|
-
}
|
226
|
-
|
227
|
-
|
228
|
-
void BreakableStatementChecker::VisitCall(Call* expr) {
|
229
|
-
// Function calls both through IC and call stub are breakable.
|
230
|
-
is_breakable_ = true;
|
231
|
-
}
|
232
|
-
|
233
|
-
|
234
|
-
void BreakableStatementChecker::VisitCallNew(CallNew* expr) {
|
235
|
-
// Function calls through new are breakable.
|
236
|
-
is_breakable_ = true;
|
237
|
-
}
|
238
|
-
|
239
|
-
|
240
|
-
void BreakableStatementChecker::VisitCallRuntime(CallRuntime* expr) {
|
241
|
-
}
|
242
|
-
|
243
|
-
|
244
|
-
void BreakableStatementChecker::VisitUnaryOperation(UnaryOperation* expr) {
|
245
|
-
Visit(expr->expression());
|
246
|
-
}
|
247
|
-
|
248
|
-
|
249
|
-
void BreakableStatementChecker::VisitCountOperation(CountOperation* expr) {
|
250
|
-
Visit(expr->expression());
|
251
|
-
}
|
252
|
-
|
253
|
-
|
254
|
-
void BreakableStatementChecker::VisitBinaryOperation(BinaryOperation* expr) {
|
255
|
-
Visit(expr->left());
|
256
|
-
Visit(expr->right());
|
257
|
-
}
|
258
|
-
|
259
|
-
|
260
|
-
void BreakableStatementChecker::VisitCompareToNull(CompareToNull* expr) {
|
261
|
-
Visit(expr->expression());
|
262
|
-
}
|
263
|
-
|
264
|
-
|
265
|
-
void BreakableStatementChecker::VisitCompareOperation(CompareOperation* expr) {
|
266
|
-
Visit(expr->left());
|
267
|
-
Visit(expr->right());
|
268
|
-
}
|
269
|
-
|
270
|
-
|
271
|
-
void BreakableStatementChecker::VisitThisFunction(ThisFunction* expr) {
|
272
|
-
}
|
273
|
-
|
274
|
-
|
275
|
-
#define __ ACCESS_MASM(masm())
|
276
|
-
|
277
|
-
bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
|
278
|
-
Isolate* isolate = info->isolate();
|
279
|
-
Handle<Script> script = info->script();
|
280
|
-
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
|
281
|
-
int len = String::cast(script->source())->length();
|
282
|
-
isolate->counters()->total_full_codegen_source_size()->Increment(len);
|
283
|
-
}
|
284
|
-
if (FLAG_trace_codegen) {
|
285
|
-
PrintF("Full Compiler - ");
|
286
|
-
}
|
287
|
-
CodeGenerator::MakeCodePrologue(info);
|
288
|
-
const int kInitialBufferSize = 4 * KB;
|
289
|
-
MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize);
|
290
|
-
#ifdef ENABLE_GDB_JIT_INTERFACE
|
291
|
-
masm.positions_recorder()->StartGDBJITLineInfoRecording();
|
292
|
-
#endif
|
293
|
-
|
294
|
-
FullCodeGenerator cgen(&masm);
|
295
|
-
cgen.Generate(info);
|
296
|
-
if (cgen.HasStackOverflow()) {
|
297
|
-
ASSERT(!isolate->has_pending_exception());
|
298
|
-
return false;
|
299
|
-
}
|
300
|
-
unsigned table_offset = cgen.EmitStackCheckTable();
|
301
|
-
|
302
|
-
Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
|
303
|
-
Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
|
304
|
-
code->set_optimizable(info->IsOptimizable());
|
305
|
-
cgen.PopulateDeoptimizationData(code);
|
306
|
-
code->set_has_deoptimization_support(info->HasDeoptimizationSupport());
|
307
|
-
code->set_allow_osr_at_loop_nesting_level(0);
|
308
|
-
code->set_stack_check_table_offset(table_offset);
|
309
|
-
CodeGenerator::PrintCode(code, info);
|
310
|
-
info->SetCode(code); // may be an empty handle.
|
311
|
-
#ifdef ENABLE_GDB_JIT_INTERFACE
|
312
|
-
if (FLAG_gdbjit && !code.is_null()) {
|
313
|
-
GDBJITLineInfo* lineinfo =
|
314
|
-
masm.positions_recorder()->DetachGDBJITLineInfo();
|
315
|
-
|
316
|
-
GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
|
317
|
-
}
|
318
|
-
#endif
|
319
|
-
return !code.is_null();
|
320
|
-
}
|
321
|
-
|
322
|
-
|
323
|
-
unsigned FullCodeGenerator::EmitStackCheckTable() {
|
324
|
-
// The stack check table consists of a length (in number of entries)
|
325
|
-
// field, and then a sequence of entries. Each entry is a pair of AST id
|
326
|
-
// and code-relative pc offset.
|
327
|
-
masm()->Align(kIntSize);
|
328
|
-
masm()->RecordComment("[ Stack check table");
|
329
|
-
unsigned offset = masm()->pc_offset();
|
330
|
-
unsigned length = stack_checks_.length();
|
331
|
-
__ dd(length);
|
332
|
-
for (unsigned i = 0; i < length; ++i) {
|
333
|
-
__ dd(stack_checks_[i].id);
|
334
|
-
__ dd(stack_checks_[i].pc_and_state);
|
335
|
-
}
|
336
|
-
masm()->RecordComment("]");
|
337
|
-
return offset;
|
338
|
-
}
|
339
|
-
|
340
|
-
|
341
|
-
void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) {
|
342
|
-
// Fill in the deoptimization information.
|
343
|
-
ASSERT(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty());
|
344
|
-
if (!info_->HasDeoptimizationSupport()) return;
|
345
|
-
int length = bailout_entries_.length();
|
346
|
-
Handle<DeoptimizationOutputData> data =
|
347
|
-
isolate()->factory()->
|
348
|
-
NewDeoptimizationOutputData(length, TENURED);
|
349
|
-
for (int i = 0; i < length; i++) {
|
350
|
-
data->SetAstId(i, Smi::FromInt(bailout_entries_[i].id));
|
351
|
-
data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state));
|
352
|
-
}
|
353
|
-
code->set_deoptimization_data(*data);
|
354
|
-
}
|
355
|
-
|
356
|
-
|
357
|
-
void FullCodeGenerator::PrepareForBailout(AstNode* node, State state) {
|
358
|
-
PrepareForBailoutForId(node->id(), state);
|
359
|
-
}
|
360
|
-
|
361
|
-
|
362
|
-
void FullCodeGenerator::RecordJSReturnSite(Call* call) {
|
363
|
-
// We record the offset of the function return so we can rebuild the frame
|
364
|
-
// if the function was inlined, i.e., this is the return address in the
|
365
|
-
// inlined function's frame.
|
366
|
-
//
|
367
|
-
// The state is ignored. We defensively set it to TOS_REG, which is the
|
368
|
-
// real state of the unoptimized code at the return site.
|
369
|
-
PrepareForBailoutForId(call->ReturnId(), TOS_REG);
|
370
|
-
#ifdef DEBUG
|
371
|
-
// In debug builds, mark the return so we can verify that this function
|
372
|
-
// was called.
|
373
|
-
ASSERT(!call->return_is_recorded_);
|
374
|
-
call->return_is_recorded_ = true;
|
375
|
-
#endif
|
376
|
-
}
|
377
|
-
|
378
|
-
|
379
|
-
void FullCodeGenerator::PrepareForBailoutForId(int id, State state) {
|
380
|
-
// There's no need to prepare this code for bailouts from already optimized
|
381
|
-
// code or code that can't be optimized.
|
382
|
-
if (!FLAG_deopt || !info_->HasDeoptimizationSupport()) return;
|
383
|
-
unsigned pc_and_state =
|
384
|
-
StateField::encode(state) | PcField::encode(masm_->pc_offset());
|
385
|
-
BailoutEntry entry = { id, pc_and_state };
|
386
|
-
#ifdef DEBUG
|
387
|
-
// Assert that we don't have multiple bailout entries for the same node.
|
388
|
-
for (int i = 0; i < bailout_entries_.length(); i++) {
|
389
|
-
if (bailout_entries_.at(i).id == entry.id) {
|
390
|
-
AstPrinter printer;
|
391
|
-
PrintF("%s", printer.PrintProgram(info_->function()));
|
392
|
-
UNREACHABLE();
|
393
|
-
}
|
394
|
-
}
|
395
|
-
#endif // DEBUG
|
396
|
-
bailout_entries_.Add(entry);
|
397
|
-
}
|
398
|
-
|
399
|
-
|
400
|
-
void FullCodeGenerator::RecordStackCheck(int ast_id) {
|
401
|
-
// The pc offset does not need to be encoded and packed together with a
|
402
|
-
// state.
|
403
|
-
BailoutEntry entry = { ast_id, masm_->pc_offset() };
|
404
|
-
stack_checks_.Add(entry);
|
405
|
-
}
|
406
|
-
|
407
|
-
|
408
|
-
int FullCodeGenerator::SlotOffset(Slot* slot) {
|
409
|
-
ASSERT(slot != NULL);
|
410
|
-
// Offset is negative because higher indexes are at lower addresses.
|
411
|
-
int offset = -slot->index() * kPointerSize;
|
412
|
-
// Adjust by a (parameter or local) base offset.
|
413
|
-
switch (slot->type()) {
|
414
|
-
case Slot::PARAMETER:
|
415
|
-
offset += (scope()->num_parameters() + 1) * kPointerSize;
|
416
|
-
break;
|
417
|
-
case Slot::LOCAL:
|
418
|
-
offset += JavaScriptFrameConstants::kLocal0Offset;
|
419
|
-
break;
|
420
|
-
case Slot::CONTEXT:
|
421
|
-
case Slot::LOOKUP:
|
422
|
-
UNREACHABLE();
|
423
|
-
}
|
424
|
-
return offset;
|
425
|
-
}
|
426
|
-
|
427
|
-
|
428
|
-
bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) {
|
429
|
-
// Inline smi case inside loops, but not division and modulo which
|
430
|
-
// are too complicated and take up too much space.
|
431
|
-
if (op == Token::DIV ||op == Token::MOD) return false;
|
432
|
-
if (FLAG_always_inline_smi_code) return true;
|
433
|
-
return loop_depth_ > 0;
|
434
|
-
}
|
435
|
-
|
436
|
-
|
437
|
-
void FullCodeGenerator::EffectContext::Plug(Register reg) const {
|
438
|
-
}
|
439
|
-
|
440
|
-
|
441
|
-
void FullCodeGenerator::AccumulatorValueContext::Plug(Register reg) const {
|
442
|
-
__ Move(result_register(), reg);
|
443
|
-
}
|
444
|
-
|
445
|
-
|
446
|
-
void FullCodeGenerator::StackValueContext::Plug(Register reg) const {
|
447
|
-
__ push(reg);
|
448
|
-
}
|
449
|
-
|
450
|
-
|
451
|
-
void FullCodeGenerator::TestContext::Plug(Register reg) const {
|
452
|
-
// For simplicity we always test the accumulator register.
|
453
|
-
__ Move(result_register(), reg);
|
454
|
-
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
|
455
|
-
codegen()->DoTest(true_label_, false_label_, fall_through_);
|
456
|
-
}
|
457
|
-
|
458
|
-
|
459
|
-
void FullCodeGenerator::EffectContext::PlugTOS() const {
|
460
|
-
__ Drop(1);
|
461
|
-
}
|
462
|
-
|
463
|
-
|
464
|
-
void FullCodeGenerator::AccumulatorValueContext::PlugTOS() const {
|
465
|
-
__ pop(result_register());
|
466
|
-
}
|
467
|
-
|
468
|
-
|
469
|
-
void FullCodeGenerator::StackValueContext::PlugTOS() const {
|
470
|
-
}
|
471
|
-
|
472
|
-
|
473
|
-
void FullCodeGenerator::TestContext::PlugTOS() const {
|
474
|
-
// For simplicity we always test the accumulator register.
|
475
|
-
__ pop(result_register());
|
476
|
-
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
|
477
|
-
codegen()->DoTest(true_label_, false_label_, fall_through_);
|
478
|
-
}
|
479
|
-
|
480
|
-
|
481
|
-
void FullCodeGenerator::EffectContext::PrepareTest(
|
482
|
-
Label* materialize_true,
|
483
|
-
Label* materialize_false,
|
484
|
-
Label** if_true,
|
485
|
-
Label** if_false,
|
486
|
-
Label** fall_through) const {
|
487
|
-
// In an effect context, the true and the false case branch to the
|
488
|
-
// same label.
|
489
|
-
*if_true = *if_false = *fall_through = materialize_true;
|
490
|
-
}
|
491
|
-
|
492
|
-
|
493
|
-
void FullCodeGenerator::AccumulatorValueContext::PrepareTest(
|
494
|
-
Label* materialize_true,
|
495
|
-
Label* materialize_false,
|
496
|
-
Label** if_true,
|
497
|
-
Label** if_false,
|
498
|
-
Label** fall_through) const {
|
499
|
-
*if_true = *fall_through = materialize_true;
|
500
|
-
*if_false = materialize_false;
|
501
|
-
}
|
502
|
-
|
503
|
-
|
504
|
-
void FullCodeGenerator::StackValueContext::PrepareTest(
|
505
|
-
Label* materialize_true,
|
506
|
-
Label* materialize_false,
|
507
|
-
Label** if_true,
|
508
|
-
Label** if_false,
|
509
|
-
Label** fall_through) const {
|
510
|
-
*if_true = *fall_through = materialize_true;
|
511
|
-
*if_false = materialize_false;
|
512
|
-
}
|
513
|
-
|
514
|
-
|
515
|
-
void FullCodeGenerator::TestContext::PrepareTest(
|
516
|
-
Label* materialize_true,
|
517
|
-
Label* materialize_false,
|
518
|
-
Label** if_true,
|
519
|
-
Label** if_false,
|
520
|
-
Label** fall_through) const {
|
521
|
-
*if_true = true_label_;
|
522
|
-
*if_false = false_label_;
|
523
|
-
*fall_through = fall_through_;
|
524
|
-
}
|
525
|
-
|
526
|
-
|
527
|
-
void FullCodeGenerator::VisitDeclarations(
|
528
|
-
ZoneList<Declaration*>* declarations) {
|
529
|
-
int length = declarations->length();
|
530
|
-
int globals = 0;
|
531
|
-
for (int i = 0; i < length; i++) {
|
532
|
-
Declaration* decl = declarations->at(i);
|
533
|
-
Variable* var = decl->proxy()->var();
|
534
|
-
Slot* slot = var->AsSlot();
|
535
|
-
|
536
|
-
// If it was not possible to allocate the variable at compile
|
537
|
-
// time, we need to "declare" it at runtime to make sure it
|
538
|
-
// actually exists in the local context.
|
539
|
-
if ((slot != NULL && slot->type() == Slot::LOOKUP) || !var->is_global()) {
|
540
|
-
VisitDeclaration(decl);
|
541
|
-
} else {
|
542
|
-
// Count global variables and functions for later processing
|
543
|
-
globals++;
|
544
|
-
}
|
545
|
-
}
|
546
|
-
|
547
|
-
// Compute array of global variable and function declarations.
|
548
|
-
// Do nothing in case of no declared global functions or variables.
|
549
|
-
if (globals > 0) {
|
550
|
-
Handle<FixedArray> array =
|
551
|
-
isolate()->factory()->NewFixedArray(2 * globals, TENURED);
|
552
|
-
for (int j = 0, i = 0; i < length; i++) {
|
553
|
-
Declaration* decl = declarations->at(i);
|
554
|
-
Variable* var = decl->proxy()->var();
|
555
|
-
Slot* slot = var->AsSlot();
|
556
|
-
|
557
|
-
if ((slot == NULL || slot->type() != Slot::LOOKUP) && var->is_global()) {
|
558
|
-
array->set(j++, *(var->name()));
|
559
|
-
if (decl->fun() == NULL) {
|
560
|
-
if (var->mode() == Variable::CONST) {
|
561
|
-
// In case this is const property use the hole.
|
562
|
-
array->set_the_hole(j++);
|
563
|
-
} else {
|
564
|
-
array->set_undefined(j++);
|
565
|
-
}
|
566
|
-
} else {
|
567
|
-
Handle<SharedFunctionInfo> function =
|
568
|
-
Compiler::BuildFunctionInfo(decl->fun(), script());
|
569
|
-
// Check for stack-overflow exception.
|
570
|
-
if (function.is_null()) {
|
571
|
-
SetStackOverflow();
|
572
|
-
return;
|
573
|
-
}
|
574
|
-
array->set(j++, *function);
|
575
|
-
}
|
576
|
-
}
|
577
|
-
}
|
578
|
-
// Invoke the platform-dependent code generator to do the actual
|
579
|
-
// declaration the global variables and functions.
|
580
|
-
DeclareGlobals(array);
|
581
|
-
}
|
582
|
-
}
|
583
|
-
|
584
|
-
|
585
|
-
void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
|
586
|
-
if (FLAG_debug_info) {
|
587
|
-
CodeGenerator::RecordPositions(masm_, fun->start_position());
|
588
|
-
}
|
589
|
-
}
|
590
|
-
|
591
|
-
|
592
|
-
void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
|
593
|
-
if (FLAG_debug_info) {
|
594
|
-
CodeGenerator::RecordPositions(masm_, fun->end_position() - 1);
|
595
|
-
}
|
596
|
-
}
|
597
|
-
|
598
|
-
|
599
|
-
void FullCodeGenerator::SetStatementPosition(Statement* stmt) {
|
600
|
-
if (FLAG_debug_info) {
|
601
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
602
|
-
if (!isolate()->debugger()->IsDebuggerActive()) {
|
603
|
-
CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
|
604
|
-
} else {
|
605
|
-
// Check if the statement will be breakable without adding a debug break
|
606
|
-
// slot.
|
607
|
-
BreakableStatementChecker checker;
|
608
|
-
checker.Check(stmt);
|
609
|
-
// Record the statement position right here if the statement is not
|
610
|
-
// breakable. For breakable statements the actual recording of the
|
611
|
-
// position will be postponed to the breakable code (typically an IC).
|
612
|
-
bool position_recorded = CodeGenerator::RecordPositions(
|
613
|
-
masm_, stmt->statement_pos(), !checker.is_breakable());
|
614
|
-
// If the position recording did record a new position generate a debug
|
615
|
-
// break slot to make the statement breakable.
|
616
|
-
if (position_recorded) {
|
617
|
-
Debug::GenerateSlot(masm_);
|
618
|
-
}
|
619
|
-
}
|
620
|
-
#else
|
621
|
-
CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
|
622
|
-
#endif
|
623
|
-
}
|
624
|
-
}
|
625
|
-
|
626
|
-
|
627
|
-
void FullCodeGenerator::SetExpressionPosition(Expression* expr, int pos) {
|
628
|
-
if (FLAG_debug_info) {
|
629
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
630
|
-
if (!isolate()->debugger()->IsDebuggerActive()) {
|
631
|
-
CodeGenerator::RecordPositions(masm_, pos);
|
632
|
-
} else {
|
633
|
-
// Check if the expression will be breakable without adding a debug break
|
634
|
-
// slot.
|
635
|
-
BreakableStatementChecker checker;
|
636
|
-
checker.Check(expr);
|
637
|
-
// Record a statement position right here if the expression is not
|
638
|
-
// breakable. For breakable expressions the actual recording of the
|
639
|
-
// position will be postponed to the breakable code (typically an IC).
|
640
|
-
// NOTE this will record a statement position for something which might
|
641
|
-
// not be a statement. As stepping in the debugger will only stop at
|
642
|
-
// statement positions this is used for e.g. the condition expression of
|
643
|
-
// a do while loop.
|
644
|
-
bool position_recorded = CodeGenerator::RecordPositions(
|
645
|
-
masm_, pos, !checker.is_breakable());
|
646
|
-
// If the position recording did record a new position generate a debug
|
647
|
-
// break slot to make the statement breakable.
|
648
|
-
if (position_recorded) {
|
649
|
-
Debug::GenerateSlot(masm_);
|
650
|
-
}
|
651
|
-
}
|
652
|
-
#else
|
653
|
-
CodeGenerator::RecordPositions(masm_, pos);
|
654
|
-
#endif
|
655
|
-
}
|
656
|
-
}
|
657
|
-
|
658
|
-
|
659
|
-
void FullCodeGenerator::SetStatementPosition(int pos) {
|
660
|
-
if (FLAG_debug_info) {
|
661
|
-
CodeGenerator::RecordPositions(masm_, pos);
|
662
|
-
}
|
663
|
-
}
|
664
|
-
|
665
|
-
|
666
|
-
void FullCodeGenerator::SetSourcePosition(int pos) {
|
667
|
-
if (FLAG_debug_info && pos != RelocInfo::kNoPosition) {
|
668
|
-
masm_->positions_recorder()->RecordPosition(pos);
|
669
|
-
}
|
670
|
-
}
|
671
|
-
|
672
|
-
|
673
|
-
// Lookup table for code generators for special runtime calls which are
|
674
|
-
// generated inline.
|
675
|
-
#define INLINE_FUNCTION_GENERATOR_ADDRESS(Name, argc, ressize) \
|
676
|
-
&FullCodeGenerator::Emit##Name,
|
677
|
-
|
678
|
-
const FullCodeGenerator::InlineFunctionGenerator
|
679
|
-
FullCodeGenerator::kInlineFunctionGenerators[] = {
|
680
|
-
INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS)
|
681
|
-
INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS)
|
682
|
-
};
|
683
|
-
#undef INLINE_FUNCTION_GENERATOR_ADDRESS
|
684
|
-
|
685
|
-
|
686
|
-
FullCodeGenerator::InlineFunctionGenerator
|
687
|
-
FullCodeGenerator::FindInlineFunctionGenerator(Runtime::FunctionId id) {
|
688
|
-
int lookup_index =
|
689
|
-
static_cast<int>(id) - static_cast<int>(Runtime::kFirstInlineFunction);
|
690
|
-
ASSERT(lookup_index >= 0);
|
691
|
-
ASSERT(static_cast<size_t>(lookup_index) <
|
692
|
-
ARRAY_SIZE(kInlineFunctionGenerators));
|
693
|
-
return kInlineFunctionGenerators[lookup_index];
|
694
|
-
}
|
695
|
-
|
696
|
-
|
697
|
-
void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* node) {
|
698
|
-
ZoneList<Expression*>* args = node->arguments();
|
699
|
-
Handle<String> name = node->name();
|
700
|
-
const Runtime::Function* function = node->function();
|
701
|
-
ASSERT(function != NULL);
|
702
|
-
ASSERT(function->intrinsic_type == Runtime::INLINE);
|
703
|
-
InlineFunctionGenerator generator =
|
704
|
-
FindInlineFunctionGenerator(function->function_id);
|
705
|
-
((*this).*(generator))(args);
|
706
|
-
}
|
707
|
-
|
708
|
-
|
709
|
-
void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) {
|
710
|
-
Comment cmnt(masm_, "[ BinaryOperation");
|
711
|
-
Token::Value op = expr->op();
|
712
|
-
Expression* left = expr->left();
|
713
|
-
Expression* right = expr->right();
|
714
|
-
|
715
|
-
OverwriteMode mode = NO_OVERWRITE;
|
716
|
-
if (left->ResultOverwriteAllowed()) {
|
717
|
-
mode = OVERWRITE_LEFT;
|
718
|
-
} else if (right->ResultOverwriteAllowed()) {
|
719
|
-
mode = OVERWRITE_RIGHT;
|
720
|
-
}
|
721
|
-
|
722
|
-
switch (op) {
|
723
|
-
case Token::COMMA:
|
724
|
-
VisitForEffect(left);
|
725
|
-
if (context()->IsTest()) ForwardBailoutToChild(expr);
|
726
|
-
context()->HandleExpression(right);
|
727
|
-
break;
|
728
|
-
|
729
|
-
case Token::OR:
|
730
|
-
case Token::AND:
|
731
|
-
EmitLogicalOperation(expr);
|
732
|
-
break;
|
733
|
-
|
734
|
-
case Token::ADD:
|
735
|
-
case Token::SUB:
|
736
|
-
case Token::DIV:
|
737
|
-
case Token::MOD:
|
738
|
-
case Token::MUL:
|
739
|
-
case Token::BIT_OR:
|
740
|
-
case Token::BIT_AND:
|
741
|
-
case Token::BIT_XOR:
|
742
|
-
case Token::SHL:
|
743
|
-
case Token::SHR:
|
744
|
-
case Token::SAR: {
|
745
|
-
// Load both operands.
|
746
|
-
VisitForStackValue(left);
|
747
|
-
VisitForAccumulatorValue(right);
|
748
|
-
|
749
|
-
SetSourcePosition(expr->position());
|
750
|
-
if (ShouldInlineSmiCase(op)) {
|
751
|
-
EmitInlineSmiBinaryOp(expr, op, mode, left, right);
|
752
|
-
} else {
|
753
|
-
EmitBinaryOp(op, mode);
|
754
|
-
}
|
755
|
-
break;
|
756
|
-
}
|
757
|
-
|
758
|
-
default:
|
759
|
-
UNREACHABLE();
|
760
|
-
}
|
761
|
-
}
|
762
|
-
|
763
|
-
|
764
|
-
void FullCodeGenerator::EmitLogicalOperation(BinaryOperation* expr) {
|
765
|
-
Label eval_right, done;
|
766
|
-
|
767
|
-
context()->EmitLogicalLeft(expr, &eval_right, &done);
|
768
|
-
|
769
|
-
PrepareForBailoutForId(expr->RightId(), NO_REGISTERS);
|
770
|
-
__ bind(&eval_right);
|
771
|
-
if (context()->IsTest()) ForwardBailoutToChild(expr);
|
772
|
-
context()->HandleExpression(expr->right());
|
773
|
-
|
774
|
-
__ bind(&done);
|
775
|
-
}
|
776
|
-
|
777
|
-
|
778
|
-
void FullCodeGenerator::EffectContext::EmitLogicalLeft(BinaryOperation* expr,
|
779
|
-
Label* eval_right,
|
780
|
-
Label* done) const {
|
781
|
-
if (expr->op() == Token::OR) {
|
782
|
-
codegen()->VisitForControl(expr->left(), done, eval_right, eval_right);
|
783
|
-
} else {
|
784
|
-
ASSERT(expr->op() == Token::AND);
|
785
|
-
codegen()->VisitForControl(expr->left(), eval_right, done, eval_right);
|
786
|
-
}
|
787
|
-
}
|
788
|
-
|
789
|
-
|
790
|
-
void FullCodeGenerator::AccumulatorValueContext::EmitLogicalLeft(
|
791
|
-
BinaryOperation* expr,
|
792
|
-
Label* eval_right,
|
793
|
-
Label* done) const {
|
794
|
-
HandleExpression(expr->left());
|
795
|
-
// We want the value in the accumulator for the test, and on the stack in case
|
796
|
-
// we need it.
|
797
|
-
__ push(result_register());
|
798
|
-
Label discard, restore;
|
799
|
-
if (expr->op() == Token::OR) {
|
800
|
-
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
|
801
|
-
codegen()->DoTest(&restore, &discard, &restore);
|
802
|
-
} else {
|
803
|
-
ASSERT(expr->op() == Token::AND);
|
804
|
-
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
|
805
|
-
codegen()->DoTest(&discard, &restore, &restore);
|
806
|
-
}
|
807
|
-
__ bind(&restore);
|
808
|
-
__ pop(result_register());
|
809
|
-
__ jmp(done);
|
810
|
-
__ bind(&discard);
|
811
|
-
__ Drop(1);
|
812
|
-
}
|
813
|
-
|
814
|
-
|
815
|
-
void FullCodeGenerator::StackValueContext::EmitLogicalLeft(
|
816
|
-
BinaryOperation* expr,
|
817
|
-
Label* eval_right,
|
818
|
-
Label* done) const {
|
819
|
-
codegen()->VisitForAccumulatorValue(expr->left());
|
820
|
-
// We want the value in the accumulator for the test, and on the stack in case
|
821
|
-
// we need it.
|
822
|
-
__ push(result_register());
|
823
|
-
Label discard;
|
824
|
-
if (expr->op() == Token::OR) {
|
825
|
-
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
|
826
|
-
codegen()->DoTest(done, &discard, &discard);
|
827
|
-
} else {
|
828
|
-
ASSERT(expr->op() == Token::AND);
|
829
|
-
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
|
830
|
-
codegen()->DoTest(&discard, done, &discard);
|
831
|
-
}
|
832
|
-
__ bind(&discard);
|
833
|
-
__ Drop(1);
|
834
|
-
}
|
835
|
-
|
836
|
-
|
837
|
-
void FullCodeGenerator::TestContext::EmitLogicalLeft(BinaryOperation* expr,
|
838
|
-
Label* eval_right,
|
839
|
-
Label* done) const {
|
840
|
-
if (expr->op() == Token::OR) {
|
841
|
-
codegen()->VisitForControl(expr->left(),
|
842
|
-
true_label_, eval_right, eval_right);
|
843
|
-
} else {
|
844
|
-
ASSERT(expr->op() == Token::AND);
|
845
|
-
codegen()->VisitForControl(expr->left(),
|
846
|
-
eval_right, false_label_, eval_right);
|
847
|
-
}
|
848
|
-
}
|
849
|
-
|
850
|
-
|
851
|
-
void FullCodeGenerator::ForwardBailoutToChild(Expression* expr) {
|
852
|
-
if (!info_->HasDeoptimizationSupport()) return;
|
853
|
-
ASSERT(context()->IsTest());
|
854
|
-
ASSERT(expr == forward_bailout_stack_->expr());
|
855
|
-
forward_bailout_pending_ = forward_bailout_stack_;
|
856
|
-
}
|
857
|
-
|
858
|
-
|
859
|
-
void FullCodeGenerator::EffectContext::HandleExpression(
|
860
|
-
Expression* expr) const {
|
861
|
-
codegen()->HandleInNonTestContext(expr, NO_REGISTERS);
|
862
|
-
}
|
863
|
-
|
864
|
-
|
865
|
-
void FullCodeGenerator::AccumulatorValueContext::HandleExpression(
|
866
|
-
Expression* expr) const {
|
867
|
-
codegen()->HandleInNonTestContext(expr, TOS_REG);
|
868
|
-
}
|
869
|
-
|
870
|
-
|
871
|
-
void FullCodeGenerator::StackValueContext::HandleExpression(
|
872
|
-
Expression* expr) const {
|
873
|
-
codegen()->HandleInNonTestContext(expr, NO_REGISTERS);
|
874
|
-
}
|
875
|
-
|
876
|
-
|
877
|
-
void FullCodeGenerator::TestContext::HandleExpression(Expression* expr) const {
|
878
|
-
codegen()->VisitInTestContext(expr);
|
879
|
-
}
|
880
|
-
|
881
|
-
|
882
|
-
void FullCodeGenerator::HandleInNonTestContext(Expression* expr, State state) {
|
883
|
-
ASSERT(forward_bailout_pending_ == NULL);
|
884
|
-
AstVisitor::Visit(expr);
|
885
|
-
PrepareForBailout(expr, state);
|
886
|
-
// Forwarding bailouts to children is a one shot operation. It
|
887
|
-
// should have been processed at this point.
|
888
|
-
ASSERT(forward_bailout_pending_ == NULL);
|
889
|
-
}
|
890
|
-
|
891
|
-
|
892
|
-
void FullCodeGenerator::VisitInTestContext(Expression* expr) {
|
893
|
-
ForwardBailoutStack stack(expr, forward_bailout_pending_);
|
894
|
-
ForwardBailoutStack* saved = forward_bailout_stack_;
|
895
|
-
forward_bailout_pending_ = NULL;
|
896
|
-
forward_bailout_stack_ = &stack;
|
897
|
-
AstVisitor::Visit(expr);
|
898
|
-
forward_bailout_stack_ = saved;
|
899
|
-
}
|
900
|
-
|
901
|
-
|
902
|
-
void FullCodeGenerator::VisitBlock(Block* stmt) {
|
903
|
-
Comment cmnt(masm_, "[ Block");
|
904
|
-
Breakable nested_statement(this, stmt);
|
905
|
-
SetStatementPosition(stmt);
|
906
|
-
|
907
|
-
PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
|
908
|
-
VisitStatements(stmt->statements());
|
909
|
-
__ bind(nested_statement.break_target());
|
910
|
-
PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
911
|
-
}
|
912
|
-
|
913
|
-
|
914
|
-
void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) {
|
915
|
-
Comment cmnt(masm_, "[ ExpressionStatement");
|
916
|
-
SetStatementPosition(stmt);
|
917
|
-
VisitForEffect(stmt->expression());
|
918
|
-
}
|
919
|
-
|
920
|
-
|
921
|
-
void FullCodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) {
|
922
|
-
Comment cmnt(masm_, "[ EmptyStatement");
|
923
|
-
SetStatementPosition(stmt);
|
924
|
-
}
|
925
|
-
|
926
|
-
|
927
|
-
void FullCodeGenerator::VisitIfStatement(IfStatement* stmt) {
|
928
|
-
Comment cmnt(masm_, "[ IfStatement");
|
929
|
-
SetStatementPosition(stmt);
|
930
|
-
Label then_part, else_part, done;
|
931
|
-
|
932
|
-
if (stmt->HasElseStatement()) {
|
933
|
-
VisitForControl(stmt->condition(), &then_part, &else_part, &then_part);
|
934
|
-
PrepareForBailoutForId(stmt->ThenId(), NO_REGISTERS);
|
935
|
-
__ bind(&then_part);
|
936
|
-
Visit(stmt->then_statement());
|
937
|
-
__ jmp(&done);
|
938
|
-
|
939
|
-
PrepareForBailoutForId(stmt->ElseId(), NO_REGISTERS);
|
940
|
-
__ bind(&else_part);
|
941
|
-
Visit(stmt->else_statement());
|
942
|
-
} else {
|
943
|
-
VisitForControl(stmt->condition(), &then_part, &done, &then_part);
|
944
|
-
PrepareForBailoutForId(stmt->ThenId(), NO_REGISTERS);
|
945
|
-
__ bind(&then_part);
|
946
|
-
Visit(stmt->then_statement());
|
947
|
-
|
948
|
-
PrepareForBailoutForId(stmt->ElseId(), NO_REGISTERS);
|
949
|
-
}
|
950
|
-
__ bind(&done);
|
951
|
-
PrepareForBailoutForId(stmt->id(), NO_REGISTERS);
|
952
|
-
}
|
953
|
-
|
954
|
-
|
955
|
-
void FullCodeGenerator::VisitContinueStatement(ContinueStatement* stmt) {
|
956
|
-
Comment cmnt(masm_, "[ ContinueStatement");
|
957
|
-
SetStatementPosition(stmt);
|
958
|
-
NestedStatement* current = nesting_stack_;
|
959
|
-
int stack_depth = 0;
|
960
|
-
// When continuing, we clobber the unpredictable value in the accumulator
|
961
|
-
// with one that's safe for GC. If we hit an exit from the try block of
|
962
|
-
// try...finally on our way out, we will unconditionally preserve the
|
963
|
-
// accumulator on the stack.
|
964
|
-
ClearAccumulator();
|
965
|
-
while (!current->IsContinueTarget(stmt->target())) {
|
966
|
-
stack_depth = current->Exit(stack_depth);
|
967
|
-
current = current->outer();
|
968
|
-
}
|
969
|
-
__ Drop(stack_depth);
|
970
|
-
|
971
|
-
Iteration* loop = current->AsIteration();
|
972
|
-
__ jmp(loop->continue_target());
|
973
|
-
}
|
974
|
-
|
975
|
-
|
976
|
-
void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
|
977
|
-
Comment cmnt(masm_, "[ BreakStatement");
|
978
|
-
SetStatementPosition(stmt);
|
979
|
-
NestedStatement* current = nesting_stack_;
|
980
|
-
int stack_depth = 0;
|
981
|
-
// When breaking, we clobber the unpredictable value in the accumulator
|
982
|
-
// with one that's safe for GC. If we hit an exit from the try block of
|
983
|
-
// try...finally on our way out, we will unconditionally preserve the
|
984
|
-
// accumulator on the stack.
|
985
|
-
ClearAccumulator();
|
986
|
-
while (!current->IsBreakTarget(stmt->target())) {
|
987
|
-
stack_depth = current->Exit(stack_depth);
|
988
|
-
current = current->outer();
|
989
|
-
}
|
990
|
-
__ Drop(stack_depth);
|
991
|
-
|
992
|
-
Breakable* target = current->AsBreakable();
|
993
|
-
__ jmp(target->break_target());
|
994
|
-
}
|
995
|
-
|
996
|
-
|
997
|
-
void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
|
998
|
-
Comment cmnt(masm_, "[ ReturnStatement");
|
999
|
-
SetStatementPosition(stmt);
|
1000
|
-
Expression* expr = stmt->expression();
|
1001
|
-
VisitForAccumulatorValue(expr);
|
1002
|
-
|
1003
|
-
// Exit all nested statements.
|
1004
|
-
NestedStatement* current = nesting_stack_;
|
1005
|
-
int stack_depth = 0;
|
1006
|
-
while (current != NULL) {
|
1007
|
-
stack_depth = current->Exit(stack_depth);
|
1008
|
-
current = current->outer();
|
1009
|
-
}
|
1010
|
-
__ Drop(stack_depth);
|
1011
|
-
|
1012
|
-
EmitReturnSequence();
|
1013
|
-
}
|
1014
|
-
|
1015
|
-
|
1016
|
-
void FullCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) {
|
1017
|
-
Comment cmnt(masm_, "[ WithEnterStatement");
|
1018
|
-
SetStatementPosition(stmt);
|
1019
|
-
|
1020
|
-
VisitForStackValue(stmt->expression());
|
1021
|
-
if (stmt->is_catch_block()) {
|
1022
|
-
__ CallRuntime(Runtime::kPushCatchContext, 1);
|
1023
|
-
} else {
|
1024
|
-
__ CallRuntime(Runtime::kPushContext, 1);
|
1025
|
-
}
|
1026
|
-
// Both runtime calls return the new context in both the context and the
|
1027
|
-
// result registers.
|
1028
|
-
|
1029
|
-
// Update local stack frame context field.
|
1030
|
-
StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
|
1031
|
-
}
|
1032
|
-
|
1033
|
-
|
1034
|
-
void FullCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) {
|
1035
|
-
Comment cmnt(masm_, "[ WithExitStatement");
|
1036
|
-
SetStatementPosition(stmt);
|
1037
|
-
|
1038
|
-
// Pop context.
|
1039
|
-
LoadContextField(context_register(), Context::PREVIOUS_INDEX);
|
1040
|
-
// Update local stack frame context field.
|
1041
|
-
StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
|
1042
|
-
}
|
1043
|
-
|
1044
|
-
|
1045
|
-
void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
1046
|
-
Comment cmnt(masm_, "[ DoWhileStatement");
|
1047
|
-
SetStatementPosition(stmt);
|
1048
|
-
Label body, stack_check;
|
1049
|
-
|
1050
|
-
Iteration loop_statement(this, stmt);
|
1051
|
-
increment_loop_depth();
|
1052
|
-
|
1053
|
-
__ bind(&body);
|
1054
|
-
Visit(stmt->body());
|
1055
|
-
|
1056
|
-
// Record the position of the do while condition and make sure it is
|
1057
|
-
// possible to break on the condition.
|
1058
|
-
__ bind(loop_statement.continue_target());
|
1059
|
-
PrepareForBailoutForId(stmt->ContinueId(), NO_REGISTERS);
|
1060
|
-
SetExpressionPosition(stmt->cond(), stmt->condition_position());
|
1061
|
-
VisitForControl(stmt->cond(),
|
1062
|
-
&stack_check,
|
1063
|
-
loop_statement.break_target(),
|
1064
|
-
&stack_check);
|
1065
|
-
|
1066
|
-
// Check stack before looping.
|
1067
|
-
PrepareForBailoutForId(stmt->BackEdgeId(), NO_REGISTERS);
|
1068
|
-
__ bind(&stack_check);
|
1069
|
-
EmitStackCheck(stmt);
|
1070
|
-
__ jmp(&body);
|
1071
|
-
|
1072
|
-
PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
1073
|
-
__ bind(loop_statement.break_target());
|
1074
|
-
decrement_loop_depth();
|
1075
|
-
}
|
1076
|
-
|
1077
|
-
|
1078
|
-
void FullCodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
|
1079
|
-
Comment cmnt(masm_, "[ WhileStatement");
|
1080
|
-
Label test, body;
|
1081
|
-
|
1082
|
-
Iteration loop_statement(this, stmt);
|
1083
|
-
increment_loop_depth();
|
1084
|
-
|
1085
|
-
// Emit the test at the bottom of the loop.
|
1086
|
-
__ jmp(&test);
|
1087
|
-
|
1088
|
-
PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS);
|
1089
|
-
__ bind(&body);
|
1090
|
-
Visit(stmt->body());
|
1091
|
-
|
1092
|
-
// Emit the statement position here as this is where the while
|
1093
|
-
// statement code starts.
|
1094
|
-
__ bind(loop_statement.continue_target());
|
1095
|
-
SetStatementPosition(stmt);
|
1096
|
-
|
1097
|
-
// Check stack before looping.
|
1098
|
-
EmitStackCheck(stmt);
|
1099
|
-
|
1100
|
-
__ bind(&test);
|
1101
|
-
VisitForControl(stmt->cond(),
|
1102
|
-
&body,
|
1103
|
-
loop_statement.break_target(),
|
1104
|
-
loop_statement.break_target());
|
1105
|
-
|
1106
|
-
PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
1107
|
-
__ bind(loop_statement.break_target());
|
1108
|
-
decrement_loop_depth();
|
1109
|
-
}
|
1110
|
-
|
1111
|
-
|
1112
|
-
void FullCodeGenerator::VisitForStatement(ForStatement* stmt) {
|
1113
|
-
Comment cmnt(masm_, "[ ForStatement");
|
1114
|
-
Label test, body;
|
1115
|
-
|
1116
|
-
Iteration loop_statement(this, stmt);
|
1117
|
-
if (stmt->init() != NULL) {
|
1118
|
-
Visit(stmt->init());
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
increment_loop_depth();
|
1122
|
-
// Emit the test at the bottom of the loop (even if empty).
|
1123
|
-
__ jmp(&test);
|
1124
|
-
|
1125
|
-
PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS);
|
1126
|
-
__ bind(&body);
|
1127
|
-
Visit(stmt->body());
|
1128
|
-
|
1129
|
-
PrepareForBailoutForId(stmt->ContinueId(), NO_REGISTERS);
|
1130
|
-
__ bind(loop_statement.continue_target());
|
1131
|
-
SetStatementPosition(stmt);
|
1132
|
-
if (stmt->next() != NULL) {
|
1133
|
-
Visit(stmt->next());
|
1134
|
-
}
|
1135
|
-
|
1136
|
-
// Emit the statement position here as this is where the for
|
1137
|
-
// statement code starts.
|
1138
|
-
SetStatementPosition(stmt);
|
1139
|
-
|
1140
|
-
// Check stack before looping.
|
1141
|
-
EmitStackCheck(stmt);
|
1142
|
-
|
1143
|
-
__ bind(&test);
|
1144
|
-
if (stmt->cond() != NULL) {
|
1145
|
-
VisitForControl(stmt->cond(),
|
1146
|
-
&body,
|
1147
|
-
loop_statement.break_target(),
|
1148
|
-
loop_statement.break_target());
|
1149
|
-
} else {
|
1150
|
-
__ jmp(&body);
|
1151
|
-
}
|
1152
|
-
|
1153
|
-
PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
1154
|
-
__ bind(loop_statement.break_target());
|
1155
|
-
decrement_loop_depth();
|
1156
|
-
}
|
1157
|
-
|
1158
|
-
|
1159
|
-
void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
|
1160
|
-
Comment cmnt(masm_, "[ TryCatchStatement");
|
1161
|
-
SetStatementPosition(stmt);
|
1162
|
-
// The try block adds a handler to the exception handler chain
|
1163
|
-
// before entering, and removes it again when exiting normally.
|
1164
|
-
// If an exception is thrown during execution of the try block,
|
1165
|
-
// control is passed to the handler, which also consumes the handler.
|
1166
|
-
// At this point, the exception is in a register, and store it in
|
1167
|
-
// the temporary local variable (prints as ".catch-var") before
|
1168
|
-
// executing the catch block. The catch block has been rewritten
|
1169
|
-
// to introduce a new scope to bind the catch variable and to remove
|
1170
|
-
// that scope again afterwards.
|
1171
|
-
|
1172
|
-
Label try_handler_setup, catch_entry, done;
|
1173
|
-
__ Call(&try_handler_setup);
|
1174
|
-
// Try handler code, exception in result register.
|
1175
|
-
|
1176
|
-
// Store exception in local .catch variable before executing catch block.
|
1177
|
-
{
|
1178
|
-
// The catch variable is *always* a variable proxy for a local variable.
|
1179
|
-
Variable* catch_var = stmt->catch_var()->AsVariableProxy()->AsVariable();
|
1180
|
-
ASSERT_NOT_NULL(catch_var);
|
1181
|
-
Slot* variable_slot = catch_var->AsSlot();
|
1182
|
-
ASSERT_NOT_NULL(variable_slot);
|
1183
|
-
ASSERT_EQ(Slot::LOCAL, variable_slot->type());
|
1184
|
-
StoreToFrameField(SlotOffset(variable_slot), result_register());
|
1185
|
-
}
|
1186
|
-
|
1187
|
-
Visit(stmt->catch_block());
|
1188
|
-
__ jmp(&done);
|
1189
|
-
|
1190
|
-
// Try block code. Sets up the exception handler chain.
|
1191
|
-
__ bind(&try_handler_setup);
|
1192
|
-
{
|
1193
|
-
TryCatch try_block(this, &catch_entry);
|
1194
|
-
__ PushTryHandler(IN_JAVASCRIPT, TRY_CATCH_HANDLER);
|
1195
|
-
Visit(stmt->try_block());
|
1196
|
-
__ PopTryHandler();
|
1197
|
-
}
|
1198
|
-
__ bind(&done);
|
1199
|
-
}
|
1200
|
-
|
1201
|
-
|
1202
|
-
void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) {
|
1203
|
-
Comment cmnt(masm_, "[ TryFinallyStatement");
|
1204
|
-
SetStatementPosition(stmt);
|
1205
|
-
// Try finally is compiled by setting up a try-handler on the stack while
|
1206
|
-
// executing the try body, and removing it again afterwards.
|
1207
|
-
//
|
1208
|
-
// The try-finally construct can enter the finally block in three ways:
|
1209
|
-
// 1. By exiting the try-block normally. This removes the try-handler and
|
1210
|
-
// calls the finally block code before continuing.
|
1211
|
-
// 2. By exiting the try-block with a function-local control flow transfer
|
1212
|
-
// (break/continue/return). The site of the, e.g., break removes the
|
1213
|
-
// try handler and calls the finally block code before continuing
|
1214
|
-
// its outward control transfer.
|
1215
|
-
// 3. by exiting the try-block with a thrown exception.
|
1216
|
-
// This can happen in nested function calls. It traverses the try-handler
|
1217
|
-
// chain and consumes the try-handler entry before jumping to the
|
1218
|
-
// handler code. The handler code then calls the finally-block before
|
1219
|
-
// rethrowing the exception.
|
1220
|
-
//
|
1221
|
-
// The finally block must assume a return address on top of the stack
|
1222
|
-
// (or in the link register on ARM chips) and a value (return value or
|
1223
|
-
// exception) in the result register (rax/eax/r0), both of which must
|
1224
|
-
// be preserved. The return address isn't GC-safe, so it should be
|
1225
|
-
// cooked before GC.
|
1226
|
-
Label finally_entry;
|
1227
|
-
Label try_handler_setup;
|
1228
|
-
|
1229
|
-
// Setup the try-handler chain. Use a call to
|
1230
|
-
// Jump to try-handler setup and try-block code. Use call to put try-handler
|
1231
|
-
// address on stack.
|
1232
|
-
__ Call(&try_handler_setup);
|
1233
|
-
// Try handler code. Return address of call is pushed on handler stack.
|
1234
|
-
{
|
1235
|
-
// This code is only executed during stack-handler traversal when an
|
1236
|
-
// exception is thrown. The execption is in the result register, which
|
1237
|
-
// is retained by the finally block.
|
1238
|
-
// Call the finally block and then rethrow the exception.
|
1239
|
-
__ Call(&finally_entry);
|
1240
|
-
__ push(result_register());
|
1241
|
-
__ CallRuntime(Runtime::kReThrow, 1);
|
1242
|
-
}
|
1243
|
-
|
1244
|
-
__ bind(&finally_entry);
|
1245
|
-
{
|
1246
|
-
// Finally block implementation.
|
1247
|
-
Finally finally_block(this);
|
1248
|
-
EnterFinallyBlock();
|
1249
|
-
Visit(stmt->finally_block());
|
1250
|
-
ExitFinallyBlock(); // Return to the calling code.
|
1251
|
-
}
|
1252
|
-
|
1253
|
-
__ bind(&try_handler_setup);
|
1254
|
-
{
|
1255
|
-
// Setup try handler (stack pointer registers).
|
1256
|
-
TryFinally try_block(this, &finally_entry);
|
1257
|
-
__ PushTryHandler(IN_JAVASCRIPT, TRY_FINALLY_HANDLER);
|
1258
|
-
Visit(stmt->try_block());
|
1259
|
-
__ PopTryHandler();
|
1260
|
-
}
|
1261
|
-
// Execute the finally block on the way out. Clobber the unpredictable
|
1262
|
-
// value in the accumulator with one that's safe for GC. The finally
|
1263
|
-
// block will unconditionally preserve the accumulator on the stack.
|
1264
|
-
ClearAccumulator();
|
1265
|
-
__ Call(&finally_entry);
|
1266
|
-
}
|
1267
|
-
|
1268
|
-
|
1269
|
-
void FullCodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) {
|
1270
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
1271
|
-
Comment cmnt(masm_, "[ DebuggerStatement");
|
1272
|
-
SetStatementPosition(stmt);
|
1273
|
-
|
1274
|
-
__ DebugBreak();
|
1275
|
-
// Ignore the return value.
|
1276
|
-
#endif
|
1277
|
-
}
|
1278
|
-
|
1279
|
-
|
1280
|
-
void FullCodeGenerator::VisitConditional(Conditional* expr) {
|
1281
|
-
Comment cmnt(masm_, "[ Conditional");
|
1282
|
-
Label true_case, false_case, done;
|
1283
|
-
VisitForControl(expr->condition(), &true_case, &false_case, &true_case);
|
1284
|
-
|
1285
|
-
PrepareForBailoutForId(expr->ThenId(), NO_REGISTERS);
|
1286
|
-
__ bind(&true_case);
|
1287
|
-
SetExpressionPosition(expr->then_expression(),
|
1288
|
-
expr->then_expression_position());
|
1289
|
-
if (context()->IsTest()) {
|
1290
|
-
const TestContext* for_test = TestContext::cast(context());
|
1291
|
-
VisitForControl(expr->then_expression(),
|
1292
|
-
for_test->true_label(),
|
1293
|
-
for_test->false_label(),
|
1294
|
-
NULL);
|
1295
|
-
} else {
|
1296
|
-
context()->HandleExpression(expr->then_expression());
|
1297
|
-
__ jmp(&done);
|
1298
|
-
}
|
1299
|
-
|
1300
|
-
PrepareForBailoutForId(expr->ElseId(), NO_REGISTERS);
|
1301
|
-
__ bind(&false_case);
|
1302
|
-
if (context()->IsTest()) ForwardBailoutToChild(expr);
|
1303
|
-
SetExpressionPosition(expr->else_expression(),
|
1304
|
-
expr->else_expression_position());
|
1305
|
-
context()->HandleExpression(expr->else_expression());
|
1306
|
-
// If control flow falls through Visit, merge it with true case here.
|
1307
|
-
if (!context()->IsTest()) {
|
1308
|
-
__ bind(&done);
|
1309
|
-
}
|
1310
|
-
}
|
1311
|
-
|
1312
|
-
|
1313
|
-
void FullCodeGenerator::VisitLiteral(Literal* expr) {
|
1314
|
-
Comment cmnt(masm_, "[ Literal");
|
1315
|
-
context()->Plug(expr->handle());
|
1316
|
-
}
|
1317
|
-
|
1318
|
-
|
1319
|
-
void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
|
1320
|
-
Comment cmnt(masm_, "[ FunctionLiteral");
|
1321
|
-
|
1322
|
-
// Build the function boilerplate and instantiate it.
|
1323
|
-
Handle<SharedFunctionInfo> function_info =
|
1324
|
-
Compiler::BuildFunctionInfo(expr, script());
|
1325
|
-
if (function_info.is_null()) {
|
1326
|
-
SetStackOverflow();
|
1327
|
-
return;
|
1328
|
-
}
|
1329
|
-
EmitNewClosure(function_info, expr->pretenure());
|
1330
|
-
}
|
1331
|
-
|
1332
|
-
|
1333
|
-
void FullCodeGenerator::VisitSharedFunctionInfoLiteral(
|
1334
|
-
SharedFunctionInfoLiteral* expr) {
|
1335
|
-
Comment cmnt(masm_, "[ SharedFunctionInfoLiteral");
|
1336
|
-
EmitNewClosure(expr->shared_function_info(), false);
|
1337
|
-
}
|
1338
|
-
|
1339
|
-
|
1340
|
-
void FullCodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* expr) {
|
1341
|
-
// Call runtime routine to allocate the catch extension object and
|
1342
|
-
// assign the exception value to the catch variable.
|
1343
|
-
Comment cmnt(masm_, "[ CatchExtensionObject");
|
1344
|
-
VisitForStackValue(expr->key());
|
1345
|
-
VisitForStackValue(expr->value());
|
1346
|
-
// Create catch extension object.
|
1347
|
-
__ CallRuntime(Runtime::kCreateCatchExtensionObject, 2);
|
1348
|
-
context()->Plug(result_register());
|
1349
|
-
}
|
1350
|
-
|
1351
|
-
|
1352
|
-
void FullCodeGenerator::VisitThrow(Throw* expr) {
|
1353
|
-
Comment cmnt(masm_, "[ Throw");
|
1354
|
-
VisitForStackValue(expr->exception());
|
1355
|
-
__ CallRuntime(Runtime::kThrow, 1);
|
1356
|
-
// Never returns here.
|
1357
|
-
}
|
1358
|
-
|
1359
|
-
|
1360
|
-
void FullCodeGenerator::VisitIncrementOperation(IncrementOperation* expr) {
|
1361
|
-
UNREACHABLE();
|
1362
|
-
}
|
1363
|
-
|
1364
|
-
|
1365
|
-
int FullCodeGenerator::TryFinally::Exit(int stack_depth) {
|
1366
|
-
// The macros used here must preserve the result register.
|
1367
|
-
__ Drop(stack_depth);
|
1368
|
-
__ PopTryHandler();
|
1369
|
-
__ Call(finally_entry_);
|
1370
|
-
return 0;
|
1371
|
-
}
|
1372
|
-
|
1373
|
-
|
1374
|
-
int FullCodeGenerator::TryCatch::Exit(int stack_depth) {
|
1375
|
-
// The macros used here must preserve the result register.
|
1376
|
-
__ Drop(stack_depth);
|
1377
|
-
__ PopTryHandler();
|
1378
|
-
return 0;
|
1379
|
-
}
|
1380
|
-
|
1381
|
-
|
1382
|
-
#undef __
|
1383
|
-
|
1384
|
-
|
1385
|
-
} } // namespace v8::internal
|