Skip to content

Commit 2ebd692

Browse files
committed
Upgrade V8 to 1.3.1
1 parent 5373c68 commit 2ebd692

File tree

124 files changed

+7951
-2392
lines changed

Some content is hidden

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

124 files changed

+7951
-2392
lines changed

deps/v8/ChangeLog

+47
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
2009-07-30: Version 1.3.1
2+
3+
Speed improvements to accessors and interceptors.
4+
5+
Added support for capturing stack information on custom errors.
6+
7+
Added support for morphing an object into a pixel array where its
8+
indexed properties are stored in an external byte array. Values written
9+
are always clamped to the 0..255 interval.
10+
11+
Profiler on x64 now handles C/C++ functions from shared libraries.
12+
13+
Changed the debugger to avoid stepping into function.call/apply if the
14+
function is a built-in.
15+
16+
Initial implementation of constructor heap profile for JS objects.
17+
18+
More fine grained control of profiling aspects through the API.
19+
20+
Optimized the called as constructor check for API calls.
21+
22+
23+
2009-07-27: Version 1.3.0
24+
25+
Allowed RegExp objects to be called as functions (issue 132).
26+
27+
Fixed issue where global property cells would escape after
28+
detaching the global object; see http://crbug.com/16276.
29+
30+
Added support for stepping into setters and getters in the
31+
debugger.
32+
33+
Changed the debugger to avoid stopping in its own JavaScript code
34+
and in the code of built-in functions.
35+
36+
Fixed issue 345 by avoiding duplicate escaping labels.
37+
38+
Fixed ARM code generator crash in short-circuited boolean
39+
expressions and added regression tests.
40+
41+
Added an external allocation limit to avoid issues where small V8
42+
objects would hold on to large amounts of external memory without
43+
causing garbage collections.
44+
45+
Finished more of the inline caching stubs for x64 targets.
46+
47+
148
2009-07-13: Version 1.2.14
249

350
Added separate paged heap space for global property cells and

deps/v8/SConstruct

