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

Commit

Permalink
v8: upgrade to v8 3.20.9
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Jul 29, 2013
1 parent 17fbd6c commit 1bd711c
Show file tree
Hide file tree
Showing 310 changed files with 21,550 additions and 3,932 deletions.
4 changes: 4 additions & 0 deletions deps/v8/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
*.pdb
*.pyc
*.scons*
*.sdf
*.sln
*.so
*.suo
*.user
*.vcproj
*.vcxproj
*.vcxproj.filters
*.xcodeproj
#*#
*~
Expand All @@ -26,6 +29,7 @@ shell
shell_g
/build/Debug
/build/gyp
/build/ipch/
/build/Release
/obj
/out
Expand Down
19 changes: 19 additions & 0 deletions deps/v8/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
2013-07-26: Version 3.20.9

Check that ExternalString objects get aligned resources.

Fixed JSArray-specific length lookup in polymorphic array handling
(Chromium issues 263276, 263905).

Performance and stability improvements on all platforms.


2013-07-24: Version 3.20.8

Deprecated v8::V8::Pause/ResumeProfiler.

Fixed Chromium issues 247688, 258519 and 260203.

Performance and stability improvements on all platforms.


2013-07-22: Version 3.20.7

Deprecated some debugger methods.
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ deps = {
"http://gyp.googlecode.com/svn/trunk@1656",

"v8/third_party/icu":
"https://src.chromium.org/chrome/trunk/deps/third_party/icu46@210659",
"https://src.chromium.org/chrome/trunk/deps/third_party/icu46@213354",
}

