Skip to content

Commit 03fa258

Browse files
committed
Revert "Upgrade V8 to 2.5.6"
This reverts commit 564a486. Breaks cygwin
1 parent cea3a95 commit 03fa258

Some content is hidden

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

99 files changed

+2691
-6813
lines changed

deps/v8/AUTHORS

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ARM Ltd.
99
Hewlett-Packard Development Company, LP
1010

1111
Alexander Botero-Lowry <[email protected]>
12-
Alexandre Rames <[email protected]>
1312
Alexandre Vassalotti <[email protected]>
1413
Andreas Anyuru <[email protected]>
1514
Burcu Dogan <[email protected]>

deps/v8/ChangeLog

-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
2010-11-10: Version 2.5.6
2-
3-
Added support for VFP rounding modes to the ARM simulator.
4-
5-
Fixed multiplication overflow bug (issue 927).
6-
7-
Added a limit for the amount of executable memory (issue 925).
8-
9-
10-
2010-11-08: Version 2.5.5
11-
12-
Added more aggressive GC of external objects in near out-of-memory
13-
situations.
14-
15-
Fixed a bug that gave the incorrect result for String.split called
16-
on the empty string (issue 924).
17-
18-
19-
2010-11-03: Version 2.5.4
20-
21-
Improved V8 VFPv3 runtime detection to address issue 914.
22-
23-
241
2010-11-01: Version 2.5.3
252

263
Fixed a bug that prevents constants from overwriting function values

deps/v8/include/v8-debug.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class EXPORT Debug {
142142

143143
virtual ~Message() {}
144144
};
145-
145+
146146

147147
/**
148148
* An event details object passed to the debug event listener.
@@ -300,7 +300,7 @@ class EXPORT Debug {
300300
* get access to information otherwise not available during normal JavaScript
301301
* execution e.g. details on stack frames. Receiver of the function call will
302302
* be the debugger context global object, however this is a subject to change.
303-
* The following example show a JavaScript function which when passed to
303+
* The following example show a JavaScript function which when passed to
304304
* v8::Debug::Call will return the current line of JavaScript execution.
305305
*
306306
* \code

deps/v8/include/v8.h

+36-28
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,23 @@
3838
#ifndef V8_H_
3939
#define V8_H_
4040

41-
#include "v8stdint.h"
41+
#include <stdio.h>
4242

4343
#ifdef _WIN32
44+
// When compiling on MinGW stdint.h is available.
45+
#ifdef __MINGW32__
46+
#include <stdint.h>
47+
#else // __MINGW32__
48+
typedef signed char int8_t;
49+
typedef unsigned char uint8_t;
50+
typedef short int16_t; // NOLINT
51+
typedef unsigned short uint16_t; // NOLINT
52+
typedef int int32_t;
53+
typedef unsigned int uint32_t;
54+
typedef __int64 int64_t;
55+
typedef unsigned __int64 uint64_t;
56+
// intptr_t and friends are defined in crtdefs.h through stdio.h.
57+
#endif // __MINGW32__
4458

4559
// Setup for Windows DLL export/import. When building the V8 DLL the
4660
// BUILDING_V8_SHARED needs to be defined. When building a program which uses
@@ -62,6 +76,8 @@
6276

6377
#else // _WIN32
6478

79+
#include <stdint.h>
80+
6581
// Setup for Linux shared library export. There is no need to distinguish
6682
// between building or using the V8 shared library, but we should not
6783
// export symbols when we are building a static library.
@@ -111,6 +127,7 @@ class Arguments;
111127
class Object;
112128
class Heap;
113129
class Top;
130+
114131
}
115132

116133

@@ -459,10 +476,10 @@ class V8EXPORT HandleScope {
459476
level = 0;
460477
}
461478
};
462-
479+
463480
void Leave();
464481

465-
482+
466483
internal::Object** prev_next_;
467484
internal::Object** prev_limit_;
468485

@@ -1038,7 +1055,7 @@ class String : public Primitive {
10381055
*/
10391056
V8EXPORT bool IsExternalAscii() const;
10401057

