Skip to content

Commit 14475c7

Browse files
committed
Upgrade V8 to 3.1.8
1 parent cf7b680 commit 14475c7

File tree

94 files changed

+7645
-2254
lines changed

Some content is hidden

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

94 files changed

+7645
-2254
lines changed

deps/v8/ChangeLog

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1+
2011-03-02: Version 3.1.8
2+
3+
Fixed a number of crash bugs.
4+
5+
Improved Crankshaft for x64 and ARM.
6+
7+
Implemented more of EcmaScript 5 strict mode.
8+
9+
Fixed issue with unaligned reads and writes on ARM.
10+
11+
Improved heap profiler support.
12+
13+
114
2011-02-28: Version 3.1.7
215

316
Fixed a number of crash bugs.
417

518
Improved Crankshaft for x64 and ARM.
619

7-
Fixed implementation of indexOf/lastIndexOf for sparse
20+
Fixed implementation of indexOf/lastIndexOf for sparse
821
arrays (http://crbug.com/73940).
922

1023
Fixed bug in map space compaction (http://crbug.com/59688).

deps/v8/SConstruct

+27-94
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
import platform
2929
import re
30-
import subprocess
3130
import sys
3231
import os
3332
from os.path import join, dirname, abspath
@@ -143,9 +142,6 @@ LIBRARY_FLAGS = {
143142
# Use visibility=default to disable this.
144143
'CXXFLAGS': ['-fvisibility=hidden']
145144
},
146-
'strictaliasing:off': {
147-
'CCFLAGS': ['-fno-strict-aliasing']
148-
},
149145
'mode:debug': {
150146
'CCFLAGS': ['-g', '-O0'],
151147
'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'],
@@ -655,16 +651,8 @@ def Abort(message):
655651
sys.exit(1)
656652

657653

658-
def GuessOS(env):
659-
return utils.GuessOS()
660-
661-
662-
def GuessArch(env):
663-
return utils.GuessArchitecture()
664-
665-
666-
def GuessToolchain(env):
667-
tools = env['TOOLS']
654+
def GuessToolchain(os):
655+
tools = Environment()['TOOLS']
668656
if 'gcc' in tools:
669657
return 'gcc'
670658
elif 'msvc' in tools:
@@ -673,9 +661,7 @@ def GuessToolchain(env):
673661
return None
674662

675663

676-
def GuessVisibility(env):
677-
os = env['os']
678-
toolchain = env['toolchain'];
664+
def GuessVisibility(os, toolchain):
679665
if (os == 'win32' or os == 'cygwin') and toolchain == 'gcc':
680666
# MinGW / Cygwin can't do it.
681667
return 'default'
@@ -685,35 +671,27 @@ def GuessVisibility(env):
685671
return 'hidden'
686672

687673

688-
def GuessStrictAliasing(env):
689-
# There seems to be a problem with gcc 4.5.x
690-
# see http://code.google.com/p/v8/issues/detail?id=884
691-
# it can be worked around by disabling strict aliasing
692-
toolchain = env['toolchain'];
693-
if toolchain == 'gcc':
694-
env = Environment(tools=['gcc'])
695-
version = subprocess.Popen([env['CC'], '-dumpversion'],
696-
stdout=subprocess.PIPE).communicate()[0]
697-
if version.find('4.5.') == 0:
698-
return 'off'
699-
return 'default'
674+
OS_GUESS = utils.GuessOS()
675+
TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS)
676+
ARCH_GUESS = utils.GuessArchitecture()
677+
VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS)
700678

701679

