Skip to content

Commit 05471f5

Browse files
committed
Update v8 to 3.8.9
1 parent bd21038 commit 05471f5

Some content is hidden

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

91 files changed

+2226
-1185
lines changed

deps/v8/ChangeLog

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2012-01-26: Version 3.8.9
2+
3+
Flush number string cache on GC (issue 1605).
4+
5+
Provide access to function inferred name with
6+
v8::Function::GetInferredName in V8 public API.
7+
8+
Fix building with Clang (issue 1912).
9+
10+
Reduce the space used by the stack for the profiling thread.
11+
12+
Fix misleading documentation of v8::Locker (issue 542).
13+
14+
Introduce readbinary function in d8 to read binary files.
15+
16+
Performance and stability improvements on all platforms.
17+
18+
119
2012-01-23: Version 3.8.8
220

321
Limited number of loop iterations in Heap::ReserveSpace

deps/v8/build/common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
'-O3',
296296
],
297297
'conditions': [
298-
[ 'gcc_version==44', {
298+
[ 'gcc_version==44 and clang==0', {
299299
'cflags': [
300300
# Avoid crashes with gcc 4.4 in the v8 test suite.
301301
'-fno-tree-vrp',

deps/v8/include/v8.h

+12-2
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,14 @@ class Function : public Object {
17311731
V8EXPORT void SetName(Handle<String> name);
17321732
V8EXPORT Handle<Value> GetName() const;
17331733

1734+
/**
1735+
* Name inferred from variable or property assignment of this function.
1736+
* Used to facilitate debugging and profiling of JavaScript code written
1737+
* in an OO style, where many functions are anonymous but are assigned
1738+
* to object properties.
1739+
*/
1740+
V8EXPORT Handle<Value> GetInferredName() const;
1741+
17341742
/**
17351743
* Returns zero based line number of function body and
17361744
* kLineOffsetNotFound if no information available.
@@ -2717,7 +2725,7 @@ class RetainedObjectInfo;
27172725
* default isolate is implicitly created and entered. The embedder
27182726
* can create additional isolates and use them in parallel in multiple
27192727
* threads. An isolate can be entered by at most one thread at any
2720-
* given time. The Locker/Unlocker API can be used to synchronize.
2728+
* given time. The Locker/Unlocker API must be used to synchronize.
27212729
*/
27222730
class V8EXPORT Isolate {
27232731
public:
@@ -3559,7 +3567,9 @@ class V8EXPORT Context {
35593567
* accessing handles or holding onto object pointers obtained
35603568
* from V8 handles while in the particular V8 isolate. It is up
35613569
* to the user of V8 to ensure (perhaps with locking) that this
3562-
* constraint is not violated.
3570+
* constraint is not violated. In addition to any other synchronization
3571+
* mechanism that may be used, the v8::Locker and v8::Unlocker classes
3572+
* must be used to signal thead switches to V8.
35633573
*
35643574
* v8::Locker is a scoped lock object. While it's
35653575
* active (i.e. between its construction and destruction) the current thread is

deps/v8/include/v8stdint.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2010 the V8 project authors. All rights reserved.
1+
// Copyright 2012 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
#ifndef V8STDINT_H_
3131
#define V8STDINT_H_
3232

33+
#include <stddef.h>
3334
#include <stdio.h>
3435

3536
#if defined(_WIN32) && !defined(__MINGW32__)

deps/v8/src/accessors.cc

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011 the V8 project authors. All rights reserved.
1+
// Copyright 2012 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:
@@ -26,15 +26,16 @@
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828
#include "v8.h"
29-
3029
#include "accessors.h"
31-
#include "ast.h"
30+
31+
#include "contexts.h"
3232
#include "deoptimizer.h"
3333
#include "execution.h"
3434
#include "factory.h"
35+
#include "frames-inl.h"
36+
#include "isolate.h"
3537
#include "list-inl.h"
36-
#include "safepoint-table.h"
37-
#include "scopeinfo.h"
38+
#include "property-details.h"
3839

3940
namespace v8 {
4041
namespace internal {
@@ -574,11 +575,12 @@ static MaybeObject* ConstructArgumentsObjectForInlinedFunction(
574575
Handle<JSFunction> inlined_function,
575576
int inlined_frame_index) {
576577
Factory* factory = Isolate::Current()->factory();
577-
int args_count = inlined_function->shared()->formal_parameter_count();
578-
ScopedVector<SlotRef> args_slots(args_count);
579-
SlotRef::ComputeSlotMappingForArguments(frame,
580-
inlined_frame_index,
581-
&args_slots);
578+
Vector<SlotRef> args_slots =
579+
SlotRef::ComputeSlotMappingForArguments(
580+
frame,
581+
inlined_frame_index,
582+
inlined_function->shared()->formal_parameter_count());
583+
int args_count = args_slots.length();
582584
Handle<JSObject> arguments =
583585
factory->NewArgumentsObject(inlined_function, args_count);
584586
Handle<FixedArray> array = factory->NewFixedArray(args_count);
@@ -587,6 +589,7 @@ static MaybeObject* ConstructArgumentsObjectForInlinedFunction(
587589
array->set(i, *value);
588590
}
589591
arguments->set_elements(*array);
592+
args_slots.Dispose();
590593

591594
// Return the freshly allocated arguments object.
592595
return *arguments;

deps/v8/src/accessors.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2006-2008 the V8 project authors. All rights reserved.
1+
// Copyright 2012 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:
@@ -29,6 +29,7 @@
2929
#define V8_ACCESSORS_H_
3030

3131
#include "allocation.h"
32+
#include "v8globals.h"
3233

3334
namespace v8 {
3435
namespace internal {

deps/v8/src/allocation.cc

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2008 the V8 project authors. All rights reserved.
1+
// Copyright 2012 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:
@@ -25,10 +25,11 @@
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
#include "../include/v8stdint.h"
29-
#include "globals.h"
30-
#include "checks.h"
3128
#include "allocation.h"
29+
30+
#include <stdlib.h> // For free, malloc.
31+
#include <string.h> // For memcpy.
32+
#include "checks.h"
3233
#include "utils.h"
3334

3435
namespace v8 {

deps/v8/src/allocation.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011 the V8 project authors. All rights reserved.
1+
// Copyright 2012 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:
@@ -28,7 +28,6 @@
2828
#ifndef V8_ALLOCATION_H_
2929
#define V8_ALLOCATION_H_
3030

31-
#include "checks.h"
3231
#include "globals.h"
3332

3433
namespace v8 {

deps/v8/src/api.cc

+16-8
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,36 @@
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
#include "v8.h"
29-
3028
#include "api.h"
3129

32-
#include "arguments.h"
30+
#include <math.h> // For isnan.
31+
#include <string.h> // For memcpy, strlen.
32+
#include "../include/v8-debug.h"
33+
#include "../include/v8-profiler.h"
34+
#include "../include/v8-testing.h"
3335
#include "bootstrapper.h"
3436
#include "compiler.h"
37+
#include "conversions-inl.h"
38+
#include "counters.h"
3539
#include "debug.h"
3640
#include "deoptimizer.h"
3741
#include "execution.h"
38-
#include "flags.h"
3942
#include "global-handles.h"
4043
#include "heap-profiler.h"
4144
#include "messages.h"
42-
#include "natives.h"
4345
#include "parser.h"
4446
#include "platform.h"
4547
#include "profile-generator-inl.h"
48+
#include "property-details.h"
49+
#include "property.h"
4650
#include "runtime-profiler.h"
4751
#include "scanner-character-streams.h"
48-
#include "serialize.h"
4952
#include "snapshot.h"
53+
#include "unicode-inl.h"
5054
#include "v8threads.h"
5155
#include "version.h"
5256
#include "vm-state-inl.h"
5357

54-
#include "../include/v8-profiler.h"
55-
#include "../include/v8-testing.h"
5658

5759
#define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr))
5860

@@ -3622,6 +3624,12 @@ Handle<Value> Function::GetName() const {
36223624
}
36233625

36243626

3627+
Handle<Value> Function::GetInferredName() const {
3628+
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
3629+
return Utils::ToLocal(i::Handle<i::Object>(func->shared()->inferred_name()));
3630+
}
3631+
3632+
36253633
ScriptOrigin Function::GetScriptOrigin() const {
36263634
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
36273635
if (func->shared()->script()->IsScript()) {

deps/v8/src/api.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2011 the V8 project authors. All rights reserved.
1+
// Copyright 2012 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:
@@ -28,10 +28,14 @@
2828
#ifndef V8_API_H_
2929
#define V8_API_H_
3030

31-
#include "apiutils.h"
32-
#include "factory.h"
31+
#include "v8.h"
3332

3433
#include "../include/v8-testing.h"
34+
#include "apiutils.h"
35+
#include "contexts.h"
36+
#include "factory.h"
37+
#include "isolate.h"
38+
#include "list-inl.h"
3539

3640
namespace v8 {
3741

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

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define V8_ARM_ASSEMBLER_ARM_INL_H_
3939

4040
#include "arm/assembler-arm.h"
41+
4142
#include "cpu.h"
4243
#include "debug.h"
4344

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

+7-5
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,13 @@ const DwVfpRegister d13 = { 13 };
300300
const DwVfpRegister d14 = { 14 };
301301
const DwVfpRegister d15 = { 15 };
302302

303-
// Aliases for double registers.
304-
static const DwVfpRegister& kFirstCalleeSavedDoubleReg = d8;
305-
static const DwVfpRegister& kLastCalleeSavedDoubleReg = d15;
306-
static const DwVfpRegister& kDoubleRegZero = d14;
307-
static const DwVfpRegister& kScratchDoubleReg = d15;
303+
// Aliases for double registers. Defined using #define instead of
304+
// "static const DwVfpRegister&" because Clang complains otherwise when a
305+
// compilation unit that includes this header doesn't use the variables.
306+
#define kFirstCalleeSavedDoubleReg d8
307+
#define kLastCalleeSavedDoubleReg d15
308+
#define kDoubleRegZero d14
309+
#define kScratchDoubleReg d15
308310

309311

310312
// Coprocessor register

deps/v8/src/arm/builtins-arm.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
17601760
__ bind(&invoke);
17611761
__ Call(r3);
17621762

1763+
masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset());
17631764
// Exit frame and return.
17641765
LeaveArgumentsAdaptorFrame(masm);
17651766
__ Jump(lr);

0 commit comments

Comments
 (0)