summaryrefslogtreecommitdiff
path: root/deps/v8/src
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src')
-rw-r--r--deps/v8/src/compiler.cc10
-rw-r--r--deps/v8/src/gdb-jit.cc128
-rw-r--r--deps/v8/src/ic-inl.h8
-rw-r--r--deps/v8/src/mark-compact.cc26
-rw-r--r--deps/v8/src/mark-compact.h1
-rw-r--r--deps/v8/src/messages.js2
-rw-r--r--deps/v8/src/objects.cc14
-rw-r--r--deps/v8/src/objects.h6
-rw-r--r--deps/v8/src/parser.h2
-rw-r--r--deps/v8/src/platform-posix.cc17
-rw-r--r--deps/v8/src/platform-solaris.cc8
-rw-r--r--deps/v8/src/version.cc2
-rw-r--r--deps/v8/src/x64/lithium-codegen-x64.cc12
13 files changed, 123 insertions, 113 deletions
diff --git a/deps/v8/src/compiler.cc b/deps/v8/src/compiler.cc
index e4a30dbbc..86374371e 100644
--- a/deps/v8/src/compiler.cc
+++ b/deps/v8/src/compiler.cc
@@ -746,8 +746,10 @@ static void InstallCodeCommon(CompilationInfo* info) {
static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
Handle<Code> code = info->code();
- Handle<JSFunction> function = info->closure();
- if (FLAG_cache_optimized_code && code->kind() == Code::OPTIMIZED_FUNCTION) {
+ if (FLAG_cache_optimized_code &&
+ info->osr_ast_id().IsNone() &&
+ code->kind() == Code::OPTIMIZED_FUNCTION) {
+ Handle<JSFunction> function = info->closure();
Handle<SharedFunctionInfo> shared(function->shared());
Handle<FixedArray> literals(function->literals());
Handle<Context> native_context(function->context()->native_context());
@@ -758,7 +760,9 @@ static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
static bool InstallCodeFromOptimizedCodeMap(CompilationInfo* info) {
- if (FLAG_cache_optimized_code && info->IsOptimizing()) {
+ if (FLAG_cache_optimized_code &&
+ info->osr_ast_id().IsNone() &&
+ info->IsOptimizing()) {
Handle<SharedFunctionInfo> shared = info->shared_info();
Handle<JSFunction> function = info->closure();
ASSERT(!function.is_null());
diff --git a/deps/v8/src/gdb-jit.cc b/deps/v8/src/gdb-jit.cc
index dde6bbdaa..d3cd44707 100644
--- a/deps/v8/src/gdb-jit.cc
+++ b/deps/v8/src/gdb-jit.cc
@@ -31,13 +31,11 @@
#include "bootstrapper.h"
#include "compiler.h"
-#include "frames.h"
-#include "frames-inl.h"
#include "global-handles.h"
#include "messages.h"
-#include "natives.h"
#include "platform.h"
-#include "scopes.h"
+#include "natives.h"
+#include "scopeinfo.h"
namespace v8 {
namespace internal {
@@ -196,7 +194,7 @@ class DebugSectionBase : public ZoneObject {
virtual void WriteBody(Writer::Slot<THeader> header, Writer* writer) {
uintptr_t start = writer->position();
- if (WriteBodyInternal(writer)) {
+ if (WriteBody(writer)) {
uintptr_t end = writer->position();
header->offset = start;
#if defined(__MACH_O)
@@ -206,7 +204,7 @@ class DebugSectionBase : public ZoneObject {
}
}
- virtual bool WriteBodyInternal(Writer* writer) {
+ virtual bool WriteBody(Writer* writer) {
return false;
}
@@ -342,14 +340,14 @@ class ELFSection : public DebugSectionBase<ELFSectionHeader> {
virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
uintptr_t start = w->position();
- if (WriteBodyInternal(w)) {
+ if (WriteBody(w)) {
uintptr_t end = w->position();
header->offset = start;
header->size = end - start;
}
}
- virtual bool WriteBodyInternal(Writer* w) {
+ virtual bool WriteBody(Writer* w) {
return false;
}
@@ -629,9 +627,9 @@ class MachO BASE_EMBEDDED {
#if defined(__ELF)
class ELF BASE_EMBEDDED {
public:
- ELF(Zone* zone) : sections_(6, zone) {
- sections_.Add(new(zone) ELFSection("", ELFSection::TYPE_NULL, 0), zone);
- sections_.Add(new(zone) StringTable(".shstrtab"), zone);
+ ELF() : sections_(6) {
+ sections_.Add(new ELFSection("", ELFSection::TYPE_NULL, 0));
+ sections_.Add(new StringTable(".shstrtab"));
}
void Write(Writer* w) {
@@ -644,8 +642,8 @@ class ELF BASE_EMBEDDED {
return sections_[index];
}
- uint32_t AddSection(ELFSection* section, Zone* zone) {
- sections_.Add(section, zone);
+ uint32_t AddSection(ELFSection* section) {
+ sections_.Add(section);
section->set_index(sections_.length() - 1);
return sections_.length() - 1;
}
@@ -677,7 +675,7 @@ class ELF BASE_EMBEDDED {
{ 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#elif defined(V8_TARGET_ARCH_X64)
const uint8_t ident[16] =
- { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0 , 0, 0, 0, 0, 0, 0};
#else
#error Unsupported target architecture.
#endif
@@ -854,10 +852,10 @@ class ELFSymbol BASE_EMBEDDED {
class ELFSymbolTable : public ELFSection {
public:
- ELFSymbolTable(const char* name, Zone* zone)
+ explicit ELFSymbolTable(const char* name)
: ELFSection(name, TYPE_SYMTAB, sizeof(uintptr_t)),
- locals_(1, zone),
- globals_(1, zone) {
+ locals_(1),
+ globals_(1) {
}
virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
@@ -885,11 +883,11 @@ class ELFSymbolTable : public ELFSection {
strtab->DetachWriter();
}
- void Add(const ELFSymbol& symbol, Zone* zone) {
+ void Add(const ELFSymbol& symbol) {
if (symbol.binding() == ELFSymbol::BIND_LOCAL) {
- locals_.Add(symbol, zone);
+ locals_.Add(symbol);
} else {
- globals_.Add(symbol, zone);
+ globals_.Add(symbol);
}
}
@@ -1021,29 +1019,26 @@ class CodeDescription BASE_EMBEDDED {
static void CreateSymbolsTable(CodeDescription* desc,
ELF* elf,
int text_section_index) {
- Zone* zone = desc->info()->zone();
- ELFSymbolTable* symtab = new(zone) ELFSymbolTable(".symtab", zone);
- StringTable* strtab = new(zone) StringTable(".strtab");
+ ELFSymbolTable* symtab = new ELFSymbolTable(".symtab");
+ StringTable* strtab = new StringTable(".strtab");
// Symbol table should be followed by the linked string table.
- elf->AddSection(symtab, zone);
- elf->AddSection(strtab, zone);
+ elf->AddSection(symtab);
+ elf->AddSection(strtab);
symtab->Add(ELFSymbol("V8 Code",
0,
0,
ELFSymbol::BIND_LOCAL,
ELFSymbol::TYPE_FILE,
- ELFSection::INDEX_ABSOLUTE),
- zone);
+ ELFSection::INDEX_ABSOLUTE));
symtab->Add(ELFSymbol(desc->name(),
0,
desc->CodeSize(),
ELFSymbol::BIND_GLOBAL,
ELFSymbol::TYPE_FUNC,
- text_section_index),
- zone);
+ text_section_index));
}
#endif // defined(__ELF)
@@ -1079,7 +1074,7 @@ class DebugInfoSection : public DebugSection {
DW_ATE_SIGNED = 0x5
};
- bool WriteBodyInternal(Writer* w) {
+ bool WriteBody(Writer* w) {
uintptr_t cu_start = w->position();
Writer::Slot<uint32_t> size = w->CreateSlotHere<uint32_t>();
uintptr_t start = w->position();
@@ -1099,7 +1094,8 @@ class DebugInfoSection : public DebugSection {
w->WriteString("v8value");
if (desc_->IsInfoAvailable()) {
- Scope* scope = desc_->info()->scope();
+ CompilationInfo* info = desc_->info();
+ ScopeInfo<FreeStoreAllocationPolicy> scope_info(info->scope());
w->WriteULEB128(2);
w->WriteString(desc_->name());
w->Write<intptr_t>(desc_->CodeStart());
@@ -1110,27 +1106,23 @@ class DebugInfoSection : public DebugSection {
w->Write<uint8_t>(DW_OP_reg5); // The frame pointer's here on ia32
#elif defined(V8_TARGET_ARCH_X64)
w->Write<uint8_t>(DW_OP_reg6); // and here on x64.
-#elif defined(V8_TARGET_ARCH_ARM)
- UNIMPLEMENTED();
-#elif defined(V8_TARGET_ARCH_MIPS)
- UNIMPLEMENTED();
#else
#error Unsupported target architecture.
#endif
fb_block_size.set(static_cast<uint32_t>(w->position() - fb_block_start));
- int params = scope->num_parameters();
- int slots = scope->num_stack_slots();
- int context_slots = scope->ContextLocalCount();
+ int params = scope_info.number_of_parameters();
+ int slots = scope_info.number_of_stack_slots();
+ int context_slots = scope_info.number_of_context_slots();
// The real slot ID is internal_slots + context_slot_id.
int internal_slots = Context::MIN_CONTEXT_SLOTS;
- int locals = scope->StackLocalCount();
+ int locals = scope_info.LocalCount();
int current_abbreviation = 4;
for (int param = 0; param < params; ++param) {
w->WriteULEB128(current_abbreviation++);
w->WriteString(
- *scope->parameter(param)->name()->ToCString(DISALLOW_NULLS));
+ *scope_info.ParameterName(param)->ToCString(DISALLOW_NULLS));
w->Write<uint32_t>(ty_offset);
Writer::Slot<uint32_t> block_size = w->CreateSlotHere<uint32_t>();
uintptr_t block_start = w->position();
@@ -1156,7 +1148,7 @@ class DebugInfoSection : public DebugSection {
ASSERT(Context::CLOSURE_INDEX == 0);
ASSERT(Context::PREVIOUS_INDEX == 1);
ASSERT(Context::EXTENSION_INDEX == 2);
- ASSERT(Context::GLOBAL_OBJECT_INDEX == 3);
+ ASSERT(Context::GLOBAL_INDEX == 3);
w->WriteULEB128(current_abbreviation++);
w->WriteString(".closure");
w->WriteULEB128(current_abbreviation++);
@@ -1175,13 +1167,10 @@ class DebugInfoSection : public DebugSection {
w->WriteString(builder.Finalize());
}
- ZoneList<Variable*> stack_locals(locals, scope->zone());
- ZoneList<Variable*> context_locals(context_slots, scope->zone());
- scope->CollectStackAndContextLocals(&stack_locals, &context_locals);
for (int local = 0; local < locals; ++local) {
w->WriteULEB128(current_abbreviation++);
w->WriteString(
- *stack_locals[local]->name()->ToCString(DISALLOW_NULLS));
+ *scope_info.LocalName(local)->ToCString(DISALLOW_NULLS));
w->Write<uint32_t>(ty_offset);
Writer::Slot<uint32_t> block_size = w->CreateSlotHere<uint32_t>();
uintptr_t block_start = w->position();
@@ -1298,7 +1287,7 @@ class DebugAbbrevSection : public DebugSection {
w->WriteULEB128(0);
}
- bool WriteBodyInternal(Writer* w) {
+ bool WriteBody(Writer* w) {
int current_abbreviation = 1;
bool extra_info = desc_->IsInfoAvailable();
ASSERT(desc_->IsLineInfoAvailable());
@@ -1317,13 +1306,14 @@ class DebugAbbrevSection : public DebugSection {
w->WriteULEB128(0);
if (extra_info) {
- Scope* scope = desc_->info()->scope();
- int params = scope->num_parameters();
- int slots = scope->num_stack_slots();
- int context_slots = scope->ContextLocalCount();
+ CompilationInfo* info = desc_->info();
+ ScopeInfo<FreeStoreAllocationPolicy> scope_info(info->scope());
+ int params = scope_info.number_of_parameters();
+ int slots = scope_info.number_of_stack_slots();
+ int context_slots = scope_info.number_of_context_slots();
// The real slot ID is internal_slots + context_slot_id.
int internal_slots = Context::MIN_CONTEXT_SLOTS;
- int locals = scope->StackLocalCount();
+ int locals = scope_info.LocalCount();
int total_children =
params + slots + context_slots + internal_slots + locals + 2;
@@ -1428,7 +1418,7 @@ class DebugLineSection : public DebugSection {
DW_LNE_DEFINE_FILE = 3
};
- bool WriteBodyInternal(Writer* w) {
+ bool WriteBody(Writer* w) {
// Write prologue.
Writer::Slot<uint32_t> total_length = w->CreateSlotHere<uint32_t>();
uintptr_t start = w->position();
@@ -1568,7 +1558,7 @@ class DebugLineSection : public DebugSection {
class UnwindInfoSection : public DebugSection {
public:
explicit UnwindInfoSection(CodeDescription* desc);
- virtual bool WriteBodyInternal(Writer* w);
+ virtual bool WriteBody(Writer* w);
int WriteCIE(Writer* w);
void WriteFDE(Writer* w, int);
@@ -1780,7 +1770,7 @@ void UnwindInfoSection::WriteFDEStateAfterRBPPop(Writer* w) {
}
-bool UnwindInfoSection::WriteBodyInternal(Writer* w) {
+bool UnwindInfoSection::WriteBody(Writer* w) {
uint32_t cie_position = WriteCIE(w);
WriteFDE(w, cie_position);
return true;
@@ -1790,14 +1780,13 @@ bool UnwindInfoSection::WriteBodyInternal(Writer* w) {
#endif // V8_TARGET_ARCH_X64
static void CreateDWARFSections(CodeDescription* desc, DebugObject* obj) {
- Zone* zone = desc->info()->zone();
if (desc->IsLineInfoAvailable()) {
- obj->AddSection(new(zone) DebugInfoSection(desc), zone);
- obj->AddSection(new(zone) DebugAbbrevSection(desc), zone);
- obj->AddSection(new(zone) DebugLineSection(desc), zone);
+ obj->AddSection(new DebugInfoSection(desc));
+ obj->AddSection(new DebugAbbrevSection(desc));
+ obj->AddSection(new DebugLineSection(desc));
}
#ifdef V8_TARGET_ARCH_X64
- obj->AddSection(new(zone) UnwindInfoSection(desc), zone);
+ obj->AddSection(new UnwindInfoSection(desc));
#endif
}
@@ -1916,8 +1905,7 @@ static void UnregisterCodeEntry(JITCodeEntry* entry) {
static JITCodeEntry* CreateELFObject(CodeDescription* desc) {
- Zone* zone = desc->info()->zone();
- ZoneScope zone_scope(zone, DELETE_ON_EXIT);
+ ZoneScope zone_scope(Isolate::Current(), DELETE_ON_EXIT);
#ifdef __MACH_O
MachO mach_o;
Writer w(&mach_o);
@@ -1930,19 +1918,17 @@ static JITCodeEntry* CreateELFObject(CodeDescription* desc) {
mach_o.Write(&w, desc->CodeStart(), desc->CodeSize());
#else
- ELF elf(zone);
+ ELF elf;
Writer w(&elf);
int text_section_index = elf.AddSection(
- new(zone) FullHeaderELFSection(
- ".text",
- ELFSection::TYPE_NOBITS,
- kCodeAlignment,
- desc->CodeStart(),
- 0,
- desc->CodeSize(),
- ELFSection::FLAG_ALLOC | ELFSection::FLAG_EXEC),
- zone);
+ new FullHeaderELFSection(".text",
+ ELFSection::TYPE_NOBITS,
+ kCodeAlignment,
+ desc->CodeStart(),
+ 0,
+ desc->CodeSize(),
+ ELFSection::FLAG_ALLOC | ELFSection::FLAG_EXEC));
CreateSymbolsTable(desc, &elf, text_section_index);
diff --git a/deps/v8/src/ic-inl.h b/deps/v8/src/ic-inl.h
index 6a86921a4..0e41093e5 100644
--- a/deps/v8/src/ic-inl.h
+++ b/deps/v8/src/ic-inl.h
@@ -79,6 +79,7 @@ Code* IC::GetTargetAtAddress(Address address) {
void IC::SetTargetAtAddress(Address address, Code* target) {
ASSERT(target->is_inline_cache_stub() || target->is_compare_ic_stub());
+ Heap* heap = target->GetHeap();
Code* old_target = GetTargetAtAddress(address);
#ifdef DEBUG
// STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark
@@ -90,8 +91,11 @@ void IC::SetTargetAtAddress(Address address, Code* target) {
}
#endif
Assembler::set_target_address_at(address, target->instruction_start());
- target->GetHeap()->incremental_marking()->RecordCodeTargetPatch(address,
- target);
+ if (heap->gc_state() == Heap::MARK_COMPACT) {
+ heap->mark_compact_collector()->RecordCodeTargetPatch(address, target);
+ } else {
+ heap->incremental_marking()->RecordCodeTargetPatch(address, target);
+ }
PostPatching(address, target, old_target);
}
diff --git a/deps/v8/src/mark-compact.cc b/deps/v8/src/mark-compact.cc
index 7d8c09f3a..31fa7afdd 100644
--- a/deps/v8/src/mark-compact.cc
+++ b/deps/v8/src/mark-compact.cc
@@ -340,11 +340,6 @@ bool MarkCompactCollector::StartCompaction(CompactionMode mode) {
if (!compacting_) {
ASSERT(evacuation_candidates_.length() == 0);
-#ifdef ENABLE_GDB_JIT_INTERFACE
- // If GDBJIT interface is active disable compaction.
- if (FLAG_gdbjit) return false;
-#endif
-
CollectEvacuationCandidates(heap()->old_pointer_space());
CollectEvacuationCandidates(heap()->old_data_space());
@@ -782,6 +777,13 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) {
ASSERT(!FLAG_never_compact || !FLAG_always_compact);
+#ifdef ENABLE_GDB_JIT_INTERFACE
+ if (FLAG_gdbjit) {
+ // If GDBJIT interface is active disable compaction.
+ compacting_collection_ = false;
+ }
+#endif
+
// Clear marking bits if incremental marking is aborted.
if (was_marked_incrementally_ && abort_incremental_marking_) {
heap()->incremental_marking()->Abort();
@@ -4078,6 +4080,20 @@ void MarkCompactCollector::RecordCodeEntrySlot(Address slot, Code* target) {
}
+void MarkCompactCollector::RecordCodeTargetPatch(Address pc, Code* target) {
+ ASSERT(heap()->gc_state() == Heap::MARK_COMPACT);
+ if (is_compacting()) {
+ Code* host = heap()->isolate()->inner_pointer_to_code_cache()->
+ GcSafeFindCodeForInnerPointer(pc);
+ MarkBit mark_bit = Marking::MarkBitFrom(host);
+ if (Marking::IsBlack(mark_bit)) {
+ RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host);
+ RecordRelocSlot(&rinfo, target);
+ }
+ }
+}
+
+
static inline SlotsBuffer::SlotType DecodeSlotType(
SlotsBuffer::ObjectSlot slot) {
return static_cast<SlotsBuffer::SlotType>(reinterpret_cast<intptr_t>(slot));
diff --git a/deps/v8/src/mark-compact.h b/deps/v8/src/mark-compact.h
index 015438062..d252e1928 100644
--- a/deps/v8/src/mark-compact.h
+++ b/deps/v8/src/mark-compact.h
@@ -552,6 +552,7 @@ class MarkCompactCollector {
void RecordRelocSlot(RelocInfo* rinfo, Object* target);
void RecordCodeEntrySlot(Address slot, Code* target);
+ void RecordCodeTargetPatch(Address pc, Code* target);
INLINE(void RecordSlot(Object** anchor_slot, Object** slot, Object* object));
diff --git a/deps/v8/src/messages.js b/deps/v8/src/messages.js
index b819724a1..d896ac394 100644
--- a/deps/v8/src/messages.js
+++ b/deps/v8/src/messages.js
@@ -229,7 +229,7 @@ function FormatMessage(message) {
"strict_catch_variable", ["Catch variable may not be eval or arguments in strict mode"],
"too_many_arguments", ["Too many arguments in function call (only 32766 allowed)"],
"too_many_parameters", ["Too many parameters in function definition (only 32766 allowed)"],
- "too_many_variables", ["Too many variables declared (only 32767 allowed)"],
+ "too_many_variables", ["Too many variables declared (only 65535 allowed)"],
"strict_param_name", ["Parameter name eval or arguments is not allowed in strict mode"],
"strict_param_dupe", ["Strict mode function may not have duplicate parameter names"],
"strict_var_name", ["Variable name may not be eval or arguments in strict mode"],
diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc
index 45d108b1c..254cd26f5 100644
--- a/deps/v8/src/objects.cc
+++ b/deps/v8/src/objects.cc
@@ -651,11 +651,9 @@ MaybeObject* Object::GetProperty(Object* receiver,
receiver, result->GetCallbackObject(), name);
case HANDLER:
return result->proxy()->GetPropertyWithHandler(receiver, name);
- case INTERCEPTOR: {
- JSObject* recvr = JSObject::cast(receiver);
+ case INTERCEPTOR:
return result->holder()->GetPropertyWithInterceptor(
- recvr, name, attributes);
- }
+ receiver, name, attributes);
case TRANSITION:
case NONEXISTENT:
UNREACHABLE();
@@ -10204,7 +10202,7 @@ InterceptorInfo* JSObject::GetIndexedInterceptor() {
MaybeObject* JSObject::GetPropertyPostInterceptor(
- JSReceiver* receiver,
+ Object* receiver,
String* name,
PropertyAttributes* attributes) {
// Check local property in holder, ignore interceptor.
@@ -10222,7 +10220,7 @@ MaybeObject* JSObject::GetPropertyPostInterceptor(
MaybeObject* JSObject::GetLocalPropertyPostInterceptor(
- JSReceiver* receiver,
+ Object* receiver,
String* name,
PropertyAttributes* attributes) {
// Check local property in holder, ignore interceptor.
@@ -10236,13 +10234,13 @@ MaybeObject* JSObject::GetLocalPropertyPostInterceptor(
MaybeObject* JSObject::GetPropertyWithInterceptor(
- JSReceiver* receiver,
+ Object* receiver,
String* name,
PropertyAttributes* attributes) {
Isolate* isolate = GetIsolate();
InterceptorInfo* interceptor = GetNamedInterceptor();
HandleScope scope(isolate);
- Handle<JSReceiver> receiver_handle(receiver);
+ Handle<Object> receiver_handle(receiver);
Handle<JSObject> holder_handle(this);
Handle<String> name_handle(name);
diff --git a/deps/v8/src/objects.h b/deps/v8/src/objects.h
index 45a2ac0d8..18e388f99 100644
--- a/deps/v8/src/objects.h
+++ b/deps/v8/src/objects.h
@@ -1680,15 +1680,15 @@ class JSObject: public JSReceiver {
String* name,
PropertyAttributes* attributes);
MUST_USE_RESULT MaybeObject* GetPropertyWithInterceptor(
- JSReceiver* receiver,
+ Object* receiver,
String* name,
PropertyAttributes* attributes);
MUST_USE_RESULT MaybeObject* GetPropertyPostInterceptor(
- JSReceiver* receiver,
+ Object* receiver,
String* name,
PropertyAttributes* attributes);
MUST_USE_RESULT MaybeObject* GetLocalPropertyPostInterceptor(
- JSReceiver* receiver,
+ Object* receiver,
String* name,
PropertyAttributes* attributes);
diff --git a/deps/v8/src/parser.h b/deps/v8/src/parser.h
index 1ab7a141b..93dd03a63 100644
--- a/deps/v8/src/parser.h
+++ b/deps/v8/src/parser.h
@@ -454,7 +454,7 @@ class Parser {
// construct a hashable id, so if more than 2^17 are allowed, this
// should be checked.
static const int kMaxNumFunctionParameters = 32766;
- static const int kMaxNumFunctionLocals = 32767;
+ static const int kMaxNumFunctionLocals = 65535;
enum Mode {
PARSE_LAZILY,
diff --git a/deps/v8/src/platform-posix.cc b/deps/v8/src/platform-posix.cc
index 2b8001516..3bc83733c 100644
--- a/deps/v8/src/platform-posix.cc
+++ b/deps/v8/src/platform-posix.cc
@@ -109,20 +109,11 @@ void* OS::GetRandomMmapAddr() {
raw_addr &= V8_UINT64_C(0x3ffffffff000);
#else
uint32_t raw_addr = V8::RandomPrivate(isolate);
-
- // For our 32-bit mmap() hint, we pick a random address in the bottom
- // half of the top half of the address space (that is, the third quarter).
- // Because we do not MAP_FIXED, this will be treated only as a hint -- the
- // system will not fail to mmap() because something else happens to already
- // be mapped at our random address. We deliberately set the hint high enough
- // to get well above the system's break (that is, the heap); systems will
- // either try the hint and if that fails move higher (MacOS and other BSD
- // derivatives) or try the hint and if that fails allocate as if there were
- // no hint at all (Linux, Solaris, illumos and derivatives). The high hint
- // prevents the break from getting hemmed in at low values, ceding half of
- // the address space to the system heap.
+ // The range 0x20000000 - 0x60000000 is relatively unpopulated across a
+ // variety of ASLR modes (PAE kernel, NX compat mode, etc) and on macos
+ // 10.6 and 10.7.
raw_addr &= 0x3ffff000;
- raw_addr += 0x80000000;
+ raw_addr += 0x20000000;
#endif
return reinterpret_cast<void*>(raw_addr);
}
diff --git a/deps/v8/src/platform-solaris.cc b/deps/v8/src/platform-solaris.cc
index 07718fe50..4248ea214 100644
--- a/deps/v8/src/platform-solaris.cc
+++ b/deps/v8/src/platform-solaris.cc
@@ -125,8 +125,12 @@ const char* OS::LocalTimezone(double time) {
double OS::LocalTimeOffset() {
- tzset();
- return -static_cast<double>(timezone * msPerSecond);
+ // On Solaris, struct tm does not contain a tm_gmtoff field.
+ time_t utc = time(NULL);
+ ASSERT(utc != -1);
+ struct tm* loc = localtime(&utc);
+ ASSERT(loc != NULL);
+ return static_cast<double>((mktime(loc) - utc) * msPerSecond);
}
diff --git a/deps/v8/src/version.cc b/deps/v8/src/version.cc
index 628665caf..c8c8fc30b 100644
--- a/deps/v8/src/version.cc
+++ b/deps/v8/src/version.cc
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 13
#define BUILD_NUMBER 7
-#define PATCH_LEVEL 1
+#define PATCH_LEVEL 4
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
diff --git a/deps/v8/src/x64/lithium-codegen-x64.cc b/deps/v8/src/x64/lithium-codegen-x64.cc
index 89e311e46..a07564ed2 100644
--- a/deps/v8/src/x64/lithium-codegen-x64.cc
+++ b/deps/v8/src/x64/lithium-codegen-x64.cc
@@ -3742,11 +3742,17 @@ void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
__ cmpq(reg, reg2);
}
} else {
+ Operand length = ToOperand(instr->length());
if (instr->index()->IsConstantOperand()) {
- __ cmpq(ToOperand(instr->length()),
- Immediate(ToInteger32(LConstantOperand::cast(instr->index()))));
+ int constant_index =
+ ToInteger32(LConstantOperand::cast(instr->index()));
+ if (instr->hydrogen()->length()->representation().IsTagged()) {
+ __ Cmp(length, Smi::FromInt(constant_index));
+ } else {
+ __ cmpq(length, Immediate(constant_index));
+ }
} else {
- __ cmpq(ToOperand(instr->length()), ToRegister(instr->index()));
+ __ cmpq(length, ToRegister(instr->index()));
}
}
DeoptimizeIf(below_equal, instr->environment());