702680
SIMPLE_OPTIONS = {
703681
'toolchain': {
704682
'values': ['gcc', 'msvc'],
705-
'guess': GuessToolchain,
706-
'help': 'the toolchain to use'
683+
'default': TOOLCHAIN_GUESS,
684+
'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS
707685
},
708686
'os': {
709687
'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'solaris', 'cygwin'],
710-
'guess': GuessOS,
711-
'help': 'the os to build for'
688+
'default': OS_GUESS,
689+
'help': 'the os to build for (%s)' % OS_GUESS
712690
},
713691
'arch': {
714692
'values':['arm', 'ia32', 'x64', 'mips'],
715-
'guess': GuessArch,
716-
'help': 'the architecture to build for'
693+
'default': ARCH_GUESS,
694+
'help': 'the architecture to build for (%s)' % ARCH_GUESS
717695
},
718696
'regexp': {
719697
'values': ['native', 'interpreted'],
@@ -822,15 +800,8 @@ SIMPLE_OPTIONS = {
822800
},
823801
'visibility': {
824802
'values': ['default', 'hidden'],
825-
'guess': GuessVisibility,
826-
'depends': ['os', 'toolchain'],
827-
'help': 'shared library symbol visibility'
828-
},
829-
'strictaliasing': {
830-
'values': ['default', 'off'],
831-
'guess': GuessStrictAliasing,
832-
'depends': ['toolchain'],
833-
'help': 'assume strict aliasing while optimizing'
803+
'default': VISIBILITY_GUESS,
804+
'help': 'shared library symbol visibility (%s)' % VISIBILITY_GUESS
834805
},
835806
'pgo': {
836807
'values': ['off', 'instrument', 'optimize'],
@@ -840,55 +811,19 @@ SIMPLE_OPTIONS = {
840811
}
841812

842813

843-
def AddOption(result, name, option):
844-
if 'guess' in option:
845-
# Option has a guess function
846-
guess = option.get('guess')
847-
guess_env = Environment(options=result)
848-
# Check if all options that the guess function depends on are set
849-
if 'depends' in option:
850-
for dependency in option.get('depends'):
851-
if not dependency in guess_env:
852-
return False
853-
default = guess(guess_env)
854-
else:
855-
# Option has a fixed default
856-
default = option.get('default')
857-
858-
help = '%s (%s)' % (option.get('help'), ", ".join(option['values']))
859-
result.Add(name, help, default)
860-
return True
861-
862-
863814
def GetOptions():
864815
result = Options()
865816
result.Add('mode', 'compilation mode (debug, release)', 'release')
866817
result.Add('sample', 'build sample (shell, process, lineprocessor)', '')
867818
result.Add('cache', 'directory to use for scons build cache', '')
868819
result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,...)', '')
869820
result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '')
870-
options = SIMPLE_OPTIONS
871-
while len(options):
872-
postpone = {}
873-
for (name, option) in options.iteritems():
874-
if not AddOption(result, name, option):
875-
postpone[name] = option
876-
options = postpone
821+
for (name, option) in SIMPLE_OPTIONS.iteritems():
822+
help = '%s (%s)' % (name, ", ".join(option['values']))
823+
result.Add(name, help, option.get('default'))
877824
return result
878825

879826

880-
def GetTools(opts):
881-
env = Environment(options=opts)
882-
os = env['os']
883-
toolchain = env['toolchain']
884-
if os == 'win32' and toolchain == 'gcc':
885-
return ['mingw']
886-
elif os == 'win32' and toolchain == 'msvc':
887-
return ['msvc', 'mslink', 'mslib', 'msvs']
888-
else:
889-
return ['default']
890-
891-
892827
def GetVersionComponents():
893828
MAJOR_VERSION_PATTERN = re.compile(r"#define\s+MAJOR_VERSION\s+(.*)")
894829
MINOR_VERSION_PATTERN = re.compile(r"#define\s+MINOR_VERSION\s+(.*)")
@@ -969,7 +904,7 @@ def VerifyOptions(env):
969904
print env['simulator']
970905
Abort("Option unalignedaccesses only supported for the ARM architecture.")
971906
for (name, option) in SIMPLE_OPTIONS.iteritems():
972-
if (not name in env):
907+
if (not option.get('default')) and (name not in ARGUMENTS):
973908
message = ("A value for option %s must be specified (%s)." %
974909
(name, ", ".join(option['values'])))
975910
Abort(message)
@@ -1097,7 +1032,7 @@ def ParseEnvOverrides(arg, imports):
10971032
return overrides
10981033

10991034

1100-
def BuildSpecific(env, mode, env_overrides, tools):
1035+
def BuildSpecific(env, mode, env_overrides):
11011036
options = {'mode': mode}
11021037
for option in SIMPLE_OPTIONS:
11031038
options[option] = env[option]
@@ -1150,7 +1085,7 @@ def BuildSpecific(env, mode, env_overrides, tools):
11501085
(object_files, shell_files, mksnapshot) = env.SConscript(
11511086
join('src', 'SConscript'),
11521087
build_dir=join('obj', target_id),
1153-
exports='context tools',
1088+
exports='context',
11541089
duplicate=False
11551090
)
11561091

@@ -1170,21 +1105,21 @@ def BuildSpecific(env, mode, env_overrides, tools):
11701105
library = env.SharedLibrary(library_name, object_files, PDB=pdb_name)
11711106
context.library_targets.append(library)
11721107

1173-
d8_env = Environment(tools=tools)
1108+
d8_env = Environment()
11741109
d8_env.Replace(**context.flags['d8'])
11751110
context.ApplyEnvOverrides(d8_env)
11761111
shell = d8_env.Program('d8' + suffix, object_files + shell_files)
11771112
context.d8_targets.append(shell)
11781113

11791114
for sample in context.samples:
1180-
sample_env = Environment(tools=tools)
1115+
sample_env = Environment()
11811116
sample_env.Replace(**context.flags['sample'])
11821117
sample_env.Prepend(LIBS=[library_name])
11831118
context.ApplyEnvOverrides(sample_env)
11841119
sample_object = sample_env.SConscript(
11851120
join('samples', 'SConscript'),
11861121
build_dir=join('obj', 'sample', sample, target_id),
1187-
exports='sample context tools',
1122+
exports='sample context',
11881123
duplicate=False
11891124
)
11901125
sample_name = sample + suffix
@@ -1197,7 +1132,7 @@ def BuildSpecific(env, mode, env_overrides, tools):
11971132
cctest_program = cctest_env.SConscript(
11981133
join('test', 'cctest', 'SConscript'),
11991134
build_dir=join('obj', 'test', target_id),
1200-
exports='context object_files tools',
1135+
exports='context object_files',
12011136
duplicate=False
12021137
)
12031138
context.cctest_targets.append(cctest_program)
@@ -1207,9 +1142,7 @@ def BuildSpecific(env, mode, env_overrides, tools):
12071142

12081143
def Build():
12091144
opts = GetOptions()
1210-
tools = GetTools(opts)
1211-
env = Environment(options=opts, tools=tools)
1212-
1145+
env = Environment(options=opts)
12131146
Help(opts.GenerateHelpText(env))
12141147
VerifyOptions(env)
12151148
env_overrides = ParseEnvOverrides(env['env'], env['importenv'])
@@ -1223,7 +1156,7 @@ def Build():
12231156
d8s = []
12241157
modes = SplitList(env['mode'])
12251158
for mode in modes:
1226-
context = BuildSpecific(env.Copy(), mode, env_overrides, tools)
1159+
context = BuildSpecific(env.Copy(), mode, env_overrides)
12271160
libraries += context.library_targets
12281161
mksnapshots += context.mksnapshot_targets
12291162
cctests += context.cctest_targets

deps/v8/src/SConscript

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ root_dir = dirname(File('SConstruct').rfile().abspath)
3131
sys.path.append(join(root_dir, 'tools'))
3232
import js2c
3333
Import('context')
34-
Import('tools')
3534

3635

3736
SOURCES = {
@@ -306,7 +305,7 @@ def Abort(message):
306305

307306

308307
def ConfigureObjectFiles():
309-
env = Environment(tools=tools)
308+
env = Environment()
310309
env.Replace(**context.flags['v8'])
311310
context.ApplyEnvOverrides(env)
312311
env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)

deps/v8/src/api.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -2286,7 +2286,8 @@ bool v8::Object::Set(v8::Handle<Value> key, v8::Handle<Value> value,
22862286
self,
22872287
key_obj,
22882288
value_obj,
2289-
static_cast<PropertyAttributes>(attribs));
2289+
static_cast<PropertyAttributes>(attribs),
2290+
i::kNonStrictMode);
22902291
has_pending_exception = obj.is_null();
22912292
EXCEPTION_BAILOUT_CHECK(false);
22922293
return true;
@@ -2711,7 +2712,8 @@ bool v8::Object::SetHiddenValue(v8::Handle<v8::String> key,
27112712
hidden_props,
27122713
key_obj,
27132714
value_obj,
2714-
static_cast<PropertyAttributes>(None));
2715+
static_cast<PropertyAttributes>(None),
2716+
i::kNonStrictMode);
27152717
has_pending_exception = obj.is_null();
27162718
EXCEPTION_BAILOUT_CHECK(false);
27172719
return true;

deps/v8/src/arm/assembler-arm.h

+1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ const SwVfpRegister s29 = { 29 };
284284
const SwVfpRegister s30 = { 30 };
285285
const SwVfpRegister s31 = { 31 };
286286

287+
const DwVfpRegister no_dreg = { -1 };
287288
const DwVfpRegister d0 = { 0 };
288289
const DwVfpRegister d1 = { 1 };
289290
const DwVfpRegister d2 = { 2 };

0 commit comments

Comments
 (0)