Revision: 18267
Author:   [email protected]
Date:     Fri Dec  6 11:45:26 2013 UTC
Log:      Fix compilation with clang

[email protected]

Review URL: https://codereview.chromium.org/106863002
http://code.google.com/p/v8/source/detail?r=18267

Modified:
 /branches/bleeding_edge/src/arm/codegen-arm.cc
 /branches/bleeding_edge/src/arm/stub-cache-arm.cc
 /branches/bleeding_edge/src/assembler.cc
 /branches/bleeding_edge/src/builtins.cc
 /branches/bleeding_edge/src/cached-powers.cc
 /branches/bleeding_edge/src/date.cc
 /branches/bleeding_edge/src/heap-snapshot-generator.cc
 /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
 /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc
 /branches/bleeding_edge/src/scanner-character-streams.cc
 /branches/bleeding_edge/src/x64/full-codegen-x64.cc
 /branches/bleeding_edge/src/x64/stub-cache-x64.cc
 /branches/bleeding_edge/test/cctest/test-api.cc
 /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc
 /branches/bleeding_edge/test/cctest/test-debug.cc

=======================================
--- /branches/bleeding_edge/src/arm/codegen-arm.cc Wed Dec 4 11:39:24 2013 UTC +++ /branches/bleeding_edge/src/arm/codegen-arm.cc Fri Dec 6 11:45:26 2013 UTC
@@ -833,8 +833,10 @@

 #undef __

+#ifdef DEBUG
 // add(r0, pc, Operand(-8))
 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008;
+#endif

 static byte* GetNoCodeAgeSequence(uint32_t* length) {
   // The sequence of instructions that is patched out for aging code is the
=======================================
--- /branches/bleeding_edge/src/arm/stub-cache-arm.cc Thu Dec 5 12:38:50 2013 UTC +++ /branches/bleeding_edge/src/arm/stub-cache-arm.cc Fri Dec 6 11:45:26 2013 UTC
@@ -927,12 +927,10 @@
  public:
   CallInterceptorCompiler(CallStubCompiler* stub_compiler,
                           const ParameterCount& arguments,
-                          Register name,
-                          ExtraICState extra_ic_state)
+                          Register name)
       : stub_compiler_(stub_compiler),
         arguments_(arguments),
-        name_(name),
-        extra_ic_state_(extra_ic_state) {}
+        name_(name) {}

   void Compile(MacroAssembler* masm,
                Handle<JSObject> object,
@@ -1107,7 +1105,6 @@
   CallStubCompiler* stub_compiler_;
   const ParameterCount& arguments_;
   Register name_;
-  ExtraICState extra_ic_state_;
 };


@@ -2466,7 +2463,7 @@
   // Get the receiver from the stack.
   __ ldr(r1, MemOperand(sp, argc * kPointerSize));

-  CallInterceptorCompiler compiler(this, arguments(), r2, extra_state());
+  CallInterceptorCompiler compiler(this, arguments(), r2);
   compiler.Compile(masm(), object, holder, name, &lookup, r1, r3, r4, r0,
                    &miss);

=======================================
--- /branches/bleeding_edge/src/assembler.cc    Wed Dec  4 11:39:24 2013 UTC
+++ /branches/bleeding_edge/src/assembler.cc    Fri Dec  6 11:45:26 2013 UTC
@@ -306,7 +306,9 @@
 //                dropped, and last non-zero chunk tagged with 1.)


+#ifdef DEBUG
 const int kMaxStandardNonCompactModes = 14;
+#endif

 const int kTagBits = 2;
 const int kTagMask = (1 << kTagBits) - 1;
=======================================
--- /branches/bleeding_edge/src/builtins.cc     Mon Dec  2 15:38:50 2013 UTC
+++ /branches/bleeding_edge/src/builtins.cc     Fri Dec  6 11:45:26 2013 UTC
@@ -153,8 +153,8 @@
 #endif


+#ifdef DEBUG
 static inline bool CalledAsConstructor(Isolate* isolate) {
-#ifdef DEBUG
   // Calculate the result using a full stack frame iterator and check
   // that the state of the stack is as we assume it to be in the
   // code below.
@@ -163,7 +163,6 @@
   it.Advance();
   StackFrame* frame = it.frame();
   bool reference_result = frame->is_construct();
-#endif
   Address fp = Isolate::c_entry_fp(isolate->thread_local_top());
   // Because we know fp points to an exit frame we can use the relevant
   // part of ExitFrame::ComputeCallerState directly.
@@ -180,6 +179,7 @@
   ASSERT_EQ(result, reference_result);
   return result;
 }
+#endif


// ----------------------------------------------------------------------------
=======================================
--- /branches/bleeding_edge/src/cached-powers.cc Fri Apr 19 13:26:47 2013 UTC +++ /branches/bleeding_edge/src/cached-powers.cc Fri Dec 6 11:45:26 2013 UTC
@@ -133,7 +133,10 @@
   {V8_2PART_UINT64_C(0xaf87023b, 9bf0ee6b), 1066, 340},
 };