1041-
class V8EXPORT ExternalStringResourceBase { // NOLINT
1058+
class V8EXPORT ExternalStringResourceBase {
10421059
public:
10431060
virtual ~ExternalStringResourceBase() {}
10441061

@@ -2348,15 +2365,12 @@ class V8EXPORT ResourceConstraints {
23482365
void set_max_young_space_size(int value) { max_young_space_size_ = value; }
23492366
int max_old_space_size() const { return max_old_space_size_; }
23502367
void set_max_old_space_size(int value) { max_old_space_size_ = value; }
2351-
int max_executable_size() { return max_executable_size_; }
2352-
void set_max_executable_size(int value) { max_executable_size_ = value; }
23532368
uint32_t* stack_limit() const { return stack_limit_; }
23542369
// Sets an address beyond which the VM's stack may not grow.
23552370
void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
23562371
private:
23572372
int max_young_space_size_;
23582373
int max_old_space_size_;
2359-
int max_executable_size_;
23602374
uint32_t* stack_limit_;
23612375
};
23622376

@@ -2488,18 +2502,13 @@ class V8EXPORT HeapStatistics {
24882502
public:
24892503
HeapStatistics();
24902504
size_t total_heap_size() { return total_heap_size_; }
2491-
size_t total_heap_size_executable() { return total_heap_size_executable_; }
24922505
size_t used_heap_size() { return used_heap_size_; }
24932506

24942507
private:
24952508
void set_total_heap_size(size_t size) { total_heap_size_ = size; }
2496-
void set_total_heap_size_executable(size_t size) {
2497-
total_heap_size_executable_ = size;
2498-
}
24992509
void set_used_heap_size(size_t size) { used_heap_size_ = size; }
25002510

25012511
size_t total_heap_size_;
2502-
size_t total_heap_size_executable_;
25032512
size_t used_heap_size_;
25042513

25052514
friend class V8;
@@ -3251,8 +3260,8 @@ class V8EXPORT Locker {
32513260
/**
32523261
* An interface for exporting data from V8, using "push" model.
32533262
*/
3254-
class V8EXPORT OutputStream { // NOLINT
3255-
public:
3263+
class V8EXPORT OutputStream {
3264+
public:
32563265
enum OutputEncoding {
32573266
kAscii = 0 // 7-bit ASCII.
32583267
};
@@ -3282,8 +3291,6 @@ class V8EXPORT OutputStream { // NOLINT
32823291

32833292
namespace internal {
32843293

3285-
const int kPointerSize = sizeof(void*); // NOLINT
3286-
const int kIntSize = sizeof(int); // NOLINT
32873294

32883295
// Tag information for HeapObject.
32893296
const int kHeapObjectTag = 1;
@@ -3319,19 +3326,19 @@ template <> struct SmiConstants<8> {
33193326
}
33203327
};
33213328

3322-
const int kSmiShiftSize = SmiConstants<kPointerSize>::kSmiShiftSize;
3323-
const int kSmiValueSize = SmiConstants<kPointerSize>::kSmiValueSize;
3329+
const int kSmiShiftSize = SmiConstants<sizeof(void*)>::kSmiShiftSize;
3330+
const int kSmiValueSize = SmiConstants<sizeof(void*)>::kSmiValueSize;
33243331

33253332
template <size_t ptr_size> struct InternalConstants;
33263333

33273334
// Internal constants for 32-bit systems.
33283335
template <> struct InternalConstants<4> {
3329-
static const int kStringResourceOffset = 3 * kPointerSize;
3336+
static const int kStringResourceOffset = 3 * sizeof(void*);
33303337
};
33313338

33323339
// Internal constants for 64-bit systems.
33333340
template <> struct InternalConstants<8> {
3334-
static const int kStringResourceOffset = 3 * kPointerSize;
3341+
static const int kStringResourceOffset = 3 * sizeof(void*);
33353342
};
33363343

33373344
/**
@@ -3345,12 +3352,12 @@ class Internals {
33453352
// These values match non-compiler-dependent values defined within
33463353
// the implementation of v8.
33473354
static const int kHeapObjectMapOffset = 0;
3348-
static const int kMapInstanceTypeOffset = kPointerSize + kIntSize;
3355+
static const int kMapInstanceTypeOffset = sizeof(void*) + sizeof(int);
33493356
static const int kStringResourceOffset =
3350-
InternalConstants<kPointerSize>::kStringResourceOffset;
3357+
InternalConstants<sizeof(void*)>::kStringResourceOffset;
33513358

3352-
static const int kProxyProxyOffset = kPointerSize;
3353-
static const int kJSObjectHeaderSize = 3 * kPointerSize;
3359+
static const int kProxyProxyOffset = sizeof(void*);
3360+
static const int kJSObjectHeaderSize = 3 * sizeof(void*);
33543361
static const int kFullStringRepresentationMask = 0x07;
33553362
static const int kExternalTwoByteRepresentationTag = 0x02;
33563363

@@ -3368,7 +3375,7 @@ class Internals {
33683375
}
33693376

33703377
static inline int SmiValue(internal::Object* value) {
3371-
return SmiConstants<kPointerSize>::SmiToInt(value);
3378+
return SmiConstants<sizeof(void*)>::SmiToInt(value);
33723379
}
33733380

33743381
static inline int GetInstanceType(internal::Object* obj) {
@@ -3397,9 +3404,10 @@ class Internals {
33973404
uint8_t* addr = reinterpret_cast<uint8_t*>(ptr) + offset - kHeapObjectTag;
33983405
return *reinterpret_cast<T*>(addr);
33993406
}
3407+
34003408
};
34013409

3402-
} // namespace internal
3410+
}
34033411

34043412

34053413
template <class T>
@@ -3559,7 +3567,7 @@ Local<Value> Object::UncheckedGetInternalField(int index) {
35593567
// If the object is a plain JSObject, which is the common case,
35603568
// we know where to find the internal fields and can return the
35613569
// value directly.
3562-
int offset = I::kJSObjectHeaderSize + (internal::kPointerSize * index);
3570+
int offset = I::kJSObjectHeaderSize + (sizeof(void*) * index);
35633571
O* value = I::ReadField<O*>(obj, offset);
35643572
O** result = HandleScope::CreateHandle(value);
35653573
return Local<Value>(reinterpret_cast<Value*>(result));
@@ -3595,7 +3603,7 @@ void* Object::GetPointerFromInternalField(int index) {
35953603
// If the object is a plain JSObject, which is the common case,
35963604
// we know where to find the internal fields and can return the
35973605
// value directly.
3598-
int offset = I::kJSObjectHeaderSize + (internal::kPointerSize * index);
3606+
int offset = I::kJSObjectHeaderSize + (sizeof(void*) * index);
35993607
O* value = I::ReadField<O*>(obj, offset);
36003608
return I::GetExternalPointer(value);
36013609
}

deps/v8/include/v8stdint.h

-53
This file was deleted.

deps/v8/src/SConscript

-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ SOURCES = {
4040
api.cc
4141
assembler.cc
4242
ast.cc
43-
bignum.cc
4443
bootstrapper.cc
4544
builtins.cc
4645
cached-powers.cc
@@ -96,7 +95,6 @@ SOURCES = {
9695
register-allocator.cc
9796
rewriter.cc
9897
runtime.cc
99-
scanner-base.cc
10098
scanner.cc
10199
scopeinfo.cc
102100
scopes.cc

deps/v8/src/api.cc

+4-11
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "serialize.h"
4444
#include "snapshot.h"
4545
#include "top.h"
46+
#include "utils.h"
4647
#include "v8threads.h"
4748
#include "version.h"
4849

@@ -393,18 +394,14 @@ v8::Handle<Boolean> False() {
393394
ResourceConstraints::ResourceConstraints()
394395
: max_young_space_size_(0),
395396
max_old_space_size_(0),
396-
max_executable_size_(0),
397397
stack_limit_(NULL) { }
398398

399399

400400
bool SetResourceConstraints(ResourceConstraints* constraints) {
401401
int young_space_size = constraints->max_young_space_size();
402402
int old_gen_size = constraints->max_old_space_size();
403-
int max_executable_size = constraints->max_executable_size();
404-
if (young_space_size != 0 || old_gen_size != 0 || max_executable_size != 0) {
405-
bool result = i::Heap::ConfigureHeap(young_space_size / 2,
406-
old_gen_size,
407-
max_executable_size);
403+
if (young_space_size != 0 || old_gen_size != 0) {
404+
bool result = i::Heap::ConfigureHeap(young_space_size / 2, old_gen_size);
408405
if (!result) return false;
409406
}
410407
if (constraints->stack_limit() != NULL) {
@@ -3263,15 +3260,11 @@ bool v8::V8::Dispose() {
32633260
}
32643261

32653262

3266-
HeapStatistics::HeapStatistics(): total_heap_size_(0),
3267-
total_heap_size_executable_(0),
3268-
used_heap_size_(0) { }
3263+
HeapStatistics::HeapStatistics(): total_heap_size_(0), used_heap_size_(0) { }
32693264

32703265

32713266
void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) {
32723267
heap_statistics->set_total_heap_size(i::Heap::CommittedMemory());
3273-
heap_statistics->set_total_heap_size_executable(
3274-
i::Heap::CommittedMemoryExecutable());
32753268
heap_statistics->set_used_heap_size(i::Heap::SizeOfObjects());
32763269
}
32773270

0 commit comments

Comments
 (0)