Skip to content

Commit

Permalink
Revert "Upgrade V8 to 2.5.6"
Browse files Browse the repository at this point in the history
This reverts commit 564a486.

Breaks cygwin
  • Loading branch information
ry committed Nov 17, 2010
1 parent cea3a95 commit 03fa258
Show file tree
Hide file tree
Showing 99 changed files with 2,691 additions and 6,813 deletions.
1 change: 0 additions & 1 deletion deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ARM Ltd.
Hewlett-Packard Development Company, LP

Alexander Botero-Lowry <alexbl@FreeBSD.org>
Alexandre Rames <alexandre.rames@arm.com>
Alexandre Vassalotti <avassalotti@gmail.com>
Andreas Anyuru <andreas.anyuru@gmail.com>
Burcu Dogan <burcujdogan@gmail.com>
Expand Down
23 changes: 0 additions & 23 deletions deps/v8/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
2010-11-10: Version 2.5.6

Added support for VFP rounding modes to the ARM simulator.

Fixed multiplication overflow bug (issue 927).

Added a limit for the amount of executable memory (issue 925).


2010-11-08: Version 2.5.5

Added more aggressive GC of external objects in near out-of-memory
situations.

Fixed a bug that gave the incorrect result for String.split called
on the empty string (issue 924).


2010-11-03: Version 2.5.4

Improved V8 VFPv3 runtime detection to address issue 914.


2010-11-01: Version 2.5.3

Fixed a bug that prevents constants from overwriting function values
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/include/v8-debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class EXPORT Debug {

virtual ~Message() {}
};


/**
* An event details object passed to the debug event listener.
Expand Down Expand Up @@ -300,7 +300,7 @@ class EXPORT Debug {
* get access to information otherwise not available during normal JavaScript
* execution e.g. details on stack frames. Receiver of the function call will
* be the debugger context global object, however this is a subject to change.
* The following example show a JavaScript function which when passed to
* The following example show a JavaScript function which when passed to
* v8::Debug::Call will return the current line of JavaScript execution.
*
* \code
Expand Down
64 changes: 36 additions & 28 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,23 @@
#ifndef V8_H_
#define V8_H_

#include "v8stdint.h"
#include <stdio.h>

#ifdef _WIN32
// When compiling on MinGW stdint.h is available.
#ifdef __MINGW32__
#include <stdint.h>
#else // __MINGW32__
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t; // NOLINT
typedef unsigned short uint16_t; // NOLINT
typedef int int32_t;
typedef unsigned int uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
// intptr_t and friends are defined in crtdefs.h through stdio.h.
#endif // __MINGW32__

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

#else // _WIN32

#include <stdint.h>

// Setup for Linux shared library export. There is no need to distinguish
// between building or using the V8 shared library, but we should not
// export symbols when we are building a static library.
Expand Down Expand Up @@ -111,6 +127,7 @@ class Arguments;
class Object;
class Heap;
class Top;

}


Expand Down Expand Up @@ -459,10 +476,10 @@ class V8EXPORT HandleScope {
level = 0;
}
};

void Leave();


internal::Object** prev_next_;
internal::Object** prev_limit_;

Expand Down Expand Up @@ -1038,7 +1055,7 @@ class String : public Primitive {
*/
V8EXPORT bool IsExternalAscii() const;

