diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2015-09-21 04:18:02 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2015-09-21 04:18:02 +0800 |
commit | 5c4069845bd168fbb7dfa6f1592bc9308db14e60 (patch) | |
tree | ed301306f1338e0a0ec24dcb319246a3c14d2da8 | |
parent | 9d84ec65ed3c80ee410bf7fe9762452bcf22aa41 (diff) | |
download | freebsd-ports-gnome-5c4069845bd168fbb7dfa6f1592bc9308db14e60.tar.gz freebsd-ports-gnome-5c4069845bd168fbb7dfa6f1592bc9308db14e60.tar.zst freebsd-ports-gnome-5c4069845bd168fbb7dfa6f1592bc9308db14e60.zip |
- Fix warnings generated by recent snapshot of Clang 3.7.0, including:
- Printing non-void pointers with %p.
- Left-shifting negative numbers.
PR: 202534
Submitted by: dim
-rw-r--r-- | lang/v8-devel/files/patch-Makefile | 17 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-allocation-tracker.cc | 13 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-deoptimizer.cc | 29 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-heap-snapshot-generator.cc | 61 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc | 11 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc | 11 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-ia32-ic-ia32.cc | 12 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-liveedit.cc | 11 | ||||
-rw-r--r-- | lang/v8-devel/files/patch-src-objects.h | 13 |
9 files changed, 174 insertions, 4 deletions
diff --git a/lang/v8-devel/files/patch-Makefile b/lang/v8-devel/files/patch-Makefile index 66431b86f357..860ef5dc2c14 100644 --- a/lang/v8-devel/files/patch-Makefile +++ b/lang/v8-devel/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 2014-02-04 10:07:31.000000000 +0800 -+++ Makefile 2014-02-04 17:01:29.349287737 +0800 +--- Makefile.orig 2014-06-03 08:52:18 UTC ++++ Makefile @@ -52,6 +52,14 @@ endif ifdef console GYPFLAGS += -Dconsole=$(console) @@ -15,7 +15,16 @@ # disassembler=on ifeq ($(disassembler), on) GYPFLAGS += -Dv8_enable_disassembler=1 -@@ -386,8 +394,7 @@ clean: $(addsuffix .clean, $(ARCHES) $(A +@@ -227,7 +235,7 @@ NACL_ARCHES = nacl_ia32 nacl_x64 + # List of files that trigger Makefile regeneration: + GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \ + build/toolchain.gypi samples/samples.gyp src/d8.gyp \ +- test/cctest/cctest.gyp tools/gyp/v8.gyp ++ tools/gyp/v8.gyp + + # If vtunejit=on, the v8vtune.gyp will be appended. + ifeq ($(vtunejit), on) +@@ -395,8 +403,7 @@ clean: $(addsuffix .clean, $(ARCHES) $(A # GYP file generation targets. OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) @@ -25,7 +34,7 @@ GYP_GENERATORS=make \ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ -Ibuild/standalone.gypi --depth=. \ -@@ -396,8 +403,7 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) +@@ -405,8 +412,7 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) diff --git a/lang/v8-devel/files/patch-src-allocation-tracker.cc b/lang/v8-devel/files/patch-src-allocation-tracker.cc new file mode 100644 index 000000000000..ea235d3cce51 --- /dev/null +++ b/lang/v8-devel/files/patch-src-allocation-tracker.cc @@ -0,0 +1,13 @@ +--- src/allocation-tracker.cc.orig 2014-06-03 08:52:11 UTC ++++ src/allocation-tracker.cc +@@ -152,8 +152,8 @@ void AddressToTraceMap::Clear() { + void AddressToTraceMap::Print() { + PrintF("[AddressToTraceMap (%" V8PRIuPTR "): \n", ranges_.size()); + for (RangeMap::iterator it = ranges_.begin(); it != ranges_.end(); ++it) { +- PrintF("[%p - %p] => %u\n", it->second.start, it->first, +- it->second.trace_node_id); ++ PrintF("[%p - %p] => %u\n", reinterpret_cast<void*>(it->second.start), ++ reinterpret_cast<void*>(it->first), it->second.trace_node_id); + } + PrintF("]\n"); + } diff --git a/lang/v8-devel/files/patch-src-deoptimizer.cc b/lang/v8-devel/files/patch-src-deoptimizer.cc new file mode 100644 index 000000000000..a80aa850c9e5 --- /dev/null +++ b/lang/v8-devel/files/patch-src-deoptimizer.cc @@ -0,0 +1,29 @@ +--- src/deoptimizer.cc.orig 2014-06-03 08:52:11 UTC ++++ src/deoptimizer.cc +@@ -1920,7 +1920,7 @@ void Deoptimizer::MaterializeHeapObjects + "Materialized a new heap number %p [%e] in slot %p\n", + reinterpret_cast<void*>(*num), + d.value(), +- d.destination()); ++ reinterpret_cast<void*>(d.destination())); + } + Memory::Object_at(d.destination()) = *num; + } +@@ -2017,7 +2017,7 @@ void Deoptimizer::MaterializeHeapNumbers + "for parameter slot #%d\n", + reinterpret_cast<void*>(*num), + d.value(), +- d.destination(), ++ reinterpret_cast<void*>(d.destination()), + index); + } + +@@ -2034,7 +2034,7 @@ void Deoptimizer::MaterializeHeapNumbers + "for expression slot #%d\n", + reinterpret_cast<void*>(*num), + d.value(), +- d.destination(), ++ reinterpret_cast<void*>(d.destination()), + index); + } + diff --git a/lang/v8-devel/files/patch-src-heap-snapshot-generator.cc b/lang/v8-devel/files/patch-src-heap-snapshot-generator.cc new file mode 100644 index 000000000000..bc865f33ded6 --- /dev/null +++ b/lang/v8-devel/files/patch-src-heap-snapshot-generator.cc @@ -0,0 +1,61 @@ +--- src/heap-snapshot-generator.cc.orig 2014-06-03 08:52:11 UTC ++++ src/heap-snapshot-generator.cc +@@ -410,8 +410,8 @@ bool HeapObjectsMap::MoveObject(Address + // object is migrated. + if (FLAG_heap_profiler_trace_objects) { + PrintF("Move object from %p to %p old size %6d new size %6d\n", +- from, +- to, ++ reinterpret_cast<void*>(from), ++ reinterpret_cast<void*>(to), + entries_.at(from_entry_info_index).size, + object_size); + } +@@ -451,7 +451,7 @@ SnapshotObjectId HeapObjectsMap::FindOrA + entry_info.accessed = accessed; + if (FLAG_heap_profiler_trace_objects) { + PrintF("Update object size : %p with old size %d and new size %d\n", +- addr, ++ reinterpret_cast<void*>(addr), + entry_info.size, + size); + } +@@ -486,9 +486,9 @@ void HeapObjectsMap::UpdateHeapObjectsMa + FindOrAddEntry(obj->address(), obj->Size()); + if (FLAG_heap_profiler_trace_objects) { + PrintF("Update object : %p %6d. Next address is %p\n", +- obj->address(), ++ reinterpret_cast<void*>(obj->address()), + obj->Size(), +- obj->address() + obj->Size()); ++ reinterpret_cast<void*>(obj->address() + obj->Size())); + } + } + RemoveDeadEntries(); +@@ -516,20 +516,20 @@ struct HeapObjectInfo { + void Print() const { + if (expected_size == 0) { + PrintF("Untracked object : %p %6d. Next address is %p\n", +- obj->address(), ++ reinterpret_cast<void*>(obj->address()), + obj->Size(), +- obj->address() + obj->Size()); ++ reinterpret_cast<void*>(obj->address() + obj->Size())); + } else if (obj->Size() != expected_size) { + PrintF("Wrong size %6d: %p %6d. Next address is %p\n", + expected_size, +- obj->address(), ++ reinterpret_cast<void*>(obj->address()), + obj->Size(), +- obj->address() + obj->Size()); ++ reinterpret_cast<void*>(obj->address() + obj->Size())); + } else { + PrintF("Good object : %p %6d. Next address is %p\n", +- obj->address(), ++ reinterpret_cast<void*>(obj->address()), + expected_size, +- obj->address() + obj->Size()); ++ reinterpret_cast<void*>(obj->address() + obj->Size())); + } + } + }; diff --git a/lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc b/lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc new file mode 100644 index 000000000000..baf25032ff0c --- /dev/null +++ b/lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc @@ -0,0 +1,11 @@ +--- src/ia32/code-stubs-ia32.cc.orig 2014-06-03 08:52:11 UTC ++++ src/ia32/code-stubs-ia32.cc +@@ -3143,7 +3143,7 @@ void StringCharFromCodeGenerator::Genera + ASSERT(IsPowerOf2(String::kMaxOneByteCharCode + 1)); + __ test(code_, + Immediate(kSmiTagMask | +- ((~String::kMaxOneByteCharCode) << kSmiTagSize))); ++ ((~String::kMaxOneByteCharCodeU) << kSmiTagSize))); + __ j(not_zero, &slow_case_); + + Factory* factory = masm->isolate()->factory(); diff --git a/lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc b/lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc new file mode 100644 index 000000000000..f5ada567c412 --- /dev/null +++ b/lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc @@ -0,0 +1,11 @@ +--- src/ia32/disasm-ia32.cc.orig 2014-06-03 08:52:11 UTC ++++ src/ia32/disasm-ia32.cc +@@ -1743,7 +1743,7 @@ int Disassembler::ConstantPoolSizeAt(byt + buffer[0] = '\0'; + byte* prev_pc = pc; + pc += d.InstructionDecode(buffer, pc); +- fprintf(f, "%p", prev_pc); ++ fprintf(f, "%p", reinterpret_cast<void*>(prev_pc)); + fprintf(f, " "); + + for (byte* bp = prev_pc; bp < pc; bp++) { diff --git a/lang/v8-devel/files/patch-src-ia32-ic-ia32.cc b/lang/v8-devel/files/patch-src-ia32-ic-ia32.cc new file mode 100644 index 000000000000..f298e15f0fa6 --- /dev/null +++ b/lang/v8-devel/files/patch-src-ia32-ic-ia32.cc @@ -0,0 +1,12 @@ +--- src/ia32/ic-ia32.cc.orig 2014-06-03 08:52:11 UTC ++++ src/ia32/ic-ia32.cc +@@ -1262,7 +1262,8 @@ void PatchInlinedSmiCode(Address address + uint8_t delta = *reinterpret_cast<uint8_t*>(delta_address); + if (FLAG_trace_ic) { + PrintF("[ patching ic at %p, test=%p, delta=%d\n", +- address, test_instruction_address, delta); ++ reinterpret_cast<void*>(address), ++ reinterpret_cast<void*>(test_instruction_address), delta); + } + + // Patch with a short conditional jump. Enabling means switching from a short diff --git a/lang/v8-devel/files/patch-src-liveedit.cc b/lang/v8-devel/files/patch-src-liveedit.cc new file mode 100644 index 000000000000..8ad906791f56 --- /dev/null +++ b/lang/v8-devel/files/patch-src-liveedit.cc @@ -0,0 +1,11 @@ +--- src/liveedit.cc.orig 2014-06-03 08:52:11 UTC ++++ src/liveedit.cc +@@ -174,7 +174,7 @@ class Differencer { + + static const int kDirectionSizeBits = 2; + static const int kDirectionMask = (1 << kDirectionSizeBits) - 1; +- static const int kEmptyCellValue = -1 << kDirectionSizeBits; ++ static const int kEmptyCellValue = -(1 << kDirectionSizeBits); + + // This method only holds static assert statement (unfortunately you cannot + // place one in class scope). diff --git a/lang/v8-devel/files/patch-src-objects.h b/lang/v8-devel/files/patch-src-objects.h new file mode 100644 index 000000000000..f39b68b493da --- /dev/null +++ b/lang/v8-devel/files/patch-src-objects.h @@ -0,0 +1,13 @@ +--- src/objects.h.orig 2014-06-03 08:52:11 UTC ++++ src/objects.h +@@ -8824,8 +8824,8 @@ class Name: public HeapObject { + STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); + + static const unsigned int kContainsCachedArrayIndexMask = +- (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) | +- kIsNotArrayIndexMask; ++ (~static_cast<unsigned>(kMaxCachedArrayIndexLength) ++ << ArrayIndexLengthBits::kShift) | kIsNotArrayIndexMask; + + // Value of empty hash field indicating that the hash is not computed. + static const int kEmptyHashField = |