diff options
author | vanilla <vanilla@FreeBSD.org> | 2011-11-03 23:13:15 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2011-11-03 23:13:15 +0800 |
commit | 11228610cad13a1b6621e9617b9822c4528420ef (patch) | |
tree | d76d54885360dbe3fa1f7e6f8792cf4c2e8da2ea | |
parent | e96c7f1d6ecc66f782689912120bc03ff1abe027 (diff) | |
download | freebsd-ports-gnome-11228610cad13a1b6621e9617b9822c4528420ef.tar.gz freebsd-ports-gnome-11228610cad13a1b6621e9617b9822c4528420ef.tar.zst freebsd-ports-gnome-11228610cad13a1b6621e9617b9822c4528420ef.zip |
Upgrade to 3.7.3.
-rw-r--r-- | lang/v8/Makefile | 8 | ||||
-rw-r--r-- | lang/v8/distinfo | 4 | ||||
-rw-r--r-- | lang/v8/files/patch-platform-freebsd.cc | 136 | ||||
-rw-r--r-- | lang/v8/files/patch-src_conversions.h | 19 | ||||
-rw-r--r-- | lang/v8/files/patch-src_hydrogen-instructions.cc | 28 | ||||
-rw-r--r-- | lang/v8/files/patch-src_jsregexp.cc | 29 | ||||
-rw-r--r-- | lang/v8/files/patch-src_jsregexp.h | 11 | ||||
-rw-r--r-- | lang/v8/files/patch-src_lithium-codegen-ia32.cc | 10 |
8 files changed, 141 insertions, 104 deletions
diff --git a/lang/v8/Makefile b/lang/v8/Makefile index c44039edbba0..f521978ed454 100644 --- a/lang/v8/Makefile +++ b/lang/v8/Makefile @@ -6,20 +6,18 @@ # PORTNAME= v8 -PORTVERSION= 3.5.10 +PORTVERSION= 3.7.3 PORTREVISION= 0 CATEGORIES= lang -MASTER_SITES= http://github.com/${PORTNAME}/${PORTNAME}/tarball/${PORTVERSION}/ -DISTNAME= ${PORTNAME}-${PORTNAME}-${PORTVERSION}-${GITVERSION} +MASTER_SITES= LOCAL/vanilla MAINTAINER= vanilla@FreeBSD.org COMMENT= Google\'s open source JavaScript engine LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo -GITVERSION= 0-g4cf15c7 +USE_XZ= yes FETCH_ARGS= -pRr -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTNAME}-${GITVERSION:S/^0-g//} USE_SCONS= yes USE_LDCONFIG= yes OPTIONS= DEBUG "Build in debug mode" Off \ diff --git a/lang/v8/distinfo b/lang/v8/distinfo index 56e31ef574be..973bc9cbdcce 100644 --- a/lang/v8/distinfo +++ b/lang/v8/distinfo @@ -1,2 +1,2 @@ -SHA256 (v8-v8-3.5.10-0-g4cf15c7.tar.gz) = 81cdde77c0e6eb9f032a4c8e36be8bc2bed0ccf37e40b61e5a25c3817bff2704 -SIZE (v8-v8-3.5.10-0-g4cf15c7.tar.gz) = 10933103 +SHA256 (v8-3.7.3.tar.xz) = ee993686d9c1e71f9c1adbe42d3e8ccb374f6d8f2e91c6378ce0ee880ff327fe +SIZE (v8-3.7.3.tar.xz) = 7921496 diff --git a/lang/v8/files/patch-platform-freebsd.cc b/lang/v8/files/patch-platform-freebsd.cc new file mode 100644 index 000000000000..620e137cb944 --- /dev/null +++ b/lang/v8/files/patch-platform-freebsd.cc @@ -0,0 +1,136 @@ +--- src/platform-freebsd.cc.orig 2011-10-25 19:44:21.000000000 +0800 ++++ src/platform-freebsd.cc 2011-10-25 20:08:08.000000000 +0800 +@@ -333,32 +333,96 @@ int OS::StackWalk(Vector<OS::StackFrame> + static const int kMmapFd = -1; + static const int kMmapFdOffset = 0; + ++VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } ++ ++ ++VirtualMemory::VirtualMemory(size_t size) ++ : address_(ReserveRegion(size)), size_(size) { } + +-VirtualMemory::VirtualMemory(size_t size) { +- address_ = mmap(NULL, size, PROT_NONE, +- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, +- kMmapFd, kMmapFdOffset); +- size_ = size; +-} + ++VirtualMemory::VirtualMemory(size_t size, size_t alignment) ++ : address_(NULL), size_(0) { ++ ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment()))); ++ size_t request_size = RoundUp(size + alignment, ++ static_cast<intptr_t>(OS::AllocateAlignment())); ++ void* reservation = mmap(OS::GetRandomMmapAddr(), ++ request_size, ++ PROT_NONE, ++ MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, ++ kMmapFd, ++ kMmapFdOffset); ++ if (reservation == MAP_FAILED) return; ++ ++ Address base = static_cast<Address>(reservation); ++ Address aligned_base = RoundUp(base, alignment); ++ ASSERT_LE(base, aligned_base); ++ ++ // Unmap extra memory reserved before and after the desired block. ++ if (aligned_base != base) { ++ size_t prefix_size = static_cast<size_t>(aligned_base - base); ++ OS::Free(base, prefix_size); ++ request_size -= prefix_size; ++ } ++ ++ size_t aligned_size = RoundUp(size, OS::AllocateAlignment()); ++ ASSERT_LE(aligned_size, request_size); ++ ++ if (aligned_size != request_size) { ++ size_t suffix_size = request_size - aligned_size; ++ OS::Free(aligned_base + aligned_size, suffix_size); ++ request_size -= suffix_size; ++ } ++ ++ ASSERT(aligned_size == request_size); ++ ++ address_ = static_cast<void*>(aligned_base); ++ size_ = aligned_size; ++} + + VirtualMemory::~VirtualMemory() { + if (IsReserved()) { +- if (0 == munmap(address(), size())) address_ = MAP_FAILED; ++ bool result = ReleaseRegion(address(), size()); ++ ASSERT(result); ++ USE(result); + } + } + ++void VirtualMemory::Reset() { ++ address_ = NULL; ++ size_ = 0; ++} ++ ++void* VirtualMemory::ReserveRegion(size_t size) { ++ void* result = mmap(OS::GetRandomMmapAddr(), ++ size, ++ PROT_NONE, ++ MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, ++ kMmapFd, ++ kMmapFdOffset); ++ ++ if (result == MAP_FAILED) return NULL; ++ ++ return result; ++} + + bool VirtualMemory::IsReserved() { + return address_ != MAP_FAILED; + } + ++bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { ++ return CommitRegion(address, size, is_executable); ++} + +-bool VirtualMemory::Commit(void* address, size_t size, bool executable) { +- int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0); +- if (MAP_FAILED == mmap(address, size, prot, ++bool VirtualMemory::CommitRegion(void* address, ++ size_t size, ++ bool is_executable) { ++ int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0); ++ if (MAP_FAILED == mmap(address, ++ size, ++ prot, + MAP_PRIVATE | MAP_ANON | MAP_FIXED, +- kMmapFd, kMmapFdOffset)) { ++ kMmapFd, ++ kMmapFdOffset)) { + return false; + } + +@@ -366,13 +430,22 @@ bool VirtualMemory::Commit(void* address + return true; + } + +- + bool VirtualMemory::Uncommit(void* address, size_t size) { +- return mmap(address, size, PROT_NONE, ++ return UncommitRegion(address, size); ++} ++ ++bool VirtualMemory::UncommitRegion(void* address, size_t size) { ++ return mmap(address, ++ size, ++ PROT_NONE, + MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, +- kMmapFd, kMmapFdOffset) != MAP_FAILED; ++ kMmapFd, ++ kMmapFdOffset) != MAP_FAILED; + } + ++bool VirtualMemory::ReleaseRegion(void* address, size_t size) { ++ return munmap(address, size) == 0; ++} + + class Thread::PlatformData : public Malloced { + public: diff --git a/lang/v8/files/patch-src_conversions.h b/lang/v8/files/patch-src_conversions.h deleted file mode 100644 index bd594edb5935..000000000000 --- a/lang/v8/files/patch-src_conversions.h +++ /dev/null @@ -1,19 +0,0 @@ ---- src/conversions.h.orig 2011-09-23 16:57:57.000000000 +0800 -+++ src/conversions.h 2011-09-23 16:58:09.000000000 +0800 -@@ -45,14 +45,14 @@ namespace internal { - const int kMaxSignificantDigits = 772; - - --static bool isDigit(int x, int radix) { -+static inline bool isDigit(int x, int radix) { - return (x >= '0' && x <= '9' && x < '0' + radix) - || (radix > 10 && x >= 'a' && x < 'a' + radix - 10) - || (radix > 10 && x >= 'A' && x < 'A' + radix - 10); - } - - --static double SignedZero(bool negative) { -+static inline double SignedZero(bool negative) { - return negative ? -0.0 : 0.0; - } - diff --git a/lang/v8/files/patch-src_hydrogen-instructions.cc b/lang/v8/files/patch-src_hydrogen-instructions.cc deleted file mode 100644 index ed2927964f77..000000000000 --- a/lang/v8/files/patch-src_hydrogen-instructions.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- src/hydrogen-instructions.cc.orig 2011-08-31 17:03:56.000000000 +0800 -+++ src/hydrogen-instructions.cc 2011-09-23 20:39:25.000000000 +0800 -@@ -1203,10 +1203,10 @@ void HBinaryOperation::PrintDataTo(Strin - Range* HBitAnd::InferRange() { - int32_t left_mask = (left()->range() != NULL) - ? left()->range()->Mask() -- : 0xffffffff; -+ : (int32_t) 0xffffffff; - int32_t right_mask = (right()->range() != NULL) - ? right()->range()->Mask() -- : 0xffffffff; -+ : (int32_t) 0xffffffff; - int32_t result_mask = left_mask & right_mask; - return (result_mask >= 0) - ? new Range(0, result_mask) -@@ -1217,10 +1217,10 @@ Range* HBitAnd::InferRange() { - Range* HBitOr::InferRange() { - int32_t left_mask = (left()->range() != NULL) - ? left()->range()->Mask() -- : 0xffffffff; -+ : (int32_t) 0xffffffff; - int32_t right_mask = (right()->range() != NULL) - ? right()->range()->Mask() -- : 0xffffffff; -+ : (int32_t) 0xffffffff; - int32_t result_mask = left_mask | right_mask; - return (result_mask >= 0) - ? new Range(0, result_mask) diff --git a/lang/v8/files/patch-src_jsregexp.cc b/lang/v8/files/patch-src_jsregexp.cc deleted file mode 100644 index 8a2ae3266311..000000000000 --- a/lang/v8/files/patch-src_jsregexp.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- src/jsregexp.cc.orig 2011-08-31 17:03:56.000000000 +0800 -+++ src/jsregexp.cc 2011-09-23 20:41:09.000000000 +0800 -@@ -2661,7 +2661,7 @@ int TextNode::GreedyLoopTextLength() { - // this alternative and back to this choice node. If there are variable - // length nodes or other complications in the way then return a sentinel - // value indicating that a greedy loop cannot be constructed. --int ChoiceNode::GreedyLoopTextLength(GuardedAlternative* alternative) { -+int ChoiceNode::GreedyLoopTextLengthForAlternative(GuardedAlternative* alternative) { - int length = 0; - RegExpNode* node = alternative->node(); - // Later we will generate code for all these text nodes using recursion -@@ -2700,7 +2700,7 @@ void LoopChoiceNode::AddContinueAlternat - void LoopChoiceNode::Emit(RegExpCompiler* compiler, Trace* trace) { - RegExpMacroAssembler* macro_assembler = compiler->macro_assembler(); - if (trace->stop_node() == this) { -- int text_length = GreedyLoopTextLength(&(alternatives_->at(0))); -+ int text_length = GreedyLoopTextLengthForAlternative(&(alternatives_->at(0))); - ASSERT(text_length != kNodeIsTooComplexForGreedyLoops); - // Update the counter-based backtracking info on the stack. This is an - // optimization for greedy loops (see below). -@@ -2893,7 +2893,7 @@ void ChoiceNode::Emit(RegExpCompiler* co - - Trace* current_trace = trace; - -- int text_length = GreedyLoopTextLength(&(alternatives_->at(0))); -+ int text_length = GreedyLoopTextLengthForAlternative(&(alternatives_->at(0))); - bool greedy_loop = false; - Label greedy_loop_label; - Trace counter_backtrack_trace; diff --git a/lang/v8/files/patch-src_jsregexp.h b/lang/v8/files/patch-src_jsregexp.h deleted file mode 100644 index c4d9009f4636..000000000000 --- a/lang/v8/files/patch-src_jsregexp.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/jsregexp.h.orig 2011-09-23 16:55:52.000000000 +0800 -+++ src/jsregexp.h 2011-09-23 16:56:04.000000000 +0800 -@@ -1071,7 +1071,7 @@ class ChoiceNode: public RegExpNode { - virtual bool try_to_emit_quick_check_for_alternative(int i) { return true; } - - protected: -- int GreedyLoopTextLength(GuardedAlternative* alternative); -+ int GreedyLoopTextLengthForAlternative(GuardedAlternative* alternative); - ZoneList<GuardedAlternative>* alternatives_; - - private: diff --git a/lang/v8/files/patch-src_lithium-codegen-ia32.cc b/lang/v8/files/patch-src_lithium-codegen-ia32.cc deleted file mode 100644 index 425edb3e6450..000000000000 --- a/lang/v8/files/patch-src_lithium-codegen-ia32.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- src/ia32/lithium-codegen-ia32.cc.orig 2011-09-23 17:00:54.000000000 +0800 -+++ src/ia32/lithium-codegen-ia32.cc 2011-09-23 17:01:10.000000000 +0800 -@@ -3175,7 +3175,6 @@ void LCodeGen::DoStoreKeyedFastElement(L - void LCodeGen::DoStoreKeyedFastDoubleElement( - LStoreKeyedFastDoubleElement* instr) { - XMMRegister value = ToDoubleRegister(instr->value()); -- Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; - Label have_value; - - __ ucomisd(value, value); |