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,2234 +0,0 @@
|
|
1
|
-
// Copyright 2011 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
|
-
#ifndef V8_AST_H_
|
29
|
-
#define V8_AST_H_
|
30
|
-
|
31
|
-
#include "execution.h"
|
32
|
-
#include "factory.h"
|
33
|
-
#include "jsregexp.h"
|
34
|
-
#include "jump-target.h"
|
35
|
-
#include "runtime.h"
|
36
|
-
#include "token.h"
|
37
|
-
#include "variables.h"
|
38
|
-
|
39
|
-
namespace v8 {
|
40
|
-
namespace internal {
|
41
|
-
|
42
|
-
// The abstract syntax tree is an intermediate, light-weight
|
43
|
-
// representation of the parsed JavaScript code suitable for
|
44
|
-
// compilation to native code.
|
45
|
-
|
46
|
-
// Nodes are allocated in a separate zone, which allows faster
|
47
|
-
// allocation and constant-time deallocation of the entire syntax
|
48
|
-
// tree.
|
49
|
-
|
50
|
-
|
51
|
-
// ----------------------------------------------------------------------------
|
52
|
-
// Nodes of the abstract syntax tree. Only concrete classes are
|
53
|
-
// enumerated here.
|
54
|
-
|
55
|
-
#define STATEMENT_NODE_LIST(V) \
|
56
|
-
V(Block) \
|
57
|
-
V(ExpressionStatement) \
|
58
|
-
V(EmptyStatement) \
|
59
|
-
V(IfStatement) \
|
60
|
-
V(ContinueStatement) \
|
61
|
-
V(BreakStatement) \
|
62
|
-
V(ReturnStatement) \
|
63
|
-
V(WithEnterStatement) \
|
64
|
-
V(WithExitStatement) \
|
65
|
-
V(SwitchStatement) \
|
66
|
-
V(DoWhileStatement) \
|
67
|
-
V(WhileStatement) \
|
68
|
-
V(ForStatement) \
|
69
|
-
V(ForInStatement) \
|
70
|
-
V(TryCatchStatement) \
|
71
|
-
V(TryFinallyStatement) \
|
72
|
-
V(DebuggerStatement)
|
73
|
-
|
74
|
-
#define EXPRESSION_NODE_LIST(V) \
|
75
|
-
V(FunctionLiteral) \
|
76
|
-
V(SharedFunctionInfoLiteral) \
|
77
|
-
V(Conditional) \
|
78
|
-
V(VariableProxy) \
|
79
|
-
V(Literal) \
|
80
|
-
V(RegExpLiteral) \
|
81
|
-
V(ObjectLiteral) \
|
82
|
-
V(ArrayLiteral) \
|
83
|
-
V(CatchExtensionObject) \
|
84
|
-
V(Assignment) \
|
85
|
-
V(Throw) \
|
86
|
-
V(Property) \
|
87
|
-
V(Call) \
|
88
|
-
V(CallNew) \
|
89
|
-
V(CallRuntime) \
|
90
|
-
V(UnaryOperation) \
|
91
|
-
V(IncrementOperation) \
|
92
|
-
V(CountOperation) \
|
93
|
-
V(BinaryOperation) \
|
94
|
-
V(CompareOperation) \
|
95
|
-
V(CompareToNull) \
|
96
|
-
V(ThisFunction)
|
97
|
-
|
98
|
-
#define AST_NODE_LIST(V) \
|
99
|
-
V(Declaration) \
|
100
|
-
STATEMENT_NODE_LIST(V) \
|
101
|
-
EXPRESSION_NODE_LIST(V)
|
102
|
-
|
103
|
-
// Forward declarations
|
104
|
-
class BitVector;
|
105
|
-
class DefinitionInfo;
|
106
|
-
class MaterializedLiteral;
|
107
|
-
class TargetCollector;
|
108
|
-
class TypeFeedbackOracle;
|
109
|
-
|
110
|
-
#define DEF_FORWARD_DECLARATION(type) class type;
|
111
|
-
AST_NODE_LIST(DEF_FORWARD_DECLARATION)
|
112
|
-
#undef DEF_FORWARD_DECLARATION
|
113
|
-
|
114
|
-
|
115
|
-
// Typedef only introduced to avoid unreadable code.
|
116
|
-
// Please do appreciate the required space in "> >".
|
117
|
-
typedef ZoneList<Handle<String> > ZoneStringList;
|
118
|
-
typedef ZoneList<Handle<Object> > ZoneObjectList;
|
119
|
-
|
120
|
-
|
121
|
-
#define DECLARE_NODE_TYPE(type) \
|
122
|
-
virtual void Accept(AstVisitor* v); \
|
123
|
-
virtual AstNode::Type node_type() const { return AstNode::k##type; } \
|
124
|
-
virtual type* As##type() { return this; }
|
125
|
-
|
126
|
-
|
127
|
-
class AstNode: public ZoneObject {
|
128
|
-
public:
|
129
|
-
#define DECLARE_TYPE_ENUM(type) k##type,
|
130
|
-
enum Type {
|
131
|
-
AST_NODE_LIST(DECLARE_TYPE_ENUM)
|
132
|
-
kInvalid = -1
|
133
|
-
};
|
134
|
-
#undef DECLARE_TYPE_ENUM
|
135
|
-
|
136
|
-
static const int kNoNumber = -1;
|
137
|
-
|
138
|
-
AstNode() : id_(GetNextId()) {
|
139
|
-
Isolate* isolate = Isolate::Current();
|
140
|
-
isolate->set_ast_node_count(isolate->ast_node_count() + 1);
|
141
|
-
}
|
142
|
-
|
143
|
-
virtual ~AstNode() { }
|
144
|
-
|
145
|
-
virtual void Accept(AstVisitor* v) = 0;
|
146
|
-
virtual Type node_type() const { return kInvalid; }
|
147
|
-
|
148
|
-
// Type testing & conversion functions overridden by concrete subclasses.
|
149
|
-
#define DECLARE_NODE_FUNCTIONS(type) \
|
150
|
-
virtual type* As##type() { return NULL; }
|
151
|
-
AST_NODE_LIST(DECLARE_NODE_FUNCTIONS)
|
152
|
-
#undef DECLARE_NODE_FUNCTIONS
|
153
|
-
|
154
|
-
virtual Statement* AsStatement() { return NULL; }
|
155
|
-
virtual Expression* AsExpression() { return NULL; }
|
156
|
-
virtual TargetCollector* AsTargetCollector() { return NULL; }
|
157
|
-
virtual BreakableStatement* AsBreakableStatement() { return NULL; }
|
158
|
-
virtual IterationStatement* AsIterationStatement() { return NULL; }
|
159
|
-
virtual MaterializedLiteral* AsMaterializedLiteral() { return NULL; }
|
160
|
-
virtual Slot* AsSlot() { return NULL; }
|
161
|
-
|
162
|
-
// True if the node is simple enough for us to inline calls containing it.
|
163
|
-
virtual bool IsInlineable() const { return false; }
|
164
|
-
|
165
|
-
static int Count() { return Isolate::Current()->ast_node_count(); }
|
166
|
-
static void ResetIds() { Isolate::Current()->set_ast_node_id(0); }
|
167
|
-
unsigned id() const { return id_; }
|
168
|
-
|
169
|
-
protected:
|
170
|
-
static unsigned GetNextId() {
|
171
|
-
Isolate* isolate = Isolate::Current();
|
172
|
-
unsigned tmp = isolate->ast_node_id();
|
173
|
-
isolate->set_ast_node_id(tmp + 1);
|
174
|
-
return tmp;
|
175
|
-
}
|
176
|
-
static unsigned ReserveIdRange(int n) {
|
177
|
-
Isolate* isolate = Isolate::Current();
|
178
|
-
unsigned tmp = isolate->ast_node_id();
|
179
|
-
isolate->set_ast_node_id(tmp + n);
|
180
|
-
return tmp;
|
181
|
-
}
|
182
|
-
|
183
|
-
private:
|
184
|
-
unsigned id_;
|
185
|
-
|
186
|
-
friend class CaseClause; // Generates AST IDs.
|
187
|
-
};
|
188
|
-
|
189
|
-
|
190
|
-
class Statement: public AstNode {
|
191
|
-
public:
|
192
|
-
Statement() : statement_pos_(RelocInfo::kNoPosition) {}
|
193
|
-
|
194
|
-
virtual Statement* AsStatement() { return this; }
|
195
|
-
|
196
|
-
virtual Assignment* StatementAsSimpleAssignment() { return NULL; }
|
197
|
-
virtual CountOperation* StatementAsCountOperation() { return NULL; }
|
198
|
-
|
199
|
-
bool IsEmpty() { return AsEmptyStatement() != NULL; }
|
200
|
-
|
201
|
-
void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; }
|
202
|
-
int statement_pos() const { return statement_pos_; }
|
203
|
-
|
204
|
-
private:
|
205
|
-
int statement_pos_;
|
206
|
-
};
|
207
|
-
|
208
|
-
|
209
|
-
class Expression: public AstNode {
|
210
|
-
public:
|
211
|
-
enum Context {
|
212
|
-
// Not assigned a context yet, or else will not be visited during
|
213
|
-
// code generation.
|
214
|
-
kUninitialized,
|
215
|
-
// Evaluated for its side effects.
|
216
|
-
kEffect,
|
217
|
-
// Evaluated for its value (and side effects).
|
218
|
-
kValue,
|
219
|
-
// Evaluated for control flow (and side effects).
|
220
|
-
kTest
|
221
|
-
};
|
222
|
-
|
223
|
-
Expression() : bitfields_(0) {}
|
224
|
-
|
225
|
-
virtual Expression* AsExpression() { return this; }
|
226
|
-
|
227
|
-
virtual bool IsTrivial() { return false; }
|
228
|
-
virtual bool IsValidLeftHandSide() { return false; }
|
229
|
-
|
230
|
-
// Helpers for ToBoolean conversion.
|
231
|
-
virtual bool ToBooleanIsTrue() { return false; }
|
232
|
-
virtual bool ToBooleanIsFalse() { return false; }
|
233
|
-
|
234
|
-
// Symbols that cannot be parsed as array indices are considered property
|
235
|
-
// names. We do not treat symbols that can be array indexes as property
|
236
|
-
// names because [] for string objects is handled only by keyed ICs.
|
237
|
-
virtual bool IsPropertyName() { return false; }
|
238
|
-
|
239
|
-
// Mark the expression as being compiled as an expression
|
240
|
-
// statement. This is used to transform postfix increments to
|
241
|
-
// (faster) prefix increments.
|
242
|
-
virtual void MarkAsStatement() { /* do nothing */ }
|
243
|
-
|
244
|
-
// True iff the result can be safely overwritten (to avoid allocation).
|
245
|
-
// False for operations that can return one of their operands.
|
246
|
-
virtual bool ResultOverwriteAllowed() { return false; }
|
247
|
-
|
248
|
-
// True iff the expression is a literal represented as a smi.
|
249
|
-
virtual bool IsSmiLiteral() { return false; }
|
250
|
-
|
251
|
-
// Type feedback information for assignments and properties.
|
252
|
-
virtual bool IsMonomorphic() {
|
253
|
-
UNREACHABLE();
|
254
|
-
return false;
|
255
|
-
}
|
256
|
-
virtual bool IsArrayLength() {
|
257
|
-
UNREACHABLE();
|
258
|
-
return false;
|
259
|
-
}
|
260
|
-
virtual ZoneMapList* GetReceiverTypes() {
|
261
|
-
UNREACHABLE();
|
262
|
-
return NULL;
|
263
|
-
}
|
264
|
-
virtual Handle<Map> GetMonomorphicReceiverType() {
|
265
|
-
UNREACHABLE();
|
266
|
-
return Handle<Map>();
|
267
|
-
}
|
268
|
-
|
269
|
-
// Static type information for this expression.
|
270
|
-
StaticType* type() { return &type_; }
|
271
|
-
|
272
|
-
// True if the expression is a loop condition.
|
273
|
-
bool is_loop_condition() const {
|
274
|
-
return LoopConditionField::decode(bitfields_);
|
275
|
-
}
|
276
|
-
void set_is_loop_condition(bool flag) {
|
277
|
-
bitfields_ = (bitfields_ & ~LoopConditionField::mask()) |
|
278
|
-
LoopConditionField::encode(flag);
|
279
|
-
}
|
280
|
-
|
281
|
-
// The value of the expression is guaranteed to be a smi, because the
|
282
|
-
// top operation is a bit operation with a mask, or a shift.
|
283
|
-
bool GuaranteedSmiResult();
|
284
|
-
|
285
|
-
// AST analysis results.
|
286
|
-
void CopyAnalysisResultsFrom(Expression* other);
|
287
|
-
|
288
|
-
// True if the expression rooted at this node can be compiled by the
|
289
|
-
// side-effect free compiler.
|
290
|
-
bool side_effect_free() { return SideEffectFreeField::decode(bitfields_); }
|
291
|
-
void set_side_effect_free(bool is_side_effect_free) {
|
292
|
-
bitfields_ &= ~SideEffectFreeField::mask();
|
293
|
-
bitfields_ |= SideEffectFreeField::encode(is_side_effect_free);
|
294
|
-
}
|
295
|
-
|
296
|
-
// Will the use of this expression treat -0 the same as 0 in all cases?
|
297
|
-
// If so, we can return 0 instead of -0 if we want to, to optimize code.
|
298
|
-
bool no_negative_zero() { return NoNegativeZeroField::decode(bitfields_); }
|
299
|
-
void set_no_negative_zero(bool no_negative_zero) {
|
300
|
-
bitfields_ &= ~NoNegativeZeroField::mask();
|
301
|
-
bitfields_ |= NoNegativeZeroField::encode(no_negative_zero);
|
302
|
-
}
|
303
|
-
|
304
|
-
// Will ToInt32 (ECMA 262-3 9.5) or ToUint32 (ECMA 262-3 9.6)
|
305
|
-
// be applied to the value of this expression?
|
306
|
-
// If so, we may be able to optimize the calculation of the value.
|
307
|
-
bool to_int32() { return ToInt32Field::decode(bitfields_); }
|
308
|
-
void set_to_int32(bool to_int32) {
|
309
|
-
bitfields_ &= ~ToInt32Field::mask();
|
310
|
-
bitfields_ |= ToInt32Field::encode(to_int32);
|
311
|
-
}
|
312
|
-
|
313
|
-
// How many bitwise logical or shift operators are used in this expression?
|
314
|
-
int num_bit_ops() { return NumBitOpsField::decode(bitfields_); }
|
315
|
-
void set_num_bit_ops(int num_bit_ops) {
|
316
|
-
bitfields_ &= ~NumBitOpsField::mask();
|
317
|
-
num_bit_ops = Min(num_bit_ops, kMaxNumBitOps);
|
318
|
-
bitfields_ |= NumBitOpsField::encode(num_bit_ops);
|
319
|
-
}
|
320
|
-
|
321
|
-
private:
|
322
|
-
static const int kMaxNumBitOps = (1 << 5) - 1;
|
323
|
-
|
324
|
-
uint32_t bitfields_;
|
325
|
-
StaticType type_;
|
326
|
-
|
327
|
-
// Using template BitField<type, start, size>.
|
328
|
-
class SideEffectFreeField : public BitField<bool, 0, 1> {};
|
329
|
-
class NoNegativeZeroField : public BitField<bool, 1, 1> {};
|
330
|
-
class ToInt32Field : public BitField<bool, 2, 1> {};
|
331
|
-
class NumBitOpsField : public BitField<int, 3, 5> {};
|
332
|
-
class LoopConditionField: public BitField<bool, 8, 1> {};
|
333
|
-
};
|
334
|
-
|
335
|
-
|
336
|
-
/**
|
337
|
-
* A sentinel used during pre parsing that represents some expression
|
338
|
-
* that is a valid left hand side without having to actually build
|
339
|
-
* the expression.
|
340
|
-
*/
|
341
|
-
class ValidLeftHandSideSentinel: public Expression {
|
342
|
-
public:
|
343
|
-
virtual bool IsValidLeftHandSide() { return true; }
|
344
|
-
virtual void Accept(AstVisitor* v) { UNREACHABLE(); }
|
345
|
-
};
|
346
|
-
|
347
|
-
|
348
|
-
class BreakableStatement: public Statement {
|
349
|
-
public:
|
350
|
-
enum Type {
|
351
|
-
TARGET_FOR_ANONYMOUS,
|
352
|
-
TARGET_FOR_NAMED_ONLY
|
353
|
-
};
|
354
|
-
|
355
|
-
// The labels associated with this statement. May be NULL;
|
356
|
-
// if it is != NULL, guaranteed to contain at least one entry.
|
357
|
-
ZoneStringList* labels() const { return labels_; }
|
358
|
-
|
359
|
-
// Type testing & conversion.
|
360
|
-
virtual BreakableStatement* AsBreakableStatement() { return this; }
|
361
|
-
|
362
|
-
// Code generation
|
363
|
-
BreakTarget* break_target() { return &break_target_; }
|
364
|
-
|
365
|
-
// Testers.
|
366
|
-
bool is_target_for_anonymous() const { return type_ == TARGET_FOR_ANONYMOUS; }
|
367
|
-
|
368
|
-
// Bailout support.
|
369
|
-
int EntryId() const { return entry_id_; }
|
370
|
-
int ExitId() const { return exit_id_; }
|
371
|
-
|
372
|
-
protected:
|
373
|
-
inline BreakableStatement(ZoneStringList* labels, Type type);
|
374
|
-
|
375
|
-
private:
|
376
|
-
ZoneStringList* labels_;
|
377
|
-
Type type_;
|
378
|
-
BreakTarget break_target_;
|
379
|
-
int entry_id_;
|
380
|
-
int exit_id_;
|
381
|
-
};
|
382
|
-
|
383
|
-
|
384
|
-
class Block: public BreakableStatement {
|
385
|
-
public:
|
386
|
-
inline Block(ZoneStringList* labels, int capacity, bool is_initializer_block);
|
387
|
-
|
388
|
-
DECLARE_NODE_TYPE(Block)
|
389
|
-
|
390
|
-
virtual Assignment* StatementAsSimpleAssignment() {
|
391
|
-
if (statements_.length() != 1) return NULL;
|
392
|
-
return statements_[0]->StatementAsSimpleAssignment();
|
393
|
-
}
|
394
|
-
|
395
|
-
virtual CountOperation* StatementAsCountOperation() {
|
396
|
-
if (statements_.length() != 1) return NULL;
|
397
|
-
return statements_[0]->StatementAsCountOperation();
|
398
|
-
}
|
399
|
-
|
400
|
-
virtual bool IsInlineable() const;
|
401
|
-
|
402
|
-
void AddStatement(Statement* statement) { statements_.Add(statement); }
|
403
|
-
|
404
|
-
ZoneList<Statement*>* statements() { return &statements_; }
|
405
|
-
bool is_initializer_block() const { return is_initializer_block_; }
|
406
|
-
|
407
|
-
private:
|
408
|
-
ZoneList<Statement*> statements_;
|
409
|
-
bool is_initializer_block_;
|
410
|
-
};
|
411
|
-
|
412
|
-
|
413
|
-
class Declaration: public AstNode {
|
414
|
-
public:
|
415
|
-
Declaration(VariableProxy* proxy, Variable::Mode mode, FunctionLiteral* fun)
|
416
|
-
: proxy_(proxy),
|
417
|
-
mode_(mode),
|
418
|
-
fun_(fun) {
|
419
|
-
ASSERT(mode == Variable::VAR || mode == Variable::CONST);
|
420
|
-
// At the moment there are no "const functions"'s in JavaScript...
|
421
|
-
ASSERT(fun == NULL || mode == Variable::VAR);
|
422
|
-
}
|
423
|
-
|
424
|
-
DECLARE_NODE_TYPE(Declaration)
|
425
|
-
|
426
|
-
VariableProxy* proxy() const { return proxy_; }
|
427
|
-
Variable::Mode mode() const { return mode_; }
|
428
|
-
FunctionLiteral* fun() const { return fun_; } // may be NULL
|
429
|
-
|
430
|
-
private:
|
431
|
-
VariableProxy* proxy_;
|
432
|
-
Variable::Mode mode_;
|
433
|
-
FunctionLiteral* fun_;
|
434
|
-
};
|
435
|
-
|
436
|
-
|
437
|
-
class IterationStatement: public BreakableStatement {
|
438
|
-
public:
|
439
|
-
// Type testing & conversion.
|
440
|
-
virtual IterationStatement* AsIterationStatement() { return this; }
|
441
|
-
|
442
|
-
Statement* body() const { return body_; }
|
443
|
-
|
444
|
-
// Bailout support.
|
445
|
-
int OsrEntryId() const { return osr_entry_id_; }
|
446
|
-
virtual int ContinueId() const = 0;
|
447
|
-
|
448
|
-
// Code generation
|
449
|
-
BreakTarget* continue_target() { return &continue_target_; }
|
450
|
-
|
451
|
-
protected:
|
452
|
-
explicit inline IterationStatement(ZoneStringList* labels);
|
453
|
-
|
454
|
-
void Initialize(Statement* body) {
|
455
|
-
body_ = body;
|
456
|
-
}
|
457
|
-
|
458
|
-
private:
|
459
|
-
Statement* body_;
|
460
|
-
BreakTarget continue_target_;
|
461
|
-
int osr_entry_id_;
|
462
|
-
};
|
463
|
-
|
464
|
-
|
465
|
-
class DoWhileStatement: public IterationStatement {
|
466
|
-
public:
|
467
|
-
explicit inline DoWhileStatement(ZoneStringList* labels);
|
468
|
-
|
469
|
-
DECLARE_NODE_TYPE(DoWhileStatement)
|
470
|
-
|
471
|
-
void Initialize(Expression* cond, Statement* body) {
|
472
|
-
IterationStatement::Initialize(body);
|
473
|
-
cond_ = cond;
|
474
|
-
}
|
475
|
-
|
476
|
-
Expression* cond() const { return cond_; }
|
477
|
-
|
478
|
-
// Position where condition expression starts. We need it to make
|
479
|
-
// the loop's condition a breakable location.
|
480
|
-
int condition_position() { return condition_position_; }
|
481
|
-
void set_condition_position(int pos) { condition_position_ = pos; }
|
482
|
-
|
483
|
-
// Bailout support.
|
484
|
-
virtual int ContinueId() const { return continue_id_; }
|
485
|
-
int BackEdgeId() const { return back_edge_id_; }
|
486
|
-
|
487
|
-
private:
|
488
|
-
Expression* cond_;
|
489
|
-
int condition_position_;
|
490
|
-
int continue_id_;
|
491
|
-
int back_edge_id_;
|
492
|
-
};
|
493
|
-
|
494
|
-
|
495
|
-
class WhileStatement: public IterationStatement {
|
496
|
-
public:
|
497
|
-
explicit inline WhileStatement(ZoneStringList* labels);
|
498
|
-
|
499
|
-
DECLARE_NODE_TYPE(WhileStatement)
|
500
|
-
|
501
|
-
void Initialize(Expression* cond, Statement* body) {
|
502
|
-
IterationStatement::Initialize(body);
|
503
|
-
cond_ = cond;
|
504
|
-
}
|
505
|
-
|
506
|
-
Expression* cond() const { return cond_; }
|
507
|
-
bool may_have_function_literal() const {
|
508
|
-
return may_have_function_literal_;
|
509
|
-
}
|
510
|
-
void set_may_have_function_literal(bool value) {
|
511
|
-
may_have_function_literal_ = value;
|
512
|
-
}
|
513
|
-
|
514
|
-
// Bailout support.
|
515
|
-
virtual int ContinueId() const { return EntryId(); }
|
516
|
-
int BodyId() const { return body_id_; }
|
517
|
-
|
518
|
-
private:
|
519
|
-
Expression* cond_;
|
520
|
-
// True if there is a function literal subexpression in the condition.
|
521
|
-
bool may_have_function_literal_;
|
522
|
-
int body_id_;
|
523
|
-
};
|
524
|
-
|
525
|
-
|
526
|
-
class ForStatement: public IterationStatement {
|
527
|
-
public:
|
528
|
-
explicit inline ForStatement(ZoneStringList* labels);
|
529
|
-
|
530
|
-
DECLARE_NODE_TYPE(ForStatement)
|
531
|
-
|
532
|
-
void Initialize(Statement* init,
|
533
|
-
Expression* cond,
|
534
|
-
Statement* next,
|
535
|
-
Statement* body) {
|
536
|
-
IterationStatement::Initialize(body);
|
537
|
-
init_ = init;
|
538
|
-
cond_ = cond;
|
539
|
-
next_ = next;
|
540
|
-
}
|
541
|
-
|
542
|
-
Statement* init() const { return init_; }
|
543
|
-
Expression* cond() const { return cond_; }
|
544
|
-
Statement* next() const { return next_; }
|
545
|
-
|
546
|
-
bool may_have_function_literal() const {
|
547
|
-
return may_have_function_literal_;
|
548
|
-
}
|
549
|
-
void set_may_have_function_literal(bool value) {
|
550
|
-
may_have_function_literal_ = value;
|
551
|
-
}
|
552
|
-
|
553
|
-
// Bailout support.
|
554
|
-
virtual int ContinueId() const { return continue_id_; }
|
555
|
-
int BodyId() const { return body_id_; }
|
556
|
-
|
557
|
-
bool is_fast_smi_loop() { return loop_variable_ != NULL; }
|
558
|
-
Variable* loop_variable() { return loop_variable_; }
|
559
|
-
void set_loop_variable(Variable* var) { loop_variable_ = var; }
|
560
|
-
|
561
|
-
private:
|
562
|
-
Statement* init_;
|
563
|
-
Expression* cond_;
|
564
|
-
Statement* next_;
|
565
|
-
// True if there is a function literal subexpression in the condition.
|
566
|
-
bool may_have_function_literal_;
|
567
|
-
Variable* loop_variable_;
|
568
|
-
int continue_id_;
|
569
|
-
int body_id_;
|
570
|
-
};
|
571
|
-
|
572
|
-
|
573
|
-
class ForInStatement: public IterationStatement {
|
574
|
-
public:
|
575
|
-
explicit inline ForInStatement(ZoneStringList* labels);
|
576
|
-
|
577
|
-
DECLARE_NODE_TYPE(ForInStatement)
|
578
|
-
|
579
|
-
void Initialize(Expression* each, Expression* enumerable, Statement* body) {
|
580
|
-
IterationStatement::Initialize(body);
|
581
|
-
each_ = each;
|
582
|
-
enumerable_ = enumerable;
|
583
|
-
}
|
584
|
-
|
585
|
-
Expression* each() const { return each_; }
|
586
|
-
Expression* enumerable() const { return enumerable_; }
|
587
|
-
|
588
|
-
// Bailout support.
|
589
|
-
int AssignmentId() const { return assignment_id_; }
|
590
|
-
virtual int ContinueId() const { return EntryId(); }
|
591
|
-
|
592
|
-
private:
|
593
|
-
Expression* each_;
|
594
|
-
Expression* enumerable_;
|
595
|
-
int assignment_id_;
|
596
|
-
};
|
597
|
-
|
598
|
-
|
599
|
-
class ExpressionStatement: public Statement {
|
600
|
-
public:
|
601
|
-
explicit ExpressionStatement(Expression* expression)
|
602
|
-
: expression_(expression) { }
|
603
|
-
|
604
|
-
DECLARE_NODE_TYPE(ExpressionStatement)
|
605
|
-
|
606
|
-
virtual bool IsInlineable() const;
|
607
|
-
|
608
|
-
virtual Assignment* StatementAsSimpleAssignment();
|
609
|
-
virtual CountOperation* StatementAsCountOperation();
|
610
|
-
|
611
|
-
void set_expression(Expression* e) { expression_ = e; }
|
612
|
-
Expression* expression() const { return expression_; }
|
613
|
-
|
614
|
-
private:
|
615
|
-
Expression* expression_;
|
616
|
-
};
|
617
|
-
|
618
|
-
|
619
|
-
class ContinueStatement: public Statement {
|
620
|
-
public:
|
621
|
-
explicit ContinueStatement(IterationStatement* target)
|
622
|
-
: target_(target) { }
|
623
|
-
|
624
|
-
DECLARE_NODE_TYPE(ContinueStatement)
|
625
|
-
|
626
|
-
IterationStatement* target() const { return target_; }
|
627
|
-
|
628
|
-
private:
|
629
|
-
IterationStatement* target_;
|
630
|
-
};
|
631
|
-
|
632
|
-
|
633
|
-
class BreakStatement: public Statement {
|
634
|
-
public:
|
635
|
-
explicit BreakStatement(BreakableStatement* target)
|
636
|
-
: target_(target) { }
|
637
|
-
|
638
|
-
DECLARE_NODE_TYPE(BreakStatement)
|
639
|
-
|
640
|
-
BreakableStatement* target() const { return target_; }
|
641
|
-
|
642
|
-
private:
|
643
|
-
BreakableStatement* target_;
|
644
|
-
};
|
645
|
-
|
646
|
-
|
647
|
-
class ReturnStatement: public Statement {
|
648
|
-
public:
|
649
|
-
explicit ReturnStatement(Expression* expression)
|
650
|
-
: expression_(expression) { }
|
651
|
-
|
652
|
-
DECLARE_NODE_TYPE(ReturnStatement)
|
653
|
-
|
654
|
-
Expression* expression() const { return expression_; }
|
655
|
-
virtual bool IsInlineable() const;
|
656
|
-
|
657
|
-
private:
|
658
|
-
Expression* expression_;
|
659
|
-
};
|
660
|
-
|
661
|
-
|
662
|
-
class WithEnterStatement: public Statement {
|
663
|
-
public:
|
664
|
-
explicit WithEnterStatement(Expression* expression, bool is_catch_block)
|
665
|
-
: expression_(expression), is_catch_block_(is_catch_block) { }
|
666
|
-
|
667
|
-
DECLARE_NODE_TYPE(WithEnterStatement)
|
668
|
-
|
669
|
-
Expression* expression() const { return expression_; }
|
670
|
-
|
671
|
-
bool is_catch_block() const { return is_catch_block_; }
|
672
|
-
|
673
|
-
private:
|
674
|
-
Expression* expression_;
|
675
|
-
bool is_catch_block_;
|
676
|
-
};
|
677
|
-
|
678
|
-
|
679
|
-
class WithExitStatement: public Statement {
|
680
|
-
public:
|
681
|
-
WithExitStatement() { }
|
682
|
-
|
683
|
-
DECLARE_NODE_TYPE(WithExitStatement)
|
684
|
-
};
|
685
|
-
|
686
|
-
|
687
|
-
class CaseClause: public ZoneObject {
|
688
|
-
public:
|
689
|
-
CaseClause(Expression* label, ZoneList<Statement*>* statements, int pos);
|
690
|
-
|
691
|
-
bool is_default() const { return label_ == NULL; }
|
692
|
-
Expression* label() const {
|
693
|
-
CHECK(!is_default());
|
694
|
-
return label_;
|
695
|
-
}
|
696
|
-
JumpTarget* body_target() { return &body_target_; }
|
697
|
-
ZoneList<Statement*>* statements() const { return statements_; }
|
698
|
-
|
699
|
-
int position() { return position_; }
|
700
|
-
void set_position(int pos) { position_ = pos; }
|
701
|
-
|
702
|
-
int EntryId() { return entry_id_; }
|
703
|
-
|
704
|
-
// Type feedback information.
|
705
|
-
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
706
|
-
bool IsSmiCompare() { return compare_type_ == SMI_ONLY; }
|
707
|
-
bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; }
|
708
|
-
|
709
|
-
private:
|
710
|
-
Expression* label_;
|
711
|
-
JumpTarget body_target_;
|
712
|
-
ZoneList<Statement*>* statements_;
|
713
|
-
int position_;
|
714
|
-
enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY };
|
715
|
-
CompareTypeFeedback compare_type_;
|
716
|
-
int entry_id_;
|
717
|
-
};
|
718
|
-
|
719
|
-
|
720
|
-
class SwitchStatement: public BreakableStatement {
|
721
|
-
public:
|
722
|
-
explicit inline SwitchStatement(ZoneStringList* labels);
|
723
|
-
|
724
|
-
DECLARE_NODE_TYPE(SwitchStatement)
|
725
|
-
|
726
|
-
void Initialize(Expression* tag, ZoneList<CaseClause*>* cases) {
|
727
|
-
tag_ = tag;
|
728
|
-
cases_ = cases;
|
729
|
-
}
|
730
|
-
|
731
|
-
Expression* tag() const { return tag_; }
|
732
|
-
ZoneList<CaseClause*>* cases() const { return cases_; }
|
733
|
-
|
734
|
-
private:
|
735
|
-
Expression* tag_;
|
736
|
-
ZoneList<CaseClause*>* cases_;
|
737
|
-
};
|
738
|
-
|
739
|
-
|
740
|
-
// If-statements always have non-null references to their then- and
|
741
|
-
// else-parts. When parsing if-statements with no explicit else-part,
|
742
|
-
// the parser implicitly creates an empty statement. Use the
|
743
|
-
// HasThenStatement() and HasElseStatement() functions to check if a
|
744
|
-
// given if-statement has a then- or an else-part containing code.
|
745
|
-
class IfStatement: public Statement {
|
746
|
-
public:
|
747
|
-
IfStatement(Expression* condition,
|
748
|
-
Statement* then_statement,
|
749
|
-
Statement* else_statement)
|
750
|
-
: condition_(condition),
|
751
|
-
then_statement_(then_statement),
|
752
|
-
else_statement_(else_statement),
|
753
|
-
then_id_(GetNextId()),
|
754
|
-
else_id_(GetNextId()) {
|
755
|
-
}
|
756
|
-
|
757
|
-
DECLARE_NODE_TYPE(IfStatement)
|
758
|
-
|
759
|
-
virtual bool IsInlineable() const;
|
760
|
-
|
761
|
-
bool HasThenStatement() const { return !then_statement()->IsEmpty(); }
|
762
|
-
bool HasElseStatement() const { return !else_statement()->IsEmpty(); }
|
763
|
-
|
764
|
-
Expression* condition() const { return condition_; }
|
765
|
-
Statement* then_statement() const { return then_statement_; }
|
766
|
-
Statement* else_statement() const { return else_statement_; }
|
767
|
-
|
768
|
-
int ThenId() const { return then_id_; }
|
769
|
-
int ElseId() const { return else_id_; }
|
770
|
-
|
771
|
-
private:
|
772
|
-
Expression* condition_;
|
773
|
-
Statement* then_statement_;
|
774
|
-
Statement* else_statement_;
|
775
|
-
int then_id_;
|
776
|
-
int else_id_;
|
777
|
-
};
|
778
|
-
|
779
|
-
|
780
|
-
// NOTE: TargetCollectors are represented as nodes to fit in the target
|
781
|
-
// stack in the compiler; this should probably be reworked.
|
782
|
-
class TargetCollector: public AstNode {
|
783
|
-
public:
|
784
|
-
explicit TargetCollector(ZoneList<BreakTarget*>* targets)
|
785
|
-
: targets_(targets) {
|
786
|
-
}
|
787
|
-
|
788
|
-
// Adds a jump target to the collector. The collector stores a pointer not
|
789
|
-
// a copy of the target to make binding work, so make sure not to pass in
|
790
|
-
// references to something on the stack.
|
791
|
-
void AddTarget(BreakTarget* target);
|
792
|
-
|
793
|
-
// Virtual behaviour. TargetCollectors are never part of the AST.
|
794
|
-
virtual void Accept(AstVisitor* v) { UNREACHABLE(); }
|
795
|
-
virtual TargetCollector* AsTargetCollector() { return this; }
|
796
|
-
|
797
|
-
ZoneList<BreakTarget*>* targets() { return targets_; }
|
798
|
-
|
799
|
-
private:
|
800
|
-
ZoneList<BreakTarget*>* targets_;
|
801
|
-
};
|
802
|
-
|
803
|
-
|
804
|
-
class TryStatement: public Statement {
|
805
|
-
public:
|
806
|
-
explicit TryStatement(Block* try_block)
|
807
|
-
: try_block_(try_block), escaping_targets_(NULL) { }
|
808
|
-
|
809
|
-
void set_escaping_targets(ZoneList<BreakTarget*>* targets) {
|
810
|
-
escaping_targets_ = targets;
|
811
|
-
}
|
812
|
-
|
813
|
-
Block* try_block() const { return try_block_; }
|
814
|
-
ZoneList<BreakTarget*>* escaping_targets() const { return escaping_targets_; }
|
815
|
-
|
816
|
-
private:
|
817
|
-
Block* try_block_;
|
818
|
-
ZoneList<BreakTarget*>* escaping_targets_;
|
819
|
-
};
|
820
|
-
|
821
|
-
|
822
|
-
class TryCatchStatement: public TryStatement {
|
823
|
-
public:
|
824
|
-
TryCatchStatement(Block* try_block,
|
825
|
-
VariableProxy* catch_var,
|
826
|
-
Block* catch_block)
|
827
|
-
: TryStatement(try_block),
|
828
|
-
catch_var_(catch_var),
|
829
|
-
catch_block_(catch_block) {
|
830
|
-
}
|
831
|
-
|
832
|
-
DECLARE_NODE_TYPE(TryCatchStatement)
|
833
|
-
|
834
|
-
VariableProxy* catch_var() const { return catch_var_; }
|
835
|
-
Block* catch_block() const { return catch_block_; }
|
836
|
-
|
837
|
-
private:
|
838
|
-
VariableProxy* catch_var_;
|
839
|
-
Block* catch_block_;
|
840
|
-
};
|
841
|
-
|
842
|
-
|
843
|
-
class TryFinallyStatement: public TryStatement {
|
844
|
-
public:
|
845
|
-
TryFinallyStatement(Block* try_block, Block* finally_block)
|
846
|
-
: TryStatement(try_block),
|
847
|
-
finally_block_(finally_block) { }
|
848
|
-
|
849
|
-
DECLARE_NODE_TYPE(TryFinallyStatement)
|
850
|
-
|
851
|
-
Block* finally_block() const { return finally_block_; }
|
852
|
-
|
853
|
-
private:
|
854
|
-
Block* finally_block_;
|
855
|
-
};
|
856
|
-
|
857
|
-
|
858
|
-
class DebuggerStatement: public Statement {
|
859
|
-
public:
|
860
|
-
DECLARE_NODE_TYPE(DebuggerStatement)
|
861
|
-
};
|
862
|
-
|
863
|
-
|
864
|
-
class EmptyStatement: public Statement {
|
865
|
-
public:
|
866
|
-
DECLARE_NODE_TYPE(EmptyStatement)
|
867
|
-
|
868
|
-
virtual bool IsInlineable() const { return true; }
|
869
|
-
};
|
870
|
-
|
871
|
-
|
872
|
-
class Literal: public Expression {
|
873
|
-
public:
|
874
|
-
explicit Literal(Handle<Object> handle) : handle_(handle) { }
|
875
|
-
|
876
|
-
DECLARE_NODE_TYPE(Literal)
|
877
|
-
|
878
|
-
virtual bool IsTrivial() { return true; }
|
879
|
-
virtual bool IsInlineable() const { return true; }
|
880
|
-
virtual bool IsSmiLiteral() { return handle_->IsSmi(); }
|
881
|
-
|
882
|
-
// Check if this literal is identical to the other literal.
|
883
|
-
bool IsIdenticalTo(const Literal* other) const {
|
884
|
-
return handle_.is_identical_to(other->handle_);
|
885
|
-
}
|
886
|
-
|
887
|
-
virtual bool IsPropertyName() {
|
888
|
-
if (handle_->IsSymbol()) {
|
889
|
-
uint32_t ignored;
|
890
|
-
return !String::cast(*handle_)->AsArrayIndex(&ignored);
|
891
|
-
}
|
892
|
-
return false;
|
893
|
-
}
|
894
|
-
|
895
|
-
Handle<String> AsPropertyName() {
|
896
|
-
ASSERT(IsPropertyName());
|
897
|
-
return Handle<String>::cast(handle_);
|
898
|
-
}
|
899
|
-
|
900
|
-
virtual bool ToBooleanIsTrue() { return handle_->ToBoolean()->IsTrue(); }
|
901
|
-
virtual bool ToBooleanIsFalse() { return handle_->ToBoolean()->IsFalse(); }
|
902
|
-
|
903
|
-
// Identity testers.
|
904
|
-
bool IsNull() const {
|
905
|
-
ASSERT(!handle_.is_null());
|
906
|
-
return handle_->IsNull();
|
907
|
-
}
|
908
|
-
bool IsTrue() const {
|
909
|
-
ASSERT(!handle_.is_null());
|
910
|
-
return handle_->IsTrue();
|
911
|
-
}
|
912
|
-
bool IsFalse() const {
|
913
|
-
ASSERT(!handle_.is_null());
|
914
|
-
return handle_->IsFalse();
|
915
|
-
}
|
916
|
-
|
917
|
-
Handle<Object> handle() const { return handle_; }
|
918
|
-
|
919
|
-
private:
|
920
|
-
Handle<Object> handle_;
|
921
|
-
};
|
922
|
-
|
923
|
-
|
924
|
-
// Base class for literals that needs space in the corresponding JSFunction.
|
925
|
-
class MaterializedLiteral: public Expression {
|
926
|
-
public:
|
927
|
-
explicit MaterializedLiteral(int literal_index, bool is_simple, int depth)
|
928
|
-
: literal_index_(literal_index), is_simple_(is_simple), depth_(depth) {}
|
929
|
-
|
930
|
-
virtual MaterializedLiteral* AsMaterializedLiteral() { return this; }
|
931
|
-
|
932
|
-
int literal_index() { return literal_index_; }
|
933
|
-
|
934
|
-
// A materialized literal is simple if the values consist of only
|
935
|
-
// constants and simple object and array literals.
|
936
|
-
bool is_simple() const { return is_simple_; }
|
937
|
-
|
938
|
-
int depth() const { return depth_; }
|
939
|
-
|
940
|
-
private:
|
941
|
-
int literal_index_;
|
942
|
-
bool is_simple_;
|
943
|
-
int depth_;
|
944
|
-
};
|
945
|
-
|
946
|
-
|
947
|
-
// An object literal has a boilerplate object that is used
|
948
|
-
// for minimizing the work when constructing it at runtime.
|
949
|
-
class ObjectLiteral: public MaterializedLiteral {
|
950
|
-
public:
|
951
|
-
// Property is used for passing information
|
952
|
-
// about an object literal's properties from the parser
|
953
|
-
// to the code generator.
|
954
|
-
class Property: public ZoneObject {
|
955
|
-
public:
|
956
|
-
enum Kind {
|
957
|
-
CONSTANT, // Property with constant value (compile time).
|
958
|
-
COMPUTED, // Property with computed value (execution time).
|
959
|
-
MATERIALIZED_LITERAL, // Property value is a materialized literal.
|
960
|
-
GETTER, SETTER, // Property is an accessor function.
|
961
|
-
PROTOTYPE // Property is __proto__.
|
962
|
-
};
|
963
|
-
|
964
|
-
Property(Literal* key, Expression* value);
|
965
|
-
Property(bool is_getter, FunctionLiteral* value);
|
966
|
-
|
967
|
-
Literal* key() { return key_; }
|
968
|
-
Expression* value() { return value_; }
|
969
|
-
Kind kind() { return kind_; }
|
970
|
-
|
971
|
-
bool IsCompileTimeValue();
|
972
|
-
|
973
|
-
void set_emit_store(bool emit_store);
|
974
|
-
bool emit_store();
|
975
|
-
|
976
|
-
private:
|
977
|
-
Literal* key_;
|
978
|
-
Expression* value_;
|
979
|
-
Kind kind_;
|
980
|
-
bool emit_store_;
|
981
|
-
};
|
982
|
-
|
983
|
-
ObjectLiteral(Handle<FixedArray> constant_properties,
|
984
|
-
ZoneList<Property*>* properties,
|
985
|
-
int literal_index,
|
986
|
-
bool is_simple,
|
987
|
-
bool fast_elements,
|
988
|
-
int depth,
|
989
|
-
bool has_function)
|
990
|
-
: MaterializedLiteral(literal_index, is_simple, depth),
|
991
|
-
constant_properties_(constant_properties),
|
992
|
-
properties_(properties),
|
993
|
-
fast_elements_(fast_elements),
|
994
|
-
has_function_(has_function) {}
|
995
|
-
|
996
|
-
DECLARE_NODE_TYPE(ObjectLiteral)
|
997
|
-
|
998
|
-
Handle<FixedArray> constant_properties() const {
|
999
|
-
return constant_properties_;
|
1000
|
-
}
|
1001
|
-
ZoneList<Property*>* properties() const { return properties_; }
|
1002
|
-
|
1003
|
-
bool fast_elements() const { return fast_elements_; }
|
1004
|
-
|
1005
|
-
bool has_function() { return has_function_; }
|
1006
|
-
|
1007
|
-
// Mark all computed expressions that are bound to a key that
|
1008
|
-
// is shadowed by a later occurrence of the same key. For the
|
1009
|
-
// marked expressions, no store code is emitted.
|
1010
|
-
void CalculateEmitStore();
|
1011
|
-
|
1012
|
-
enum Flags {
|
1013
|
-
kNoFlags = 0,
|
1014
|
-
kFastElements = 1,
|
1015
|
-
kHasFunction = 1 << 1
|
1016
|
-
};
|
1017
|
-
|
1018
|
-
private:
|
1019
|
-
Handle<FixedArray> constant_properties_;
|
1020
|
-
ZoneList<Property*>* properties_;
|
1021
|
-
bool fast_elements_;
|
1022
|
-
bool has_function_;
|
1023
|
-
};
|
1024
|
-
|
1025
|
-
|
1026
|
-
// Node for capturing a regexp literal.
|
1027
|
-
class RegExpLiteral: public MaterializedLiteral {
|
1028
|
-
public:
|
1029
|
-
RegExpLiteral(Handle<String> pattern,
|
1030
|
-
Handle<String> flags,
|
1031
|
-
int literal_index)
|
1032
|
-
: MaterializedLiteral(literal_index, false, 1),
|
1033
|
-
pattern_(pattern),
|
1034
|
-
flags_(flags) {}
|
1035
|
-
|
1036
|
-
DECLARE_NODE_TYPE(RegExpLiteral)
|
1037
|
-
|
1038
|
-
Handle<String> pattern() const { return pattern_; }
|
1039
|
-
Handle<String> flags() const { return flags_; }
|
1040
|
-
|
1041
|
-
private:
|
1042
|
-
Handle<String> pattern_;
|
1043
|
-
Handle<String> flags_;
|
1044
|
-
};
|
1045
|
-
|
1046
|
-
// An array literal has a literals object that is used
|
1047
|
-
// for minimizing the work when constructing it at runtime.
|
1048
|
-
class ArrayLiteral: public MaterializedLiteral {
|
1049
|
-
public:
|
1050
|
-
ArrayLiteral(Handle<FixedArray> constant_elements,
|
1051
|
-
ZoneList<Expression*>* values,
|
1052
|
-
int literal_index,
|
1053
|
-
bool is_simple,
|
1054
|
-
int depth)
|
1055
|
-
: MaterializedLiteral(literal_index, is_simple, depth),
|
1056
|
-
constant_elements_(constant_elements),
|
1057
|
-
values_(values),
|
1058
|
-
first_element_id_(ReserveIdRange(values->length())) {}
|
1059
|
-
|
1060
|
-
DECLARE_NODE_TYPE(ArrayLiteral)
|
1061
|
-
|
1062
|
-
Handle<FixedArray> constant_elements() const { return constant_elements_; }
|
1063
|
-
ZoneList<Expression*>* values() const { return values_; }
|
1064
|
-
|
1065
|
-
// Return an AST id for an element that is used in simulate instructions.
|
1066
|
-
int GetIdForElement(int i) { return first_element_id_ + i; }
|
1067
|
-
|
1068
|
-
private:
|
1069
|
-
Handle<FixedArray> constant_elements_;
|
1070
|
-
ZoneList<Expression*>* values_;
|
1071
|
-
int first_element_id_;
|
1072
|
-
};
|
1073
|
-
|
1074
|
-
|
1075
|
-
// Node for constructing a context extension object for a catch block.
|
1076
|
-
// The catch context extension object has one property, the catch
|
1077
|
-
// variable, which should be DontDelete.
|
1078
|
-
class CatchExtensionObject: public Expression {
|
1079
|
-
public:
|
1080
|
-
CatchExtensionObject(Literal* key, VariableProxy* value)
|
1081
|
-
: key_(key), value_(value) {
|
1082
|
-
}
|
1083
|
-
|
1084
|
-
DECLARE_NODE_TYPE(CatchExtensionObject)
|
1085
|
-
|
1086
|
-
Literal* key() const { return key_; }
|
1087
|
-
VariableProxy* value() const { return value_; }
|
1088
|
-
|
1089
|
-
private:
|
1090
|
-
Literal* key_;
|
1091
|
-
VariableProxy* value_;
|
1092
|
-
};
|
1093
|
-
|
1094
|
-
|
1095
|
-
class VariableProxy: public Expression {
|
1096
|
-
public:
|
1097
|
-
explicit VariableProxy(Variable* var);
|
1098
|
-
|
1099
|
-
DECLARE_NODE_TYPE(VariableProxy)
|
1100
|
-
|
1101
|
-
// Type testing & conversion
|
1102
|
-
virtual Property* AsProperty() {
|
1103
|
-
return var_ == NULL ? NULL : var_->AsProperty();
|
1104
|
-
}
|
1105
|
-
|
1106
|
-
Variable* AsVariable() {
|
1107
|
-
if (this == NULL || var_ == NULL) return NULL;
|
1108
|
-
Expression* rewrite = var_->rewrite();
|
1109
|
-
if (rewrite == NULL || rewrite->AsSlot() != NULL) return var_;
|
1110
|
-
return NULL;
|
1111
|
-
}
|
1112
|
-
|
1113
|
-
virtual bool IsValidLeftHandSide() {
|
1114
|
-
return var_ == NULL ? true : var_->IsValidLeftHandSide();
|
1115
|
-
}
|
1116
|
-
|
1117
|
-
virtual bool IsTrivial() {
|
1118
|
-
// Reading from a mutable variable is a side effect, but the
|
1119
|
-
// variable for 'this' is immutable.
|
1120
|
-
return is_this_ || is_trivial_;
|
1121
|
-
}
|
1122
|
-
|
1123
|
-
virtual bool IsInlineable() const;
|
1124
|
-
|
1125
|
-
bool IsVariable(Handle<String> n) {
|
1126
|
-
return !is_this() && name().is_identical_to(n);
|
1127
|
-
}
|
1128
|
-
|
1129
|
-
bool IsArguments() {
|
1130
|
-
Variable* variable = AsVariable();
|
1131
|
-
return (variable == NULL) ? false : variable->is_arguments();
|
1132
|
-
}
|
1133
|
-
|
1134
|
-
Handle<String> name() const { return name_; }
|
1135
|
-
Variable* var() const { return var_; }
|
1136
|
-
bool is_this() const { return is_this_; }
|
1137
|
-
bool inside_with() const { return inside_with_; }
|
1138
|
-
int position() const { return position_; }
|
1139
|
-
|
1140
|
-
void MarkAsTrivial() { is_trivial_ = true; }
|
1141
|
-
|
1142
|
-
// Bind this proxy to the variable var.
|
1143
|
-
void BindTo(Variable* var);
|
1144
|
-
|
1145
|
-
protected:
|
1146
|
-
Handle<String> name_;
|
1147
|
-
Variable* var_; // resolved variable, or NULL
|
1148
|
-
bool is_this_;
|
1149
|
-
bool inside_with_;
|
1150
|
-
bool is_trivial_;
|
1151
|
-
int position_;
|
1152
|
-
|
1153
|
-
VariableProxy(Handle<String> name,
|
1154
|
-
bool is_this,
|
1155
|
-
bool inside_with,
|
1156
|
-
int position = RelocInfo::kNoPosition);
|
1157
|
-
explicit VariableProxy(bool is_this);
|
1158
|
-
|
1159
|
-
friend class Scope;
|
1160
|
-
};
|
1161
|
-
|
1162
|
-
|
1163
|
-
class VariableProxySentinel: public VariableProxy {
|
1164
|
-
public:
|
1165
|
-
virtual bool IsValidLeftHandSide() { return !is_this(); }
|
1166
|
-
|
1167
|
-
private:
|
1168
|
-
explicit VariableProxySentinel(bool is_this) : VariableProxy(is_this) { }
|
1169
|
-
|
1170
|
-
friend class AstSentinels;
|
1171
|
-
};
|
1172
|
-
|
1173
|
-
|
1174
|
-
class Slot: public Expression {
|
1175
|
-
public:
|
1176
|
-
enum Type {
|
1177
|
-
// A slot in the parameter section on the stack. index() is
|
1178
|
-
// the parameter index, counting left-to-right, starting at 0.
|
1179
|
-
PARAMETER,
|
1180
|
-
|
1181
|
-
// A slot in the local section on the stack. index() is
|
1182
|
-
// the variable index in the stack frame, starting at 0.
|
1183
|
-
LOCAL,
|
1184
|
-
|
1185
|
-
// An indexed slot in a heap context. index() is the
|
1186
|
-
// variable index in the context object on the heap,
|
1187
|
-
// starting at 0. var()->scope() is the corresponding
|
1188
|
-
// scope.
|
1189
|
-
CONTEXT,
|
1190
|
-
|
1191
|
-
// A named slot in a heap context. var()->name() is the
|
1192
|
-
// variable name in the context object on the heap,
|
1193
|
-
// with lookup starting at the current context. index()
|
1194
|
-
// is invalid.
|
1195
|
-
LOOKUP
|
1196
|
-
};
|
1197
|
-
|
1198
|
-
Slot(Variable* var, Type type, int index)
|
1199
|
-
: var_(var), type_(type), index_(index) {
|
1200
|
-
ASSERT(var != NULL);
|
1201
|
-
}
|
1202
|
-
|
1203
|
-
virtual void Accept(AstVisitor* v);
|
1204
|
-
|
1205
|
-
virtual Slot* AsSlot() { return this; }
|
1206
|
-
|
1207
|
-
bool IsStackAllocated() { return type_ == PARAMETER || type_ == LOCAL; }
|
1208
|
-
|
1209
|
-
// Accessors
|
1210
|
-
Variable* var() const { return var_; }
|
1211
|
-
Type type() const { return type_; }
|
1212
|
-
int index() const { return index_; }
|
1213
|
-
bool is_arguments() const { return var_->is_arguments(); }
|
1214
|
-
|
1215
|
-
private:
|
1216
|
-
Variable* var_;
|
1217
|
-
Type type_;
|
1218
|
-
int index_;
|
1219
|
-
};
|
1220
|
-
|
1221
|
-
|
1222
|
-
class Property: public Expression {
|
1223
|
-
public:
|
1224
|
-
// Synthetic properties are property lookups introduced by the system,
|
1225
|
-
// to objects that aren't visible to the user. Function calls to synthetic
|
1226
|
-
// properties should use the global object as receiver, not the base object
|
1227
|
-
// of the resolved Reference.
|
1228
|
-
enum Type { NORMAL, SYNTHETIC };
|
1229
|
-
Property(Expression* obj, Expression* key, int pos, Type type = NORMAL)
|
1230
|
-
: obj_(obj),
|
1231
|
-
key_(key),
|
1232
|
-
pos_(pos),
|
1233
|
-
type_(type),
|
1234
|
-
receiver_types_(NULL),
|
1235
|
-
is_monomorphic_(false),
|
1236
|
-
is_array_length_(false),
|
1237
|
-
is_string_length_(false),
|
1238
|
-
is_string_access_(false),
|
1239
|
-
is_function_prototype_(false),
|
1240
|
-
is_arguments_access_(false) { }
|
1241
|
-
|
1242
|
-
DECLARE_NODE_TYPE(Property)
|
1243
|
-
|
1244
|
-
virtual bool IsValidLeftHandSide() { return true; }
|
1245
|
-
virtual bool IsInlineable() const;
|
1246
|
-
|
1247
|
-
Expression* obj() const { return obj_; }
|
1248
|
-
Expression* key() const { return key_; }
|
1249
|
-
int position() const { return pos_; }
|
1250
|
-
bool is_synthetic() const { return type_ == SYNTHETIC; }
|
1251
|
-
|
1252
|
-
bool IsStringLength() const { return is_string_length_; }
|
1253
|
-
bool IsStringAccess() const { return is_string_access_; }
|
1254
|
-
bool IsFunctionPrototype() const { return is_function_prototype_; }
|
1255
|
-
|
1256
|
-
// Marks that this is actually an argument rewritten to a keyed property
|
1257
|
-
// accessing the argument through the arguments shadow object.
|
1258
|
-
void set_is_arguments_access(bool is_arguments_access) {
|
1259
|
-
is_arguments_access_ = is_arguments_access;
|
1260
|
-
}
|
1261
|
-
bool is_arguments_access() const { return is_arguments_access_; }
|
1262
|
-
|
1263
|
-
ExternalArrayType GetExternalArrayType() const { return array_type_; }
|
1264
|
-
void SetExternalArrayType(ExternalArrayType array_type) {
|
1265
|
-
array_type_ = array_type;
|
1266
|
-
}
|
1267
|
-
|
1268
|
-
// Type feedback information.
|
1269
|
-
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
1270
|
-
virtual bool IsMonomorphic() { return is_monomorphic_; }
|
1271
|
-
virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; }
|
1272
|
-
virtual bool IsArrayLength() { return is_array_length_; }
|
1273
|
-
virtual Handle<Map> GetMonomorphicReceiverType() {
|
1274
|
-
return monomorphic_receiver_type_;
|
1275
|
-
}
|
1276
|
-
|
1277
|
-
private:
|
1278
|
-
Expression* obj_;
|
1279
|
-
Expression* key_;
|
1280
|
-
int pos_;
|
1281
|
-
Type type_;
|
1282
|
-
|
1283
|
-
ZoneMapList* receiver_types_;
|
1284
|
-
bool is_monomorphic_ : 1;
|
1285
|
-
bool is_array_length_ : 1;
|
1286
|
-
bool is_string_length_ : 1;
|
1287
|
-
bool is_string_access_ : 1;
|
1288
|
-
bool is_function_prototype_ : 1;
|
1289
|
-
bool is_arguments_access_ : 1;
|
1290
|
-
Handle<Map> monomorphic_receiver_type_;
|
1291
|
-
ExternalArrayType array_type_;
|
1292
|
-
};
|
1293
|
-
|
1294
|
-
|
1295
|
-
class Call: public Expression {
|
1296
|
-
public:
|
1297
|
-
Call(Expression* expression, ZoneList<Expression*>* arguments, int pos)
|
1298
|
-
: expression_(expression),
|
1299
|
-
arguments_(arguments),
|
1300
|
-
pos_(pos),
|
1301
|
-
is_monomorphic_(false),
|
1302
|
-
check_type_(RECEIVER_MAP_CHECK),
|
1303
|
-
receiver_types_(NULL),
|
1304
|
-
return_id_(GetNextId()) {
|
1305
|
-
}
|
1306
|
-
|
1307
|
-
DECLARE_NODE_TYPE(Call)
|
1308
|
-
|
1309
|
-
virtual bool IsInlineable() const;
|
1310
|
-
|
1311
|
-
Expression* expression() const { return expression_; }
|
1312
|
-
ZoneList<Expression*>* arguments() const { return arguments_; }
|
1313
|
-
int position() { return pos_; }
|
1314
|
-
|
1315
|
-
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
1316
|
-
virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; }
|
1317
|
-
virtual bool IsMonomorphic() { return is_monomorphic_; }
|
1318
|
-
CheckType check_type() const { return check_type_; }
|
1319
|
-
Handle<JSFunction> target() { return target_; }
|
1320
|
-
Handle<JSObject> holder() { return holder_; }
|
1321
|
-
Handle<JSGlobalPropertyCell> cell() { return cell_; }
|
1322
|
-
|
1323
|
-
bool ComputeTarget(Handle<Map> type, Handle<String> name);
|
1324
|
-
bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup);
|
1325
|
-
|
1326
|
-
// Bailout support.
|
1327
|
-
int ReturnId() const { return return_id_; }
|
1328
|
-
|
1329
|
-
#ifdef DEBUG
|
1330
|
-
// Used to assert that the FullCodeGenerator records the return site.
|
1331
|
-
bool return_is_recorded_;
|
1332
|
-
#endif
|
1333
|
-
|
1334
|
-
private:
|
1335
|
-
Expression* expression_;
|
1336
|
-
ZoneList<Expression*>* arguments_;
|
1337
|
-
int pos_;
|
1338
|
-
|
1339
|
-
bool is_monomorphic_;
|
1340
|
-
CheckType check_type_;
|
1341
|
-
ZoneMapList* receiver_types_;
|
1342
|
-
Handle<JSFunction> target_;
|
1343
|
-
Handle<JSObject> holder_;
|
1344
|
-
Handle<JSGlobalPropertyCell> cell_;
|
1345
|
-
|
1346
|
-
int return_id_;
|
1347
|
-
};
|
1348
|
-
|
1349
|
-
|
1350
|
-
class AstSentinels {
|
1351
|
-
public:
|
1352
|
-
~AstSentinels() { }
|
1353
|
-
|
1354
|
-
// Returns a property singleton property access on 'this'. Used
|
1355
|
-
// during preparsing.
|
1356
|
-
Property* this_property() { return &this_property_; }
|
1357
|
-
VariableProxySentinel* this_proxy() { return &this_proxy_; }
|
1358
|
-
VariableProxySentinel* identifier_proxy() { return &identifier_proxy_; }
|
1359
|
-
ValidLeftHandSideSentinel* valid_left_hand_side_sentinel() {
|
1360
|
-
return &valid_left_hand_side_sentinel_;
|
1361
|
-
}
|
1362
|
-
Call* call_sentinel() { return &call_sentinel_; }
|
1363
|
-
EmptyStatement* empty_statement() { return &empty_statement_; }
|
1364
|
-
|
1365
|
-
private:
|
1366
|
-
AstSentinels();
|
1367
|
-
VariableProxySentinel this_proxy_;
|
1368
|
-
VariableProxySentinel identifier_proxy_;
|
1369
|
-
ValidLeftHandSideSentinel valid_left_hand_side_sentinel_;
|
1370
|
-
Property this_property_;
|
1371
|
-
Call call_sentinel_;
|
1372
|
-
EmptyStatement empty_statement_;
|
1373
|
-
|
1374
|
-
friend class Isolate;
|
1375
|
-
|
1376
|
-
DISALLOW_COPY_AND_ASSIGN(AstSentinels);
|
1377
|
-
};
|
1378
|
-
|
1379
|
-
|
1380
|
-
class CallNew: public Expression {
|
1381
|
-
public:
|
1382
|
-
CallNew(Expression* expression, ZoneList<Expression*>* arguments, int pos)
|
1383
|
-
: expression_(expression), arguments_(arguments), pos_(pos) { }
|
1384
|
-
|
1385
|
-
DECLARE_NODE_TYPE(CallNew)
|
1386
|
-
|
1387
|
-
virtual bool IsInlineable() const;
|
1388
|
-
|
1389
|
-
Expression* expression() const { return expression_; }
|
1390
|
-
ZoneList<Expression*>* arguments() const { return arguments_; }
|
1391
|
-
int position() { return pos_; }
|
1392
|
-
|
1393
|
-
private:
|
1394
|
-
Expression* expression_;
|
1395
|
-
ZoneList<Expression*>* arguments_;
|
1396
|
-
int pos_;
|
1397
|
-
};
|
1398
|
-
|
1399
|
-
|
1400
|
-
// The CallRuntime class does not represent any official JavaScript
|
1401
|
-
// language construct. Instead it is used to call a C or JS function
|
1402
|
-
// with a set of arguments. This is used from the builtins that are
|
1403
|
-
// implemented in JavaScript (see "v8natives.js").
|
1404
|
-
class CallRuntime: public Expression {
|
1405
|
-
public:
|
1406
|
-
CallRuntime(Handle<String> name,
|
1407
|
-
const Runtime::Function* function,
|
1408
|
-
ZoneList<Expression*>* arguments)
|
1409
|
-
: name_(name), function_(function), arguments_(arguments) { }
|
1410
|
-
|
1411
|
-
DECLARE_NODE_TYPE(CallRuntime)
|
1412
|
-
|
1413
|
-
virtual bool IsInlineable() const;
|
1414
|
-
|
1415
|
-
Handle<String> name() const { return name_; }
|
1416
|
-
const Runtime::Function* function() const { return function_; }
|
1417
|
-
ZoneList<Expression*>* arguments() const { return arguments_; }
|
1418
|
-
bool is_jsruntime() const { return function_ == NULL; }
|
1419
|
-
|
1420
|
-
private:
|
1421
|
-
Handle<String> name_;
|
1422
|
-
const Runtime::Function* function_;
|
1423
|
-
ZoneList<Expression*>* arguments_;
|
1424
|
-
};
|
1425
|
-
|
1426
|
-
|
1427
|
-
class UnaryOperation: public Expression {
|
1428
|
-
public:
|
1429
|
-
UnaryOperation(Token::Value op, Expression* expression)
|
1430
|
-
: op_(op), expression_(expression) {
|
1431
|
-
ASSERT(Token::IsUnaryOp(op));
|
1432
|
-
}
|
1433
|
-
|
1434
|
-
DECLARE_NODE_TYPE(UnaryOperation)
|
1435
|
-
|
1436
|
-
virtual bool IsInlineable() const;
|
1437
|
-
|
1438
|
-
virtual bool ResultOverwriteAllowed();
|
1439
|
-
|
1440
|
-
Token::Value op() const { return op_; }
|
1441
|
-
Expression* expression() const { return expression_; }
|
1442
|
-
|
1443
|
-
private:
|
1444
|
-
Token::Value op_;
|
1445
|
-
Expression* expression_;
|
1446
|
-
};
|
1447
|
-
|
1448
|
-
|
1449
|
-
class BinaryOperation: public Expression {
|
1450
|
-
public:
|
1451
|
-
BinaryOperation(Token::Value op,
|
1452
|
-
Expression* left,
|
1453
|
-
Expression* right,
|
1454
|
-
int pos)
|
1455
|
-
: op_(op), left_(left), right_(right), pos_(pos) {
|
1456
|
-
ASSERT(Token::IsBinaryOp(op));
|
1457
|
-
right_id_ = (op == Token::AND || op == Token::OR)
|
1458
|
-
? static_cast<int>(GetNextId())
|
1459
|
-
: AstNode::kNoNumber;
|
1460
|
-
}
|
1461
|
-
|
1462
|
-
// Create the binary operation corresponding to a compound assignment.
|
1463
|
-
explicit BinaryOperation(Assignment* assignment);
|
1464
|
-
|
1465
|
-
DECLARE_NODE_TYPE(BinaryOperation)
|
1466
|
-
|
1467
|
-
virtual bool IsInlineable() const;
|
1468
|
-
|
1469
|
-
virtual bool ResultOverwriteAllowed();
|
1470
|
-
|
1471
|
-
Token::Value op() const { return op_; }
|
1472
|
-
Expression* left() const { return left_; }
|
1473
|
-
Expression* right() const { return right_; }
|
1474
|
-
int position() const { return pos_; }
|
1475
|
-
|
1476
|
-
// Bailout support.
|
1477
|
-
int RightId() const { return right_id_; }
|
1478
|
-
|
1479
|
-
private:
|
1480
|
-
Token::Value op_;
|
1481
|
-
Expression* left_;
|
1482
|
-
Expression* right_;
|
1483
|
-
int pos_;
|
1484
|
-
// The short-circuit logical operations have an AST ID for their
|
1485
|
-
// right-hand subexpression.
|
1486
|
-
int right_id_;
|
1487
|
-
};
|
1488
|
-
|
1489
|
-
|
1490
|
-
class IncrementOperation: public Expression {
|
1491
|
-
public:
|
1492
|
-
IncrementOperation(Token::Value op, Expression* expr)
|
1493
|
-
: op_(op), expression_(expr) {
|
1494
|
-
ASSERT(Token::IsCountOp(op));
|
1495
|
-
}
|
1496
|
-
|
1497
|
-
DECLARE_NODE_TYPE(IncrementOperation)
|
1498
|
-
|
1499
|
-
Token::Value op() const { return op_; }
|
1500
|
-
bool is_increment() { return op_ == Token::INC; }
|
1501
|
-
Expression* expression() const { return expression_; }
|
1502
|
-
|
1503
|
-
private:
|
1504
|
-
Token::Value op_;
|
1505
|
-
Expression* expression_;
|
1506
|
-
int pos_;
|
1507
|
-
};
|
1508
|
-
|
1509
|
-
|
1510
|
-
class CountOperation: public Expression {
|
1511
|
-
public:
|
1512
|
-
CountOperation(bool is_prefix, IncrementOperation* increment, int pos)
|
1513
|
-
: is_prefix_(is_prefix), increment_(increment), pos_(pos),
|
1514
|
-
assignment_id_(GetNextId()) {
|
1515
|
-
}
|
1516
|
-
|
1517
|
-
DECLARE_NODE_TYPE(CountOperation)
|
1518
|
-
|
1519
|
-
bool is_prefix() const { return is_prefix_; }
|
1520
|
-
bool is_postfix() const { return !is_prefix_; }
|
1521
|
-
|
1522
|
-
Token::Value op() const { return increment_->op(); }
|
1523
|
-
Token::Value binary_op() {
|
1524
|
-
return (op() == Token::INC) ? Token::ADD : Token::SUB;
|
1525
|
-
}
|
1526
|
-
|
1527
|
-
Expression* expression() const { return increment_->expression(); }
|
1528
|
-
IncrementOperation* increment() const { return increment_; }
|
1529
|
-
int position() const { return pos_; }
|
1530
|
-
|
1531
|
-
virtual void MarkAsStatement() { is_prefix_ = true; }
|
1532
|
-
|
1533
|
-
virtual bool IsInlineable() const;
|
1534
|
-
|
1535
|
-
// Bailout support.
|
1536
|
-
int AssignmentId() const { return assignment_id_; }
|
1537
|
-
|
1538
|
-
private:
|
1539
|
-
bool is_prefix_;
|
1540
|
-
IncrementOperation* increment_;
|
1541
|
-
int pos_;
|
1542
|
-
int assignment_id_;
|
1543
|
-
};
|
1544
|
-
|
1545
|
-
|
1546
|
-
class CompareOperation: public Expression {
|
1547
|
-
public:
|
1548
|
-
CompareOperation(Token::Value op,
|
1549
|
-
Expression* left,
|
1550
|
-
Expression* right,
|
1551
|
-
int pos)
|
1552
|
-
: op_(op), left_(left), right_(right), pos_(pos), compare_type_(NONE) {
|
1553
|
-
ASSERT(Token::IsCompareOp(op));
|
1554
|
-
}
|
1555
|
-
|
1556
|
-
DECLARE_NODE_TYPE(CompareOperation)
|
1557
|
-
|
1558
|
-
Token::Value op() const { return op_; }
|
1559
|
-
Expression* left() const { return left_; }
|
1560
|
-
Expression* right() const { return right_; }
|
1561
|
-
int position() const { return pos_; }
|
1562
|
-
|
1563
|
-
virtual bool IsInlineable() const;
|
1564
|
-
|
1565
|
-
// Type feedback information.
|
1566
|
-
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
1567
|
-
bool IsSmiCompare() { return compare_type_ == SMI_ONLY; }
|
1568
|
-
bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; }
|
1569
|
-
|
1570
|
-
private:
|
1571
|
-
Token::Value op_;
|
1572
|
-
Expression* left_;
|
1573
|
-
Expression* right_;
|
1574
|
-
int pos_;
|
1575
|
-
|
1576
|
-
enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY };
|
1577
|
-
CompareTypeFeedback compare_type_;
|
1578
|
-
};
|
1579
|
-
|
1580
|
-
|
1581
|
-
class CompareToNull: public Expression {
|
1582
|
-
public:
|
1583
|
-
CompareToNull(bool is_strict, Expression* expression)
|
1584
|
-
: is_strict_(is_strict), expression_(expression) { }
|
1585
|
-
|
1586
|
-
DECLARE_NODE_TYPE(CompareToNull)
|
1587
|
-
|
1588
|
-
virtual bool IsInlineable() const;
|
1589
|
-
|
1590
|
-
bool is_strict() const { return is_strict_; }
|
1591
|
-
Token::Value op() const { return is_strict_ ? Token::EQ_STRICT : Token::EQ; }
|
1592
|
-
Expression* expression() const { return expression_; }
|
1593
|
-
|
1594
|
-
private:
|
1595
|
-
bool is_strict_;
|
1596
|
-
Expression* expression_;
|
1597
|
-
};
|
1598
|
-
|
1599
|
-
|
1600
|
-
class Conditional: public Expression {
|
1601
|
-
public:
|
1602
|
-
Conditional(Expression* condition,
|
1603
|
-
Expression* then_expression,
|
1604
|
-
Expression* else_expression,
|
1605
|
-
int then_expression_position,
|
1606
|
-
int else_expression_position)
|
1607
|
-
: condition_(condition),
|
1608
|
-
then_expression_(then_expression),
|
1609
|
-
else_expression_(else_expression),
|
1610
|
-
then_expression_position_(then_expression_position),
|
1611
|
-
else_expression_position_(else_expression_position),
|
1612
|
-
then_id_(GetNextId()),
|
1613
|
-
else_id_(GetNextId()) {
|
1614
|
-
}
|
1615
|
-
|
1616
|
-
DECLARE_NODE_TYPE(Conditional)
|
1617
|
-
|
1618
|
-
virtual bool IsInlineable() const;
|
1619
|
-
|
1620
|
-
Expression* condition() const { return condition_; }
|
1621
|
-
Expression* then_expression() const { return then_expression_; }
|
1622
|
-
Expression* else_expression() const { return else_expression_; }
|
1623
|
-
|
1624
|
-
int then_expression_position() const { return then_expression_position_; }
|
1625
|
-
int else_expression_position() const { return else_expression_position_; }
|
1626
|
-
|
1627
|
-
int ThenId() const { return then_id_; }
|
1628
|
-
int ElseId() const { return else_id_; }
|
1629
|
-
|
1630
|
-
private:
|
1631
|
-
Expression* condition_;
|
1632
|
-
Expression* then_expression_;
|
1633
|
-
Expression* else_expression_;
|
1634
|
-
int then_expression_position_;
|
1635
|
-
int else_expression_position_;
|
1636
|
-
int then_id_;
|
1637
|
-
int else_id_;
|
1638
|
-
};
|
1639
|
-
|
1640
|
-
|
1641
|
-
class Assignment: public Expression {
|
1642
|
-
public:
|
1643
|
-
Assignment(Token::Value op, Expression* target, Expression* value, int pos);
|
1644
|
-
|
1645
|
-
DECLARE_NODE_TYPE(Assignment)
|
1646
|
-
|
1647
|
-
virtual bool IsInlineable() const;
|
1648
|
-
|
1649
|
-
Assignment* AsSimpleAssignment() { return !is_compound() ? this : NULL; }
|
1650
|
-
|
1651
|
-
Token::Value binary_op() const;
|
1652
|
-
|
1653
|
-
Token::Value op() const { return op_; }
|
1654
|
-
Expression* target() const { return target_; }
|
1655
|
-
Expression* value() const { return value_; }
|
1656
|
-
int position() { return pos_; }
|
1657
|
-
BinaryOperation* binary_operation() const { return binary_operation_; }
|
1658
|
-
|
1659
|
-
// This check relies on the definition order of token in token.h.
|
1660
|
-
bool is_compound() const { return op() > Token::ASSIGN; }
|
1661
|
-
|
1662
|
-
// An initialization block is a series of statments of the form
|
1663
|
-
// x.y.z.a = ...; x.y.z.b = ...; etc. The parser marks the beginning and
|
1664
|
-
// ending of these blocks to allow for optimizations of initialization
|
1665
|
-
// blocks.
|
1666
|
-
bool starts_initialization_block() { return block_start_; }
|
1667
|
-
bool ends_initialization_block() { return block_end_; }
|
1668
|
-
void mark_block_start() { block_start_ = true; }
|
1669
|
-
void mark_block_end() { block_end_ = true; }
|
1670
|
-
|
1671
|
-
// Type feedback information.
|
1672
|
-
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
1673
|
-
virtual bool IsMonomorphic() { return is_monomorphic_; }
|
1674
|
-
virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; }
|
1675
|
-
virtual Handle<Map> GetMonomorphicReceiverType() {
|
1676
|
-
return monomorphic_receiver_type_;
|
1677
|
-
}
|
1678
|
-
ExternalArrayType GetExternalArrayType() const { return array_type_; }
|
1679
|
-
void SetExternalArrayType(ExternalArrayType array_type) {
|
1680
|
-
array_type_ = array_type;
|
1681
|
-
}
|
1682
|
-
|
1683
|
-
// Bailout support.
|
1684
|
-
int CompoundLoadId() const { return compound_load_id_; }
|
1685
|
-
int AssignmentId() const { return assignment_id_; }
|
1686
|
-
|
1687
|
-
private:
|
1688
|
-
Token::Value op_;
|
1689
|
-
Expression* target_;
|
1690
|
-
Expression* value_;
|
1691
|
-
int pos_;
|
1692
|
-
BinaryOperation* binary_operation_;
|
1693
|
-
int compound_load_id_;
|
1694
|
-
int assignment_id_;
|
1695
|
-
|
1696
|
-
bool block_start_;
|
1697
|
-
bool block_end_;
|
1698
|
-
|
1699
|
-
bool is_monomorphic_;
|
1700
|
-
ZoneMapList* receiver_types_;
|
1701
|
-
Handle<Map> monomorphic_receiver_type_;
|
1702
|
-
ExternalArrayType array_type_;
|
1703
|
-
};
|
1704
|
-
|
1705
|
-
|
1706
|
-
class Throw: public Expression {
|
1707
|
-
public:
|
1708
|
-
Throw(Expression* exception, int pos)
|
1709
|
-
: exception_(exception), pos_(pos) {}
|
1710
|
-
|
1711
|
-
DECLARE_NODE_TYPE(Throw)
|
1712
|
-
|
1713
|
-
Expression* exception() const { return exception_; }
|
1714
|
-
int position() const { return pos_; }
|
1715
|
-
|
1716
|
-
private:
|
1717
|
-
Expression* exception_;
|
1718
|
-
int pos_;
|
1719
|
-
};
|
1720
|
-
|
1721
|
-
|
1722
|
-
class FunctionLiteral: public Expression {
|
1723
|
-
public:
|
1724
|
-
FunctionLiteral(Handle<String> name,
|
1725
|
-
Scope* scope,
|
1726
|
-
ZoneList<Statement*>* body,
|
1727
|
-
int materialized_literal_count,
|
1728
|
-
int expected_property_count,
|
1729
|
-
bool has_only_simple_this_property_assignments,
|
1730
|
-
Handle<FixedArray> this_property_assignments,
|
1731
|
-
int num_parameters,
|
1732
|
-
int start_position,
|
1733
|
-
int end_position,
|
1734
|
-
bool is_expression,
|
1735
|
-
bool contains_loops)
|
1736
|
-
: name_(name),
|
1737
|
-
scope_(scope),
|
1738
|
-
body_(body),
|
1739
|
-
materialized_literal_count_(materialized_literal_count),
|
1740
|
-
expected_property_count_(expected_property_count),
|
1741
|
-
has_only_simple_this_property_assignments_(
|
1742
|
-
has_only_simple_this_property_assignments),
|
1743
|
-
this_property_assignments_(this_property_assignments),
|
1744
|
-
num_parameters_(num_parameters),
|
1745
|
-
start_position_(start_position),
|
1746
|
-
end_position_(end_position),
|
1747
|
-
is_expression_(is_expression),
|
1748
|
-
contains_loops_(contains_loops),
|
1749
|
-
function_token_position_(RelocInfo::kNoPosition),
|
1750
|
-
inferred_name_(HEAP->empty_string()),
|
1751
|
-
pretenure_(false) { }
|
1752
|
-
|
1753
|
-
DECLARE_NODE_TYPE(FunctionLiteral)
|
1754
|
-
|
1755
|
-
Handle<String> name() const { return name_; }
|
1756
|
-
Scope* scope() const { return scope_; }
|
1757
|
-
ZoneList<Statement*>* body() const { return body_; }
|
1758
|
-
void set_function_token_position(int pos) { function_token_position_ = pos; }
|
1759
|
-
int function_token_position() const { return function_token_position_; }
|
1760
|
-
int start_position() const { return start_position_; }
|
1761
|
-
int end_position() const { return end_position_; }
|
1762
|
-
bool is_expression() const { return is_expression_; }
|
1763
|
-
bool contains_loops() const { return contains_loops_; }
|
1764
|
-
bool strict_mode() const;
|
1765
|
-
|
1766
|
-
int materialized_literal_count() { return materialized_literal_count_; }
|
1767
|
-
int expected_property_count() { return expected_property_count_; }
|
1768
|
-
bool has_only_simple_this_property_assignments() {
|
1769
|
-
return has_only_simple_this_property_assignments_;
|
1770
|
-
}
|
1771
|
-
Handle<FixedArray> this_property_assignments() {
|
1772
|
-
return this_property_assignments_;
|
1773
|
-
}
|
1774
|
-
int num_parameters() { return num_parameters_; }
|
1775
|
-
|
1776
|
-
bool AllowsLazyCompilation();
|
1777
|
-
|
1778
|
-
Handle<String> debug_name() const {
|
1779
|
-
if (name_->length() > 0) return name_;
|
1780
|
-
return inferred_name();
|
1781
|
-
}
|
1782
|
-
|
1783
|
-
Handle<String> inferred_name() const { return inferred_name_; }
|
1784
|
-
void set_inferred_name(Handle<String> inferred_name) {
|
1785
|
-
inferred_name_ = inferred_name;
|
1786
|
-
}
|
1787
|
-
|
1788
|
-
bool pretenure() { return pretenure_; }
|
1789
|
-
void set_pretenure(bool value) { pretenure_ = value; }
|
1790
|
-
|
1791
|
-
private:
|
1792
|
-
Handle<String> name_;
|
1793
|
-
Scope* scope_;
|
1794
|
-
ZoneList<Statement*>* body_;
|
1795
|
-
int materialized_literal_count_;
|
1796
|
-
int expected_property_count_;
|
1797
|
-
bool has_only_simple_this_property_assignments_;
|
1798
|
-
Handle<FixedArray> this_property_assignments_;
|
1799
|
-
int num_parameters_;
|
1800
|
-
int start_position_;
|
1801
|
-
int end_position_;
|
1802
|
-
bool is_expression_;
|
1803
|
-
bool contains_loops_;
|
1804
|
-
bool strict_mode_;
|
1805
|
-
int function_token_position_;
|
1806
|
-
Handle<String> inferred_name_;
|
1807
|
-
bool pretenure_;
|
1808
|
-
};
|
1809
|
-
|
1810
|
-
|
1811
|
-
class SharedFunctionInfoLiteral: public Expression {
|
1812
|
-
public:
|
1813
|
-
explicit SharedFunctionInfoLiteral(
|
1814
|
-
Handle<SharedFunctionInfo> shared_function_info)
|
1815
|
-
: shared_function_info_(shared_function_info) { }
|
1816
|
-
|
1817
|
-
DECLARE_NODE_TYPE(SharedFunctionInfoLiteral)
|
1818
|
-
|
1819
|
-
Handle<SharedFunctionInfo> shared_function_info() const {
|
1820
|
-
return shared_function_info_;
|
1821
|
-
}
|
1822
|
-
|
1823
|
-
private:
|
1824
|
-
Handle<SharedFunctionInfo> shared_function_info_;
|
1825
|
-
};
|
1826
|
-
|
1827
|
-
|
1828
|
-
class ThisFunction: public Expression {
|
1829
|
-
public:
|
1830
|
-
DECLARE_NODE_TYPE(ThisFunction)
|
1831
|
-
};
|
1832
|
-
|
1833
|
-
|
1834
|
-
// ----------------------------------------------------------------------------
|
1835
|
-
// Regular expressions
|
1836
|
-
|
1837
|
-
|
1838
|
-
class RegExpVisitor BASE_EMBEDDED {
|
1839
|
-
public:
|
1840
|
-
virtual ~RegExpVisitor() { }
|
1841
|
-
#define MAKE_CASE(Name) \
|
1842
|
-
virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
|
1843
|
-
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
|
1844
|
-
#undef MAKE_CASE
|
1845
|
-
};
|
1846
|
-
|
1847
|
-
|
1848
|
-
class RegExpTree: public ZoneObject {
|
1849
|
-
public:
|
1850
|
-
static const int kInfinity = kMaxInt;
|
1851
|
-
virtual ~RegExpTree() { }
|
1852
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data) = 0;
|
1853
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
1854
|
-
RegExpNode* on_success) = 0;
|
1855
|
-
virtual bool IsTextElement() { return false; }
|
1856
|
-
virtual bool IsAnchoredAtStart() { return false; }
|
1857
|
-
virtual bool IsAnchoredAtEnd() { return false; }
|
1858
|
-
virtual int min_match() = 0;
|
1859
|
-
virtual int max_match() = 0;
|
1860
|
-
// Returns the interval of registers used for captures within this
|
1861
|
-
// expression.
|
1862
|
-
virtual Interval CaptureRegisters() { return Interval::Empty(); }
|
1863
|
-
virtual void AppendToText(RegExpText* text);
|
1864
|
-
SmartPointer<const char> ToString();
|
1865
|
-
#define MAKE_ASTYPE(Name) \
|
1866
|
-
virtual RegExp##Name* As##Name(); \
|
1867
|
-
virtual bool Is##Name();
|
1868
|
-
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_ASTYPE)
|
1869
|
-
#undef MAKE_ASTYPE
|
1870
|
-
};
|
1871
|
-
|
1872
|
-
|
1873
|
-
class RegExpDisjunction: public RegExpTree {
|
1874
|
-
public:
|
1875
|
-
explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
|
1876
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
1877
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
1878
|
-
RegExpNode* on_success);
|
1879
|
-
virtual RegExpDisjunction* AsDisjunction();
|
1880
|
-
virtual Interval CaptureRegisters();
|
1881
|
-
virtual bool IsDisjunction();
|
1882
|
-
virtual bool IsAnchoredAtStart();
|
1883
|
-
virtual bool IsAnchoredAtEnd();
|
1884
|
-
virtual int min_match() { return min_match_; }
|
1885
|
-
virtual int max_match() { return max_match_; }
|
1886
|
-
ZoneList<RegExpTree*>* alternatives() { return alternatives_; }
|
1887
|
-
private:
|
1888
|
-
ZoneList<RegExpTree*>* alternatives_;
|
1889
|
-
int min_match_;
|
1890
|
-
int max_match_;
|
1891
|
-
};
|
1892
|
-
|
1893
|
-
|
1894
|
-
class RegExpAlternative: public RegExpTree {
|
1895
|
-
public:
|
1896
|
-
explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
|
1897
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
1898
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
1899
|
-
RegExpNode* on_success);
|
1900
|
-
virtual RegExpAlternative* AsAlternative();
|
1901
|
-
virtual Interval CaptureRegisters();
|
1902
|
-
virtual bool IsAlternative();
|
1903
|
-
virtual bool IsAnchoredAtStart();
|
1904
|
-
virtual bool IsAnchoredAtEnd();
|
1905
|
-
virtual int min_match() { return min_match_; }
|
1906
|
-
virtual int max_match() { return max_match_; }
|
1907
|
-
ZoneList<RegExpTree*>* nodes() { return nodes_; }
|
1908
|
-
private:
|
1909
|
-
ZoneList<RegExpTree*>* nodes_;
|
1910
|
-
int min_match_;
|
1911
|
-
int max_match_;
|
1912
|
-
};
|
1913
|
-
|
1914
|
-
|
1915
|
-
class RegExpAssertion: public RegExpTree {
|
1916
|
-
public:
|
1917
|
-
enum Type {
|
1918
|
-
START_OF_LINE,
|
1919
|
-
START_OF_INPUT,
|
1920
|
-
END_OF_LINE,
|
1921
|
-
END_OF_INPUT,
|
1922
|
-
BOUNDARY,
|
1923
|
-
NON_BOUNDARY
|
1924
|
-
};
|
1925
|
-
explicit RegExpAssertion(Type type) : type_(type) { }
|
1926
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
1927
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
1928
|
-
RegExpNode* on_success);
|
1929
|
-
virtual RegExpAssertion* AsAssertion();
|
1930
|
-
virtual bool IsAssertion();
|
1931
|
-
virtual bool IsAnchoredAtStart();
|
1932
|
-
virtual bool IsAnchoredAtEnd();
|
1933
|
-
virtual int min_match() { return 0; }
|
1934
|
-
virtual int max_match() { return 0; }
|
1935
|
-
Type type() { return type_; }
|
1936
|
-
private:
|
1937
|
-
Type type_;
|
1938
|
-
};
|
1939
|
-
|
1940
|
-
|
1941
|
-
class CharacterSet BASE_EMBEDDED {
|
1942
|
-
public:
|
1943
|
-
explicit CharacterSet(uc16 standard_set_type)
|
1944
|
-
: ranges_(NULL),
|
1945
|
-
standard_set_type_(standard_set_type) {}
|
1946
|
-
explicit CharacterSet(ZoneList<CharacterRange>* ranges)
|
1947
|
-
: ranges_(ranges),
|
1948
|
-
standard_set_type_(0) {}
|
1949
|
-
ZoneList<CharacterRange>* ranges();
|
1950
|
-
uc16 standard_set_type() { return standard_set_type_; }
|
1951
|
-
void set_standard_set_type(uc16 special_set_type) {
|
1952
|
-
standard_set_type_ = special_set_type;
|
1953
|
-
}
|
1954
|
-
bool is_standard() { return standard_set_type_ != 0; }
|
1955
|
-
void Canonicalize();
|
1956
|
-
private:
|
1957
|
-
ZoneList<CharacterRange>* ranges_;
|
1958
|
-
// If non-zero, the value represents a standard set (e.g., all whitespace
|
1959
|
-
// characters) without having to expand the ranges.
|
1960
|
-
uc16 standard_set_type_;
|
1961
|
-
};
|
1962
|
-
|
1963
|
-
|
1964
|
-
class RegExpCharacterClass: public RegExpTree {
|
1965
|
-
public:
|
1966
|
-
RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated)
|
1967
|
-
: set_(ranges),
|
1968
|
-
is_negated_(is_negated) { }
|
1969
|
-
explicit RegExpCharacterClass(uc16 type)
|
1970
|
-
: set_(type),
|
1971
|
-
is_negated_(false) { }
|
1972
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
1973
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
1974
|
-
RegExpNode* on_success);
|
1975
|
-
virtual RegExpCharacterClass* AsCharacterClass();
|
1976
|
-
virtual bool IsCharacterClass();
|
1977
|
-
virtual bool IsTextElement() { return true; }
|
1978
|
-
virtual int min_match() { return 1; }
|
1979
|
-
virtual int max_match() { return 1; }
|
1980
|
-
virtual void AppendToText(RegExpText* text);
|
1981
|
-
CharacterSet character_set() { return set_; }
|
1982
|
-
// TODO(lrn): Remove need for complex version if is_standard that
|
1983
|
-
// recognizes a mangled standard set and just do { return set_.is_special(); }
|
1984
|
-
bool is_standard();
|
1985
|
-
// Returns a value representing the standard character set if is_standard()
|
1986
|
-
// returns true.
|
1987
|
-
// Currently used values are:
|
1988
|
-
// s : unicode whitespace
|
1989
|
-
// S : unicode non-whitespace
|
1990
|
-
// w : ASCII word character (digit, letter, underscore)
|
1991
|
-
// W : non-ASCII word character
|
1992
|
-
// d : ASCII digit
|
1993
|
-
// D : non-ASCII digit
|
1994
|
-
// . : non-unicode non-newline
|
1995
|
-
// * : All characters
|
1996
|
-
uc16 standard_type() { return set_.standard_set_type(); }
|
1997
|
-
ZoneList<CharacterRange>* ranges() { return set_.ranges(); }
|
1998
|
-
bool is_negated() { return is_negated_; }
|
1999
|
-
private:
|
2000
|
-
CharacterSet set_;
|
2001
|
-
bool is_negated_;
|
2002
|
-
};
|
2003
|
-
|
2004
|
-
|
2005
|
-
class RegExpAtom: public RegExpTree {
|
2006
|
-
public:
|
2007
|
-
explicit RegExpAtom(Vector<const uc16> data) : data_(data) { }
|
2008
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2009
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2010
|
-
RegExpNode* on_success);
|
2011
|
-
virtual RegExpAtom* AsAtom();
|
2012
|
-
virtual bool IsAtom();
|
2013
|
-
virtual bool IsTextElement() { return true; }
|
2014
|
-
virtual int min_match() { return data_.length(); }
|
2015
|
-
virtual int max_match() { return data_.length(); }
|
2016
|
-
virtual void AppendToText(RegExpText* text);
|
2017
|
-
Vector<const uc16> data() { return data_; }
|
2018
|
-
int length() { return data_.length(); }
|
2019
|
-
private:
|
2020
|
-
Vector<const uc16> data_;
|
2021
|
-
};
|
2022
|
-
|
2023
|
-
|
2024
|
-
class RegExpText: public RegExpTree {
|
2025
|
-
public:
|
2026
|
-
RegExpText() : elements_(2), length_(0) {}
|
2027
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2028
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2029
|
-
RegExpNode* on_success);
|
2030
|
-
virtual RegExpText* AsText();
|
2031
|
-
virtual bool IsText();
|
2032
|
-
virtual bool IsTextElement() { return true; }
|
2033
|
-
virtual int min_match() { return length_; }
|
2034
|
-
virtual int max_match() { return length_; }
|
2035
|
-
virtual void AppendToText(RegExpText* text);
|
2036
|
-
void AddElement(TextElement elm) {
|
2037
|
-
elements_.Add(elm);
|
2038
|
-
length_ += elm.length();
|
2039
|
-
}
|
2040
|
-
ZoneList<TextElement>* elements() { return &elements_; }
|
2041
|
-
private:
|
2042
|
-
ZoneList<TextElement> elements_;
|
2043
|
-
int length_;
|
2044
|
-
};
|
2045
|
-
|
2046
|
-
|
2047
|
-
class RegExpQuantifier: public RegExpTree {
|
2048
|
-
public:
|
2049
|
-
enum Type { GREEDY, NON_GREEDY, POSSESSIVE };
|
2050
|
-
RegExpQuantifier(int min, int max, Type type, RegExpTree* body)
|
2051
|
-
: body_(body),
|
2052
|
-
min_(min),
|
2053
|
-
max_(max),
|
2054
|
-
min_match_(min * body->min_match()),
|
2055
|
-
type_(type) {
|
2056
|
-
if (max > 0 && body->max_match() > kInfinity / max) {
|
2057
|
-
max_match_ = kInfinity;
|
2058
|
-
} else {
|
2059
|
-
max_match_ = max * body->max_match();
|
2060
|
-
}
|
2061
|
-
}
|
2062
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2063
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2064
|
-
RegExpNode* on_success);
|
2065
|
-
static RegExpNode* ToNode(int min,
|
2066
|
-
int max,
|
2067
|
-
bool is_greedy,
|
2068
|
-
RegExpTree* body,
|
2069
|
-
RegExpCompiler* compiler,
|
2070
|
-
RegExpNode* on_success,
|
2071
|
-
bool not_at_start = false);
|
2072
|
-
virtual RegExpQuantifier* AsQuantifier();
|
2073
|
-
virtual Interval CaptureRegisters();
|
2074
|
-
virtual bool IsQuantifier();
|
2075
|
-
virtual int min_match() { return min_match_; }
|
2076
|
-
virtual int max_match() { return max_match_; }
|
2077
|
-
int min() { return min_; }
|
2078
|
-
int max() { return max_; }
|
2079
|
-
bool is_possessive() { return type_ == POSSESSIVE; }
|
2080
|
-
bool is_non_greedy() { return type_ == NON_GREEDY; }
|
2081
|
-
bool is_greedy() { return type_ == GREEDY; }
|
2082
|
-
RegExpTree* body() { return body_; }
|
2083
|
-
private:
|
2084
|
-
RegExpTree* body_;
|
2085
|
-
int min_;
|
2086
|
-
int max_;
|
2087
|
-
int min_match_;
|
2088
|
-
int max_match_;
|
2089
|
-
Type type_;
|
2090
|
-
};
|
2091
|
-
|
2092
|
-
|
2093
|
-
class RegExpCapture: public RegExpTree {
|
2094
|
-
public:
|
2095
|
-
explicit RegExpCapture(RegExpTree* body, int index)
|
2096
|
-
: body_(body), index_(index) { }
|
2097
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2098
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2099
|
-
RegExpNode* on_success);
|
2100
|
-
static RegExpNode* ToNode(RegExpTree* body,
|
2101
|
-
int index,
|
2102
|
-
RegExpCompiler* compiler,
|
2103
|
-
RegExpNode* on_success);
|
2104
|
-
virtual RegExpCapture* AsCapture();
|
2105
|
-
virtual bool IsAnchoredAtStart();
|
2106
|
-
virtual bool IsAnchoredAtEnd();
|
2107
|
-
virtual Interval CaptureRegisters();
|
2108
|
-
virtual bool IsCapture();
|
2109
|
-
virtual int min_match() { return body_->min_match(); }
|
2110
|
-
virtual int max_match() { return body_->max_match(); }
|
2111
|
-
RegExpTree* body() { return body_; }
|
2112
|
-
int index() { return index_; }
|
2113
|
-
static int StartRegister(int index) { return index * 2; }
|
2114
|
-
static int EndRegister(int index) { return index * 2 + 1; }
|
2115
|
-
private:
|
2116
|
-
RegExpTree* body_;
|
2117
|
-
int index_;
|
2118
|
-
};
|
2119
|
-
|
2120
|
-
|
2121
|
-
class RegExpLookahead: public RegExpTree {
|
2122
|
-
public:
|
2123
|
-
RegExpLookahead(RegExpTree* body,
|
2124
|
-
bool is_positive,
|
2125
|
-
int capture_count,
|
2126
|
-
int capture_from)
|
2127
|
-
: body_(body),
|
2128
|
-
is_positive_(is_positive),
|
2129
|
-
capture_count_(capture_count),
|
2130
|
-
capture_from_(capture_from) { }
|
2131
|
-
|
2132
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2133
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2134
|
-
RegExpNode* on_success);
|
2135
|
-
virtual RegExpLookahead* AsLookahead();
|
2136
|
-
virtual Interval CaptureRegisters();
|
2137
|
-
virtual bool IsLookahead();
|
2138
|
-
virtual bool IsAnchoredAtStart();
|
2139
|
-
virtual int min_match() { return 0; }
|
2140
|
-
virtual int max_match() { return 0; }
|
2141
|
-
RegExpTree* body() { return body_; }
|
2142
|
-
bool is_positive() { return is_positive_; }
|
2143
|
-
int capture_count() { return capture_count_; }
|
2144
|
-
int capture_from() { return capture_from_; }
|
2145
|
-
private:
|
2146
|
-
RegExpTree* body_;
|
2147
|
-
bool is_positive_;
|
2148
|
-
int capture_count_;
|
2149
|
-
int capture_from_;
|
2150
|
-
};
|
2151
|
-
|
2152
|
-
|
2153
|
-
class RegExpBackReference: public RegExpTree {
|
2154
|
-
public:
|
2155
|
-
explicit RegExpBackReference(RegExpCapture* capture)
|
2156
|
-
: capture_(capture) { }
|
2157
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2158
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2159
|
-
RegExpNode* on_success);
|
2160
|
-
virtual RegExpBackReference* AsBackReference();
|
2161
|
-
virtual bool IsBackReference();
|
2162
|
-
virtual int min_match() { return 0; }
|
2163
|
-
virtual int max_match() { return capture_->max_match(); }
|
2164
|
-
int index() { return capture_->index(); }
|
2165
|
-
RegExpCapture* capture() { return capture_; }
|
2166
|
-
private:
|
2167
|
-
RegExpCapture* capture_;
|
2168
|
-
};
|
2169
|
-
|
2170
|
-
|
2171
|
-
class RegExpEmpty: public RegExpTree {
|
2172
|
-
public:
|
2173
|
-
RegExpEmpty() { }
|
2174
|
-
virtual void* Accept(RegExpVisitor* visitor, void* data);
|
2175
|
-
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
|
2176
|
-
RegExpNode* on_success);
|
2177
|
-
virtual RegExpEmpty* AsEmpty();
|
2178
|
-
virtual bool IsEmpty();
|
2179
|
-
virtual int min_match() { return 0; }
|
2180
|
-
virtual int max_match() { return 0; }
|
2181
|
-
static RegExpEmpty* GetInstance() { return &kInstance; }
|
2182
|
-
private:
|
2183
|
-
static RegExpEmpty kInstance;
|
2184
|
-
};
|
2185
|
-
|
2186
|
-
|
2187
|
-
// ----------------------------------------------------------------------------
|
2188
|
-
// Basic visitor
|
2189
|
-
// - leaf node visitors are abstract.
|
2190
|
-
|
2191
|
-
class AstVisitor BASE_EMBEDDED {
|
2192
|
-
public:
|
2193
|
-
AstVisitor() : isolate_(Isolate::Current()), stack_overflow_(false) { }
|
2194
|
-
virtual ~AstVisitor() { }
|
2195
|
-
|
2196
|
-
// Stack overflow check and dynamic dispatch.
|
2197
|
-
void Visit(AstNode* node) { if (!CheckStackOverflow()) node->Accept(this); }
|
2198
|
-
|
2199
|
-
// Iteration left-to-right.
|
2200
|
-
virtual void VisitDeclarations(ZoneList<Declaration*>* declarations);
|
2201
|
-
virtual void VisitStatements(ZoneList<Statement*>* statements);
|
2202
|
-
virtual void VisitExpressions(ZoneList<Expression*>* expressions);
|
2203
|
-
|
2204
|
-
// Stack overflow tracking support.
|
2205
|
-
bool HasStackOverflow() const { return stack_overflow_; }
|
2206
|
-
bool CheckStackOverflow();
|
2207
|
-
|
2208
|
-
// If a stack-overflow exception is encountered when visiting a
|
2209
|
-
// node, calling SetStackOverflow will make sure that the visitor
|
2210
|
-
// bails out without visiting more nodes.
|
2211
|
-
void SetStackOverflow() { stack_overflow_ = true; }
|
2212
|
-
void ClearStackOverflow() { stack_overflow_ = false; }
|
2213
|
-
|
2214
|
-
// Nodes not appearing in the AST, including slots.
|
2215
|
-
virtual void VisitSlot(Slot* node) { UNREACHABLE(); }
|
2216
|
-
|
2217
|
-
// Individual AST nodes.
|
2218
|
-
#define DEF_VISIT(type) \
|
2219
|
-
virtual void Visit##type(type* node) = 0;
|
2220
|
-
AST_NODE_LIST(DEF_VISIT)
|
2221
|
-
#undef DEF_VISIT
|
2222
|
-
|
2223
|
-
protected:
|
2224
|
-
Isolate* isolate() { return isolate_; }
|
2225
|
-
|
2226
|
-
private:
|
2227
|
-
Isolate* isolate_;
|
2228
|
-
bool stack_overflow_;
|
2229
|
-
};
|
2230
|
-
|
2231
|
-
|
2232
|
-
} } // namespace v8::internal
|
2233
|
-
|
2234
|
-
#endif // V8_AST_H_
|