Skip to content

Commit 1f31a7d

Browse files
committed
Upgrade v8 to 1.3.14
1 parent 1a2762b commit 1f31a7d

123 files changed

Lines changed: 3495 additions & 4380 deletions

File tree

Some content is hidden

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

LICENSE

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ are:
99
This code is copyrighted by Marc Alexander Lehmann. Both are dually
1010
licensed under MIT and GPL2.
1111

12-
- JSMin JavaScript minifier, located at tools/jsmin.py. This code is
13-
copyrighted by Douglas Crockford and Baruch Even and has an MIT license.
14-
1512
- parseUri, a URI parser, is located in lib/http.js. This is just a small
1613
snippit. It is copyrighted 2007 by Steven Levithan and released under an
1714
MIT license.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ clean:
4949

5050
distclean:
5151
@-rm -rf build/
52-
@-rm -f *.pyc
52+
@-find tools | egrep --colour=never ".pyc$" | xargs rm
5353

5454
check:
5555
@tools/waf-light check

deps/v8/ChangeLog

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
2009-10-07: Version 1.3.14
2+
3+
Added GetRealNamedProperty to the API to lookup real properties
4+
located on the object or in the prototype chain skipping any
5+
interceptors.
6+
7+
Fix the stack limits setting API to work correctly with threads. The
8+
stack limit now needs to be set to each thread thich is used with V8.
9+
10+
Remove the high-priority flag from IdleNotification()
11+
12+
Ensure V8 is initialized before locking and unlocking threads.
13+
14+
Implemented a new JavaScript minifier for compressing the source of
15+
the built-in JavaScript. This Remove non-Open Source code from Douglas
16+
Crockford from the project.
17+
18+
Added a missing optimization in StringCharAt.
19+
20+
Fixed some flaky socket tests.
21+
22+
Change by Alexander Botero-Lowry to fix profiler sampling on FreeBSD
23+
in 64-bit mode.
24+
25+
Fixed memory leaks in the thread management code.
26+
27+
Fixed the result of assignment to a pixel array. The assigned value
28+
is now the result.
29+
30+
Error reporting for invalid left-hand sides in for-in statements, pre-
31+
and postfix count expressions, and assignments now matches the JSC
32+
behavior in Safari 4.
33+
34+
Follow the spec in disallowing function declarations without a name.
35+
36+
Always allocate code objects within a 2 GB range. On x64 architecture
37+
this is used to use near calls (32-bit displacement) in Code objects.
38+
39+
Optimized array construction ported to x64 and ARM architectures.
40+
41+
[ES5] Changed Object.keys to return strings for element indices.
42+
43+
144
2009-09-23: Version 1.3.13
245

346
Fixed uninitialized memory problem.

deps/v8/LICENSE

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ are:
2121
This code is copyrighted by Sun Microsystems Inc. and released
2222
under a 3-clause BSD license.
2323

24-
- JSMin JavaScript minifier, located at tools/jsmin.py. This code is
25-
copyrighted by Douglas Crockford and Baruch Even and released under
26-
an MIT license.
27-
28-
- Valgrind client API header, located at third_party/valgrind/valgrind.h
29-
This is release under the BSD license.
30-
3124
- Valgrind client API header, located at third_party/valgrind/valgrind.h
3225
This is release under the BSD license.
3326