deps_os = {
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,4 @@ dependencies:
--revision 1656
svn checkout --force \
https://src.chromium.org/chrome/trunk/deps/third_party/icu46 \
third_party/icu --revision 210659
third_party/icu --revision 213354
10 changes: 5 additions & 5 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -4545,18 +4545,18 @@ class V8EXPORT V8 {
* See also the --prof and --prof_auto command line switches to
* enable V8 profiling.
*/
static void PauseProfiler();
V8_DEPRECATED(static void PauseProfiler());

/**
* Resumes recording of tick samples in the profiler.
* See also PauseProfiler().
*/
static void ResumeProfiler();
V8_DEPRECATED(static void ResumeProfiler());

/**
* Return whether profiler is currently paused.
*/
static bool IsProfilerPaused();
V8_DEPRECATED(static bool IsProfilerPaused());

/**
* Retrieve the V8 thread id of the calling thread.
Expand Down Expand Up @@ -5399,7 +5399,7 @@ class Internals {
static const int kNullValueRootIndex = 7;
static const int kTrueValueRootIndex = 8;
static const int kFalseValueRootIndex = 9;
static const int kEmptyStringRootIndex = 132;
static const int kEmptyStringRootIndex = 134;

static const int kNodeClassIdOffset = 1 * kApiPointerSize;
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
Expand All @@ -5412,7 +5412,7 @@ class Internals {
static const int kJSObjectType = 0xb1;
static const int kFirstNonstringType = 0x80;
static const int kOddballType = 0x83;
static const int kForeignType = 0x88;
static const int kForeignType = 0x87;

static const int kUndefinedOddballKind = 5;
static const int kNullOddballKind = 3;
Expand Down
21 changes: 18 additions & 3 deletions deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ void Context::Exit() {
i::Context* last_context =
isolate->handle_scope_implementer()->RestoreContext();
isolate->set_context(last_context);
isolate->set_context_exit_happened(true);
}


Expand All @@ -780,8 +779,8 @@ static void* DecodeSmiToAligned(i::Object* value, const char* location) {
}


static i::Smi* EncodeAlignedAsSmi(void* value, const char* location) {
i::Smi* smi = reinterpret_cast<i::Smi*>(value);
static i::Smi* EncodeAlignedAsSmi(const void* value, const char* location) {
i::Smi* smi = const_cast<i::Smi*>(reinterpret_cast<const i::Smi*>(value));
ApiCheck(smi->IsSmi(), location, "Pointer is not aligned");
return smi;
}
Expand Down Expand Up @@ -5938,6 +5937,10 @@ Local<String> v8::String::NewExternal(
LOG_API(isolate, "String::NewExternal");
ENTER_V8(isolate);
CHECK(resource && resource->data());
// Resource pointers need to look like Smis since ExternalString objects
// are sometimes put into old pointer space (see i::String::MakeExternal).
CHECK(EncodeAlignedAsSmi(resource, "v8::String::NewExternal()"));
CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::NewExternal()"));
i::Handle<i::String> result = NewExternalStringHandle(isolate, resource);
isolate->heap()->external_string_table()->AddString(*result);
return Utils::ToLocal(result);
Expand All @@ -5959,6 +5962,10 @@ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
return false;
}
CHECK(resource && resource->data());
// Resource pointers need to look like Smis since ExternalString objects
// are sometimes put into old pointer space (see i::String::MakeExternal).
CHECK(EncodeAlignedAsSmi(resource, "v8::String::MakeExternal()"));
CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::MakeExternal()"));
bool result = obj->MakeExternal(resource);
if (result && !obj->IsInternalizedString()) {
isolate->heap()->external_string_table()->AddString(*obj);
Expand All @@ -5974,6 +5981,10 @@ Local<String> v8::String::NewExternal(
LOG_API(isolate, "String::NewExternal");
ENTER_V8(isolate);
CHECK(resource && resource->data());
// Resource pointers need to look like Smis since ExternalString objects
// are sometimes put into old pointer space (see i::String::MakeExternal).
CHECK(EncodeAlignedAsSmi(resource, "v8::String::NewExternal()"));
CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::NewExternal()"));
i::Handle<i::String> result = NewExternalAsciiStringHandle(isolate, resource);
isolate->heap()->external_string_table()->AddString(*result);
return Utils::ToLocal(result);
Expand All @@ -5996,6 +6007,10 @@ bool v8::String::MakeExternal(
return false;
}
CHECK(resource && resource->data());
// Resource pointers need to look like Smis since ExternalString objects
// are sometimes put into old pointer space (see i::String::MakeExternal).
CHECK(EncodeAlignedAsSmi(resource, "v8::String::MakeExternal()"));
CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::MakeExternal()"));
bool result = obj->MakeExternal(resource);
if (result && !obj->IsInternalizedString()) {
isolate->heap()->external_string_table()->AddString(*obj);
Expand Down
21 changes: 19 additions & 2 deletions deps/v8/src/arm/assembler-arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2373,15 +2373,16 @@ void Assembler::vmov(const DwVfpRegister dst,

if (scratch.is(no_reg)) {
if (dst.code() < 16) {
const LowDwVfpRegister loc = LowDwVfpRegister::from_code(dst.code());
// Move the low part of the double into the lower of the corresponsing S
// registers of D register dst.
mov(ip, Operand(lo));
vmov(dst.low(), ip);
vmov(loc.low(), ip);

// Move the high part of the double into the higher of the
// corresponsing S registers of D register dst.
mov(ip, Operand(hi));
vmov(dst.high(), ip);
vmov(loc.high(), ip);
} else {
// D16-D31 does not have S registers, so move the low and high parts
// directly to the D register using vmov.32.
Expand Down Expand Up @@ -2446,6 +2447,22 @@ void Assembler::vmov(const DwVfpRegister dst,
}


void Assembler::vmov(const Register dst,
const VmovIndex index,
const DwVfpRegister src,
const Condition cond) {
// Dd[index] = Rt
// Instruction details available in ARM DDI 0406C.b, A8.8.342.
// cond(31-28) | 1110(27-24) | U=0(23) | opc1=0index(22-21) | 1(20) |
// Vn(19-16) | Rt(15-12) | 1011(11-8) | N(7) | opc2=00(6-5) | 1(4) | 0000(3-0)
ASSERT(index.index == 0 || index.index == 1);
int vn, n;
src.split_code(&vn, &n);
emit(cond | 0xE*B24 | index.index*B21 | B20 | vn*B16 | dst.code()*B12 |
0xB*B8 | n*B7 | B4);
}


void Assembler::vmov(const DwVfpRegister dst,
const Register src1,
const Register src2,
Expand Down
94 changes: 62 additions & 32 deletions deps/v8/src/arm/assembler-arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,22 +267,6 @@ struct DwVfpRegister {
return 0 <= code_ && code_ < kMaxNumRegisters;
}
bool is(DwVfpRegister reg) const { return code_ == reg.code_; }
SwVfpRegister low() const {
ASSERT(code_ < 16);
SwVfpRegister reg;
reg.code_ = code_ * 2;

ASSERT(reg.is_valid());
return reg;
}
SwVfpRegister high() const {
ASSERT(code_ < 16);
SwVfpRegister reg;
reg.code_ = (code_ * 2) + 1;

ASSERT(reg.is_valid());
return reg;
}
int code() const {
ASSERT(is_valid());
return code_;
Expand All @@ -304,6 +288,47 @@ struct DwVfpRegister {
typedef DwVfpRegister DoubleRegister;


// Double word VFP register d0-15.
struct LowDwVfpRegister {
public:
static const int kMaxNumLowRegisters = 16;
operator DwVfpRegister() const {
DwVfpRegister r = { code_ };
return r;
}
static LowDwVfpRegister from_code(int code) {
LowDwVfpRegister r = { code };
return r;
}

bool is_valid() const {
return 0 <= code_ && code_ < kMaxNumLowRegisters;
}
bool is(DwVfpRegister reg) const { return code_ == reg.code_; }
bool is(LowDwVfpRegister reg) const { return code_ == reg.code_; }
int code() const {
ASSERT(is_valid());
return code_;
}
SwVfpRegister low() const {
SwVfpRegister reg;
reg.code_ = code_ * 2;

ASSERT(reg.is_valid());
return reg;
}
SwVfpRegister high() const {
SwVfpRegister reg;
reg.code_ = (code_ * 2) + 1;

ASSERT(reg.is_valid());
return reg;
}

int code_;
};


// Quad word NEON register.
struct QwNeonRegister {
static const int kMaxNumRegisters = 16;
Expand Down Expand Up @@ -370,22 +395,22 @@ const SwVfpRegister s30 = { 30 };
const SwVfpRegister s31 = { 31 };

const DwVfpRegister no_dreg = { -1 };
const DwVfpRegister d0 = { 0 };
const DwVfpRegister d1 = { 1 };
const DwVfpRegister d2 = { 2 };
const DwVfpRegister d3 = { 3 };
const DwVfpRegister d4 = { 4 };
const DwVfpRegister d5 = { 5 };
const DwVfpRegister d6 = { 6 };
const DwVfpRegister d7 = { 7 };
const DwVfpRegister d8 = { 8 };
const DwVfpRegister d9 = { 9 };
const DwVfpRegister d10 = { 10 };
const DwVfpRegister d11 = { 11 };
const DwVfpRegister d12 = { 12 };
const DwVfpRegister d13 = { 13 };
const DwVfpRegister d14 = { 14 };
const DwVfpRegister d15 = { 15 };
const LowDwVfpRegister d0 = { 0 };
const LowDwVfpRegister d1 = { 1 };
const LowDwVfpRegister d2 = { 2 };
const LowDwVfpRegister d3 = { 3 };
const LowDwVfpRegister d4 = { 4 };
const LowDwVfpRegister d5 = { 5 };
const LowDwVfpRegister d6 = { 6 };
const LowDwVfpRegister d7 = { 7 };
const LowDwVfpRegister d8 = { 8 };
const LowDwVfpRegister d9 = { 9 };
const LowDwVfpRegister d10 = { 10 };
const LowDwVfpRegister d11 = { 11 };
const LowDwVfpRegister d12 = { 12 };
const LowDwVfpRegister d13 = { 13 };
const LowDwVfpRegister d14 = { 14 };
const LowDwVfpRegister d15 = { 15 };
const DwVfpRegister d16 = { 16 };
const DwVfpRegister d17 = { 17 };
const DwVfpRegister d18 = { 18 };
Expand Down Expand Up @@ -420,6 +445,7 @@ const QwNeonRegister q13 = { 13 };
const QwNeonRegister q14 = { 14 };
const QwNeonRegister q15 = { 15 };


// Aliases for double registers. Defined using #define instead of
// "static const DwVfpRegister&" because Clang complains otherwise when a
// compilation unit that includes this header doesn't use the variables.
Expand Down Expand Up @@ -1109,6 +1135,10 @@ class Assembler : public AssemblerBase {
const VmovIndex index,
const Register src,
const Condition cond = al);
void vmov(const Register dst,
const VmovIndex index,
const DwVfpRegister src,
const Condition cond = al);
void vmov(const DwVfpRegister dst,
const Register src1,
const Register src2,
Expand Down
Loading

0 comments on commit 1bd711c

Please sign in to comment.