Title: [215853] trunk/Source/_javascript_Core
Revision
215853
Author
[email protected]
Date
2017-04-26 19:57:09 -0700 (Wed, 26 Apr 2017)

Log Message

Follow up to r215843
https://bugs.webkit.org/show_bug.cgi?id=171361

Reviewed by Saam Barati.

This patch fixes some style comments Saam didn't get a chance to
request before I landed: https://bugs.webkit.org/show_bug.cgi?id=170134.

It renames Wasm::CodeBlock::m_wasmEntrypoints to
m_wasmIndirectCallEntrypoints, as well as fixes some copyrights and
indentation.

* wasm/WasmBBQPlan.cpp:
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::CodeBlock):
* wasm/WasmCodeBlock.h:
(JSC::Wasm::CodeBlock::wasmEntrypointLoadLocationFromFunctionIndexSpace):
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* wasm/WasmTierUpCount.h:
(JSC::Wasm::TierUpCount::TierUpCount):
(JSC::Wasm::TierUpCount::loopDecrement):
(JSC::Wasm::TierUpCount::functionEntryDecrement):
(JSC::Wasm::TierUpCount::shouldStartTierUp):
(JSC::Wasm::TierUpCount::count):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (215852 => 215853)


--- trunk/Source/_javascript_Core/ChangeLog	2017-04-27 02:28:39 UTC (rev 215852)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-04-27 02:57:09 UTC (rev 215853)
@@ -1,3 +1,31 @@
+2017-04-26  Keith Miller  <[email protected]>
+
+        Follow up to r215843
+        https://bugs.webkit.org/show_bug.cgi?id=171361
+
+        Reviewed by Saam Barati.
+
+        This patch fixes some style comments Saam didn't get a chance to
+        request before I landed: https://bugs.webkit.org/show_bug.cgi?id=170134.
+
+        It renames Wasm::CodeBlock::m_wasmEntrypoints to
+        m_wasmIndirectCallEntrypoints, as well as fixes some copyrights and
+        indentation.
+
+        * wasm/WasmBBQPlan.cpp:
+        * wasm/WasmCodeBlock.cpp:
+        (JSC::Wasm::CodeBlock::CodeBlock):
+        * wasm/WasmCodeBlock.h:
+        (JSC::Wasm::CodeBlock::wasmEntrypointLoadLocationFromFunctionIndexSpace):
+        * wasm/WasmOMGPlan.cpp:
+        (JSC::Wasm::OMGPlan::work):
+        * wasm/WasmTierUpCount.h:
+        (JSC::Wasm::TierUpCount::TierUpCount):
+        (JSC::Wasm::TierUpCount::loopDecrement):
+        (JSC::Wasm::TierUpCount::functionEntryDecrement):
+        (JSC::Wasm::TierUpCount::shouldStartTierUp):
+        (JSC::Wasm::TierUpCount::count):
+
 2017-04-26  Saam Barati  <[email protected]>
 
         ASSERTION FAILED: inIndex != notFound in JSC::invalidParameterInSourceAppender()

Modified: trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp (215852 => 215853)


--- trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp	2017-04-27 02:28:39 UTC (rev 215852)
+++ trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp	2017-04-27 02:57:09 UTC (rev 215853)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: trunk/Source/_javascript_Core/wasm/WasmCodeBlock.cpp (215852 => 215853)


--- trunk/Source/_javascript_Core/wasm/WasmCodeBlock.cpp	2017-04-27 02:28:39 UTC (rev 215852)
+++ trunk/Source/_javascript_Core/wasm/WasmCodeBlock.cpp	2017-04-27 02:57:09 UTC (rev 215853)
@@ -52,12 +52,12 @@
         m_callees.resize(m_calleeCount);
         m_jsCallees.resize(m_calleeCount);
         m_optimizedCallees.resize(m_calleeCount);