deps/v8/SConstruct

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ V8_EXTRA_FLAGS = {
238238
'gcc': {
239239
'all': {
240240
'WARNINGFLAGS': ['-Wall',
241+
'-Werror',
241242
'-W',
242243
'-Wno-unused-parameter',
243244
'-Wnon-virtual-dtor']

deps/v8/include/v8.h

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2007-2008 the V8 project authors. All rights reserved.
1+
// Copyright 2007-2009 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:
@@ -130,6 +130,7 @@ class Data;
130130
namespace internal {
131131

132132
class Object;
133+
class Arguments;
133134

134135
}
135136

@@ -1205,7 +1206,14 @@ class V8EXPORT Object : public Value {
12051206
* If result.IsEmpty() no real property was located in the prototype chain.
12061207
* This means interceptors in the prototype chain are not called.
12071208
*/
1208-
Handle<Value> GetRealNamedPropertyInPrototypeChain(Handle<String> key);
1209+
Local<Value> GetRealNamedPropertyInPrototypeChain(Handle<String> key);
1210+
1211+
/**
1212+
* If result.IsEmpty() no real property was located on the object or
1213+
* in the prototype chain.
1214+
* This means interceptors in the prototype chain are not called.
1215+
*/
1216+
Local<Value> GetRealNamedProperty(Handle<String> key);
12091217

12101218
/** Tests for a named lookup interceptor.*/
12111219
bool HasNamedLookupInterceptor();
@@ -1401,17 +1409,13 @@ class V8EXPORT Arguments {
14011409
*/
14021410
class V8EXPORT AccessorInfo {
14031411
public:
1404-
inline AccessorInfo(Local<Object> self,
1405-
Local<Value> data,
1406-
Local<Object> holder)
1407-
: self_(self), data_(data), holder_(holder) { }
1412+
inline AccessorInfo(internal::Object** args)
1413+
: args_(args) { }
14081414
inline Local<Value> Data() const;
14091415
inline Local<Object> This() const;
14101416
inline Local<Object> Holder() const;
14111417
private:
1412-
Local<Object> self_;
1413-
Local<Value> data_;
1414-
Local<Object> holder_;
1418+
internal::Object** args_;
14151419
};
14161420

14171421

@@ -1567,7 +1571,10 @@ typedef bool (*IndexedSecurityCallback)(Local<Object> host,
15671571
/**
15681572
* A FunctionTemplate is used to create functions at runtime. There
15691573
* can only be one function created from a FunctionTemplate in a
1570-
* context.
1574+
* context. The lifetime of the created function is equal to the
1575+
* lifetime of the context. So in case the embedder needs to create
1576+
* temporary functions that can be collected using Scripts is
1577+
* preferred.
15711578
*
15721579
* A FunctionTemplate can have properties, these properties are added to the
15731580
* function object when it is created.
@@ -1974,8 +1981,13 @@ Handle<Boolean> V8EXPORT False();
19741981

19751982

19761983
/**
1977-
* A set of constraints that specifies the limits of the runtime's
1978-
* memory use.
1984+
* A set of constraints that specifies the limits of the runtime's memory use.
1985+
* You must set the heap size before initializing the VM - the size cannot be
1986+
* adjusted after the VM is initialized.
1987+
*
1988+
* If you are using threads then you should hold the V8::Locker lock while
1989+
* setting the stack limit and you must set a non-default stack limit separately
1990+
* for each thread.
19791991
*/
19801992
class V8EXPORT ResourceConstraints {
19811993
public:
@@ -1985,6 +1997,7 @@ class V8EXPORT ResourceConstraints {
19851997
int max_old_space_size() const { return max_old_space_size_; }
19861998
void set_max_old_space_size(int value) { max_old_space_size_ = value; }
19871999
uint32_t* stack_limit() const { return stack_limit_; }
2000+
// Sets an address beyond which the VM's stack may not grow.
19882001
void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
19892002
private:
19902003
int max_young_space_size_;
@@ -2192,7 +2205,8 @@ class V8EXPORT V8 {
21922205

21932206
/**
21942207
* Initializes from snapshot if possible. Otherwise, attempts to
2195-
* initialize from scratch.
2208+
* initialize from scratch. This function is called implicitly if
2209+
* you use the API without calling it first.
21962210
*/
21972211
static bool Initialize();
21982212

@@ -2335,12 +2349,11 @@ class V8EXPORT V8 {
23352349
* Optional notification that the embedder is idle.
23362350
* V8 uses the notification to reduce memory footprint.
23372351
* This call can be used repeatedly if the embedder remains idle.
2338-
* \param is_high_priority tells whether the embedder is high priority.
23392352
* Returns true if the embedder should stop calling IdleNotification
23402353
* until real work has been done. This indicates that V8 has done
23412354
* as much cleanup as it will be able to do.
23422355
*/
2343-
static bool IdleNotification(bool is_high_priority);
2356+
static bool IdleNotification();
23442357

23452358
/**
23462359
* Optional notification that the system is running low on memory.
@@ -2742,15 +2755,15 @@ class Internals {
27422755
return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) ==
27432756
kHeapObjectTag);
27442757
}
2745-
2758+
27462759
static inline bool HasSmiTag(internal::Object* value) {
27472760
return ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag);
27482761
}
2749-
2762+
27502763
static inline int SmiValue(internal::Object* value) {
27512764
return static_cast<int>(reinterpret_cast<intptr_t>(value)) >> kSmiTagSize;
27522765
}
2753-
2766+
27542767
static inline bool IsExternalTwoByteString(int instance_type) {
27552768
int representation = (instance_type & kFullStringRepresentationMask);
27562769
return representation == kExternalTwoByteRepresentationTag;
@@ -2863,21 +2876,6 @@ int Arguments::Length() const {
28632876
}
28642877

28652878

2866-
Local<Value> AccessorInfo::Data() const {
2867-
return data_;
2868-
}
2869-
2870-
2871-
Local<Object> AccessorInfo::This() const {
2872-
return self_;
2873-
}
2874-
2875-
2876-
Local<Object> AccessorInfo::Holder() const {
2877-
return holder_;
2878-
}
2879-
2880-
28812879
template <class T>
28822880
Local<T> HandleScope::Close(Handle<T> value) {
28832881
internal::Object** before = reinterpret_cast<internal::Object**>(*value);
@@ -3075,6 +3073,21 @@ External* External::Cast(v8::Value* value) {
30753073
}
30763074

30773075

3076+
Local<Value> AccessorInfo::Data() const {
3077+
return Local<Value>(reinterpret_cast<Value*>(&args_[-3]));
3078+
}
3079+
3080+
3081+
Local<Object> AccessorInfo::This() const {
3082+
return Local<Object>(reinterpret_cast<Object*>(&args_[0]));
3083+
}
3084+
3085+
3086+
Local<Object> AccessorInfo::Holder() const {
3087+
return Local<Object>(reinterpret_cast<Object*>(&args_[-1]));
3088+
}
3089+
3090+
30783091
/**
30793092
* \example shell.cc
30803093
* A simple shell that takes a list of expressions on the

deps/v8/src/SConscript

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,49 +36,48 @@ Import('context')
3636
SOURCES = {
3737
'all': [
3838
'accessors.cc', 'allocation.cc', 'api.cc', 'assembler.cc', 'ast.cc',
39-
'bootstrapper.cc', 'builtins.cc', 'checks.cc', 'cfg.cc',
40-
'code-stubs.cc', 'codegen.cc', 'compilation-cache.cc', 'compiler.cc',
41-
'contexts.cc', 'conversions.cc', 'counters.cc', 'dateparser.cc',
42-
'debug.cc', 'debug-agent.cc', 'disassembler.cc', 'execution.cc',
43-
'factory.cc', 'flags.cc', 'frame-element.cc', 'frames.cc',
44-
'func-name-inferrer.cc', 'global-handles.cc', 'handles.cc',
45-
'hashmap.cc', 'heap.cc', 'heap-profiler.cc', 'ic.cc',
46-
'interpreter-irregexp.cc', 'jsregexp.cc', 'jump-target.cc',
47-
'log.cc', 'log-utils.cc', 'mark-compact.cc', 'messages.cc',
48-
'objects.cc', 'oprofile-agent.cc', 'parser.cc', 'property.cc',
49-
'regexp-macro-assembler.cc', 'regexp-macro-assembler-irregexp.cc',
50-
'regexp-stack.cc', 'register-allocator.cc', 'rewriter.cc',
51-
'runtime.cc', 'scanner.cc', 'scopeinfo.cc', 'scopes.cc',
52-
'serialize.cc', 'snapshot-common.cc', 'spaces.cc',
53-
'string-stream.cc', 'stub-cache.cc', 'token.cc', 'top.cc',
39+
'bootstrapper.cc', 'builtins.cc', 'checks.cc', 'code-stubs.cc',
40+
'codegen.cc', 'compilation-cache.cc', 'compiler.cc', 'contexts.cc',
41+
'conversions.cc', 'counters.cc', 'dateparser.cc', 'debug.cc',
42+
'debug-agent.cc', 'disassembler.cc', 'execution.cc', 'factory.cc',
43+
'flags.cc', 'frame-element.cc', 'frames.cc', 'func-name-inferrer.cc',
44+
'global-handles.cc', 'handles.cc', 'hashmap.cc', 'heap.cc',
45+
'heap-profiler.cc', 'ic.cc', 'interpreter-irregexp.cc', 'jsregexp.cc',
46+
'jump-target.cc', 'log.cc', 'log-utils.cc', 'mark-compact.cc',
47+
'messages.cc', 'objects.cc', 'oprofile-agent.cc', 'parser.cc',
48+
'property.cc', 'regexp-macro-assembler.cc',
49+
'regexp-macro-assembler-irregexp.cc', 'regexp-stack.cc',
50+
'register-allocator.cc', 'rewriter.cc', 'runtime.cc', 'scanner.cc',
51+
'scopeinfo.cc', 'scopes.cc', 'serialize.cc', 'snapshot-common.cc',
52+
'spaces.cc', 'string-stream.cc', 'stub-cache.cc', 'token.cc', 'top.cc',
5453
'unicode.cc', 'usage-analyzer.cc', 'utils.cc', 'v8-counters.cc',
5554
'v8.cc', 'v8threads.cc', 'variables.cc', 'version.cc',
5655
'virtual-frame.cc', 'zone.cc'
5756
],
5857
'arch:arm': [
59-
'arm/assembler-arm.cc', 'arm/builtins-arm.cc', 'arm/cfg-arm.cc',
60-
'arm/codegen-arm.cc', 'arm/constants-arm.cc', 'arm/cpu-arm.cc',
61-
'arm/disasm-arm.cc', 'arm/debug-arm.cc', 'arm/frames-arm.cc',
62-
'arm/ic-arm.cc', 'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
63-
'arm/regexp-macro-assembler-arm.cc',
64-
'arm/register-allocator-arm.cc', 'arm/stub-cache-arm.cc',
65-
'arm/virtual-frame-arm.cc'
58+
'arm/assembler-arm.cc', 'arm/builtins-arm.cc', 'arm/codegen-arm.cc',
59+
'arm/constants-arm.cc', 'arm/cpu-arm.cc', 'arm/disasm-arm.cc',
60+
'arm/debug-arm.cc', 'arm/frames-arm.cc', 'arm/ic-arm.cc',
61+
'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
62+
'arm/regexp-macro-assembler-arm.cc', 'arm/register-allocator-arm.cc',
63+
'arm/stub-cache-arm.cc', 'arm/virtual-frame-arm.cc'
6664
],
6765
'arch:ia32': [
68-
'ia32/assembler-ia32.cc', 'ia32/builtins-ia32.cc', 'ia32/cfg-ia32.cc',
66+
'ia32/assembler-ia32.cc', 'ia32/builtins-ia32.cc',
6967
'ia32/codegen-ia32.cc', 'ia32/cpu-ia32.cc', 'ia32/disasm-ia32.cc',
7068
'ia32/debug-ia32.cc', 'ia32/frames-ia32.cc', 'ia32/ic-ia32.cc',
7169
'ia32/jump-target-ia32.cc', 'ia32/macro-assembler-ia32.cc',
72-
'ia32/regexp-macro-assembler-ia32.cc', 'ia32/register-allocator-ia32.cc',
73-
'ia32/stub-cache-ia32.cc', 'ia32/virtual-frame-ia32.cc'
70+
'ia32/regexp-macro-assembler-ia32.cc',
71+
'ia32/register-allocator-ia32.cc', 'ia32/stub-cache-ia32.cc',
72+
'ia32/virtual-frame-ia32.cc'
7473
],
7574
'arch:x64': [
76-
'x64/assembler-x64.cc', 'x64/builtins-x64.cc', 'x64/cfg-x64.cc',
77-
'x64/codegen-x64.cc', 'x64/cpu-x64.cc', 'x64/disasm-x64.cc',
78-
'x64/debug-x64.cc', 'x64/frames-x64.cc', 'x64/ic-x64.cc',
79-
'x64/jump-target-x64.cc', 'x64/macro-assembler-x64.cc',
80-
'x64/regexp-macro-assembler-x64.cc', 'x64/register-allocator-x64.cc',
81-
'x64/stub-cache-x64.cc', 'x64/virtual-frame-x64.cc'
75+
'x64/assembler-x64.cc', 'x64/builtins-x64.cc', 'x64/codegen-x64.cc',
76+
'x64/cpu-x64.cc', 'x64/disasm-x64.cc', 'x64/debug-x64.cc',
77+
'x64/frames-x64.cc', 'x64/ic-x64.cc', 'x64/jump-target-x64.cc',
78+
'x64/macro-assembler-x64.cc', 'x64/regexp-macro-assembler-x64.cc',
79+
'x64/register-allocator-x64.cc', 'x64/stub-cache-x64.cc',
80+
'x64/virtual-frame-x64.cc'
8281
],
8382
'simulator:arm': ['arm/simulator-arm.cc'],
8483
'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'],

0 commit comments

Comments
 (0)