+#ifdef DEBUG
 static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
+#endif
+
static const int kCachedPowersOffset = 348; // -1 * the first decimal_exponent.
 static const double kD_1_LOG2_10 = 0.30102999566398114;  //  1 / lg(10)
 // Difference between the decimal exponents in the table above.
=======================================
--- /branches/bleeding_edge/src/date.cc Fri Mar  9 12:07:29 2012 UTC
+++ /branches/bleeding_edge/src/date.cc Fri Dec  6 11:45:26 2013 UTC
@@ -36,7 +36,6 @@
 namespace internal {


-static const int kDays4Years[] = {0, 365, 2 * 365, 3 * 365 + 1};
 static const int kDaysIn4Years = 4 * 365 + 1;
 static const int kDaysIn100Years = 25 * kDaysIn4Years - 1;
 static const int kDaysIn400Years = 4 * kDaysIn100Years + 1;
=======================================
--- /branches/bleeding_edge/src/heap-snapshot-generator.cc Tue Dec 3 09:48:30 2013 UTC +++ /branches/bleeding_edge/src/heap-snapshot-generator.cc Fri Dec 6 11:45:26 2013 UTC
@@ -202,6 +202,7 @@

 }  // namespace

+
 HeapSnapshot::HeapSnapshot(HeapProfiler* profiler,
                            const char* title,
                            unsigned uid)
@@ -218,6 +219,10 @@
   STATIC_CHECK(
       sizeof(HeapEntry) ==
       SnapshotSizeConstants<kPointerSize>::kExpectedHeapEntrySize);
+  USE(SnapshotSizeConstants<4>::kExpectedHeapGraphEdgeSize);
+  USE(SnapshotSizeConstants<4>::kExpectedHeapEntrySize);
+  USE(SnapshotSizeConstants<8>::kExpectedHeapGraphEdgeSize);
+  USE(SnapshotSizeConstants<8>::kExpectedHeapEntrySize);
   for (int i = 0; i < VisitorSynchronization::kNumberOfSyncTags; ++i) {
     gc_subroot_indexes_[i] = HeapEntry::kNoEntry;
   }
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri Dec 6 09:52:40 2013 UTC +++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri Dec 6 11:45:26 2013 UTC
@@ -4833,9 +4833,11 @@

 static const byte kJnsInstruction = 0x79;
 static const byte kJnsOffset = 0x11;
-static const byte kCallInstruction = 0xe8;
 static const byte kNopByteOne = 0x66;
 static const byte kNopByteTwo = 0x90;
+#ifdef DEBUG
+static const byte kCallInstruction = 0xe8;
+#endif


 void BackEdgeTable::PatchAt(Code* unoptimized_code,
=======================================
--- /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Mon Dec 2 11:59:44 2013 UTC +++ /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Fri Dec 6 11:45:26 2013 UTC
@@ -647,8 +647,7 @@
  public:
   CallInterceptorCompiler(CallStubCompiler* stub_compiler,
                           const ParameterCount& arguments,
-                          Register name,
-                          ExtraICState extra_state)
+                          Register name)
       : stub_compiler_(stub_compiler),
         arguments_(arguments),
         name_(name) {}
@@ -2589,7 +2588,7 @@
   // Get the receiver from the stack.
   __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));

-  CallInterceptorCompiler compiler(this, arguments(), ecx, extra_state());
+  CallInterceptorCompiler compiler(this, arguments(), ecx);
compiler.Compile(masm(), object, holder, name, &lookup, edx, ebx, edi, eax,
                    &miss);

=======================================
--- /branches/bleeding_edge/src/scanner-character-streams.cc Fri Jul 5 09:52:11 2013 UTC +++ /branches/bleeding_edge/src/scanner-character-streams.cc Fri Dec 6 11:45:26 2013 UTC
@@ -213,11 +213,11 @@


 static const byte kUtf8MultiByteMask = 0xC0;
-static const byte kUtf8MultiByteCharStart = 0xC0;
 static const byte kUtf8MultiByteCharFollower = 0x80;


 #ifdef DEBUG