class V8EXPORT ExternalStringResourceBase { // NOLINT
class V8EXPORT ExternalStringResourceBase {
public:
virtual ~ExternalStringResourceBase() {}

Expand Down Expand Up @@ -2348,15 +2365,12 @@ class V8EXPORT ResourceConstraints {
void set_max_young_space_size(int value) { max_young_space_size_ = value; }
int max_old_space_size() const { return max_old_space_size_; }
void set_max_old_space_size(int value) { max_old_space_size_ = value; }
int max_executable_size() { return max_executable_size_; }
void set_max_executable_size(int value) { max_executable_size_ = value; }
uint32_t* stack_limit() const { return stack_limit_; }
// Sets an address beyond which the VM's stack may not grow.
void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
private:
int max_young_space_size_;
int max_old_space_size_;
int max_executable_size_;
uint32_t* stack_limit_;
};

Expand Down Expand Up @@ -2488,18 +2502,13 @@ class V8EXPORT HeapStatistics {
public:
HeapStatistics();
size_t total_heap_size() { return total_heap_size_; }
size_t total_heap_size_executable() { return total_heap_size_executable_; }
size_t used_heap_size() { return used_heap_size_; }

private:
void set_total_heap_size(size_t size) { total_heap_size_ = size; }
void set_total_heap_size_executable(size_t size) {
total_heap_size_executable_ = size;
}
void set_used_heap_size(size_t size) { used_heap_size_ = size; }

size_t total_heap_size_;
size_t total_heap_size_executable_;
size_t used_heap_size_;

friend class V8;
Expand Down Expand Up @@ -3251,8 +3260,8 @@ class V8EXPORT Locker {
/**
* An interface for exporting data from V8, using "push" model.
*/
class V8EXPORT OutputStream { // NOLINT
public:
class V8EXPORT OutputStream {
public:
enum OutputEncoding {
kAscii = 0 // 7-bit ASCII.
};
Expand Down Expand Up @@ -3282,8 +3291,6 @@ class V8EXPORT OutputStream { // NOLINT

namespace internal {

const int kPointerSize = sizeof(void*); // NOLINT
const int kIntSize = sizeof(int); // NOLINT

// Tag information for HeapObject.
const int kHeapObjectTag = 1;
Expand Down Expand Up @@ -3319,19 +3326,19 @@ template <> struct SmiConstants<8> {
}
};

const int kSmiShiftSize = SmiConstants<kPointerSize>::kSmiShiftSize;
const int kSmiValueSize = SmiConstants<kPointerSize>::kSmiValueSize;
const int kSmiShiftSize = SmiConstants<sizeof(void*)>::kSmiShiftSize;
const int kSmiValueSize = SmiConstants<sizeof(void*)>::kSmiValueSize;

template <size_t ptr_size> struct InternalConstants;

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

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

/**
Expand All @@ -3345,12 +3352,12 @@ class Internals {
// These values match non-compiler-dependent values defined within
// the implementation of v8.
static const int kHeapObjectMapOffset = 0;
static const int kMapInstanceTypeOffset = kPointerSize + kIntSize;
static const int kMapInstanceTypeOffset = sizeof(void*) + sizeof(int);
static const int kStringResourceOffset =
InternalConstants<kPointerSize>::kStringResourceOffset;
InternalConstants<sizeof(void*)>::kStringResourceOffset;

static const int kProxyProxyOffset = kPointerSize;
static const int kJSObjectHeaderSize = 3 * kPointerSize;
static const int kProxyProxyOffset = sizeof(void*);
static const int kJSObjectHeaderSize = 3 * sizeof(void*);
static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02;

Expand All @@ -3368,7 +3375,7 @@ class Internals {
}

static inline int SmiValue(internal::Object* value) {
return SmiConstants<kPointerSize>::SmiToInt(value);
return SmiConstants<sizeof(void*)>::SmiToInt(value);
}

static inline int GetInstanceType(internal::Object* obj) {
Expand Down Expand Up @@ -3397,9 +3404,10 @@ class Internals {
uint8_t* addr = reinterpret_cast<uint8_t*>(ptr) + offset - kHeapObjectTag;
return *reinterpret_cast<T*>(addr);
}

};

} // namespace internal
}


template <class T>
Expand Down Expand Up @@ -3559,7 +3567,7 @@ Local<Value> Object::UncheckedGetInternalField(int index) {
// If the object is a plain JSObject, which is the common case,
// we know where to find the internal fields and can return the
// value directly.
int offset = I::kJSObjectHeaderSize + (internal::kPointerSize * index);
int offset = I::kJSObjectHeaderSize + (sizeof(void*) * index);
O* value = I::ReadField<O*>(obj, offset);
O** result = HandleScope::CreateHandle(value);
return Local<Value>(reinterpret_cast<Value*>(result));
Expand Down Expand Up @@ -3595,7 +3603,7 @@ void* Object::GetPointerFromInternalField(int index) {
// If the object is a plain JSObject, which is the common case,
// we know where to find the internal fields and can return the
// value directly.
int offset = I::kJSObjectHeaderSize + (internal::kPointerSize * index);
int offset = I::kJSObjectHeaderSize + (sizeof(void*) * index);
O* value = I::ReadField<O*>(obj, offset);
return I::GetExternalPointer(value);
}
Expand Down
53 changes: 0 additions & 53 deletions deps/v8/include/v8stdint.h

This file was deleted.

2 changes: 0 additions & 2 deletions deps/v8/src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ SOURCES = {
api.cc
assembler.cc
ast.cc
bignum.cc
bootstrapper.cc
builtins.cc
cached-powers.cc
Expand Down Expand Up @@ -96,7 +95,6 @@ SOURCES = {
register-allocator.cc
rewriter.cc
runtime.cc
scanner-base.cc
scanner.cc
scopeinfo.cc
scopes.cc
Expand Down
15 changes: 4 additions & 11 deletions deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "serialize.h"
#include "snapshot.h"
#include "top.h"
#include "utils.h"
#include "v8threads.h"
#include "version.h"

Expand Down Expand Up @@ -393,18 +394,14 @@ v8::Handle<Boolean> False() {
ResourceConstraints::ResourceConstraints()
: max_young_space_size_(0),
max_old_space_size_(0),
max_executable_size_(0),
stack_limit_(NULL) { }


bool SetResourceConstraints(ResourceConstraints* constraints) {
int young_space_size = constraints->max_young_space_size();
int old_gen_size = constraints->max_old_space_size();
int max_executable_size = constraints->max_executable_size();
if (young_space_size != 0 || old_gen_size != 0 || max_executable_size != 0) {
bool result = i::Heap::ConfigureHeap(young_space_size / 2,
old_gen_size,
max_executable_size);
if (young_space_size != 0 || old_gen_size != 0) {
bool result = i::Heap::ConfigureHeap(young_space_size / 2, old_gen_size);
if (!result) return false;
}
if (constraints->stack_limit() != NULL) {
Expand Down Expand Up @@ -3263,15 +3260,11 @@ bool v8::V8::Dispose() {
}


HeapStatistics::HeapStatistics(): total_heap_size_(0),
total_heap_size_executable_(0),
used_heap_size_(0) { }
HeapStatistics::HeapStatistics(): total_heap_size_(0), used_heap_size_(0) { }


void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) {
heap_statistics->set_total_heap_size(i::Heap::CommittedMemory());
heap_statistics->set_total_heap_size_executable(
i::Heap::CommittedMemoryExecutable());
heap_statistics->set_used_heap_size(i::Heap::SizeOfObjects());
}

Expand Down
Loading

0 comments on commit 03fa258

Please sign in to comment.