Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 20:18:03 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r397413 - head/lang/v8-devel/files
Message-ID:  <201509202018.t8KKI3b6076950@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sun Sep 20 20:18:02 2015
New Revision: 397413
URL: https://svnweb.freebsd.org/changeset/ports/397413

Log:
  - 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

Added:
  head/lang/v8-devel/files/patch-src-allocation-tracker.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-deoptimizer.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-heap-snapshot-generator.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-ia32-ic-ia32.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-liveedit.cc   (contents, props changed)
  head/lang/v8-devel/files/patch-src-objects.h   (contents, props changed)
Modified:
  head/lang/v8-devel/files/patch-Makefile

Modified: head/lang/v8-devel/files/patch-Makefile
==============================================================================
--- head/lang/v8-devel/files/patch-Makefile	Sun Sep 20 20:17:28 2015	(r397412)
+++ head/lang/v8-devel/files/patch-Makefile	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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)

Added: head/lang/v8-devel/files/patch-src-allocation-tracker.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-allocation-tracker.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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");
+ }

Added: head/lang/v8-devel/files/patch-src-deoptimizer.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-deoptimizer.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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);
+       }
+ 

Added: head/lang/v8-devel/files/patch-src-heap-snapshot-generator.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-heap-snapshot-generator.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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()));
+     }
+   }
+ };

Added: head/lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-ia32-code-stubs-ia32.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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();

Added: head/lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-ia32-disasm-ia32.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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++) {

Added: head/lang/v8-devel/files/patch-src-ia32-ic-ia32.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-ia32-ic-ia32.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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

Added: head/lang/v8-devel/files/patch-src-liveedit.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-liveedit.cc	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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).

Added: head/lang/v8-devel/files/patch-src-objects.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/v8-devel/files/patch-src-objects.h	Sun Sep 20 20:18:02 2015	(r397413)
@@ -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 =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509202018.t8KKI3b6076950>