-        m_wasmEntryPoints.resize(m_calleeCount);
+        m_wasmIndirectCallEntryPoints.resize(m_calleeCount);
 
         m_plan->initializeCallees([&] (unsigned calleeIndex, Ref<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {
             m_jsCallees[calleeIndex] = WTFMove(jsEntrypointCallee);
             m_callees[calleeIndex] = WTFMove(wasmEntrypointCallee);
-            m_wasmEntryPoints[calleeIndex] = m_callees[calleeIndex]->entrypoint();
+            m_wasmIndirectCallEntryPoints[calleeIndex] = m_callees[calleeIndex]->entrypoint();
         });
 
         m_wasmToWasmExitStubs = m_plan->takeWasmToWasmExitStubs();

Modified: trunk/Source/_javascript_Core/wasm/WasmCodeBlock.h (215852 => 215853)


--- trunk/Source/_javascript_Core/wasm/WasmCodeBlock.h	2017-04-27 02:28:39 UTC (rev 215852)
+++ trunk/Source/_javascript_Core/wasm/WasmCodeBlock.h	2017-04-27 02:57:09 UTC (rev 215853)
@@ -98,7 +98,7 @@
     {
         RELEASE_ASSERT(functionIndexSpace >= functionImportCount());
         unsigned calleeIndex = functionIndexSpace - functionImportCount();
-        return &m_wasmEntryPoints[calleeIndex];
+        return &m_wasmIndirectCallEntryPoints[calleeIndex];
     }
 
     TierUpCount& tierUpCount(uint32_t functionIndex)
@@ -120,7 +120,7 @@
     Vector<RefPtr<Callee>> m_callees;
     Vector<RefPtr<Callee>> m_optimizedCallees;
     Vector<RefPtr<Callee>> m_jsCallees;
-    Vector<void*> m_wasmEntryPoints;
+    Vector<void*> m_wasmIndirectCallEntryPoints;
     Vector<TierUpCount> m_tierUpCounts;
     Vector<Vector<UnlinkedWasmToWasmCall>> m_wasmToWasmCallsites;
     Vector<MacroAssemblerCodeRef> m_wasmToWasmExitStubs;

Modified: trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp (215852 => 215853)


--- trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp	2017-04-27 02:28:39 UTC (rev 215852)
+++ trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp	2017-04-27 02:57:09 UTC (rev 215853)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -124,11 +124,11 @@
 
     // It's important to make sure we do this before we make any of the code we just compiled visible. If we didn't, we could end up
     // where we are tiering up some function A to A' and we repatch some function B to call A' instead of A. Another CPU could see
-    // the updates to B but still not have reset it's cache of A', which would lead to all kinds of badness.
+    // the updates to B but still not have reset its cache of A', which would lead to all kinds of badness.
     resetInstructionCacheOnAllThreads();
     WTF::storeStoreFence(); // This probably isn't necessary but it's good to be paranoid.
 
-    m_codeBlock->m_wasmEntryPoints[m_functionIndex] = entrypoint;
+    m_codeBlock->m_wasmIndirectCallEntryPoints[m_functionIndex] = entrypoint;
     {
         LockHolder holder(m_codeBlock->m_lock);
 

Modified: trunk/Source/_javascript_Core/wasm/WasmTierUpCount.h (215852 => 215853)


--- trunk/Source/_javascript_Core/wasm/WasmTierUpCount.h	2017-04-27 02:28:39 UTC (rev 215852)
+++ trunk/Source/_javascript_Core/wasm/WasmTierUpCount.h	2017-04-27 02:57:09 UTC (rev 215853)
@@ -33,38 +33,38 @@
 
 namespace JSC { namespace Wasm {
 
-    // This class manages the tier up counts for Wasm binaries. The main interesting thing about
-    // wasm tiering up counts is that the least significant bit indicates if the tier up has already
-    // started. Also, wasm code does not atomically update this count. This is because we
-    // don't care too much if the countdown is slightly off. The tier up trigger is atomic, however,
-    // so tier up will be triggered exactly once.
-    class TierUpCount {
-        WTF_MAKE_NONCOPYABLE(TierUpCount);
-    public:
-        TierUpCount()
-            : m_count(Options::webAssemblyOMGTierUpCount() * 2)
-        {
-        }
+// This class manages the tier up counts for Wasm binaries. The main interesting thing about
+// wasm tiering up counts is that the least significant bit indicates if the tier up has already
+// started. Also, wasm code does not atomically update this count. This is because we
+// don't care too much if the countdown is slightly off. The tier up trigger is atomic, however,
+// so tier up will be triggered exactly once.
+class TierUpCount {
+    WTF_MAKE_NONCOPYABLE(TierUpCount);
+public:
+    TierUpCount()
+        : m_count(Options::webAssemblyOMGTierUpCount() * 2)
+    {
+    }
 
-        TierUpCount(TierUpCount&& other)
-        {
-            ASSERT(other.m_count == Options::webAssemblyOMGTierUpCount() * 2);
-            m_count = other.m_count;
-        }
+    TierUpCount(TierUpCount&& other)
+    {
+        ASSERT(other.m_count == Options::webAssemblyOMGTierUpCount() * 2);
+        m_count = other.m_count;
+    }
 
-        static uint32_t loopDecrement() { return Options::webAssemblyLoopDecrement() * 2; }
-        static uint32_t functionEntryDecrement() { return Options::webAssemblyFunctionEntryDecrement() * 2; }
+    static uint32_t loopDecrement() { return Options::webAssemblyLoopDecrement() * 2; }
+    static uint32_t functionEntryDecrement() { return Options::webAssemblyFunctionEntryDecrement() * 2; }
 
-        bool shouldStartTierUp()
-        {
-            return !(WTF::atomicExchangeOr(&m_count, 1) & 1);
-        }
+    bool shouldStartTierUp()
+    {
+        return !(WTF::atomicExchangeOr(&m_count, 1) & 1);
+    }
 
-        int32_t count() { return bitwise_cast<int32_t>(m_count); }
+    int32_t count() { return bitwise_cast<int32_t>(m_count); }
 
-    private:
-        uint32_t m_count;
-    };
+private:
+    uint32_t m_count;
+};
     
 } } // namespace JSC::Wasm
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to