[vm] Fix gcc build.

TEST=local build
Change-Id: Ia4c28bda4b353e9f353ddbbf854df085adf831c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175562
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 15af026..19a1934 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -568,6 +568,38 @@
     }
   }
 
+  template <typename type, std::memory_order order = std::memory_order_relaxed>
+  void StoreArrayPointer(type const* addr, type value) {
+    reinterpret_cast<std::atomic<type>*>(const_cast<type*>(addr))
+        ->store(value, order);
+    if (value->IsHeapObject()) {
+      CheckArrayPointerStore(addr, value, Thread::Current());
+    }
+  }
+
+  template <typename type>
+  void StoreArrayPointer(type const* addr, type value, Thread* thread) {
+    *const_cast<type*>(addr) = value;
+    if (value->IsHeapObject()) {
+      CheckArrayPointerStore(addr, value, thread);
+    }
+  }
+
+  template <typename type, std::memory_order order = std::memory_order_relaxed>
+  type LoadSmi(type const* addr) const {
+    return reinterpret_cast<std::atomic<type>*>(const_cast<type*>(addr))
+        ->load(order);
+  }
+  // Use for storing into an explicitly Smi-typed field of an object
+  // (i.e., both the previous and new value are Smis).
+  template <std::memory_order order = std::memory_order_relaxed>
+  void StoreSmi(SmiPtr const* addr, SmiPtr value) {
+    // Can't use Contains, as array length is initialized through this method.
+    ASSERT(reinterpret_cast<uword>(addr) >= ObjectLayout::ToAddr(this));
+    reinterpret_cast<std::atomic<SmiPtr>*>(const_cast<SmiPtr*>(addr))
+        ->store(value, order);
+  }
+
  private:
   DART_FORCE_INLINE
   void CheckHeapPointerStore(ObjectPtr value, Thread* thread) {
@@ -597,23 +629,6 @@
     }
   }
 
-  template <typename type, std::memory_order order = std::memory_order_relaxed>
-  void StoreArrayPointer(type const* addr, type value) {
-    reinterpret_cast<std::atomic<type>*>(const_cast<type*>(addr))
-        ->store(value, order);
-    if (value->IsHeapObject()) {
-      CheckArrayPointerStore(addr, value, Thread::Current());
-    }
-  }
-
-  template <typename type>
-  void StoreArrayPointer(type const* addr, type value, Thread* thread) {
-    *const_cast<type*>(addr) = value;
-    if (value->IsHeapObject()) {
-      CheckArrayPointerStore(addr, value, thread);
-    }
-  }
-
   template <typename type>
   DART_FORCE_INLINE void CheckArrayPointerStore(type const* addr,
                                                 ObjectPtr value,
@@ -650,26 +665,9 @@
     }
   }
 
- protected:
-  template <typename type, std::memory_order order = std::memory_order_relaxed>
-  type LoadSmi(type const* addr) const {
-    return reinterpret_cast<std::atomic<type>*>(const_cast<type*>(addr))
-        ->load(order);
-  }
-  // Use for storing into an explicitly Smi-typed field of an object
-  // (i.e., both the previous and new value are Smis).
-  template <std::memory_order order = std::memory_order_relaxed>
-  void StoreSmi(SmiPtr const* addr, SmiPtr value) {
-    // Can't use Contains, as array length is initialized through this method.
-    ASSERT(reinterpret_cast<uword>(addr) >= ObjectLayout::ToAddr(this));
-    reinterpret_cast<std::atomic<SmiPtr>*>(const_cast<SmiPtr*>(addr))
-        ->store(value, order);
-  }
-
   friend class StoreBufferUpdateVisitor;  // RememberCard
   void RememberCard(ObjectPtr const* slot);
 
- private:
   friend class Array;
   friend class ByteBuffer;
   friend class CidRewriteVisitor;
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index 3f074ff..b52f017 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -634,13 +634,6 @@
   // Now output the wanted constant coverage.
   for (intptr_t i = 0; i < local_script_table_entries->length(); i++) {
     const Script* script = local_script_table_entries->At(i)->script;
-    bool script_ok = true;
-    if (script_ != NULL && !script_->IsNull()) {
-      if (script->raw() != script_->raw()) {
-        // This is the wrong script.
-        script_ok = false;
-      }
-    }
 
     // Whether we want *this* script or not we need to look at the constant
     // constructor coverage. Any of those could be in a script we *do* want.