Navigation Menu

Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Upgrade V8 to 3.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 15, 2011
1 parent f8b9094 commit 1b15af9
Show file tree
Hide file tree
Showing 201 changed files with 4,246 additions and 2,128 deletions.
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Expand Up @@ -21,6 +21,7 @@ Daniel Andersson <kodandersson@gmail.com>
Daniel James <dnljms@gmail.com>
Dineel D Sule <dsule@codeaurora.org>
Erich Ocean <erich.ocean@me.com>
Fedor Indutny <fedor@indutny.com>
Jan de Mooij <jandemooij@gmail.com>
Jay Freeman <saurik@saurik.com>
Joel Stanley <joel.stan@gmail.com>
Expand Down
21 changes: 21 additions & 0 deletions deps/v8/ChangeLog
@@ -1,3 +1,24 @@
2011-09-15: Version 3.6.4

Fixed d8's broken readline history.

Removed the need for code delete events in CPU profiler (Issue 1466).

Fixed debugger stepping next with trycatch recursion (Issue 1639).

Fixing parallel execution in d8 (with -p) and some memory leaks.

Support for precise stepping in functions compiled before debugging was
started (step 1).


2011-09-13: Version 3.6.3

Implemented better support of typed arrays in the d8 shell.

Bug fixes and performance improvements on all platforms.


2011-09-08: Version 3.6.2

Added "dependencies" target to top-level Makefile.
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/build/README.txt
Expand Up @@ -53,11 +53,11 @@ from the Chromium repository. From the root of the V8 project do the following:

> svn co http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844 third_party/cygwin

To run GYP Python is required and it is reccomended to use the same version as
To run GYP Python is required and it is recommended to use the same version as
is used by the Chromium project. This can also be checked out from the Chromium
repository. From the root of the V8 project do the following:

> svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@70627 third_party/python_26
> svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@89111 third_party/python_26

Now generate Visual Studio solution and project files for the ia32 architecture:

Expand Down
37 changes: 20 additions & 17 deletions deps/v8/include/v8.h
Expand Up @@ -1051,18 +1051,21 @@ class String : public Primitive {
NO_NULL_TERMINATION = 2
};

// 16-bit character codes.
V8EXPORT int Write(uint16_t* buffer,
int start = 0,
int length = -1,
int options = NO_OPTIONS) const; // UTF-16
int options = NO_OPTIONS) const;
// ASCII characters.
V8EXPORT int WriteAscii(char* buffer,
int start = 0,
int length = -1,
int options = NO_OPTIONS) const; // ASCII
int options = NO_OPTIONS) const;
// UTF-8 encoded characters.
V8EXPORT int WriteUtf8(char* buffer,
int length = -1,
int* nchars_ref = NULL,
int options = NO_OPTIONS) const; // UTF-8
int options = NO_OPTIONS) const;

/**
* A zero length string.
Expand All @@ -1075,7 +1078,7 @@ class String : public Primitive {
V8EXPORT bool IsExternal() const;

/**
* Returns true if the string is both external and ascii
* Returns true if the string is both external and ASCII
*/
V8EXPORT bool IsExternalAscii() const;

Expand Down Expand Up @@ -1132,11 +1135,11 @@ class String : public Primitive {
};

