Skip to content

Commit 89bed19

Browse files
committed
Upgrade V8 to v3.5.4
1 parent fb7faef commit 89bed19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+3959
-2069
lines changed

deps/v8/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ shell_g
3131
/tools/visual_studio/Release
3232
/xcodebuild/
3333
TAGS
34-
Makefile
3534
*.Makefile

deps/v8/ChangeLog

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2011-08-10: Version 3.5.4
2+
3+
Added a preliminary implementation of ES Harmony weak maps. Weak
4+
maps can be enabled by the flag --harmony-weakmaps.
5+
6+
Introduced a toplevel Makefile to support GYP-based building. GYP
7+
can be obtained from http://gyp.googlecode.com.
8+
9+
Fixed a bug in the length property of functions created by
10+
Function.prototype.bind.
11+
12+
Reduced malloc heap allocation on process startup.
13+
14+
Several important code generation bug fixes.
15+
16+
Performance improvements on all platforms.
17+
18+
119
2011-08-03: Version 3.5.3
220

321
MIPS: Port of fix to ClassOf check from ARM.

deps/v8/Makefile

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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+
29+
# Variable default definitions. Override them by exporting them in your shell.
30+
CXX ?= "g++" # For distcc: export CXX="distcc g++"
31+
LINK ?= "g++"
32+
OUTDIR ?= out
33+
TESTJOBS ?= -j16
34+
GYPFLAGS ?= -Dv8_can_use_vfp_instructions=true
35+
36+
# Architectures and modes to be compiled.
37+
ARCHES = ia32 x64 arm
38+
MODES = release debug
39+
40+
# List of files that trigger Makefile regeneration:
41+
GYPFILES = build/all.gyp build/common.gypi build/v8-features.gypi \
42+
preparser/preparser.gyp samples/samples.gyp src/d8.gyp \
43+
test/cctest/cctest.gyp tools/gyp/v8.gyp
44+
45+
# Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
46+
BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
47+
CHECKS = $(addsuffix .check,$(BUILDS))
48+
# Generates corresponding test targets, e.g. "ia32.release.check".
49+
50+
.PHONY: all release debug ia32 x64 arm $(BUILDS)
51+
52+
# Target definitions. "all" is the default, you can specify any others on the
53+
# command line, e.g. "make ia32". Targets defined in $(BUILDS), e.g.
54+
# "ia32.debug", can also be specified.
55+
all: release debug
56+
57+
release: $(addsuffix .release,$(ARCHES))
58+
59+
debug: $(addsuffix .debug,$(ARCHES))
60+
61+
ia32: $(addprefix ia32.,$(MODES))
62+
63+
x64: $(addprefix x64.,$(MODES))
64+
65+
arm: $(addprefix arm.,$(MODES))
66+
67+
.SECONDEXPANSION:
68+
$(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@)
69+
@$(MAKE) -C "$(OUTDIR)" -f Makefile-$(basename $@) \
70+
CXX="$(CXX)" LINK="$(LINK)" \
71+
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
72+
python -c "print raw_input().capitalize()") \
73+
builddir="$(shell pwd)/$(OUTDIR)/$@"
74+
75+
# Test targets.
76+
check: all
77+
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)
78+
79+
$(addsuffix .check,$(MODES)): $$(basename $$@)
80+
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --mode=$(basename $@)
81+
82+
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
83+
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch=$(basename $@)
84+
85+
$(CHECKS): $$(basename $$@)
86+
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch-and-mode=$(basename $@)
87+
88+
# Clean targets. You can clean each architecture individually, or everything.
89+
$(addsuffix .clean,$(ARCHES)):
90+
rm -f $(OUTDIR)/Makefile-$(basename $@)
91+
rm -rf $(OUTDIR)/$(basename $@).release
92+
rm -rf $(OUTDIR)/$(basename $@).debug
93+
94+
clean: $(addsuffix .clean,$(ARCHES))
95+
96+
# GYP file generation targets.
97+
$(OUTDIR)/Makefile-ia32: $(GYPFILES)
98+
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
99+
-Ibuild/common.gypi --depth=. -Dtarget_arch=ia32 -S-ia32 \
100+
$(GYPFLAGS)
101+
102+
$(OUTDIR)/Makefile-x64: $(GYPFILES)
103+
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
104+
-Ibuild/common.gypi --depth=. -Dtarget_arch=x64 -S-x64 \
105+
$(GYPFLAGS)
106+
107+
$(OUTDIR)/Makefile-arm: $(GYPFILES) build/armu.gypi
108+
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
109+
-Ibuild/common.gypi --depth=. -Ibuild/armu.gypi -S-arm \
110+
$(GYPFLAGS)

deps/v8/SConstruct