+20-55
Original file line numberDiff line numberDiff line change
@@ -149,31 +149,22 @@ LIBRARY_FLAGS = {
149149
'-Wstrict-aliasing=2'],
150150
'CPPPATH': ANDROID_INCLUDES,
151151
},
152-
'wordsize:32': {
153-
'arch:x64': {
154-
'CCFLAGS': ['-m64'],
155-
'LINKFLAGS': ['-m64']
156-
}
157-
},
158-
'wordsize:64': {
159-
'arch:ia32': {
160-
'CCFLAGS': ['-m32'],
161-
'LINKFLAGS': ['-m32']
162-
},
163-
'arch:arm': {
164-
'CCFLAGS': ['-m32'],
165-
'LINKFLAGS': ['-m32']
166-
}
167-
},
168152
'arch:ia32': {
169-
'CPPDEFINES': ['V8_TARGET_ARCH_IA32']
153+
'CPPDEFINES': ['V8_TARGET_ARCH_IA32'],
154+
'CCFLAGS': ['-m32'],
155+
'LINKFLAGS': ['-m32']
170156
},
171157
'arch:arm': {
172158
'CPPDEFINES': ['V8_TARGET_ARCH_ARM']
173159
},
160+
'simulator:arm': {
161+
'CCFLAGS': ['-m32'],
162+
'LINKFLAGS': ['-m32']
163+
},
174164
'arch:x64': {
175-
'CCFLAGS': ['-fno-strict-aliasing'],
176-
'CPPDEFINES': ['V8_TARGET_ARCH_X64']
165+
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
166+
'CCFLAGS': ['-fno-strict-aliasing', '-m64'],
167+
'LINKFLAGS': ['-m64'],
177168
},
178169
'prof:oprofile': {
179170
'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
@@ -341,22 +332,6 @@ CCTEST_EXTRA_FLAGS = {
341332
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
342333
}
343334
},
344-
'wordsize:32': {
345-
'arch:x64': {
346-
'CCFLAGS': ['-m64'],
347-
'LINKFLAGS': ['-m64']
348-
}
349-
},
350-
'wordsize:64': {
351-
'arch:ia32': {
352-
'CCFLAGS': ['-m32'],
353-
'LINKFLAGS': ['-m32']
354-
},
355-
'arch:arm': {
356-
'CCFLAGS': ['-m32'],
357-
'LINKFLAGS': ['-m32']
358-
}
359-
}
360335
},
361336
'msvc': {
362337
'all': {
@@ -408,21 +383,17 @@ SAMPLE_FLAGS = {
408383
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
409384
}
410385
},
411-
'wordsize:32': {
412-
'arch:x64': {
413-
'CCFLAGS': ['-m64'],
414-
'LINKFLAGS': ['-m64']
415-
}
386+
'arch:ia32': {
387+
'CCFLAGS': ['-m32'],
388+
'LINKFLAGS': ['-m32']
416389
},
417-
'wordsize:64': {
418-
'arch:ia32': {
419-
'CCFLAGS': ['-m32'],
420-
'LINKFLAGS': ['-m32']
421-
},
422-
'arch:arm': {
423-
'CCFLAGS': ['-m32'],
424-
'LINKFLAGS': ['-m32']
425-
}
390+
'arch:x64': {
391+
'CCFLAGS': ['-m64'],
392+
'LINKFLAGS': ['-m64']
393+
},
394+
'simulator:arm': {
395+
'CCFLAGS': ['-m32'],
396+
'LINKFLAGS': ['-m32']
426397
},
427398
'mode:release': {
428399
'CCFLAGS': ['-O2']
@@ -533,7 +504,6 @@ def GuessToolchain(os):
533504
OS_GUESS = utils.GuessOS()
534505
TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS)
535506
ARCH_GUESS = utils.GuessArchitecture()
536-
WORDSIZE_GUESS = utils.GuessWordsize()
537507

538508

539509
SIMPLE_OPTIONS = {
@@ -587,11 +557,6 @@ SIMPLE_OPTIONS = {
587557
'default': 'on',
588558
'help': 'use Microsoft Visual C++ link-time code generation'
589559
},
590-
'wordsize': {
591-
'values': ['64', '32'],
592-
'default': WORDSIZE_GUESS,
593-
'help': 'the word size'
594-
},
595560
'simulator': {
596561
'values': ['arm', 'none'],
597562
'default': 'none',

deps/v8/benchmarks/run.html

100755100644
+32
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,48 @@
5555
NotifyScore: AddScore });
5656
}
5757

58+
function ShowWarningIfObsolete() {
59+
// If anything goes wrong we will just catch the exception and no
60+
// warning is shown, i.e., no harm is done.
61+
try {
62+
var xmlhttp;
63+
var next_version = parseInt(BenchmarkSuite.version) + 1;
64+
var next_version_url = "../v" + next_version + "/run.html";
65+
if (window.XMLHttpRequest) {
66+
xmlhttp = new window.XMLHttpRequest();
67+
} else if (window.ActiveXObject) {
68+
xmlhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
69+
}
70+
xmlhttp.open('GET', next_version_url, true);
71+
xmlhttp.onreadystatechange = function() {
72+
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
73+
document.getElementById('obsolete').style.display="block";
74+
}
75+
};
76+
xmlhttp.send(null);
77+
} catch(e) {
78+
// Ignore exception if check for next version fails.
79+
// Hence no warning is displayed.
80+
}
81+
}
82+
5883
function Load() {
5984
var version = BenchmarkSuite.version;
6085
document.getElementById("version").innerHTML = version;
86+
ShowWarningIfObsolete();
6187
setTimeout(Run, 200);
6288
}
6389
</script>
6490
</head>
6591
<body onload="Load()">
6692
<div>
6793
<div class="title"><h1>V8 Benchmark Suite - version <span id="version">?</span></h1></div>
94+
<div class="warning" id="obsolete">
95+
Warning! This is not the latest version of the V8 benchmark
96+
suite. Consider running the
97+
<a href="http://v8.googlecode.com/svn/data/benchmarks/current/run.html">
98+
latest version</a>.
99+
</div>
68100
<table>
69101
<tr>
70102
<td class="contents">

deps/v8/benchmarks/style.css

100755100644
+9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ div.run {
5555
border: 1px solid rgb(51, 102, 204);
5656
}
5757

58+
div.warning {
59+
background: #ffffd9;
60+
border: 1px solid #d2d26a;
61+
display: none;
62+
margin: 1em 0 2em;
63+
padding: 8px;
64+
text-align: center;
65+
}
66+
5867
#status {
5968
text-align: center;
6069
margin-top: 50px;

deps/v8/include/v8.h

+66-10
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ template <class T> class V8EXPORT_INLINE Handle {
180180
/**
181181
* Creates an empty handle.
182182
*/
183-
Handle();
183+
inline Handle();
184184

185185
/**
186186
* Creates a new handle for the specified value.
@@ -264,7 +264,7 @@ template <class T> class V8EXPORT_INLINE Handle {
264264
*/
265265
template <class T> class V8EXPORT_INLINE Local : public Handle<T> {
266266
public:
267-
Local();
267+
inline Local();
268268
template <class S> inline Local(Local<S> that)
269269
: Handle<T>(reinterpret_cast<T*>(*that)) {
270270
/**
@@ -284,7 +284,7 @@ template <class T> class V8EXPORT_INLINE Local : public Handle<T> {
284284
* The referee is kept alive by the local handle even when
285285
* the original handle is destroyed/disposed.
286286
*/
287-
static Local<T> New(Handle<T> that);
287+
inline static Local<T> New(Handle<T> that);
288288
};
289289

290290

@@ -312,7 +312,7 @@ template <class T> class V8EXPORT_INLINE Persistent : public Handle<T> {
312312
* Creates an empty persistent handle that doesn't point to any
313313
* storage cell.
314314
*/
315-
Persistent();
315+
inline Persistent();
316316

317317
/**
318318
* Creates a persistent handle for the same storage cell as the
@@ -353,36 +353,36 @@ template <class T> class V8EXPORT_INLINE Persistent : public Handle<T> {
353353
* Creates a new persistent handle for an existing local or
354354
* persistent handle.
355355
*/
356-
static Persistent<T> New(Handle<T> that);
356+
inline static Persistent<T> New(Handle<T> that);
357357

358358
/**
359359
* Releases the storage cell referenced by this persistent handle.
360360
* Does not remove the reference to the cell from any handles.
361361
* This handle's reference, and any any other references to the storage
362362
* cell remain and IsEmpty will still return false.
363363
*/
364-
void Dispose();
364+
inline void Dispose();
365365

366366
/**
367367
* Make the reference to this object weak. When only weak handles
368368
* refer to the object, the garbage collector will perform a
369369
* callback to the given V8::WeakReferenceCallback function, passing
370370
* it the object reference and the given parameters.
371371
*/
372-
void MakeWeak(void* parameters, WeakReferenceCallback callback);
372+
inline void MakeWeak(void* parameters, WeakReferenceCallback callback);
373373

374374
/** Clears the weak reference to this object.*/
375-
void ClearWeak();
375+
inline void ClearWeak();
376376

377377
/**
378378
*Checks if the handle holds the only reference to an object.
379379
*/
380-
bool IsNearDeath() const;
380+
inline bool IsNearDeath() const;
381381

382382
/**
383383
* Returns true if the handle's reference is weak.
384384
*/
385-
bool IsWeak() const;
385+
inline bool IsWeak() const;
386386

387387
private:
388388
friend class ImplementationUtilities;
@@ -1113,6 +1113,13 @@ class V8EXPORT Object : public Value {
11131113
/** Sets the value in an internal field. */
11141114
void SetInternalField(int index, Handle<Value> value);
11151115

1116+
// The two functions below do not perform index bounds checks and
1117+
// they do not check that the VM is still running. Use with caution.
1118+
/** Gets a native pointer from an internal field. */
1119+
void* GetPointerFromInternalField(int index);
1120+
/** Sets a native pointer in an internal field. */
1121+
void SetPointerInInternalField(int index, void* value);
1122+
11161123
// Testers for local properties.
11171124
bool HasRealNamedProperty(Handle<String> key);
11181125
bool HasRealIndexedProperty(uint32_t index);
@@ -1162,6 +1169,15 @@ class V8EXPORT Object : public Value {
11621169
*/
11631170
Local<Object> Clone();
11641171

1172+
/**
1173+
* Set the backing store of the indexed properties to be managed by the
1174+
* embedding layer. Access to the indexed properties will follow the rules
1175+
* spelled out in CanvasPixelArray.
1176+
* Note: The embedding program still owns the data and needs to ensure that
1177+
* the backing store is preserved while V8 has a reference.
1178+
*/
1179+
void SetIndexedPropertiesToPixelData(uint8_t* data, int length);
1180+
11651181
static Local<Object> New();
11661182
static Object* Cast(Value* obj);
11671183
private:
@@ -1950,6 +1966,20 @@ typedef void (*GCCallback)();
19501966
typedef Persistent<Context> (*ContextGenerator)();
19511967

19521968

1969+
/**
1970+
* Profiler modules.
1971+
*
1972+
* In V8, profiler consists of several modules: CPU profiler, and different
1973+
* kinds of heap profiling. Each can be turned on / off independently.
1974+
*/
1975+
enum ProfilerModules {
1976+
PROFILER_MODULE_NONE = 0,
1977+
PROFILER_MODULE_CPU = 1,
1978+
PROFILER_MODULE_HEAP_STATS = 1 << 1,
1979+
PROFILER_MODULE_JS_CONSTRUCTORS = 1 << 2
1980+
};
1981+
1982+
19531983
/**
19541984
* Container class for static utility functions.
19551985
*/
@@ -2103,6 +2133,32 @@ class V8EXPORT V8 {
21032133
*/
21042134
static bool IsProfilerPaused();
21052135

2136+
/**
2137+
* Resumes specified profiler modules.
2138+
* "ResumeProfiler" is equivalent to "ResumeProfilerEx(PROFILER_MODULE_CPU)".
2139+
* See ProfilerModules enum.
2140+
*
2141+
* \param flags Flags specifying profiler modules.
2142+
*/
2143+
static void ResumeProfilerEx(int flags);
2144+
2145+
/**
2146+
* Pauses specified profiler modules.
2147+
* "PauseProfiler" is equivalent to "PauseProfilerEx(PROFILER_MODULE_CPU)".
2148+
* See ProfilerModules enum.
2149+
*
2150+
* \param flags Flags specifying profiler modules.
2151+
*/
2152+
static void PauseProfilerEx(int flags);
2153+
2154+
/**
2155+
* Returns active (resumed) profiler modules.
2156+
* See ProfilerModules enum.
2157+
*
2158+
* \returns active profiler modules.
2159+
*/
2160+
static int GetActiveProfilerModules();
2161+
21062162
/**
21072163
* If logging is performed into a memory buffer (via --logfile=*), allows to
21082164
* retrieve previously written messages. This can be used for retrieving

0 commit comments

Comments
 (0)