/**
* An ExternalAsciiStringResource is a wrapper around an ascii
* An ExternalAsciiStringResource is a wrapper around an ASCII
* string buffer that resides outside V8's heap. Implement an
* ExternalAsciiStringResource to manage the life cycle of the
* underlying buffer. Note that the string data must be immutable
* and that the data must be strict 7-bit ASCII, not Latin1 or
* and that the data must be strict (7-bit) ASCII, not Latin-1 or
* UTF-8, which would require special treatment internally in the
* engine and, in the case of UTF-8, do not allow efficient indexing.
* Use String::New or convert to 16 bit data for non-ASCII.
Expand All @@ -1152,7 +1155,7 @@ class String : public Primitive {
virtual ~ExternalAsciiStringResource() {}
/** The string data from the underlying buffer.*/
virtual const char* data() const = 0;
/** The number of ascii characters in the string.*/
/** The number of ASCII characters in the string.*/
virtual size_t length() const = 0;
protected:
ExternalAsciiStringResource() {}
Expand All @@ -1165,25 +1168,25 @@ class String : public Primitive {
inline ExternalStringResource* GetExternalStringResource() const;

/**
* Get the ExternalAsciiStringResource for an external ascii string.
* Get the ExternalAsciiStringResource for an external ASCII string.
* Returns NULL if IsExternalAscii() doesn't return true.
*/
V8EXPORT ExternalAsciiStringResource* GetExternalAsciiStringResource() const;

static inline String* Cast(v8::Value* obj);

/**
* Allocates a new string from either utf-8 encoded or ascii data.
* Allocates a new string from either UTF-8 encoded or ASCII data.
* The second parameter 'length' gives the buffer length.
* If the data is utf-8 encoded, the caller must
* If the data is UTF-8 encoded, the caller must
* be careful to supply the length parameter.
* If it is not given, the function calls
* 'strlen' to determine the buffer length, it might be
* wrong if 'data' contains a null character.
*/
V8EXPORT static Local<String> New(const char* data, int length = -1);

/** Allocates a new string from utf16 data.*/
/** Allocates a new string from 16-bit character codes.*/
V8EXPORT static Local<String> New(const uint16_t* data, int length = -1);

/** Creates a symbol. Returns one if it exists already.*/
Expand Down Expand Up @@ -1218,7 +1221,7 @@ class String : public Primitive {
V8EXPORT bool MakeExternal(ExternalStringResource* resource);

/**
* Creates a new external string using the ascii data defined in the given
* Creates a new external string using the ASCII data defined in the given
* resource. When the external string is no longer live on V8's heap the
* resource will be disposed by calling its Dispose method. The caller of
* this function should not otherwise delete or modify the resource. Neither
Expand All @@ -1244,18 +1247,18 @@ class String : public Primitive {
*/
V8EXPORT bool CanMakeExternal();

/** Creates an undetectable string from the supplied ascii or utf-8 data.*/
/** Creates an undetectable string from the supplied ASCII or UTF-8 data.*/
V8EXPORT static Local<String> NewUndetectable(const char* data,
int length = -1);

/** Creates an undetectable string from the supplied utf-16 data.*/
/** Creates an undetectable string from the supplied 16-bit character codes.*/
V8EXPORT static Local<String> NewUndetectable(const uint16_t* data,
int length = -1);

/**
* Converts an object to a utf8-encoded character array. Useful if
* Converts an object to a UTF-8-encoded character array. Useful if
* you want to print the object. If conversion to a string fails
* (eg. due to an exception in the toString() method of the object)
* (e.g. due to an exception in the toString() method of the object)
* then the length() method returns 0 and the * operator returns
* NULL.
*/
Expand All @@ -1276,7 +1279,7 @@ class String : public Primitive {
};

/**
* Converts an object to an ascii string.
* Converts an object to an ASCII string.
* Useful if you want to print the object.
* If conversion to a string fails (eg. due to an exception in the toString()
* method of the object) then the length() method returns 0 and the * operator
Expand Down
2 changes: 0 additions & 2 deletions deps/v8/samples/process.cc
Expand Up @@ -77,7 +77,6 @@ class HttpRequestProcessor {
*/
class JsHttpRequestProcessor : public HttpRequestProcessor {
public:

// Creates a new processor that processes requests by invoking the
// Process function of the JavaScript script given as an argument.
explicit JsHttpRequestProcessor(Handle<String> script) : script_(script) { }
Expand All @@ -88,7 +87,6 @@ class JsHttpRequestProcessor : public HttpRequestProcessor {
virtual bool Process(HttpRequest* req);

private:

// Execute the script associated with this processor and extract the
// Process function. Returns true if this succeeded, otherwise false.
bool ExecuteScript(Handle<String> script);
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/accessors.cc
Expand Up @@ -710,6 +710,7 @@ class FrameFunctionIterator {
} while (next_function != NULL);
return false;
}

private:
void GetFunctions() {
functions_.Rewind(0);
Expand Down
41 changes: 39 additions & 2 deletions deps/v8/src/api.cc
Expand Up @@ -3266,6 +3266,42 @@ bool v8::Object::DeleteHiddenValue(v8::Handle<v8::String> key) {

namespace {

static i::ElementsKind GetElementsKindFromExternalArrayType(
ExternalArrayType array_type) {
switch (array_type) {
case kExternalByteArray:
return i::EXTERNAL_BYTE_ELEMENTS;
break;
case kExternalUnsignedByteArray:
return i::EXTERNAL_UNSIGNED_BYTE_ELEMENTS;
break;
case kExternalShortArray:
return i::EXTERNAL_SHORT_ELEMENTS;
break;
case kExternalUnsignedShortArray:
return i::EXTERNAL_UNSIGNED_SHORT_ELEMENTS;
break;
case kExternalIntArray:
return i::EXTERNAL_INT_ELEMENTS;
break;
case kExternalUnsignedIntArray:
return i::EXTERNAL_UNSIGNED_INT_ELEMENTS;
break;
case kExternalFloatArray:
return i::EXTERNAL_FLOAT_ELEMENTS;
break;
case kExternalDoubleArray:
return i::EXTERNAL_DOUBLE_ELEMENTS;
break;
case kExternalPixelArray:
return i::EXTERNAL_PIXEL_ELEMENTS;
break;
}
UNREACHABLE();
return i::DICTIONARY_ELEMENTS;
}


void PrepareExternalArrayElements(i::Handle<i::JSObject> object,
void* data,
ExternalArrayType array_type,
Expand All @@ -3284,9 +3320,9 @@ void PrepareExternalArrayElements(i::Handle<i::JSObject> object,
elements->map() != isolate->heap()->MapForExternalArrayType(array_type);
if (cant_reuse_map) {
i::Handle<i::Map> external_array_map =
isolate->factory()->GetExternalArrayElementsMap(
isolate->factory()->GetElementsTransitionMap(
i::Handle<i::Map>(object->map()),
array_type,
GetElementsKindFromExternalArrayType(array_type),
object->HasFastProperties());
object->set_map(*external_array_map);
}
Expand Down Expand Up @@ -3348,6 +3384,7 @@ int v8::Object::GetIndexedPropertiesPixelDataLength() {
}
}


void v8::Object::SetIndexedPropertiesToExternalArrayData(
void* data,
ExternalArrayType array_type,
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/arguments.h
Expand Up @@ -75,6 +75,7 @@ class Arguments BASE_EMBEDDED {
int length() const { return length_; }

Object** arguments() { return arguments_; }

private:
int length_;
Object** arguments_;
Expand Down

0 comments on commit 1b15af9

Please sign in to comment.