+75-9
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,19 @@ LIBRARY_FLAGS = {
153153
}
154154
},
155155
'armeabi:softfp' : {
156-
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0', 'CAN_USE_VFP_INSTRUCTIONS'],
156+
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0'],
157+
'vfp3:on': {
158+
'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
159+
},
157160
'simulator:none': {
158161
'CCFLAGS': ['-mfloat-abi=softfp'],
159162
}
160163
},
161164
'armeabi:hard' : {
162-
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1', 'CAN_USE_VFP_INSTRUCTIONS'],
165+
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1'],
166+
'vfp3:on': {
167+
'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
168+
},
163169
'simulator:none': {
164170
'CCFLAGS': ['-mfloat-abi=hard'],
165171
}
@@ -436,7 +442,7 @@ CCTEST_EXTRA_FLAGS = {
436442
},
437443
'arch:x64': {
438444
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
439-
'LINKFLAGS': ['/STACK:2091752']
445+
'LINKFLAGS': ['/STACK:2097152']
440446
},
441447
}
442448
}
@@ -496,7 +502,10 @@ SAMPLE_FLAGS = {
496502
}
497503
},
498504
'armeabi:hard' : {
499-
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1', 'CAN_USE_VFP_INSTRUCTIONS'],
505+
'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1'],
506+
'vfp3:on': {
507+
'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
508+
},
500509
'simulator:none': {
501510
'CCFLAGS': ['-mfloat-abi=hard'],
502511
}
@@ -601,7 +610,7 @@ SAMPLE_FLAGS = {
601610
},
602611
'arch:x64': {
603612
'CPPDEFINES': ['V8_TARGET_ARCH_X64', 'WIN32'],
604-
'LINKFLAGS': ['/MACHINE:X64', '/STACK:2091752']
613+
'LINKFLAGS': ['/MACHINE:X64', '/STACK:2097152']
605614
},
606615
'mode:debug': {
607616
'CCFLAGS': ['/Od'],
@@ -756,7 +765,7 @@ PREPARSER_FLAGS = {
756765
},
757766
'arch:x64': {
758767
'CPPDEFINES': ['V8_TARGET_ARCH_X64', 'WIN32'],
759-
'LINKFLAGS': ['/MACHINE:X64', '/STACK:2091752']
768+
'LINKFLAGS': ['/MACHINE:X64', '/STACK:2097152']
760769
},
761770
'mode:debug': {
762771
'CCFLAGS': ['/Od'],
@@ -822,6 +831,57 @@ D8_FLAGS = {
822831
'msvc': {
823832
'all': {
824833
'LIBS': ['winmm', 'ws2_32']
834+
},
835+
'verbose:off': {
836+
'CCFLAGS': ['/nologo'],
837+
'LINKFLAGS': ['/NOLOGO']
838+
},
839+
'verbose:on': {
840+
'LINKFLAGS': ['/VERBOSE']
841+
},
842+
'prof:on': {
843+
'LINKFLAGS': ['/MAP']
844+
},
845+
'mode:release': {
846+
'CCFLAGS': ['/O2'],
847+
'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'],
848+
'msvcrt:static': {
849+
'CCFLAGS': ['/MT']
850+
},
851+
'msvcrt:shared': {
852+
'CCFLAGS': ['/MD']
853+
},
854+
'msvcltcg:on': {
855+
'CCFLAGS': ['/GL'],
856+
'pgo:off': {
857+
'LINKFLAGS': ['/LTCG'],
858+
},
859+
},
860+
'pgo:instrument': {
861+
'LINKFLAGS': ['/LTCG:PGI']
862+
},
863+
'pgo:optimize': {
864+
'LINKFLAGS': ['/LTCG:PGO']
865+
}
866+
},
867+
'arch:ia32': {
868+
'CPPDEFINES': ['V8_TARGET_ARCH_IA32', 'WIN32'],
869+
'LINKFLAGS': ['/MACHINE:X86']
870+
},
871+
'arch:x64': {
872+
'CPPDEFINES': ['V8_TARGET_ARCH_X64', 'WIN32'],
873+
'LINKFLAGS': ['/MACHINE:X64', '/STACK:2097152']
874+
},
875+
'mode:debug': {
876+
'CCFLAGS': ['/Od'],
877+
'LINKFLAGS': ['/DEBUG'],
878+
'CPPDEFINES': ['DEBUG'],
879+
'msvcrt:static': {
880+
'CCFLAGS': ['/MTd']
881+
},
882+
'msvcrt:shared': {
883+
'CCFLAGS': ['/MDd']
884+
}
825885
}
826886
}
827887
}
@@ -1039,6 +1099,12 @@ SIMPLE_OPTIONS = {
10391099
'default': 'off',
10401100
'help': 'compress startup data (snapshot) [Linux only]'
10411101
},
1102+
'vfp3': {
1103+
'values': ['on', 'off'],
1104+
'default': 'on',
1105+
'help': 'use vfp3 instructions when building the snapshot [Arm only]'
1106+
},
1107+
10421108
}
10431109