+static const byte kUtf8MultiByteCharStart = 0xC0;
 static bool IsUtf8MultiCharacterStart(byte first_byte) {
   return (first_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharStart;
 }
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Fri Dec 6 09:52:40 2013 UTC +++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Fri Dec 6 11:45:26 2013 UTC
@@ -4826,9 +4826,11 @@

 static const byte kJnsInstruction = 0x79;
 static const byte kJnsOffset = 0x1d;
-static const byte kCallInstruction = 0xe8;
 static const byte kNopByteOne = 0x66;
 static const byte kNopByteTwo = 0x90;
+#ifdef DEBUG
+static const byte kCallInstruction = 0xe8;
+#endif


 void BackEdgeTable::PatchAt(Code* unoptimized_code,
=======================================
--- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Mon Dec 2 11:59:44 2013 UTC +++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Fri Dec 6 11:45:26 2013 UTC
@@ -639,12 +639,10 @@
  public:
   CallInterceptorCompiler(CallStubCompiler* stub_compiler,
                           const ParameterCount& arguments,
-                          Register name,
-                          ExtraICState extra_ic_state)
+                          Register name)
       : stub_compiler_(stub_compiler),
         arguments_(arguments),
-        name_(name),
-        extra_ic_state_(extra_ic_state) {}
+        name_(name) {}

   void Compile(MacroAssembler* masm,
                Handle<JSObject> object,
@@ -820,7 +818,6 @@
   CallStubCompiler* stub_compiler_;
   const ParameterCount& arguments_;
   Register name_;
-  ExtraICState extra_ic_state_;
 };


@@ -2497,7 +2494,7 @@
   StackArgumentsAccessor args(rsp, arguments());
   __ movq(rdx, args.GetReceiverOperand());

-  CallInterceptorCompiler compiler(this, arguments(), rcx, extra_state());
+  CallInterceptorCompiler compiler(this, arguments(), rcx);
compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax,
                    &miss);

=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Wed Dec 4 10:09:08 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-api.cc Fri Dec 6 11:45:26 2013 UTC
@@ -6454,9 +6454,12 @@
 template <typename T> static void USE(T) { }


-// This test is not intended to be run, just type checked.
-static inline void PersistentHandles(v8::Isolate* isolate) {
-  USE(PersistentHandles);
+// The point of this test is type checking. We run it only so compilers
+// don't complain about an unused function.
+TEST(PersistentHandles) {
+  LocalContext env;
+  v8::Isolate* isolate = CcTest::isolate();
+  v8::HandleScope scope(isolate);
   Local<String> str = v8_str("foo");
   v8::Persistent<String> p_str(isolate, str);
   p_str.Reset();
@@ -18088,8 +18091,6 @@
 }


-static const int k0CacheSize = 16;
-
 THREADED_TEST(FillJSFunctionResultCache) {
   i::FLAG_allow_natives_syntax = true;
   LocalContext context;
=======================================
--- /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Thu Nov 28 08:21:26 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Fri Dec 6 11:45:26 2013 UTC
@@ -59,10 +59,6 @@
 }


-static inline i::Address ToAddress(int n) {
-  return reinterpret_cast<i::Address>(n);
-}
-
 static void EnqueueTickSampleEvent(ProfilerEventsProcessor* proc,
                                    i::Address frame1,
                                    i::Address frame2 = NULL,
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Mon Dec 2 15:41:57 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-debug.cc Fri Dec 6 11:45:26 2013 UTC
@@ -70,65 +70,6 @@
 // Size of temp buffer for formatting small strings.
 #define SMALL_STRING_BUFFER_SIZE 80

-// --- A d d i t i o n a l   C h e c k   H e l p e r s
-
-
-// Helper function used by the CHECK_EQ function when given Address
-// arguments.  Should not be called directly.
-static inline void CheckEqualsHelper(const char* file, int line,
-                                     const char* expected_source,
-                                     ::v8::internal::Address expected,
-                                     const char* value_source,
-                                     ::v8::internal::Address value) {
-  if (expected != value) {
-    V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n#   "
-                         "Expected: %i\n#   Found: %i",
-             expected_source, value_source, expected, value);
-  }
-}
-
-
-// Helper function used by the CHECK_NE function when given Address
-// arguments.  Should not be called directly.
-static inline void CheckNonEqualsHelper(const char* file, int line,
-                                        const char* unexpected_source,
-                                        ::v8::internal::Address unexpected,
-                                        const char* value_source,
-                                        ::v8::internal::Address value) {
-  if (unexpected == value) {
-    V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n#   Value: %i",
-             unexpected_source, value_source, value);
-  }
-}
-
-
-// Helper function used by the CHECK function when given code
-// arguments.  Should not be called directly.
-static inline void CheckEqualsHelper(const char* file, int line,
-                                     const char* expected_source,
-                                     const Code* expected,
-                                     const char* value_source,
-                                     const Code* value) {
-  if (expected != value) {
-    V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n#   "
-                         "Expected: %p\n#   Found: %p",
-             expected_source, value_source, expected, value);
-  }
-}
-
-
-static inline void CheckNonEqualsHelper(const char* file, int line,
-                                        const char* expected_source,
-                                        const Code* expected,
-                                        const char* value_source,
-                                        const Code* value) {
-  if (expected == value) {
-    V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n#   Value: %p",
-             expected_source, value_source, value);
-  }
-}
-
-
 // --- H e l p e r   C l a s s e s


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to