10441110
ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS)
@@ -1343,10 +1409,12 @@ def BuildSpecific(env, mode, env_overrides, tools):
13431409
env['SONAME'] = soname
13441410

13451411
# Build the object files by invoking SCons recursively.
1412+
d8_env = Environment(tools=tools)
1413+
d8_env.Replace(**context.flags['d8'])
13461414
(object_files, shell_files, mksnapshot, preparser_files) = env.SConscript(
13471415
join('src', 'SConscript'),
13481416
build_dir=join('obj', target_id),
1349-
exports='context tools',
1417+
exports='context tools d8_env',
13501418
duplicate=False
13511419
)
13521420

@@ -1375,8 +1443,6 @@ def BuildSpecific(env, mode, env_overrides, tools):
13751443
context.library_targets.append(library)
13761444
context.library_targets.append(preparser_library)
13771445

1378-
d8_env = Environment(tools=tools)
1379-
d8_env.Replace(**context.flags['d8'])
13801446
context.ApplyEnvOverrides(d8_env)
13811447
if context.options['library'] == 'static':
13821448
shell = d8_env.Program('d8' + suffix, object_files + shell_files)

deps/v8/build/all.gyp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
1+
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

@@ -8,6 +8,7 @@
88
'target_name': 'All',
99
'type': 'none',
1010
'dependencies': [
11+
'../preparser/preparser.gyp:*',
1112
'../samples/samples.gyp:*',
1213
'../src/d8.gyp:d8',
1314
],

deps/v8/build/armu.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
'armv7': 1,
3333
'arm_neon': 0,
3434
'arm_fpu': 'vfpv3',
35-
}
35+
},
3636
}

deps/v8/build/common.gypi

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2010 the V8 project authors. All rights reserved.
1+
# Copyright 2011 the V8 project authors. All rights reserved.
22
# Redistribution and use in source and binary forms, with or without
33
# modification, are permitted provided that the following conditions are
44
# met:
@@ -30,6 +30,7 @@
3030
'library%': 'static_library',
3131
'component%': 'static_library',
3232
'visibility%': 'hidden',
33+
'msvs_multi_core_compile%': '1',
3334
'variables': {
3435
'conditions': [
3536
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
@@ -46,23 +47,41 @@
4647
'host_arch%': '<(host_arch)',
4748
'target_arch%': '<(host_arch)',
4849
'v8_target_arch%': '<(target_arch)',
50+
'v8_enable_debugger_support%': 1,
51+
'conditions': [
52+
['(target_arch=="arm" and host_arch!="arm") or \
53+
(target_arch=="x64" and host_arch!="x64")', {
54+
'want_separate_host_toolset': 1,
55+
}, {
56+
'want_separate_host_toolset': 0,
57+
}],
58+
],
4959
},
5060
'target_defaults': {
5161
'default_configuration': 'Debug',
62+
'conditions': [
63+
['v8_enable_debugger_support==1', {
64+
'defines': ['ENABLE_DEBUGGER_SUPPORT',],
65+
},
66+
],
67+
],
5268
'configurations': {
5369
'Debug': {
5470
'cflags': [ '-g', '-O0' ],
55-
'defines': [ 'ENABLE_DISASSEMBLER', 'DEBUG' ],
71+
'defines': [ 'ENABLE_DISASSEMBLER', 'DEBUG', 'V8_ENABLE_CHECKS',
72+
'OBJECT_PRINT' ],
5673
},
5774
'Release': {
58-
'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
75+
'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections',
76+
'-ffunction-sections' ],
5977
},
6078
},
6179
},
6280
'conditions': [
6381
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
6482
'target_defaults': {
65-
'cflags': [ '-Wall', '-pthread', '-fno-rtti', '-fno-exceptions' ],
83+
'cflags': [ '-Wall', '-pthread', '-fno-rtti', '-fno-exceptions',
84+
'-pedantic' ],
6685
'ldflags': [ '-pthread', ],
6786
'conditions': [
6887
[ 'target_arch=="ia32"', {

deps/v8/build/v8-features.gypi

+7
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@
8989
'USE_EABI_HARDFLOAT=1',
9090
'CAN_USE_VFP_INSTRUCTIONS',
9191
],
92+
'cflags': [
93+
'-mfloat-abi=hard',
94+
],
95+
}, {
96+
'defines': [
97+
'USE_EABI_HARDFLOAT=0',
98+
],
9299
}],
93100
],
94101
}],

deps/v8/include/v8.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3606,7 +3606,7 @@ class V8EXPORT Locker {
36063606
/**
36073607
* Returns whether v8::Locker is being used by this V8 instance.
36083608
*/
3609-
static bool IsActive() { return active_; }
3609+
static bool IsActive();
36103610

36113611
private:
36123612
bool has_lock_;

0 commit comments

Comments
 (0)