Merge mozilla-inbound to mozilla-central. a=merge
authorAndreea Pavel <apavel@mozilla.com>
Fri, 22 Mar 2019 18:44:45 +0200
changeset 465747 fd1adb9941e9f9e088533dd5f33e1b88a42372cb
parent 465693 e66a2b59914df9ac0ac6bad9887dc8585575bede (current diff)
parent 465746 25f4f25d5268a2b7e02a533ca63b493110fcc5bf (diff)
child 465748 0e9f9d86014a1bf41badb6f9c8f25551a480d72c
child 465833 2deb1c4df8fda42bdce78761b25eb90d44d14d05
push id81218
push userapavel@mozilla.com
push dateFri, 22 Mar 2019 16:50:59 +0000
treeherderautoland@0e9f9d86014a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone68.0a1
first release with
nightly linux32
fd1adb9941e9 / 68.0a1 / 20190322164604 / files
nightly linux64
fd1adb9941e9 / 68.0a1 / 20190322164604 / files
nightly mac
fd1adb9941e9 / 68.0a1 / 20190322164604 / files
nightly win32
fd1adb9941e9 / 68.0a1 / 20190322164604 / files
nightly win64
fd1adb9941e9 / 68.0a1 / 20190322164604 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-inbound to mozilla-central. a=merge
dom/quota/ActorsParent.cpp
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -280,16 +280,18 @@ var gSync = {
       return;
     }
 
     if (!gFxaToolbarAccessed) {
       Services.prefs.setBoolPref("identity.fxaccounts.toolbar.accessed", true);
       document.documentElement.removeAttribute("fxa_avatar_badged");
     }
 
+    this.enableSendTabIfValidTab();
+
     const anchor = document.getElementById("fxa-toolbar-menu-button");
     if (anchor.getAttribute("open") == "true") {
       PanelUI.hide();
     } else {
       PanelUI.showSubView(viewId, anchor, aEvent);
     }
   },
 
@@ -335,16 +337,28 @@ var gSync = {
       document.getElementById("fxa-menu-email").value = state.email;
 
       let defaultPanelTitle = this.fxaStrings.GetStringFromName("account.title");
       document.getElementById("PanelUI-fxa").setAttribute("title", state.displayName ? state.displayName : defaultPanelTitle);
     }
     mainWindowEl.setAttribute("fxastatus", stateValue);
   },
 
+  enableSendTabIfValidTab() {
+    // All tabs selected must be sendable for the Send Tab button to be enabled
+    // on the FxA menu.
+    let canSendAllURIs = gBrowser.selectedTabs.every(t => this.isSendableURI(t.linkedBrowser.currentURI.spec));
+
+    if (canSendAllURIs) {
+      document.getElementById("PanelUI-fxa-menu-sendtab-button").removeAttribute("disabled");
+    } else {
+      document.getElementById("PanelUI-fxa-menu-sendtab-button").setAttribute("disabled", true);
+    }
+  },
+
   updatePanelPopup(state) {
     let defaultLabel = this.appMenuStatus.getAttribute("defaultlabel");
     // The localization string is for the signed in text, but it's the default text as well
     let defaultTooltiptext = this.appMenuStatus.getAttribute("signedinTooltiptext");
 
     const status = state.status;
     // Reset the status bar to its original state.
     this.appMenuLabel.setAttribute("label", defaultLabel);
--- a/dom/localstorage/ActorsParent.cpp
+++ b/dom/localstorage/ActorsParent.cpp
@@ -52,16 +52,19 @@
 #if DISABLE_ASSERTS_FOR_FUZZING
 #  define ASSERT_UNLESS_FUZZING(...) \
     do {                             \
     } while (0)
 #else
 #  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
+#define LS_LOG_TEST() MOZ_LOG_TEST(GetLocalStorageLogger(), LogLevel::Info)
+#define LS_LOG(_args) MOZ_LOG(GetLocalStorageLogger(), LogLevel::Info, _args)
+
 #if defined(MOZ_WIDGET_ANDROID)
 #  define LS_MOBILE
 #endif
 
 namespace mozilla {
 namespace dom {
 
 using namespace mozilla::dom::quota;
@@ -2154,32 +2157,36 @@ class LSRequestBase : public DatastoreOp
   virtual nsresult Open() = 0;
 
   virtual nsresult NestedRun();
 
   virtual void GetResponse(LSRequestResponse& aResponse) = 0;
 
   virtual void Cleanup() {}
 
+  void LogState();
+
+  virtual void LogNestedState() {}
+
  private:
   void SendReadyMessage();
 
   void SendResults();
 
  protected:
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
   Run() final;
 
   // IPDL methods.
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
-  mozilla::ipc::IPCResult RecvCancel() override;
-
  private:
+  mozilla::ipc::IPCResult RecvCancel() final;
+
   mozilla::ipc::IPCResult RecvFinish() final;
 };
 
 class PrepareDatastoreOp : public LSRequestBase, public OpenDirectoryListener {
   class LoadDataOp;
 
   enum class NestedState {
     // The nesting has not yet taken place. Next step is
@@ -2226,16 +2233,17 @@ class PrepareDatastoreOp : public LSRequ
     DatabaseWorkLoadData,
 
     // The nesting has completed.
     AfterNesting
   };
 
   nsCOMPtr<nsIEventTarget> mMainEventTarget;
   RefPtr<PrepareDatastoreOp> mDelayedOp;
+  RefPtr<DirectoryLock> mPendingDirectoryLock;
   RefPtr<DirectoryLock> mDirectoryLock;
   RefPtr<Connection> mConnection;
   RefPtr<Datastore> mDatastore;
   nsAutoPtr<ArchivedOriginScope> mArchivedOriginScope;
   LoadDataOp* mLoadDataOp;
   nsDataHashtable<nsStringHashKey, nsString> mValues;
   nsTArray<LSItemInfo> mOrderedItems;
   const LSRequestCommonParams mParams;
@@ -2334,23 +2342,23 @@ class PrepareDatastoreOp : public LSRequ
   void GetResponse(LSRequestResponse& aResponse) override;
 
   void Cleanup() override;
 
   void ConnectionClosedCallback();
 
   void CleanupMetadata();
 
+  void LogNestedState() override;
+
   NS_DECL_ISUPPORTS_INHERITED
 
   // IPDL overrides.
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
-  mozilla::ipc::IPCResult RecvCancel() final;
-
   // OpenDirectoryListener overrides.
   void DirectoryLockAcquired(DirectoryLock* aLock) override;
 
   void DirectoryLockFailed() override;
 };
 
 class PrepareDatastoreOp::LoadDataOp final
     : public ConnectionDatastoreOperationBase {
@@ -2737,18 +2745,16 @@ typedef nsDataHashtable<nsCStringHashKey
 // Can only be touched on the Quota Manager I/O thread.
 StaticAutoPtr<UsageHashtable> gUsages;
 
 StaticAutoPtr<ArchivedOriginHashtable> gArchivedOrigins;
 
 // Can only be touched on the Quota Manager I/O thread.
 bool gInitializedShadowStorage = false;
 
-LazyLogModule gLogger("LocalStorage");
-
 bool IsOnConnectionThread() {
   MOZ_ASSERT(gConnectionThread);
   return gConnectionThread->IsOnConnectionThread();
 }
 
 void AssertIsOnConnectionThread() {
   MOZ_ASSERT(gConnectionThread);
   gConnectionThread->AssertIsOnConnectionThread();
@@ -5623,16 +5629,71 @@ void LSRequestBase::Dispatch() {
 
   mState = State::Opening;
 
   MOZ_ALWAYS_SUCCEEDS(NS_DispatchToCurrentThread(this));
 }
 
 nsresult LSRequestBase::NestedRun() { return NS_OK; }
 
+void LSRequestBase::LogState() {
+  AssertIsOnOwningThread();
+
+  if (!LS_LOG_TEST()) {
+    return;
+  }
+
+  LS_LOG(("LSRequestBase [%p]", this));
+
+  nsCString state;
+
+  switch (mState) {
+    case State::Initial:
+      state.AssignLiteral("Initial");
+      break;
+
+    case State::Opening:
+      state.AssignLiteral("Opening");
+      break;
+
+    case State::Nesting:
+      state.AssignLiteral("Nesting");
+      break;
+
+    case State::SendingReadyMessage:
+      state.AssignLiteral("SendingReadyMessage");
+      break;
+
+    case State::WaitingForFinish:
+      state.AssignLiteral("WaitingForFinish");
+      break;
+
+    case State::SendingResults:
+      state.AssignLiteral("SendingResults");
+      break;
+
+    case State::Completed:
+      state.AssignLiteral("Completed");
+      break;
+
+    default:
+      MOZ_CRASH("Bad state!");
+  }
+
+  LS_LOG(("  mState: %s", state.get()));
+
+  switch (mState) {
+    case State::Nesting:
+      LogNestedState();
+      break;
+
+    default:;
+  }
+}
+
 void LSRequestBase::SendReadyMessage() {
   AssertIsOnOwningThread();
   MOZ_ASSERT(mState == State::SendingReadyMessage);
 
   if (NS_WARN_IF(QuotaClient::IsShuttingDownOnBackgroundThread()) ||
       !MayProceed()) {
     MaybeSetFailureCode(NS_ERROR_FAILURE);
   }
@@ -5721,56 +5782,17 @@ void LSRequestBase::ActorDestroy(ActorDe
   AssertIsOnOwningThread();
 
   NoteComplete();
 }
 
 mozilla::ipc::IPCResult LSRequestBase::RecvCancel() {
   AssertIsOnOwningThread();
 
-  if (MOZ_LOG_TEST(gLogger, LogLevel::Info)) {
-    MOZ_LOG(gLogger, LogLevel::Info, ("LSRequestBase::RecvCancel"));
-
-    nsCString state;
-
-    switch (mState) {
-      case State::Initial:
-        state.AssignLiteral("Initial");
-        break;
-
-      case State::Opening:
-        state.AssignLiteral("Opening");
-        break;
-
-      case State::Nesting:
-        state.AssignLiteral("Nesting");
-        break;
-
-      case State::SendingReadyMessage:
-        state.AssignLiteral("SendingReadyMessage");
-        break;
-
-      case State::WaitingForFinish:
-        state.AssignLiteral("WaitingForFinish");
-        break;
-
-      case State::SendingResults:
-        state.AssignLiteral("SendingResults");
-        break;
-
-      case State::Completed:
-        state.AssignLiteral("Completed");
-        break;
-
-      default:
-        MOZ_CRASH("Bad state!");
-    }
-
-    MOZ_LOG(gLogger, LogLevel::Info, ("  mState: %s", state.get()));
-  }
+  LogState();
 
   const char* crashOnCancel = PR_GetEnv("LSNG_CRASH_ON_CANCEL");
   if (crashOnCancel) {
     MOZ_CRASH("LSNG: Crash on cancel.");
   }
 
   IProtocol* mgr = Manager();
   if (!PBackgroundLSRequestParent::Send__delete__(this, NS_ERROR_FAILURE)) {
@@ -6061,19 +6083,26 @@ nsresult PrepareDatastoreOp::OpenDirecto
              mNestedState == NestedState::QuotaManagerPending);
   MOZ_ASSERT(!mOrigin.IsEmpty());
   MOZ_ASSERT(!mDirectoryLock);
   MOZ_ASSERT(!QuotaClient::IsShuttingDownOnBackgroundThread());
   MOZ_ASSERT(MayProceed());
   MOZ_ASSERT(QuotaManager::Get());
 
   mNestedState = NestedState::DirectoryOpenPending;
-  QuotaManager::Get()->OpenDirectory(PERSISTENCE_TYPE_DEFAULT, mGroup, mOrigin,
-                                     mozilla::dom::quota::Client::LS,
-                                     /* aExclusive */ false, this);
+  RefPtr<DirectoryLock> pendingDirectoryLock =
+      QuotaManager::Get()->CreateDirectoryLock(PERSISTENCE_TYPE_DEFAULT, mGroup,
+                                               mOrigin,
+                                               mozilla::dom::quota::Client::LS,
+                                               /* aExclusive */ false, this);
+  MOZ_ASSERT(pendingDirectoryLock);
+
+  if (mNestedState == NestedState::DirectoryOpenPending) {
+    mPendingDirectoryLock = pendingDirectoryLock.forget();
+  }
 
   mRequestedDirectoryLock = true;
 
   return NS_OK;
 }
 
 void PrepareDatastoreOp::SendToIOThread() {
   AssertIsOnOwningThread();
@@ -6714,93 +6743,120 @@ void PrepareDatastoreOp::CleanupMetadata
   MOZ_ASSERT(gPrepareDatastoreOps);
   gPrepareDatastoreOps->RemoveElement(this);
 
   if (gPrepareDatastoreOps->IsEmpty()) {
     gPrepareDatastoreOps = nullptr;
   }
 }
 
+void PrepareDatastoreOp::LogNestedState() {
+  AssertIsOnOwningThread();
+
+  nsCString nestedState;
+
+  switch (mNestedState) {
+    case NestedState::BeforeNesting:
+      nestedState.AssignLiteral("BeforeNesting");
+      break;
+
+    case NestedState::CheckExistingOperations:
+      nestedState.AssignLiteral("CheckExistingOperations");
+      break;
+
+    case NestedState::CheckClosingDatastore:
+      nestedState.AssignLiteral("CheckClosingDatastore");
+      break;
+
+    case NestedState::PreparationPending:
+      nestedState.AssignLiteral("PreparationPending");
+      break;
+
+    case NestedState::QuotaManagerPending:
+      nestedState.AssignLiteral("QuotaManagerPending");
+      break;
+
+    case NestedState::DirectoryOpenPending:
+      nestedState.AssignLiteral("DirectoryOpenPending");
+      break;
+
+    case NestedState::DatabaseWorkOpen:
+      nestedState.AssignLiteral("DatabaseWorkOpen");
+      break;
+
+    case NestedState::BeginLoadData:
+      nestedState.AssignLiteral("BeginLoadData");
+      break;
+
+    case NestedState::DatabaseWorkLoadData:
+      nestedState.AssignLiteral("DatabaseWorkLoadData");
+      break;
+
+    case NestedState::AfterNesting:
+      nestedState.AssignLiteral("AfterNesting");
+      break;
+
+    default:
+      MOZ_CRASH("Bad state!");
+  }
+
+  LS_LOG(("  mNestedState: %s", nestedState.get()));
+
+  switch (mNestedState) {
+    case NestedState::CheckClosingDatastore: {
+      for (uint32_t index = gPrepareDatastoreOps->Length(); index > 0;
+           index--) {
+        PrepareDatastoreOp* existingOp = (*gPrepareDatastoreOps)[index - 1];
+
+        if (existingOp->mDelayedOp == this) {
+          LS_LOG(("  mDelayedBy: [%p]", existingOp));
+
+          existingOp->LogState();
+
+          break;
+        }
+      }
+
+      break;
+    }
+
+    case NestedState::DirectoryOpenPending: {
+      MOZ_ASSERT(mPendingDirectoryLock);
+
+      LS_LOG(("  mPendingDirectoryLock: [%p]", mPendingDirectoryLock.get()));
+
+      mPendingDirectoryLock->LogState();
+
+      break;
+    }
+
+    default:;
+  }
+}
+
 NS_IMPL_ISUPPORTS_INHERITED0(PrepareDatastoreOp, LSRequestBase)
 
 void PrepareDatastoreOp::ActorDestroy(ActorDestroyReason aWhy) {
   AssertIsOnOwningThread();
 
   LSRequestBase::ActorDestroy(aWhy);
 
   if (mLoadDataOp) {
     mLoadDataOp->NoteComplete();
   }
 }
 
-mozilla::ipc::IPCResult PrepareDatastoreOp::RecvCancel() {
-  AssertIsOnOwningThread();
-
-  if (MOZ_LOG_TEST(gLogger, LogLevel::Info)) {
-    MOZ_LOG(gLogger, LogLevel::Info, ("PrepareDatastoreOp::RecvCancel"));
-
-    nsCString nestedState;
-
-    switch (mNestedState) {
-      case NestedState::BeforeNesting:
-        nestedState.AssignLiteral("BeforeNesting");
-        break;
-
-      case NestedState::CheckExistingOperations:
-        nestedState.AssignLiteral("CheckExistingOperations");
-        break;
-
-      case NestedState::CheckClosingDatastore:
-        nestedState.AssignLiteral("CheckClosingDatastore");
-        break;
-
-      case NestedState::PreparationPending:
-        nestedState.AssignLiteral("PreparationPending");
-        break;
-
-      case NestedState::QuotaManagerPending:
-        nestedState.AssignLiteral("QuotaManagerPending");
-        break;
-
-      case NestedState::DirectoryOpenPending:
-        nestedState.AssignLiteral("DirectoryOpenPending");
-        break;
-
-      case NestedState::DatabaseWorkOpen:
-        nestedState.AssignLiteral("DatabaseWorkOpen");
-        break;
-
-      case NestedState::BeginLoadData:
-        nestedState.AssignLiteral("BeginLoadData");
-        break;
-
-      case NestedState::DatabaseWorkLoadData:
-        nestedState.AssignLiteral("DatabaseWorkLoadData");
-        break;
-
-      case NestedState::AfterNesting:
-        nestedState.AssignLiteral("AfterNesting");
-        break;
-
-      default:
-        MOZ_CRASH("Bad state!");
-    }
-
-    MOZ_LOG(gLogger, LogLevel::Info, ("  mNestedState: %s", nestedState.get()));
-  }
-
-  return LSRequestBase::RecvCancel();
-}
-
 void PrepareDatastoreOp::DirectoryLockAcquired(DirectoryLock* aLock) {
   AssertIsOnOwningThread();
   MOZ_ASSERT(mState == State::Nesting);
   MOZ_ASSERT(mNestedState == NestedState::DirectoryOpenPending);
   MOZ_ASSERT(!mDirectoryLock);
 
+  mPendingDirectoryLock = nullptr;
+
   if (NS_WARN_IF(QuotaClient::IsShuttingDownOnBackgroundThread()) ||
       !MayProceed()) {
     MaybeSetFailureCode(NS_ERROR_FAILURE);
 
     FinishNesting();
 
     return;
   }
@@ -6811,16 +6867,18 @@ void PrepareDatastoreOp::DirectoryLockAc
 }
 
 void PrepareDatastoreOp::DirectoryLockFailed() {
   AssertIsOnOwningThread();
   MOZ_ASSERT(mState == State::Nesting);
   MOZ_ASSERT(mNestedState == NestedState::DirectoryOpenPending);
   MOZ_ASSERT(!mDirectoryLock);
 
+  mPendingDirectoryLock = nullptr;
+
   MaybeSetFailureCode(NS_ERROR_FAILURE);
 
   FinishNesting();
 }
 
 nsresult PrepareDatastoreOp::LoadDataOp::DoDatastoreWork() {
   AssertIsOnConnectionThread();
   MOZ_ASSERT(mConnection);
--- a/dom/localstorage/LocalStorageCommon.cpp
+++ b/dom/localstorage/LocalStorageCommon.cpp
@@ -13,16 +13,17 @@ namespace mozilla {
 namespace dom {
 
 using namespace mozilla::net;
 
 namespace {
 
 StaticMutex gNextGenLocalStorageMutex;
 Atomic<int32_t> gNextGenLocalStorageEnabled(-1);
+LazyLogModule gLogger("LocalStorage");
 
 }  // namespace
 
 const char16_t* kLocalStorageType = u"localStorage";
 
 bool NextGenLocalStorageEnabled() {
   if (XRE_IsParentProcess()) {
     StaticMutexAutoLock lock(gNextGenLocalStorageMutex);
@@ -128,10 +129,12 @@ nsresult GenerateOriginKey2(const Princi
   int32_t port = specURL->RealPort();
   if (port != -1) {
     aOriginKey.Append(nsPrintfCString(":%d", port));
   }
 
   return NS_OK;
 }
 
+LogModule* GetLocalStorageLogger() { return gLogger; }
+
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/localstorage/LocalStorageCommon.h
+++ b/dom/localstorage/LocalStorageCommon.h
@@ -181,16 +181,18 @@
  * interface.
  */
 
 #include "mozilla/Attributes.h"
 #include "nsString.h"
 
 namespace mozilla {
 
+class LogModule;
+
 namespace ipc {
 
 class PrincipalInfo;
 
 }  // namespace ipc
 
 namespace dom {
 
@@ -233,12 +235,14 @@ bool NextGenLocalStorageEnabled();
  * Cached any-thread version of NextGenLocalStorageEnabled().
  */
 bool CachedNextGenLocalStorageEnabled();
 
 nsresult GenerateOriginKey2(const mozilla::ipc::PrincipalInfo& aPrincipalInfo,
                             nsACString& aOriginAttrSuffix,
                             nsACString& aOriginKey);
 
+LogModule* GetLocalStorageLogger();
+
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_localstorage_LocalStorageCommon_h
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -86,16 +86,19 @@
 #if DISABLE_ASSERTS_FOR_FUZZING
 #  define ASSERT_UNLESS_FUZZING(...) \
     do {                             \
     } while (0)
 #else
 #  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
+#define QM_LOG_TEST() MOZ_LOG_TEST(GetQuotaManagerLogger(), LogLevel::Info)
+#define QM_LOG(_args) MOZ_LOG(GetQuotaManagerLogger(), LogLevel::Info, _args)
+
 #define UNKNOWN_FILE_WARNING(_leafName)                              \
   QM_WARNING("Something (%s) in the directory that doesn't belong!", \
              NS_ConvertUTF16toUTF8(_leafName).get())
 
 // The amount of time, in milliseconds, that our IO thread will stay alive
 // after the last event it processes.
 #define DEFAULT_THREAD_TIMEOUT_MS 30000
 
@@ -412,16 +415,18 @@ class DirectoryLockImpl final : public D
   void Invalidate() {
     AssertIsOnOwningThread();
 
     mInvalidated = true;
   }
 
   NS_INLINE_DECL_REFCOUNTING(DirectoryLockImpl, override)
 
+  void LogState() override;
+
  private:
   ~DirectoryLockImpl();
 };
 
 class QuotaManager::Observer final : public nsIObserver {
   static Observer* sInstance;
 
   bool mPendingProfileChange;
@@ -2340,16 +2345,76 @@ void DirectoryLockImpl::NotifyOpenListen
     mOpenListener->DirectoryLockAcquired(this);
   }
 
   mOpenListener = nullptr;
 
   mQuotaManager->RemovePendingDirectoryLock(this);
 }
 
+void DirectoryLockImpl::LogState() {
+  AssertIsOnOwningThread();
+
+  if (!QM_LOG_TEST()) {
+    return;
+  }
+
+  QM_LOG(("DirectoryLockImpl [%p]", this));
+
+  nsCString persistenceType;
+  if (mPersistenceType.IsNull()) {
+    persistenceType.AssignLiteral("null");
+  } else {
+    PersistenceTypeToText(mPersistenceType.Value(), persistenceType);
+  }
+  QM_LOG(("  mPersistenceType: %s", persistenceType.get()));
+
+  QM_LOG(("  mGroup: %s", mGroup.get()));
+
+  nsCString originScope;
+  if (mOriginScope.IsOrigin()) {
+    originScope.AssignLiteral("origin:");
+    originScope.Append(mOriginScope.GetOrigin());
+  } else if (mOriginScope.IsPrefix()) {
+    originScope.AssignLiteral("prefix:");
+    originScope.Append(mOriginScope.GetOriginNoSuffix());
+  } else if (mOriginScope.IsPattern()) {
+    originScope.AssignLiteral("pattern:");
+    // Can't call GetJSONPattern since it only works on the main thread.
+  } else {
+    MOZ_ASSERT(mOriginScope.IsNull());
+    originScope.AssignLiteral("null");
+  }
+  QM_LOG(("  mOriginScope: %s", originScope.get()));
+
+  nsString clientType;
+  if (mClientType.IsNull()) {
+    clientType.AssignLiteral("null");
+  } else {
+    Client::TypeToText(mClientType.Value(), clientType);
+  }
+  QM_LOG(("  mClientType: %s", NS_ConvertUTF16toUTF8(clientType).get()));
+
+  nsCString blockedOnString;
+  for (auto blockedOn : mBlockedOn) {
+    blockedOnString.Append(nsPrintfCString(" [%p]", blockedOn));
+  }
+  QM_LOG(("  mBlockedOn:%s", blockedOnString.get()));
+
+  QM_LOG(("  mExclusive: %d", mExclusive));
+
+  QM_LOG(("  mInternal: %d", mInternal));
+
+  QM_LOG(("  mInvalidated: %d", mInvalidated));
+
+  for (auto blockedOn : mBlockedOn) {
+    blockedOn->LogState();
+  }
+}
+
 QuotaManager::Observer* QuotaManager::Observer::sInstance = nullptr;
 
 // static
 nsresult QuotaManager::Observer::Initialize() {
   MOZ_ASSERT(NS_IsMainThread());
 
   RefPtr<Observer> observer = new Observer();
 
@@ -5010,27 +5075,41 @@ nsresult QuotaManager::EnsureStorageIsIn
     return rv;
   }
 
   mStorageInitialized = true;
 
   return NS_OK;
 }
 
+already_AddRefed<DirectoryLock> QuotaManager::CreateDirectoryLock(
+    PersistenceType aPersistenceType, const nsACString& aGroup,
+    const nsACString& aOrigin, Client::Type aClientType, bool aExclusive,
+    OpenDirectoryListener* aOpenListener) {
+  AssertIsOnOwningThread();
+
+  RefPtr<DirectoryLockImpl> lock = CreateDirectoryLock(
+      Nullable<PersistenceType>(aPersistenceType), aGroup,
+      OriginScope::FromOrigin(aOrigin), Nullable<Client::Type>(aClientType),
+      aExclusive, false, aOpenListener);
+  MOZ_ASSERT(lock);
+
+  return lock.forget();
+}
+
 void QuotaManager::OpenDirectory(PersistenceType aPersistenceType,
                                  const nsACString& aGroup,
                                  const nsACString& aOrigin,
                                  Client::Type aClientType, bool aExclusive,
                                  OpenDirectoryListener* aOpenListener) {
   AssertIsOnOwningThread();
 
-  RefPtr<DirectoryLockImpl> lock = CreateDirectoryLock(
-      Nullable<PersistenceType>(aPersistenceType), aGroup,
-      OriginScope::FromOrigin(aOrigin), Nullable<Client::Type>(aClientType),
-      aExclusive, false, aOpenListener);
+  RefPtr<DirectoryLock> lock =
+      CreateDirectoryLock(aPersistenceType, aGroup, aOrigin, aClientType,
+                          aExclusive, aOpenListener);
   MOZ_ASSERT(lock);
 }
 
 void QuotaManager::OpenDirectoryInternal(
     const Nullable<PersistenceType>& aPersistenceType,
     const OriginScope& aOriginScope, const Nullable<Client::Type>& aClientType,
     bool aExclusive, OpenDirectoryListener* aOpenListener) {
   AssertIsOnOwningThread();
--- a/dom/quota/QuotaCommon.cpp
+++ b/dom/quota/QuotaCommon.cpp
@@ -1,16 +1,28 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "QuotaCommon.h"
 
-BEGIN_QUOTA_NAMESPACE
+namespace mozilla {
+namespace dom {
+namespace quota {
+
+namespace {
+
+LazyLogModule gLogger("QuotaManager");
+
+}  // namespace
 
 #ifdef NIGHTLY_BUILD
 NS_NAMED_LITERAL_CSTRING(kInternalError, "internal");
 NS_NAMED_LITERAL_CSTRING(kExternalError, "external");
 #endif
 
-END_QUOTA_NAMESPACE
+LogModule* GetQuotaManagerLogger() { return gLogger; }
+
+}  // namespace quota
+}  // namespace dom
+}  // namespace mozilla
--- a/dom/quota/QuotaCommon.h
+++ b/dom/quota/QuotaCommon.h
@@ -67,17 +67,22 @@
 #  define RECORD_IN_NIGHTLY(_dummy, _status) \
     {}
 
 #  define CONTINUE_IN_NIGHTLY_RETURN_IN_OTHERS(_rv) return _rv
 #endif
 
 class nsIEventTarget;
 
-BEGIN_QUOTA_NAMESPACE
+namespace mozilla {
+
+class LogModule;
+
+namespace dom {
+namespace quota {
 
 // Telemetry keys to indicate types of errors.
 #ifdef NIGHTLY_BUILD
 extern const nsLiteralCString kInternalError;
 extern const nsLiteralCString kExternalError;
 #else
 // No need for these when we're not collecting telemetry.
 #  define kInternalError
@@ -108,11 +113,15 @@ class BackgroundThreadObject {
 void AssertIsOnIOThread();
 
 void AssertCurrentThreadOwnsQuotaMutex();
 
 bool IsOnIOThread();
 
 void ReportInternalError(const char* aFile, uint32_t aLine, const char* aStr);
 
-END_QUOTA_NAMESPACE
+LogModule* GetQuotaManagerLogger();
+
+}  // namespace quota
+}  // namespace dom
+}  // namespace mozilla
 
 #endif  // mozilla_dom_quota_quotacommon_h__
--- a/dom/quota/QuotaManager.h
+++ b/dom/quota/QuotaManager.h
@@ -56,16 +56,19 @@ class QuotaObject;
 class NS_NO_VTABLE RefCountedObject {
  public:
   NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
 };
 
 class DirectoryLock : public RefCountedObject {
   friend class DirectoryLockImpl;
 
+ public:
+  virtual void LogState() = 0;
+
  private:
   DirectoryLock() {}
 
   ~DirectoryLock() {}
 };
 
 class NS_NO_VTABLE OpenDirectoryListener : public RefCountedObject {
  public:
@@ -205,16 +208,21 @@ class QuotaManager final : public Backgr
   nsresult GetDirectoryMetadata2(nsIFile* aDirectory, int64_t* aTimestamp,
                                  bool* aPersisted);
 
   nsresult GetDirectoryMetadata2WithRestore(nsIFile* aDirectory,
                                             bool aPersistent,
                                             int64_t* aTimestamp,
                                             bool* aPersisted);
 
+  already_AddRefed<DirectoryLock> CreateDirectoryLock(
+      PersistenceType aPersistenceType, const nsACString& aGroup,
+      const nsACString& aOrigin, Client::Type aClientType, bool aExclusive,
+      OpenDirectoryListener* aOpenListener);
+
   // This is the main entry point into the QuotaManager API.
   // Any storage API implementation (quota client) that participates in
   // centralized quota and storage handling should call this method to get
   // a directory lock which will protect client's files from being deleted
   // while they are still in use.
   // After a lock is acquired, client is notified via the open listener's
   // method DirectoryLockAcquired. If the lock couldn't be acquired, client
   // gets DirectoryLockFailed notification.
--- a/js/src/builtin/Array.cpp
+++ b/js/src/builtin/Array.cpp
@@ -4073,20 +4073,19 @@ static MOZ_ALWAYS_INLINE ArrayObject* Ne
   RootedShape shape(cx, EmptyShape::getInitialShape(cx, &ArrayObject::class_,
                                                     TaggedProto(proto),
                                                     gc::AllocKind::OBJECT0));
   if (!shape) {
     return nullptr;
   }
 
   AutoSetNewObjectMetadata metadata(cx);
-  RootedArrayObject arr(
-      cx, ArrayObject::createArray(
-              cx, allocKind, GetInitialHeap(newKind, &ArrayObject::class_),
-              shape, group, length, metadata));
+  RootedArrayObject arr(cx, ArrayObject::createArray(
+                                cx, allocKind, GetInitialHeap(newKind, group),
+                                shape, group, length, metadata));
   if (!arr) {
     return nullptr;
   }
 
   if (shape->isEmptyShape()) {
     if (!AddLengthProperty(cx, arr)) {
       return nullptr;
     }
@@ -4164,17 +4163,17 @@ ArrayObject* js::NewDenseFullyAllocatedA
   AutoSetNewObjectMetadata metadata(cx);
   gc::AllocKind allocKind = GuessArrayGCKind(length);
   MOZ_ASSERT(CanBeFinalizedInBackground(allocKind, &ArrayObject::class_));
   allocKind = GetBackgroundAllocKind(allocKind);
 
   RootedObjectGroup group(cx, templateObject->group());
   RootedShape shape(cx, templateObject->as<ArrayObject>().lastProperty());
 
-  gc::InitialHeap heap = GetInitialHeap(GenericObject, &ArrayObject::class_);
+  gc::InitialHeap heap = GetInitialHeap(GenericObject, group);
   Rooted<ArrayObject*> arr(
       cx, ArrayObject::createArray(cx, allocKind, heap, shape, group, length,
                                    metadata));
   if (!arr) {
     return nullptr;
   }
 
   if (!EnsureNewArrayElements(cx, arr, length)) {
@@ -4182,20 +4181,21 @@ ArrayObject* js::NewDenseFullyAllocatedA
   }
 
   probes::CreateObject(cx, arr);
 
   return arr;
 }
 
 ArrayObject* js::NewDenseCopyOnWriteArray(JSContext* cx,
-                                          HandleArrayObject templateObject,
-                                          gc::InitialHeap heap) {
+                                          HandleArrayObject templateObject) {
   MOZ_ASSERT(!gc::IsInsideNursery(templateObject));
 
+  gc::InitialHeap heap = GetInitialHeap(GenericObject, templateObject->group());
+
   ArrayObject* arr =
       ArrayObject::createCopyOnWriteArray(cx, heap, templateObject);
   if (!arr) {
     return nullptr;
   }
 
   probes::CreateObject(cx, arr);
   return arr;
--- a/js/src/builtin/Array.h
+++ b/js/src/builtin/Array.h
@@ -74,18 +74,17 @@ extern ArrayObject* NewDenseCopiedArray(
                                         NewObjectKind newKind = GenericObject);
 
 // Create a dense array based on templateObject with the given length.
 extern ArrayObject* NewDenseFullyAllocatedArrayWithTemplate(
     JSContext* cx, uint32_t length, JSObject* templateObject);
 
 // Create a dense array with the same copy-on-write elements as another object.
 extern ArrayObject* NewDenseCopyOnWriteArray(JSContext* cx,
-                                             HandleArrayObject templateObject,
-                                             gc::InitialHeap heap);
+                                             HandleArrayObject templateObject);
 
 extern ArrayObject* NewFullyAllocatedArrayTryUseGroup(
     JSContext* cx, HandleObjectGroup group, size_t length,
     NewObjectKind newKind = GenericObject);
 
 extern ArrayObject* NewPartlyAllocatedArrayTryUseGroup(JSContext* cx,
                                                        HandleObjectGroup group,
                                                        size_t length);
--- a/js/src/builtin/Stream.cpp
+++ b/js/src/builtin/Stream.cpp
@@ -1547,18 +1547,17 @@ static MOZ_MUST_USE JSObject* ReadableSt
     return nullptr;
   }
 
   // Step 3: Assert: Type(done) is Boolean (implicit).
 
   // Step 4: Let obj be ObjectCreate(prototype).
   NativeObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(
-      cx, obj,
-      NativeObject::createWithTemplate(cx, gc::DefaultHeap, templateObject));
+      cx, obj, NativeObject::createWithTemplate(cx, templateObject));
 
   // Step 5: Perform CreateDataProperty(obj, "value", value).
   obj->setSlot(Realm::IterResultObjectValueSlot, value);
 
   // Step 6: Perform CreateDataProperty(obj, "done", done).
   obj->setSlot(Realm::IterResultObjectDoneSlot,
                done ? TrueHandleValue : FalseHandleValue);
 
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug-1532376.js
@@ -0,0 +1,10 @@
+"use strict";
+function __f_276() {
+    this.getNameReallyHard = () => eval("eval('(() => this.name)()')")
+}
+for (var __v_1377 = 0; __v_1377 < 10000; __v_1377++) {
+  var __v_1378 = new __f_276();
+  try {
+    __v_1376[__getRandomProperty()];
+  } catch (e) {}
+__v_1378.getNameReallyHard()}
--- a/js/src/jit-test/tests/wasm/atomic.js
+++ b/js/src/jit-test/tests/wasm/atomic.js
@@ -172,17 +172,17 @@ var RMWOperation =
 	let bin = wasmTextToBinary(
 	    `(module
 	      (memory (import "" "memory") 1 1 shared)
 	      (func (export "st") (param i32)
 	       (${type}.atomic.store${view} ${address} ${operand}))
 	      (func $ld (param i32) (result ${type})
 	       (${type}.atomic.load${view} ${address}))
 	      (func (export "ld") (param i32) (result i32)
-	       (${type}.eq (call $ld (get_local 0)) ${operand})))`);
+	       (${type}.eq (call $ld (local.get 0)) ${operand})))`);
 	let mod = new WebAssembly.Module(bin);
 	let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true});
 	let ins = new WebAssembly.Instance(mod, {"": {memory: mem}});
 	return [mem, ins.exports.ld, ins.exports.st];
     },
 
     opModuleEffect(type, view, address, op, operand, ignored) {
 	let bin = wasmTextToBinary(
@@ -199,17 +199,17 @@ var RMWOperation =
 
     opModuleReturned(type, view, address, op, operand, expected) {
 	let bin = wasmTextToBinary(
 	    `(module
 	      (memory (import "" "memory") 1 1 shared)
 	      (func $_f (param i32) (result ${type})
 	       (${type}.atomic.rmw${view}.${op} ${address} ${operand}))
 	      (func (export "f") (param i32) (result i32)
-	       (${type}.eq (call $_f (get_local 0)) (${type}.const ${expected}))))`);
+	       (${type}.eq (call $_f (local.get 0)) (${type}.const ${expected}))))`);
 	let mod = new WebAssembly.Module(bin);
 	let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true});
 	let ins = new WebAssembly.Instance(mod, {"": {memory: mem}});
 	return [mem, ins.exports.f];
     },
 
     cmpxchgModuleEffect(type, view, address, operand1, operand2, ignored) {
 	let bin = wasmTextToBinary(
@@ -225,17 +225,17 @@ var RMWOperation =
 
     cmpxchgModuleReturned(type, view, address, operand1, operand2, expected) {
 	let bin = wasmTextToBinary(
 	    `(module
 	      (memory (import "" "memory") 1 1 shared)
 	      (func $_f (param i32) (result ${type})
 	       (${type}.atomic.rmw${view}.cmpxchg ${address} ${operand1} ${operand2}))
 	      (func (export "f") (param i32) (result i32)
-	       (${type}.eq (call $_f (get_local 0)) (${type}.const ${expected}))))`);
+	       (${type}.eq (call $_f (local.get 0)) (${type}.const ${expected}))))`);
 	let mod = new WebAssembly.Module(bin);
 	let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true});
 	let ins = new WebAssembly.Instance(mod, {"": {memory: mem}});
 	return [mem, ins.exports.f];
     },
 
     assertZero(array, LOC) {
 	for ( let i=0 ; i < 100 ; i++ ) {
@@ -251,17 +251,17 @@ var RMWOperation =
 
 	for ( let [type, variations] of
 	          [["i32", [[Uint8Array,"8_u"], [Uint16Array,"16_u"], [Uint32Array,""]]],
 		   ["i64", [[Uint8Array,"8_u"], [Uint16Array,"16_u"], [Uint32Array,"32_u"], [Uint64Array,""]]]] )
 	{
 	    for ( let [TA, view] of variations )
 	    {
 		for ( let addr of [`(i32.const ${LOC * TA.BYTES_PER_ELEMENT})`,
-				   `(get_local 0)`] )
+				   `(local.get 0)`] )
 		{
 		    for ( let [initial, operand] of [[0x12, 0x37]] )
 		    {
 			let [opd_str, opd_num] = widen(TA, operand);
 			for ( let rhs of [`(${type}.const ${opd_str})`,
 					  `(${type}.load${view} (i32.const ${OPD1 * TA.BYTES_PER_ELEMENT}))`] )
 			{
 			    let [mem, ld, st] = this.loadStoreModule(type, view, addr, rhs);
@@ -364,68 +364,68 @@ function assertNum(a, b) {
 
 var BoundsAndAlignment =
 {
     loadModule(type, ext, offset) {
 	return wasmEvalText(
 	    `(module
 	      (memory 1 1 shared)
 	      (func $0 (param i32) (result ${type})
-	       (${type}.atomic.load${ext} offset=${offset} (get_local 0)))
+	       (${type}.atomic.load${ext} offset=${offset} (local.get 0)))
 	      (func (export "f") (param i32)
-	       (drop (call $0 (get_local 0)))))
+	       (drop (call $0 (local.get 0)))))
 	    `).exports.f;
     },
 
     loadModuleIgnored(type, ext, offset) {
 	return wasmEvalText(
 	    `(module
 	      (memory 1 1 shared)
 	      (func (export "f") (param i32)
-	       (drop (${type}.atomic.load${ext} offset=${offset} (get_local 0)))))
+	       (drop (${type}.atomic.load${ext} offset=${offset} (local.get 0)))))
 	    `).exports.f;
     },
 
     storeModule(type, ext, offset) {
 	return wasmEvalText(
 	    `(module
 	      (memory 1 1 shared)
 	      (func (export "f") (param i32)
-	       (${type}.atomic.store${ext} offset=${offset} (get_local 0) (${type}.const 37))))
+	       (${type}.atomic.store${ext} offset=${offset} (local.get 0) (${type}.const 37))))
 	    `).exports.f;
     },
 
     opModule(type, ext, offset, op) {
 	return wasmEvalText(
 	    `(module
 	      (memory 1 1 shared)
 	      (func $0 (param i32) (result ${type})
-	       (${type}.atomic.rmw${ext}.${op} offset=${offset} (get_local 0) (${type}.const 37)))
+	       (${type}.atomic.rmw${ext}.${op} offset=${offset} (local.get 0) (${type}.const 37)))
 	      (func (export "f") (param i32)
-	       (drop (call $0 (get_local 0)))))
+	       (drop (call $0 (local.get 0)))))
 	    `).exports.f;
     },
 
     opModuleForEffect(type, ext, offset, op) {
 	return wasmEvalText(
 	    `(module
 	      (memory 1 1 shared)
 	      (func (export "f") (param i32)
-	       (drop (${type}.atomic.rmw${ext}.${op} offset=${offset} (get_local 0) (${type}.const 37)))))
+	       (drop (${type}.atomic.rmw${ext}.${op} offset=${offset} (local.get 0) (${type}.const 37)))))
 	    `).exports.f;
     },
 
     cmpxchgModule(type, ext, offset) {
 	return wasmEvalText(
 	    `(module
 	      (memory 1 1 shared)
 	      (func $0 (param i32) (result ${type})
-	       (${type}.atomic.rmw${ext}.cmpxchg offset=${offset} (get_local 0) (${type}.const 37) (${type}.const 42)))
+	       (${type}.atomic.rmw${ext}.cmpxchg offset=${offset} (local.get 0) (${type}.const 37) (${type}.const 42)))
 	      (func (export "f") (param i32)
-	       (drop (call $0 (get_local 0)))))
+	       (drop (call $0 (local.get 0)))))
 	    `).exports.f;
     },
 
     run() {
 	for ( let [type, variations] of [["i32", [["8_u", 1], ["16_u", 2], ["", 4]]],
 					 ["i64", [["8_u",1], ["16_u",2], ["32_u",4], ["",8]]]] )
 	{
 	    for ( let [ext,size] of variations )
@@ -466,49 +466,49 @@ var BoundsAndAlignment =
 }
 
 BoundsAndAlignment.run();
 
 // Bounds and alignment checks on wait and notify
 
 assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared)
 					(func (param i32) (result i32)
-					 (i32.atomic.wait (get_local 0) (i32.const 1) (i64.const -1)))
+					 (i32.atomic.wait (local.get 0) (i32.const 1) (i64.const -1)))
 					(export "" 0))`).exports[""](65536),
 		   RuntimeError, oob);
 
 assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared)
 					(func (param i32) (result i32)
-					 (i64.atomic.wait (get_local 0) (i64.const 1) (i64.const -1)))
+					 (i64.atomic.wait (local.get 0) (i64.const 1) (i64.const -1)))
 					(export "" 0))`).exports[""](65536),
 		   RuntimeError, oob);
 
 assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared)
 					(func (param i32) (result i32)
-					 (i32.atomic.wait (get_local 0) (i32.const 1) (i64.const -1)))
+					 (i32.atomic.wait (local.get 0) (i32.const 1) (i64.const -1)))
 					(export "" 0))`).exports[""](65501),
 		   RuntimeError, unaligned);
 
 assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared)
 					(func (param i32) (result i32)
-					 (i64.atomic.wait (get_local 0) (i64.const 1) (i64.const -1)))
+					 (i64.atomic.wait (local.get 0) (i64.const 1) (i64.const -1)))
 					(export "" 0))`).exports[""](65501),
 		   RuntimeError, unaligned);
 
 assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared)
 					(func (param i32) (result i32)
-					 (atomic.notify (get_local 0) (i32.const 1)))
+					 (atomic.notify (local.get 0) (i32.const 1)))
 					(export "" 0))`).exports[""](65536),
 		   RuntimeError, oob);
 
 // Minimum run-time alignment for NOTIFY is 4
 for (let addr of [1,2,3,5,6,7]) {
     assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared)
 					    (func (export "f") (param i32) (result i32)
-					     (atomic.notify (get_local 0) (i32.const 1))))`).exports.f(addr),
+					     (atomic.notify (local.get 0) (i32.const 1))))`).exports.f(addr),
 		       RuntimeError, unaligned);
 }
 
 // Ensure alias analysis works even if atomic and non-atomic accesses are
 // mixed.
 assertErrorMessage(() => wasmEvalText(`(module
   (memory 0 1 shared)
   (func (export "main")
--- a/js/src/jit-test/tests/wasm/atomicity.js
+++ b/js/src/jit-test/tests/wasm/atomicity.js
@@ -151,20 +151,20 @@ function makeModule(id) {
 
     function makeLoop(bits, name, op, loc, initial, val, expected) {
         // Exclude high bit to avoid messing with the sign.
         let NUMVALS32 = Math.floor(31/VALSHIFT);
         let NUMVALS = bits == 64 ? 2 * NUMVALS32 : Math.floor(Math.min(bits,31)/VALSHIFT);
         let BARRIER = "(i32.const 0)";
         let barrier = `
   ;; Barrier
-  (set_local $barrierValue (i32.add (get_local $barrierValue) (i32.const ${NUMAGENTS})))
+  (local.set $barrierValue (i32.add (local.get $barrierValue) (i32.const ${NUMAGENTS})))
   (drop (i32.atomic.rmw.add ${BARRIER} (i32.const 1)))
   (loop $c1
-   (if (i32.lt_s (i32.atomic.load ${BARRIER}) (get_local $barrierValue))
+   (if (i32.lt_s (i32.atomic.load ${BARRIER}) (local.get $barrierValue))
        (br $c1)))
   ;; End barrier
 `;
 
         // Distribute a value `v` across a word NUMVALs times
 
         function distribute(v) {
             if (bits <= 32)
@@ -195,51 +195,51 @@ function makeModule(id) {
         }
 
         let tag = bits < 32 ? bits + '_u' : '';
         let prefix = bits == 64 ? 'i64' : 'i32';
         return `
  (func ${name} (param $barrierValue i32) (result i32)
    (local $n i32)
    (local $tmp ${prefix})
-   (set_local $n (i32.const ${ITERATIONS}))
+   (local.set $n (i32.const ${ITERATIONS}))
    (loop $outer
-    (if (get_local $n)
+    (if (local.get $n)
         (block
          ${isMaster ? `;; Init
 (${prefix}.atomic.store${tag} ${loc} (${prefix}.const ${distribute(initial)}))` : ``}
          ${barrier}
 
 ${(() => {
     let s = `;; Do\n`;
     for (let i=0; i < NUMVALS; i++) {
         let bitval = `(${prefix}.const ${format(val, i)})`
         // The load must be atomic though it would be better if it were relaxed,
         // we would avoid fences in that case.
         if (op.match(/cmpxchg/)) {
             s += `(loop $doit
-                   (set_local $tmp (${prefix}.atomic.load${tag} ${loc}))
+                   (local.set $tmp (${prefix}.atomic.load${tag} ${loc}))
                    (br_if $doit (i32.eqz
                                  (${prefix}.eq
-                                  (get_local $tmp)
-                                  (${op} ${loc} (get_local $tmp) (${prefix}.or (get_local $tmp) ${bitval}))))))
+                                  (local.get $tmp)
+                                  (${op} ${loc} (local.get $tmp) (${prefix}.or (local.get $tmp) ${bitval}))))))
             `;
         } else {
             s += `(drop (${op} ${loc} ${bitval}))
             `;
        }
      }
     return s
 })()}
          (loop $wait_done
           (br_if $wait_done (${prefix}.ne (${prefix}.atomic.load${tag} ${loc}) (${prefix}.const ${distribute(expected)}))))
          ${barrier}
-         (set_local $n (i32.sub (get_local $n) (i32.const 1)))
+         (local.set $n (i32.sub (local.get $n) (i32.const 1)))
          (br $outer))))
-  (get_local $barrierValue))`;
+  (local.get $barrierValue))`;
     }
 
     const ADDLOC = "(i32.const 256)";
     const ADDINIT = 0;
     const ADDVAL = [1, 2, 4];
     const ADDRESULT = 7;
 
     const SUBLOC = "(i32.const 512)";
@@ -298,43 +298,43 @@ function makeModule(id) {
  ${makeLoop(64, "$test_and64", "i64.atomic.rmw.and", ANDLOC, ANDINIT, ANDVAL[id], ANDRESULT)}
  ${makeLoop(64, "$test_or64", "i64.atomic.rmw.or",   ORLOC, ORINIT, ORVAL[id], ORRESULT)}
  ${makeLoop(64, "$test_xor64", "i64.atomic.rmw.xor", XORLOC, XORINIT, XORVAL[id], XORRESULT)}
  ${makeLoop(64, "$test_cmpxchg64", "i64.atomic.rmw.cmpxchg", CMPXCHGLOC, CMPXCHGINIT, CMPXCHGVAL[id], CMPXCHGRESULT)}
 
  (func (export "test")
   (local $barrierValue i32)
   (call $print (i32.const ${10 + id}))
-  (set_local $barrierValue (call $test_add8 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_sub8 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_and8 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_or8 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_xor8 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_cmpxchg8 (get_local $barrierValue)))
+  (local.set $barrierValue (call $test_add8 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_sub8 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_and8 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_or8 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_xor8 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_cmpxchg8 (local.get $barrierValue)))
   (call $print (i32.const ${20 + id}))
-  (set_local $barrierValue (call $test_add16 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_sub16 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_and16 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_or16 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_xor16 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_cmpxchg16 (get_local $barrierValue)))
+  (local.set $barrierValue (call $test_add16 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_sub16 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_and16 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_or16 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_xor16 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_cmpxchg16 (local.get $barrierValue)))
   (call $print (i32.const ${30 + id}))
-  (set_local $barrierValue (call $test_add (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_sub (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_and (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_or (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_xor (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_cmpxchg (get_local $barrierValue)))
+  (local.set $barrierValue (call $test_add (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_sub (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_and (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_or (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_xor (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_cmpxchg (local.get $barrierValue)))
   (call $print (i32.const ${40 + id}))
-  (set_local $barrierValue (call $test_add64 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_sub64 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_and64 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_or64 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_xor64 (get_local $barrierValue)))
-  (set_local $barrierValue (call $test_cmpxchg64 (get_local $barrierValue)))
+  (local.set $barrierValue (call $test_add64 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_sub64 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_and64 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_or64 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_xor64 (local.get $barrierValue)))
+  (local.set $barrierValue (call $test_cmpxchg64 (local.get $barrierValue)))
  ))
 `;
 }
 
 function makeModule2(id) {
     let text = makeModule(id);
     if (DEBUG > 1)
         print(text);
--- a/js/src/jit-test/tests/wasm/baseline-opt.js
+++ b/js/src/jit-test/tests/wasm/baseline-opt.js
@@ -10,99 +10,99 @@
 // On AngryBots as of November 2016, 84% of all test instructions
 // (measured statically) are optimized by this method.
 
 function testEqzBrIf(value, type, untaken, taken, expected) {
     var f = wasmEvalText(`(module
 			   (func (result i32)
 			    (local ${type})
 			    (local i32)
-			    (set_local 0 (${type}.const ${value}))
-			    (set_local 1 (i32.const ${taken}))
+			    (local.set 0 (${type}.const ${value}))
+			    (local.set 1 (i32.const ${taken}))
 			    (block $b
-			     (br_if $b (${type}.eqz (get_local 0)))
-			     (set_local 1 (i32.const ${untaken})))
-			    (get_local 1))
+			     (br_if $b (${type}.eqz (local.get 0)))
+			     (local.set 1 (i32.const ${untaken})))
+			    (local.get 1))
 			   (export "f" 0))`).exports["f"];
     assertEq(f(), expected);
 }
 
 ["i32", "i64"].forEach(t => testEqzBrIf(0, t, 37, 42, 42)); // Taken
 ["i32", "i64"].forEach(t => testEqzBrIf(1, t, 37, 42, 37)); // Untaken
 
 function testCmpBrIf(value, type, untaken, taken, expected) {
     var f = wasmEvalText(`(module
 			   (func (result i32)
 			    (local ${type})
 			    (local i32)
-			    (set_local 1 (i32.const ${taken}))
+			    (local.set 1 (i32.const ${taken}))
 			    (block $b
-			     (br_if $b (${type}.eq (get_local 0) (${type}.const ${value})))
-			     (set_local 1 (i32.const ${untaken})))
-			    (get_local 1))
+			     (br_if $b (${type}.eq (local.get 0) (${type}.const ${value})))
+			     (local.set 1 (i32.const ${untaken})))
+			    (local.get 1))
 			   (export "f" 0))`).exports["f"];
     assertEq(f(), expected);
 }
 
 ["i32", "i64", "f32", "f64"].forEach(t => testCmpBrIf(0, t, 37, 42, 42)); // Branch taken
 ["i32", "i64", "f32", "f64"].forEach(t => testCmpBrIf(1, t, 37, 42, 37)); // Branch untaken
 
 function testEqzSelect(value, type, iftrue, iffalse, expected) {
     var f = wasmEvalText(`(module
 			   (func (result i32)
 			    (local ${type})
-			    (set_local 0 (${type}.const ${value}))
+			    (local.set 0 (${type}.const ${value}))
 			    (select (i32.const ${iftrue})
 			            (i32.const ${iffalse})
-			            (${type}.eqz (get_local 0))))
+			            (${type}.eqz (local.get 0))))
 			   (export "f" 0))`).exports["f"];
     assertEq(f(), expected);
 }
 
 ["i32", "i64"].forEach(t => testEqzSelect(0, t, 42, 37, 42)); // Select first
 ["i32", "i64"].forEach(t => testEqzSelect(1, t, 42, 37, 37)); // Select second
 
 function testCmpSelect(value, type, iftrue, iffalse, expected) {
     var f = wasmEvalText(`(module
 			   (func (result i32)
 			    (local ${type})
 			    (select (i32.const ${iftrue})
 			            (i32.const ${iffalse})
-			            (${type}.eq (get_local 0) (${type}.const ${value}))))
+			            (${type}.eq (local.get 0) (${type}.const ${value}))))
 			   (export "f" 0))`).exports["f"];
     assertEq(f(), expected);
 }
 
 ["i32", "i64", "f32", "f64"].forEach(t => testCmpSelect(0, t, 42, 37, 42)); // Select first
 ["i32", "i64", "f32", "f64"].forEach(t => testCmpSelect(1, t, 42, 37, 37)); // Select second
 
 function testEqzIf(value, type, trueBranch, falseBranch, expected) {
     var f = wasmEvalText(`(module
 			   (func (result i32)
 			    (local ${type})
 			    (local i32)
-			    (set_local 0 (${type}.const ${value}))
-			    (if (${type}.eqz (get_local 0))
-				(set_local 1 (i32.const ${trueBranch}))
-			        (set_local 1 (i32.const ${falseBranch})))
-			    (get_local 1))
+			    (local.set 0 (${type}.const ${value}))
+			    (if (${type}.eqz (local.get 0))
+				(local.set 1 (i32.const ${trueBranch}))
+			        (local.set 1 (i32.const ${falseBranch})))
+			    (local.get 1))
 			   (export "f" 0))`).exports["f"];
     assertEq(f(), expected);
 }
 
 ["i32", "i64"].forEach(t => testEqzIf(0, t, 42, 37, 42)); // Taken
 ["i32", "i64"].forEach(t => testEqzIf(1, t, 42, 37, 37)); // Untaken
 
 function testCmpIf(value, type, trueBranch, falseBranch, expected) {
     var f = wasmEvalText(`(module
 			   (func (result i32)
 			    (local ${type})
 			    (local i32)
-			    (if (${type}.eq (get_local 0) (${type}.const ${value}))
-				(set_local 1 (i32.const ${trueBranch}))
-			        (set_local 1 (i32.const ${falseBranch})))
-			    (get_local 1))
+			    (if (${type}.eq (local.get 0) (${type}.const ${value}))
+				(local.set 1 (i32.const ${trueBranch}))
+			        (local.set 1 (i32.const ${falseBranch})))
+			    (local.get 1))
 			   (export "f" 0))`).exports["f"];
     assertEq(f(), expected);
 }
 
 ["i32", "i64", "f32", "f64"].forEach(t => testCmpIf(0, t, 42, 37, 42)); // Taken
 ["i32", "i64", "f32", "f64"].forEach(t => testCmpIf(1, t, 42, 37, 37)); // Untaken
--- a/js/src/jit-test/tests/wasm/basic.js
+++ b/js/src/jit-test/tests/wasm/basic.js
@@ -77,17 +77,17 @@ assertErrorMessage(f, TypeError, /i64/);
 var f = wasmEvalText('(module (import $imp "a" "b" (result i64)) (func $f (result i64) (call $imp)) (export "" $f))', {a:{b:()=>{}}}).exports[""];
 assertErrorMessage(f, TypeError, /i64/);
 
 wasmFullPassI64('(module (func $run (result i64) (i64.const 123)))', 123);
 wasmFullPassI64('(module (func $run (param i64) (result i64) (local.get 0)))',
                 '0x123400007fffffff',
                 {},
                 '(i64.const 0x123400007fffffff)');
-wasmFullPassI64('(module (func $run (param i64) (result i64) (i64.add (get_local 0) (i64.const 1))))',
+wasmFullPassI64('(module (func $run (param i64) (result i64) (i64.add (local.get 0) (i64.const 1))))',
                 '0x1234000100000000',
                 {},
                 '(i64.const 0x12340000ffffffff)');
 
 // ----------------------------------------------------------------------------
 // imports
 
 const noImportObj = "second argument must be an object";
@@ -170,70 +170,70 @@ assertEq(new Uint8Array(buf)[2], 'b'.cha
 
 var buf = wasmEvalText('(module (memory 1) (data (i32.const 65535) "c") (export "memory" memory))').exports.memory.buffer;
 assertEq(new Uint8Array(buf)[0], 0);
 assertEq(new Uint8Array(buf)[65535], 'c'.charCodeAt(0));
 
 // ----------------------------------------------------------------------------
 // locals
 
-assertEq(wasmEvalText('(module (func (param i32) (result i32) (get_local 0)) (export "" 0))').exports[""](), 0);
-assertEq(wasmEvalText('(module (func (param i32) (result i32) (get_local 0)) (export "" 0))').exports[""](42), 42);
-assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (get_local 0)) (export "" 0))').exports[""](42, 43), 42);
-assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (get_local 1)) (export "" 0))').exports[""](42, 43), 43);
+assertEq(wasmEvalText('(module (func (param i32) (result i32) (local.get 0)) (export "" 0))').exports[""](), 0);
+assertEq(wasmEvalText('(module (func (param i32) (result i32) (local.get 0)) (export "" 0))').exports[""](42), 42);
+assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (local.get 0)) (export "" 0))').exports[""](42, 43), 42);
+assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (local.get 1)) (export "" 0))').exports[""](42, 43), 43);
 
-wasmFailValidateText('(module (func (get_local 0)))', /local.get index out of range/);
-wasmFailValidateText('(module (func (result f32) (local i32) (get_local 0)))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (result i32) (local f32) (get_local 0)))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (result f32) (param i32) (local f32) (get_local 0)))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (result i32) (param i32) (local f32) (get_local 1)))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (local.get 0)))', /local.get index out of range/);
+wasmFailValidateText('(module (func (result f32) (local i32) (local.get 0)))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (result i32) (local f32) (local.get 0)))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (result f32) (param i32) (local f32) (local.get 0)))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (result i32) (param i32) (local f32) (local.get 1)))', mismatchError("f32", "i32"));
 
 wasmValidateText('(module (func (local i32)))');
 wasmValidateText('(module (func (local i32) (local f32)))');
 
-wasmFullPass('(module (func (result i32) (local i32) (get_local 0)) (export "run" 0))', 0);
-wasmFullPass('(module (func (result i32) (param i32) (local f32) (get_local 0)) (export "run" 0))', 0);
-wasmFullPass('(module (func (result f32) (param i32) (local f32) (get_local 1)) (export "run" 0))', 0);
+wasmFullPass('(module (func (result i32) (local i32) (local.get 0)) (export "run" 0))', 0);
+wasmFullPass('(module (func (result i32) (param i32) (local f32) (local.get 0)) (export "run" 0))', 0);
+wasmFullPass('(module (func (result f32) (param i32) (local f32) (local.get 1)) (export "run" 0))', 0);
 
 wasmFailValidateText('(module (func (local.set 0 (i32.const 0))))', /local.set index out of range/);
-wasmFailValidateText('(module (func (local f32) (set_local 0 (i32.const 0))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (local f32) (set_local 0 (nop))))', emptyStackError);
-wasmFailValidateText('(module (func (local i32) (local f32) (set_local 0 (get_local 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (local i32) (local f32) (set_local 1 (get_local 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (local f32) (local.set 0 (i32.const 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (local f32) (local.set 0 (nop))))', emptyStackError);
+wasmFailValidateText('(module (func (local i32) (local f32) (local.set 0 (local.get 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (local i32) (local f32) (local.set 1 (local.get 0))))', mismatchError("i32", "f32"));
 
-wasmValidateText('(module (func (local i32) (set_local 0 (i32.const 0))))');
-wasmValidateText('(module (func (local i32) (local f32) (set_local 0 (get_local 0))))');
-wasmValidateText('(module (func (local i32) (local f32) (set_local 1 (get_local 1))))');
+wasmValidateText('(module (func (local i32) (local.set 0 (i32.const 0))))');
+wasmValidateText('(module (func (local i32) (local f32) (local.set 0 (local.get 0))))');
+wasmValidateText('(module (func (local i32) (local f32) (local.set 1 (local.get 1))))');
 
 wasmFullPass('(module (func (result i32) (local i32) (tee_local 0 (i32.const 42))) (export "run" 0))', 42);
-wasmFullPass('(module (func (result i32) (local i32) (tee_local 0 (get_local 0))) (export "run" 0))', 0);
+wasmFullPass('(module (func (result i32) (local i32) (tee_local 0 (local.get 0))) (export "run" 0))', 0);
 
-wasmFullPass('(module (func (param $a i32) (result i32) (get_local $a)) (export "run" 0))', 0);
-wasmFullPass('(module (func (param $a i32) (local $b i32) (result i32) (block i32 (set_local $b (get_local $a)) (get_local $b))) (export "run" 0))', 42, {}, 42);
+wasmFullPass('(module (func (param $a i32) (result i32) (local.get $a)) (export "run" 0))', 0);
+wasmFullPass('(module (func (param $a i32) (local $b i32) (result i32) (block i32 (local.set $b (local.get $a)) (local.get $b))) (export "run" 0))', 42, {}, 42);
 
-wasmValidateText('(module (func (local i32) (local $a f32) (set_local 0 (i32.const 1)) (set_local $a (f32.const nan))))');
+wasmValidateText('(module (func (local i32) (local $a f32) (local.set 0 (i32.const 1)) (local.set $a (f32.const nan))))');
 
 // ----------------------------------------------------------------------------
 // blocks
 
 wasmFullPass('(module (func (block )) (export "run" 0))', undefined);
 
 wasmFailValidateText('(module (func (result i32) (block )))', emptyStackError);
 wasmFailValidateText('(module (func (result i32) (block (block ))))', emptyStackError);
-wasmFailValidateText('(module (func (local i32) (set_local 0 (block ))))', emptyStackError);
+wasmFailValidateText('(module (func (local i32) (local.set 0 (block ))))', emptyStackError);
 
 wasmFullPass('(module (func (block (block ))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (result i32) (block i32 (i32.const 42))) (export "run" 0))', 42);
 wasmFullPass('(module (func (result i32) (block i32 (block i32 (i32.const 42)))) (export "run" 0))', 42);
 wasmFailValidateText('(module (func (result f32) (block i32 (i32.const 0))))', mismatchError("i32", "f32"));
 
 wasmFullPass('(module (func (result i32) (block i32 (drop (i32.const 13)) (block i32 (i32.const 42)))) (export "run" 0))', 42);
-wasmFailValidateText('(module (func (result f32) (param f32) (block i32 (drop (get_local 0)) (i32.const 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (result f32) (param f32) (block i32 (drop (local.get 0)) (i32.const 0))))', mismatchError("i32", "f32"));
 
-wasmFullPass('(module (func (result i32) (local i32) (set_local 0 (i32.const 42)) (get_local 0)) (export "run" 0))', 42);
+wasmFullPass('(module (func (result i32) (local i32) (local.set 0 (i32.const 42)) (local.get 0)) (export "run" 0))', 42);
 
 // ----------------------------------------------------------------------------
 // calls
 
 wasmFailValidateText('(module (func (nop)) (func (call 0 (i32.const 0))))', unusedValuesError);
 
 wasmFailValidateText('(module (func (param i32) (nop)) (func (call 0)))', emptyStackError);
 wasmFailValidateText('(module (func (param f32) (nop)) (func (call 0 (i32.const 0))))', mismatchError("i32", "f32"));
@@ -256,17 +256,17 @@ wasmFailValidateText('(module (import "a
 assertErrorMessage(() => wasmEvalText('(module (import "a" "") (func (call 1)))'), TypeError, noImportObj);
 wasmEvalText('(module (import "" "a") (func (call 0)))', {"":{a:()=>{}}});
 wasmEvalText('(module (import "" "a" (param i32)) (func (call 0 (i32.const 0))))', {"":{a:()=>{}}});
 
 function checkF32CallImport(v) {
     wasmFullPass('(module (import "" "a" (result f32)) (func (result f32) (call 0)) (export "run" 1))',
                  Math.fround(v),
                  {"":{a:()=>{ return v; }}});
-    wasmFullPass('(module (import "" "a" (param f32)) (func (param f32) (call 0 (get_local 0))) (export "run" 1))',
+    wasmFullPass('(module (import "" "a" (param f32)) (func (param f32) (call 0 (local.get 0))) (export "run" 1))',
                  undefined,
                  {"":{a:x=>{ assertEq(Math.fround(v), x); }}},
                  v);
 }
 checkF32CallImport(13.37);
 checkF32CallImport(NaN);
 checkF32CallImport(-Infinity);
 checkF32CallImport(-0);
@@ -302,24 +302,24 @@ if (typeof evaluate === 'function')
 wasmFailValidateText(`(module (type $t (func)) (func (call_indirect $t (i32.const 0))))`, /can't call_indirect without a table/);
 
 var {v2i, i2i, i2v} = wasmEvalText(`(module
     (type (func (result i32)))
     (type (func (param i32) (result i32)))
     (type (func (param i32)))
     (func (type 0) (i32.const 13))
     (func (type 0) (i32.const 42))
-    (func (type 1) (i32.add (get_local 0) (i32.const 1)))
-    (func (type 1) (i32.add (get_local 0) (i32.const 2)))
-    (func (type 1) (i32.add (get_local 0) (i32.const 3)))
-    (func (type 1) (i32.add (get_local 0) (i32.const 4)))
+    (func (type 1) (i32.add (local.get 0) (i32.const 1)))
+    (func (type 1) (i32.add (local.get 0) (i32.const 2)))
+    (func (type 1) (i32.add (local.get 0) (i32.const 3)))
+    (func (type 1) (i32.add (local.get 0) (i32.const 4)))
     (table funcref (elem 0 1 2 3 4 5))
-    (func (param i32) (result i32) (call_indirect 0 (get_local 0)))
-    (func (param i32) (param i32) (result i32) (call_indirect 1 (get_local 1) (get_local 0)))
-    (func (param i32) (call_indirect 2 (i32.const 0) (get_local 0)))
+    (func (param i32) (result i32) (call_indirect 0 (local.get 0)))
+    (func (param i32) (param i32) (result i32) (call_indirect 1 (local.get 1) (local.get 0)))
+    (func (param i32) (call_indirect 2 (i32.const 0) (local.get 0)))
     (export "v2i" 6)
     (export "i2i" 7)
     (export "i2v" 8)
 )`).exports;
 
 const signatureMismatch = /indirect call signature mismatch/;
 
 assertEq(v2i(0), 13);
@@ -407,17 +407,17 @@ var imports = {"": {
 var f = wasmEvalText(`
 (module
  (import "" "ifTrue" (result i32))
  (import "" "ifFalse" (result i32))
  (func (result i32) (param i32)
   (select
    (call 0)
    (call 1)
-   (get_local 0)
+   (local.get 0)
   )
  )
  (export "" 2)
 )
 `, imports).exports[""];
 
 assertEq(f(-1), numT);
 assertEq(numT, 1);
@@ -488,34 +488,34 @@ function testSelect(type, trueVal, false
 
     // Variable condition
     var f = wasmEvalText(`
     (module
      (func (result ${type}) (param i32)
       (select
        (${type}.const ${trueVal})
        (${type}.const ${falseVal})
-       (get_local 0)
+       (local.get 0)
       )
      )
      (export "" 0)
     )
     `, imports).exports[""];
 
     assertEq(f(0), falseJS);
     assertEq(f(1), trueJS);
     assertEq(f(-1), trueJS);
 
     wasmFullPass(`
     (module
      (func (result ${type}) (param i32)
       (select
        (${type}.const ${trueVal})
        (${type}.const ${falseVal})
-       (get_local 0)
+       (local.get 0)
       )
      )
      (export "run" 0)
     )`,
     trueJS,
     imports,
     1);
 }
@@ -532,17 +532,17 @@ testSelect('f64', 'infinity', '-0');
 testSelect('f64', 'nan', Math.pow(2, -31));
 
 wasmAssert(`
 (module
  (func $f (result i64) (param i32)
   (select
    (i64.const 0xc0010ff08badf00d)
    (i64.const 0x12345678deadc0de)
-   (get_local 0)
+   (local.get 0)
   )
  )
  (export "" 0)
 )`, [
     { type: 'i64', func: '$f', args: ['i32.const  0'], expected: '0x12345678deadc0de' },
     { type: 'i64', func: '$f', args: ['i32.const  1'], expected: '0xc0010ff08badf00d' },
     { type: 'i64', func: '$f', args: ['i32.const -1'], expected: '0xc0010ff08badf00d' },
 ], imports);
--- a/js/src/jit-test/tests/wasm/bce.js
+++ b/js/src/jit-test/tests/wasm/bce.js
@@ -62,66 +62,66 @@ function loadTwiceModule(type, ext, offs
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (func (param i32) (param i32) (result ${type})
          (drop (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 0)
+          (local.get 0)
          ))
          (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 1)
+          (local.get 1)
          )
        ) (export "" 0))`
     ).exports[""];
 }
 
 function loadTwiceSameBasePlusConstModule(type, ext, offset, align, addConst) {
     return wasmEvalText(
     `(module
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (func (param i32) (result ${type})
          (drop (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 0)
+          (local.get 0)
          ))
          (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (i32.add (get_local 0) (i32.const ${addConst}))
+          (i32.add (local.get 0) (i32.const ${addConst}))
          )
        ) (export "" 0))`
     ).exports[""];
 }
 
 function loadTwiceSameBasePlusNonConstModule(type, ext, offset, align) {
     return wasmEvalText(
     `(module
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (func (param i32) (param i32) (result ${type})
          (drop (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 0)
+          (local.get 0)
          ))
          (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (i32.add (get_local 0) (get_local 1))
+          (i32.add (local.get 0) (local.get 1))
          )
        ) (export "" 0))`
     ).exports[""];
 }
 
 /*
  * On x64 falsely removed bounds checks will be masked by the signal handlers.
  * Thus it is important that these tests be run on x86.
--- a/js/src/jit-test/tests/wasm/builtin.js
+++ b/js/src/jit-test/tests/wasm/builtin.js
@@ -17,30 +17,30 @@ function unary(name) {
         (import $f64 "math" "func" (param f64) (result f64))
 
         (table $t 10 funcref)
         (type $f_f (func (param f32) (result f32)))
         (type $d_d (func (param f64) (result f64)))
         (elem (i32.const 0) $f32 $f64)
 
         (func (export "f32") (param f32) (result f32)
-            get_local 0
+            local.get 0
             call $f32
         )
         (func (export "f32_t") (param f32) (result f32)
-            get_local 0
+            local.get 0
             i32.const 0
             call_indirect $f_f
         )
         (func (export "f64") (param f64) (result f64)
-            get_local 0
+            local.get 0
             call $f64
         )
         (func (export "f64_t") (param f64) (result f64)
-            get_local 0
+            local.get 0
             i32.const 1
             call_indirect $d_d
         )
     )`, imports).exports;
 
     for (let v of values) {
         assertEq(i.f32(v), f32(v));
         assertEq(i.f32_t(v), f32(v));
@@ -66,34 +66,34 @@ function binary(name) {
         (import $f64 "math" "func" (param f64) (param f64) (result f64))
 
         (table $t 10 funcref)
         (type $ff_f (func (param f32) (param f32) (result f32)))
         (type $dd_d (func (param f64) (param f64) (result f64)))
         (elem (i32.const 0) $f32 $f64)
 
         (func (export "f32") (param f32) (param f32) (result f32)
-            get_local 0
-            get_local 1
+            local.get 0
+            local.get 1
             call $f32
         )
         (func (export "f32_t") (param f32) (param f32) (result f32)
-            get_local 0
-            get_local 1
+            local.get 0
+            local.get 1
             i32.const 0
             call_indirect $ff_f
         )
         (func (export "f64") (param f64) (param f64) (result f64)
-            get_local 0
-            get_local 1
+            local.get 0
+            local.get 1
             call $f64
         )
         (func (export "f64_t") (param f64) (param f64) (result f64)
-            get_local 0
-            get_local 1
+            local.get 0
+            local.get 1
             i32.const 1
             call_indirect $dd_d
         )
     )`, imports).exports;
 
     for (let v of values) {
         for (let w of values) {
             assertEq(i.f32(v, w), f32(v, w));
--- a/js/src/jit-test/tests/wasm/caching.js
+++ b/js/src/jit-test/tests/wasm/caching.js
@@ -32,17 +32,17 @@ function testCached(code, imports, test)
      .catch(err => { print(String(err) + " at:\n" + err.stack) });
 
      drainJobQueue();
      assertEq(success, true);
 }
 
 testCached(`(module
     (func $test (param i64) (result f64)
-        get_local 0
+        local.get 0
         f64.convert_u/i64
     )
     (func (export "run") (result i32)
         i64.const 1
         call $test
         f64.const 1
         f64.eq
     )
@@ -63,17 +63,17 @@ testCached(
     `(module
        (type $T (func (result i32)))
        (func $t1 (import "" "t1") (type $T))
        (func $t2 (import "" "t2") (type $T))
        (func $t3 (type $T) (i32.const 30))
        (func $t4 (type $T) (i32.const 40))
        (table funcref (elem $t1 $t2 $t3 $t4))
        (func (export "run") (param i32) (result i32)
-         (call_indirect $T (get_local 0))))`,
+         (call_indirect $T (local.get 0))))`,
     {'':{ t1() { return 10 }, t2() { return 20 } }},
     i => {
         assertEq(i.exports.run(0), 10);
         assertEq(i.exports.run(1), 20);
         assertEq(i.exports.run(2), 30);
         assertEq(i.exports.run(3), 40);
     }
 );
--- a/js/src/jit-test/tests/wasm/compiler-frame-depth.js
+++ b/js/src/jit-test/tests/wasm/compiler-frame-depth.js
@@ -1,11 +1,11 @@
 // Ensures that the postorder allows us to have very deep expression trees.
 
-var expr = '(get_local 0)';
+var expr = '(local.get 0)';
 
 for (var i = 1000; i --> 0; ) {
     expr = `(f32.neg ${expr})`;
 }
 
 var code = `(module
  (func
   (result f32)
--- a/js/src/jit-test/tests/wasm/control-flow.js
+++ b/js/src/jit-test/tests/wasm/control-flow.js
@@ -1,31 +1,31 @@
 const RuntimeError = WebAssembly.RuntimeError;
 
 // ----------------------------------------------------------------------------
 // if
 
 // Condition is an int32
-wasmFailValidateText('(module (func (local f32) (if (get_local 0) (i32.const 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (local f32) (if (get_local 0) (i32.const 1) (i32.const 0))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (local f64) (if (get_local 0) (i32.const 1) (i32.const 0))))', mismatchError("f64", "i32"));
-wasmEvalText('(module (func (local i32) (if (get_local 0) (nop))) (export "" 0))');
-wasmEvalText('(module (func (local i32) (if (get_local 0) (nop) (nop))) (export "" 0))');
+wasmFailValidateText('(module (func (local f32) (if (local.get 0) (i32.const 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (local f32) (if (local.get 0) (i32.const 1) (i32.const 0))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (local f64) (if (local.get 0) (i32.const 1) (i32.const 0))))', mismatchError("f64", "i32"));
+wasmEvalText('(module (func (local i32) (if (local.get 0) (nop))) (export "" 0))');
+wasmEvalText('(module (func (local i32) (if (local.get 0) (nop) (nop))) (export "" 0))');
 
 // Expression values types are consistent
-wasmFailValidateText('(module (func (result i32) (local f32) (if f32 (i32.const 42) (get_local 0) (i32.const 0))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (result i32) (local f64) (if i32 (i32.const 42) (i32.const 0) (get_local 0))))', mismatchError("f64", "i32"));
+wasmFailValidateText('(module (func (result i32) (local f32) (if f32 (i32.const 42) (local.get 0) (i32.const 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (result i32) (local f64) (if i32 (i32.const 42) (i32.const 0) (local.get 0))))', mismatchError("f64", "i32"));
 assertEq(wasmEvalText('(module (func (result i32) (if i32 (i32.const 42) (i32.const 1) (i32.const 2))) (export "" 0))').exports[""](), 1);
 assertEq(wasmEvalText('(module (func (result i32) (if i32 (i32.const 0) (i32.const 1) (i32.const 2))) (export "" 0))').exports[""](), 2);
 
 // Even if we don't yield, sub expressions types still have to match.
-wasmFailValidateText('(module (func (param f32) (if i32 (i32.const 42) (i32.const 1) (get_local 0))) (export "" 0))', mismatchError('f32', 'i32'));
+wasmFailValidateText('(module (func (param f32) (if i32 (i32.const 42) (i32.const 1) (local.get 0))) (export "" 0))', mismatchError('f32', 'i32'));
 wasmFailValidateText('(module (func (if i32 (i32.const 42) (i32.const 1) (i32.const 0))) (export "" 0))', /unused values not explicitly dropped by end of block/);
 wasmFullPass('(module (func (drop (if i32 (i32.const 42) (i32.const 1) (i32.const 0)))) (export "run" 0))', undefined);
-wasmFullPass('(module (func (param f32) (if (i32.const 42) (drop (i32.const 1)) (drop (get_local 0)))) (export "run" 0))', undefined, {}, 13.37);
+wasmFullPass('(module (func (param f32) (if (i32.const 42) (drop (i32.const 1)) (drop (local.get 0)))) (export "run" 0))', undefined, {}, 13.37);
 
 // Sub-expression values are returned
 wasmFullPass(`(module
     (func
         (result i32)
         (if i32
             (i32.const 42)
             (block i32
@@ -290,93 +290,93 @@ wasmFullPass(`(module (func (result i32)
 wasmFullPass('(module (func (br_if 0 (i32.const 1))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (br_if 0 (i32.const 0))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (block (br_if 0 (i32.const 1)))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (block (br_if 0 (i32.const 0)))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (block $l (br_if $l (i32.const 1)))) (export "run" 0))', undefined);
 
 var isNonZero = wasmEvalText(`(module (func (result i32) (param i32)
   (block
-    (br_if 0 (get_local 0))
+    (br_if 0 (local.get 0))
     (return (i32.const 0))
   )
   (return (i32.const 1))
 ) (export "" 0))`).exports[""];
 
 assertEq(isNonZero(0), 0);
 assertEq(isNonZero(1), 1);
 assertEq(isNonZero(-1), 1);
 
 // branches with values
 // br/br_if and block
 wasmFailValidateText('(module (func (result i32) (br 0)))', emptyStackError);
 wasmFailValidateText('(module (func (result i32) (br 0 (f32.const 42))))', mismatchError("f32", "i32"));
 wasmFailValidateText('(module (func (result i32) (block (br 0))))', emptyStackError);
 wasmFailValidateText('(module (func (result i32) (block f32 (br 0 (f32.const 42)))))', mismatchError("f32", "i32"));
 
-wasmFailValidateText(`(module (func (result i32) (param i32) (block (if i32 (get_local 0) (br 0 (i32.const 42))))) (export "" 0))`, /if without else with a result value/);
-wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (drop (i32.const 42))) (br 0 (f32.const 42)))) (export "" 0))`, mismatchError("f32", "i32"));
+wasmFailValidateText(`(module (func (result i32) (param i32) (block (if i32 (local.get 0) (br 0 (i32.const 42))))) (export "" 0))`, /if without else with a result value/);
+wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if (local.get 0) (drop (i32.const 42))) (br 0 (f32.const 42)))) (export "" 0))`, mismatchError("f32", "i32"));
 
 wasmFullPass('(module (func (result i32) (br 0 (i32.const 42)) (i32.const 13)) (export "run" 0))', 42);
 wasmFullPass('(module (func (result i32) (block i32 (br 0 (i32.const 42)) (i32.const 13))) (export "run" 0))', 42);
 
 wasmFailValidateText('(module (func) (func (block i32 (br 0 (call 0)) (i32.const 13))) (export "" 0))', emptyStackError);
 wasmFailValidateText('(module (func) (func (block i32 (br_if 0 (call 0) (i32.const 1)) (i32.const 13))) (export "" 0))', emptyStackError);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (drop (i32.const 42))) (i32.const 43))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (local.get 0) (drop (i32.const 42))) (i32.const 43))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 43);
 
-wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if i32 (get_local 0) (br 0 (i32.const 42))) (i32.const 43))) (export "" 0))`, /if without else with a result value/);
+wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if i32 (local.get 0) (br 0 (i32.const 42))) (i32.const 43))) (export "" 0))`, /if without else with a result value/);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (br 1 (i32.const 42))) (i32.const 43))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (local.get 0) (br 1 (i32.const 42))) (i32.const 43))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 42);
 
-wasmFailValidateText(`(module (func (result i32) (param i32) (block (br_if 0 (i32.const 42) (get_local 0)) (i32.const 43))) (export "" 0))`, /unused values not explicitly dropped by end of block/);
+wasmFailValidateText(`(module (func (result i32) (param i32) (block (br_if 0 (i32.const 42) (local.get 0)) (i32.const 43))) (export "" 0))`, /unused values not explicitly dropped by end of block/);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (drop (br_if 0 (i32.const 42) (get_local 0))) (i32.const 43))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (drop (br_if 0 (i32.const 42) (local.get 0))) (i32.const 43))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 42);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (drop (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (local.get 0) (drop (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 43);
 
-wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if i32 (get_local 0) (br 0 (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`, /if without else with a result value/);
+wasmFailValidateText(`(module (func (result i32) (param i32) (block i32 (if i32 (local.get 0) (br 0 (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`, /if without else with a result value/);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (if (get_local 0) (br 1 (i32.const 42))) (br 0 (i32.const 43))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (if (local.get 0) (br 1 (i32.const 42))) (br 0 (i32.const 43))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 42);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (get_local 0) (br 1 (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (if (local.get 0) (br 1 (i32.const 42))) (br 0 (i32.const 43)))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 42);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (br_if 0 (i32.const 42) (get_local 0)) (br 0 (i32.const 43))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (br_if 0 (i32.const 42) (local.get 0)) (br 0 (i32.const 43))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 42);
 
-var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (br_if 0 (i32.const 42) (get_local 0)) (br 0 (i32.const 43)))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (result i32) (param i32) (block i32 (br_if 0 (i32.const 42) (local.get 0)) (br 0 (i32.const 43)))) (export "" 0))`).exports[""];
 assertEq(f(0), 43);
 assertEq(f(1), 42);
 
-var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if (get_local 0) (drop (i32.const 99))) (i32.const -1)))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if (local.get 0) (drop (i32.const 99))) (i32.const -1)))) (export "" 0))`).exports[""];
 assertEq(f(0), 0);
 assertEq(f(1), 0);
 
-wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if i32 (get_local 0) (br 0 (i32.const 99))) (i32.const -1)))) (export "" 0))`, /if without else with a result value/);
+wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if i32 (local.get 0) (br 0 (i32.const 99))) (i32.const -1)))) (export "" 0))`, /if without else with a result value/);
 
-var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if (get_local 0) (br 1 (i32.const 99))) (i32.const -1)))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (if (local.get 0) (br 1 (i32.const 99))) (i32.const -1)))) (export "" 0))`).exports[""];
 assertEq(f(0), 0);
 assertEq(f(1), 100);
 
-wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (br_if 0 (i32.const 99) (get_local 0)) (i32.const -1)))) (export "" 0))`, /unused values not explicitly dropped by end of block/);
+wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (br_if 0 (i32.const 99) (local.get 0)) (i32.const -1)))) (export "" 0))`, /unused values not explicitly dropped by end of block/);
 
-var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (drop (br_if 0 (i32.const 99) (get_local 0))) (i32.const -1)))) (export "" 0))`).exports[""];
+var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block i32 (drop (br_if 0 (i32.const 99) (local.get 0))) (i32.const -1)))) (export "" 0))`).exports[""];
 assertEq(f(0), 0);
 assertEq(f(1), 100);
 
 wasmFullPass(`(module (func (result i32) (block i32 (br 0 (return (i32.const 42))) (i32.const 0))) (export "run" 0))`, 42);
 wasmFullPass(`(module (func (result i32) (block i32 (return (br 0 (i32.const 42))))) (export "run" 0))`, 42);
 wasmFullPass(`(module (func (result i32) (block i32 (return (br 0 (i32.const 42))) (i32.const 0))) (export "run" 0))`, 42);
 
 wasmFullPass(`(module (func (result f32) (drop (block i32 (br 0 (i32.const 0)))) (block f32 (br 0 (f32.const 42)))) (export "run" 0))`, 42);
@@ -390,72 +390,72 @@ var imports = {
 }
 var f = wasmEvalText(`(module
  (import "sideEffects" "ifTrue" (param i32))
  (import "sideEffects" "ifFalse" (param i32))
  (func
   (param i32) (result i32)
   (block $outer
    (if
-    (get_local 0)
+    (local.get 0)
     (block (call 0 (i32.const 13)) (br $outer))
    )
    (if
-    (i32.eqz (get_local 0))
+    (i32.eqz (local.get 0))
     (block (call 1 (i32.const 37)) (br $outer))
    )
   )
   (i32.const 42)
  )
 (export "" 2))`, imports).exports[""];
 assertEq(f(0), 42);
 assertEq(called, -1);
 assertEq(f(1), 42);
 assertEq(called, 0);
 
 // br/br_if and loop
-wasmFullPass(`(module (func (param i32) (result i32) (loop $out $in i32 (br $out (get_local 0)))) (export "run" 0))`, 1, {}, 1);
-wasmFullPass(`(module (func (param i32) (result i32) (loop $in i32 (br 1 (get_local 0)))) (export "run" 0))`, 1, {}, 1);
-wasmFullPass(`(module (func (param i32) (result i32) (block $out i32 (loop $in i32 (br $out (get_local 0))))) (export "run" 0))`, 1, {}, 1);
+wasmFullPass(`(module (func (param i32) (result i32) (loop $out $in i32 (br $out (local.get 0)))) (export "run" 0))`, 1, {}, 1);
+wasmFullPass(`(module (func (param i32) (result i32) (loop $in i32 (br 1 (local.get 0)))) (export "run" 0))`, 1, {}, 1);
+wasmFullPass(`(module (func (param i32) (result i32) (block $out i32 (loop $in i32 (br $out (local.get 0))))) (export "run" 0))`, 1, {}, 1);
 
 wasmFailValidateText(`(module (func (param i32) (result i32)
   (loop $out $in
-   (if (get_local 0) (br $in (i32.const 1)))
-   (if (get_local 0) (br $in (f32.const 2)))
-   (if (get_local 0) (br $in (f64.const 3)))
-   (if (get_local 0) (br $in))
+   (if (local.get 0) (br $in (i32.const 1)))
+   (if (local.get 0) (br $in (f32.const 2)))
+   (if (local.get 0) (br $in (f64.const 3)))
+   (if (local.get 0) (br $in))
    (i32.const 7)
   )
 ) (export "" 0))`, /unused values not explicitly dropped by end of block/);
 
 wasmFullPass(`(module
  (func
   (result i32)
   (local i32)
   (block $out i32
     (loop $in i32
-     (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+     (local.set 0 (i32.add (local.get 0) (i32.const 1)))
      (if
-        (i32.ge_s (get_local 0) (i32.const 7))
-        (br $out (get_local 0))
+        (i32.ge_s (local.get 0) (i32.const 7))
+        (br $out (local.get 0))
      )
      (br $in)
     )
   )
  )
 (export "run" 0))`, 7);
 
 wasmFullPass(`(module
  (func
   (result i32)
   (local i32)
   (block $out i32
    (loop $in i32
-    (set_local 0 (i32.add (get_local 0) (i32.const 1)))
-    (br_if $out (get_local 0) (i32.ge_s (get_local 0) (i32.const 7)))
+    (local.set 0 (i32.add (local.get 0) (i32.const 1)))
+    (br_if $out (local.get 0) (i32.ge_s (local.get 0) (i32.const 7)))
     (br $in)
    )
   )
  )
 (export "run" 0))`, 7);
 
 // ----------------------------------------------------------------------------
 // loop
@@ -472,163 +472,163 @@ wasmFullPass('(module (func (loop $a (br
 wasmFullPass('(module (func (loop $a $b (br $a))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (block $a (loop $b (br $a)))) (export "run" 0))', undefined);
 wasmFullPass('(module (func (result i32) (loop i32 (i32.const 1))) (export "run" 0))', 1);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (loop
     $break $continue
     (if
-      (i32.gt_u (get_local 0) (i32.const 5))
+      (i32.gt_u (local.get 0) (i32.const 5))
       (br $break)
     )
-    (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+    (local.set 0 (i32.add (local.get 0) (i32.const 1)))
     (br $continue)
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (block
     $break
     (loop
       $continue
       (if
-        (i32.gt_u (get_local 0) (i32.const 5))
+        (i32.gt_u (local.get 0) (i32.const 5))
         (br $break)
       )
-      (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+      (local.set 0 (i32.add (local.get 0) (i32.const 1)))
       (br $continue)
     )
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (loop
     $break $continue
     (br_if
       $break
-      (i32.gt_u (get_local 0) (i32.const 5))
+      (i32.gt_u (local.get 0) (i32.const 5))
     )
-    (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+    (local.set 0 (i32.add (local.get 0) (i32.const 1)))
     (br $continue)
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (block
     $break
     (loop
       $continue
       (br_if
         $break
-        (i32.gt_u (get_local 0) (i32.const 5))
+        (i32.gt_u (local.get 0) (i32.const 5))
       )
-      (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+      (local.set 0 (i32.add (local.get 0) (i32.const 1)))
       (br $continue)
     )
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (loop
     $break $continue
-    (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+    (local.set 0 (i32.add (local.get 0) (i32.const 1)))
     (br_if
       $continue
-      (i32.le_u (get_local 0) (i32.const 5))
+      (i32.le_u (local.get 0) (i32.const 5))
     )
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (block
     $break
     (loop
       $continue
-      (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+      (local.set 0 (i32.add (local.get 0) (i32.const 1)))
       (br_if
         $continue
-        (i32.le_u (get_local 0) (i32.const 5))
+        (i32.le_u (local.get 0) (i32.const 5))
       )
     )
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (loop
     $break $continue
     (br_if
       $break
-      (i32.gt_u (get_local 0) (i32.const 5))
+      (i32.gt_u (local.get 0) (i32.const 5))
     )
-    (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+    (local.set 0 (i32.add (local.get 0) (i32.const 1)))
     (loop
       (br $continue)
     )
     (return (i32.const 42))
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (block
     $break
     (loop
       $continue
       (br_if
         $break
-        (i32.gt_u (get_local 0) (i32.const 5))
+        (i32.gt_u (local.get 0) (i32.const 5))
       )
-      (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+      (local.set 0 (i32.add (local.get 0) (i32.const 1)))
       (loop
         (br $continue)
       )
       (return (i32.const 42))
     )
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (loop
     $break $continue
-    (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+    (local.set 0 (i32.add (local.get 0) (i32.const 1)))
     (loop
       (br_if
         $continue
-        (i32.le_u (get_local 0) (i32.const 5))
+        (i32.le_u (local.get 0) (i32.const 5))
       )
     )
     (br $break)
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 wasmFullPass(`(module (func (result i32) (local i32)
   (block
     $break
     (loop
       $continue
-      (set_local 0 (i32.add (get_local 0) (i32.const 1)))
+      (local.set 0 (i32.add (local.get 0) (i32.const 1)))
       (loop
         (br_if
           $continue
-          (i32.le_u (get_local 0) (i32.const 5))
+          (i32.le_u (local.get 0) (i32.const 5))
         )
       )
       (br $break)
     )
   )
-  (return (get_local 0))
+  (return (local.get 0))
 ) (export "run" 0))`, 6);
 
 // ----------------------------------------------------------------------------
 // br_table
 
 wasmFailValidateText('(module (func (br_table 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS);
 wasmFailValidateText('(module (func (br_table 1 0 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS);
 wasmFailValidateText('(module (func (br_table 0 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS);
@@ -636,47 +636,47 @@ wasmFailValidateText('(module (func (blo
 wasmFailValidateText('(module (func (block (br_table 0 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS);
 wasmFailValidateText('(module (func (block (br_table 0 (f32.const 0)))))', mismatchError("f32", "i32"));
 wasmFailValidateText('(module (func (loop (br_table 2 0 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS);
 wasmFailValidateText('(module (func (loop (br_table 0 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS);
 wasmFailValidateText('(module (func (loop (br_table 0 (f32.const 0)))))', mismatchError("f32", "i32"));
 
 wasmFullPass(`(module (func (result i32) (param i32)
   (block $default
-   (br_table $default (get_local 0))
+   (br_table $default (local.get 0))
    (return (i32.const 0))
   )
   (return (i32.const 1))
 ) (export "run" 0))`, 1);
 
 wasmFullPass(`(module (func (result i32) (param i32)
   (block $default
    (br_table $default (return (i32.const 1)))
    (return (i32.const 0))
   )
   (return (i32.const 2))
 ) (export "run" 0))`, 1);
 
 wasmFullPass(`(module (func (result i32) (param i32)
   (block $outer
    (block $inner
-    (br_table $inner (get_local 0))
+    (br_table $inner (local.get 0))
     (return (i32.const 0))
    )
    (return (i32.const 1))
   )
   (return (i32.const 2))
 ) (export "run" 0))`, 1);
 
 var f = wasmEvalText(`(module (func (result i32) (param i32)
   (block $0
    (block $1
     (block $2
      (block $default
-      (br_table $0 $1 $2 $default (get_local 0))
+      (br_table $0 $1 $2 $default (local.get 0))
      )
      (return (i32.const -1))
     )
     (return (i32.const 2))
    )
   )
   (return (i32.const 0))
 ) (export "" 0))`).exports[""];
@@ -706,21 +706,21 @@ wasmFailValidateText(`(module
 
 wasmFullPass(`(module (func (result i32) (block $default i32 (br_table $default (i32.const 42) (i32.const 1)))) (export "run" 0))`, 42);
 
 var f = wasmEvalText(`(module (func (param i32) (result i32)
   (i32.add
    (block $1 i32
     (drop (block $0 i32
      (drop (block $default i32
-      (br_table $0 $1 $default (get_local 0) (get_local 0))
+      (br_table $0 $1 $default (local.get 0) (local.get 0))
      ))
-     (tee_local 0 (i32.mul (i32.const 2) (get_local 0)))
+     (tee_local 0 (i32.mul (i32.const 2) (local.get 0)))
     ))
-    (tee_local 0 (i32.add (i32.const 4) (get_local 0)))
+    (tee_local 0 (i32.add (i32.const 4) (local.get 0)))
    )
    (i32.const 1)
   )
  ) (export "" 0))`).exports[""];
 
 assertEq(f(0), 5);
 assertEq(f(1), 2);
 assertEq(f(2), 9);
--- a/js/src/jit-test/tests/wasm/conversion.js
+++ b/js/src/jit-test/tests/wasm/conversion.js
@@ -1,51 +1,51 @@
 function testConversion0(resultType, opcode, paramType, op, expect) {
     if (resultType === 'i64') {
         wasmFullPassI64(`(module
             (func $run (param ${paramType}) (result ${resultType})
-                (${opcode} (get_local 0))
+                (${opcode} (local.get 0))
             )
         )`, expect, {}, `${paramType}.const ${op}`);
 
         // The same, but now the input is a constant.
         wasmFullPassI64(`(module
             (func $run (result ${resultType})
                 (${opcode} (${paramType}.const ${op}))
             )
         )`, expect);
     } else if (paramType === 'i64') {
         wasmFullPass(`(module
            (func $f (param ${paramType}) (result ${resultType})
-            (${opcode} (get_local 0))
+            (${opcode} (local.get 0))
            )
            (func (export "run") (result ${resultType})
             i64.const ${op}
             call $f
            )
         )`, expect, {});
     } else {
         wasmFullPass(`(module
            (func (param ${paramType}) (result ${resultType})
-            (${opcode} (get_local 0)))
+            (${opcode} (local.get 0)))
             (export "run" 0)
         )`, expect, {}, op);
     }
 
     for (var bad of ['i32', 'f32', 'f64', 'i64']) {
         if (bad !== resultType) {
             wasmFailValidateText(
-                `(module (func (param ${paramType}) (result ${bad}) (${opcode} (get_local 0))))`,
+                `(module (func (param ${paramType}) (result ${bad}) (${opcode} (local.get 0))))`,
                 mismatchError(resultType, bad)
             );
         }
 
         if (bad !== paramType) {
             wasmFailValidateText(
-                `(module (func (param ${bad}) (result ${resultType}) (${opcode} (get_local 0))))`,
+                `(module (func (param ${bad}) (result ${resultType}) (${opcode} (local.get 0))))`,
                 mismatchError(bad, paramType)
             );
         }
     }
 }
 
 function testConversion(resultType, opcode, paramType, op, expect) {
   testConversion0(resultType, `${resultType}.${opcode}/${paramType}`, paramType, op, expect);
@@ -55,21 +55,21 @@ function testSignExtension(resultType, o
   testConversion0(resultType, `${resultType}.${opcode}`, paramType, op, expect);
 }
 
 function testTrap(resultType, opcode, paramType, op) {
     let func = wasmEvalText(`(module
         (func
             (param ${paramType})
             (result ${resultType})
-            (${resultType}.${opcode}/${paramType} (get_local 0))
+            (${resultType}.${opcode}/${paramType} (local.get 0))
         )
         (func
             (param ${paramType})
-            get_local 0
+            local.get 0
             call 0
             drop
         )
         (export "" 1)
     )`).exports[""];
 
     let expectedError = op === 'nan' ? /invalid conversion to integer/ : /integer overflow/;
 
@@ -362,9 +362,9 @@ testConversion('f32', 'convert_u', 'i32'
 testConversion('f64', 'convert_s', 'i32', 40, 40);
 testConversion('f64', 'convert_u', 'i32', 40, 40);
 
 testConversion('f32', 'demote', 'f64', 40.1, 40.099998474121094);
 testConversion('f64', 'promote', 'f32', 40.1, 40.099998474121094);
 
 // Non-canonical NaNs.
 wasmFullPass('(module (func (result i32) (i32.reinterpret/f32 (f32.demote/f64 (f64.const -nan:0x4444444444444)))) (export "run" 0))', -0x1dddde);
-wasmFullPass('(module (func (result i32) (local i64) (set_local 0 (i64.reinterpret/f64 (f64.promote/f32 (f32.const -nan:0x222222)))) (i32.xor (i32.wrap/i64 (get_local 0)) (i32.wrap/i64 (i64.shr_u (get_local 0) (i64.const 32))))) (export "run" 0))', -0x4003bbbc);
+wasmFullPass('(module (func (result i32) (local i64) (local.set 0 (i64.reinterpret/f64 (f64.promote/f32 (f32.const -nan:0x222222)))) (i32.xor (i32.wrap/i64 (local.get 0)) (i32.wrap/i64 (i64.shr_u (local.get 0) (i64.const 32))))) (export "run" 0))', -0x4003bbbc);
--- a/js/src/jit-test/tests/wasm/drop.js
+++ b/js/src/jit-test/tests/wasm/drop.js
@@ -1,45 +1,45 @@
 for (let type of ['i32', 'f32', 'f64']) {
     assertEq(wasmEvalText(`
         (module
          (func $test (result ${type}) (param $p ${type}) (param $p2 ${type})
-            get_local $p
-            get_local $p2
+            local.get $p
+            local.get $p2
             (block)
             drop
          )
          (export "test" $test)
         )
     `).exports.test(0x1337abc0, 0xffffffff), 0x1337abc0);
 }
 
 assertEq(wasmEvalText(`
     (module
      (func $test (result i32) (param $p i32) (param $p2 f32) (param $p3 f64) (param $p4 i32)
-        get_local $p
-        get_local $p2
-        get_local $p3
-        get_local $p4
+        local.get $p
+        local.get $p2
+        local.get $p3
+        local.get $p4
         (block)
         drop
         (block)
         (block)
         drop
         drop
      )
      (export "test" $test)
     )
 `).exports.test(0x1337abc0, 0xffffffff), 0x1337abc0);
 
 wasmAssert(`
     (module
      (func $test (result i64) (param $p i64) (param $p2 i64)
-        get_local $p
-        get_local $p2
+        local.get $p
+        local.get $p2
         (block)
         drop
      )
      (export "test" $test)
     )
 `, [
     { type: 'i64', func: '$test', args: ['(i64.const 0x1337abc0)', '(i64.const -1)'], expected: '0x1337abc0' }
 ]);
--- a/js/src/jit-test/tests/wasm/errors.js
+++ b/js/src/jit-test/tests/wasm/errors.js
@@ -65,22 +65,22 @@ function testAccess(opcode, text, width,
                 exn = e;
             }
             testExn(opcode, binary, type, msg, exn);
         }
     }
 }
 
 function testLoad(opcode, optext, width, type, msg) {
-    var text = `(module (memory 1) (func (export "") (param i32) (drop (${optext} (get_local 0)))))`;
+    var text = `(module (memory 1) (func (export "") (param i32) (drop (${optext} (local.get 0)))))`;
     testAccess(opcode, text, width, type, msg);
 }
 
 function testStore(opcode, optext, consttext, width, type, msg) {
-    var text = `(module (memory 1) (func (export "") (param i32) (${optext} (get_local 0) (${consttext}.const 0))))`;
+    var text = `(module (memory 1) (func (export "") (param i32) (${optext} (local.get 0) (${consttext}.const 0))))`;
     testAccess(opcode, text, width, type, msg);
 }
 
 test(UnreachableCode, '(module (func unreachable) (start 0))', RuntimeError, /unreachable executed/);
 test(I32DivSCode, '(module (func (drop (i32.div_s (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/);
 test(I32DivSCode, '(module (func (drop (i32.div_s (i32.const -2147483648) (i32.const -1)))) (start 0))', RuntimeError, /integer overflow/);
 test(I32DivUCode, '(module (func (drop (i32.div_u (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/);
 test(I32RemSCode, '(module (func (drop (i32.rem_s (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/);
--- a/js/src/jit-test/tests/wasm/fac.js
+++ b/js/src/jit-test/tests/wasm/fac.js
@@ -1,19 +1,19 @@
 // This is fac-opt from fac.wast in the official testsuite, changed to use
 // i32 instead of i64.
 assertEq(wasmEvalText(`(module
   (func $fac-opt (param i32) (result i32)
     (local i32)
-    (set_local 1 (i32.const 1))
+    (local.set 1 (i32.const 1))
     (block
-      (br_if 0 (i32.lt_s (get_local 0) (i32.const 2)))
+      (br_if 0 (i32.lt_s (local.get 0) (i32.const 2)))
       (loop
-        (set_local 1 (i32.mul (get_local 1) (get_local 0)))
-        (set_local 0 (i32.add (get_local 0) (i32.const -1)))
-        (br_if 0 (i32.gt_s (get_local 0) (i32.const 1)))
+        (local.set 1 (i32.mul (local.get 1) (local.get 0)))
+        (local.set 0 (i32.add (local.get 0) (i32.const -1)))
+        (br_if 0 (i32.gt_s (local.get 0) (i32.const 1)))
       )
     )
-    (get_local 1)
+    (local.get 1)
   )
 
   (export "" 0)
 )`).exports[""](10), 3628800);
--- a/js/src/jit-test/tests/wasm/float-unaligned.js
+++ b/js/src/jit-test/tests/wasm/float-unaligned.js
@@ -30,38 +30,38 @@ function makeLoadStore(numBallast, ty, o
 
     let loadtxt =
       `(func (export "get_${ty}_${offset}") (param $p i32) (result ${ty})
          ${ballast(() => `
               (i32.const 8)
               (i32.store (i32.const 8) (i32.add (i32.load (i32.const 8)) (i32.const 1)))
               (${ty}.load (i32.const 8))`)}
 
-         (${ty}.store (i32.const 0) (${ty}.load offset=${offset} (get_local $p)))
+         (${ty}.store (i32.const 0) (${ty}.load offset=${offset} (local.get $p)))
 
          ${ballast(() => `
              ${ty}.store`)}
 
          (${ty}.load (i32.const 0)))`;
 
     // This will assume the value at mem[16] is zero.
     let storetxt =
       `(func (export "set_${ty}_${offset}") (param $p i32) (param $v ${ty})
          (local $tmp ${ty})
          ${ballast(() => `
               (i32.const 8)
               (i32.store (i32.const 8) (i32.add (i32.load (i32.const 8)) (i32.const 1)))
               (${ty}.load (i32.const 8))`)}
 
-         (set_local $tmp (${ty}.add (get_local $v) (${ty}.load (i32.const 16))))
-         (${ty}.store offset=${offset} (get_local $p) (get_local $tmp))
+         (local.set $tmp (${ty}.add (local.get $v) (${ty}.load (i32.const 16))))
+         (${ty}.store offset=${offset} (local.get $p) (local.get $tmp))
 
          ${ballast(() => `
              ${ty}.store`)}
-         (${ty}.store (i32.const 8) (get_local $v)))`;
+         (${ty}.store (i32.const 8) (local.get $v)))`;
 
     return `${loadtxt}
             ${storetxt}`;
 
     function ballast(thunk) {
         let s = "";
         for ( let i=0 ; i < numBallast; i++ )
             s += thunk();
--- a/js/src/jit-test/tests/wasm/float.js
+++ b/js/src/jit-test/tests/wasm/float.js
@@ -7,31 +7,31 @@ wasmFullPass('(module (func (result f32)
 wasmFullPass('(module (func (result f64) (f64.const 2.5)) (export "run" 0))', 2.5);
 wasmFullPass('(module (func (result f64) (f64.const 10e2)) (export "run" 0))', 10e2);
 wasmFullPass('(module (func (result f32) (f32.const 10e2)) (export "run" 0))', 10e2);
 wasmFullPass('(module (func (result f64) (f64.const -0x8000000000000000)) (export "run" 0))', -0x8000000000000000);
 wasmFullPass('(module (func (result f64) (f64.const -9223372036854775808)) (export "run" 0))', -9223372036854775808);
 wasmFullPass('(module (func (result f64) (f64.const 1797693134862315708145274e284)) (export "run" 0))', 1797693134862315708145274e284);
 
 function testUnary(type, opcode, op, expect) {
-    wasmFullPass('(module (func (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0))) (export "run" 0))',
+    wasmFullPass('(module (func (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (local.get 0))) (export "run" 0))',
                  expect,
                  {},
                  op);
 }
 
 function testBinary(type, opcode, lhs, rhs, expect) {
-    wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "run" 0))',
+    wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (local.get 0) (local.get 1))) (export "run" 0))',
                  expect,
                  {},
                  lhs, rhs);
 }
 
 function testComparison(type, opcode, lhs, rhs, expect) {
-    wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result i32) (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "run" 0))',
+    wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result i32) (' + type + '.' + opcode + ' (local.get 0) (local.get 1))) (export "run" 0))',
                  expect,
                  {},
                  lhs, rhs);
 }
 
 testUnary('f32', 'abs', -40, 40);
 testUnary('f32', 'neg', 40, -40);
 testUnary('f32', 'floor', 40.9, 40);
@@ -73,31 +73,31 @@ testBinary('f64', 'copysign', 40, -2, -4
 
 testComparison('f64', 'eq', 40, 40, 1);
 testComparison('f64', 'ne', 40, 40, 0);
 testComparison('f64', 'lt', 40, 40, 0);
 testComparison('f64', 'le', 40, 40, 1);
 testComparison('f64', 'gt', 40, 40, 0);
 testComparison('f64', 'ge', 40, 40, 1);
 
-wasmFailValidateText('(module (func (param i32) (result f32) (f32.sqrt (get_local 0))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (result i32) (f32.sqrt (get_local 0))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (result i32) (f32.sqrt (get_local 0))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param i32) (result f64) (f64.sqrt (get_local 0))))', mismatchError("i32", "f64"));
-wasmFailValidateText('(module (func (param f64) (result i32) (f64.sqrt (get_local 0))))', mismatchError("f64", "i32"));
-wasmFailValidateText('(module (func (param i32) (result i32) (f64.sqrt (get_local 0))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param i32) (result f32) (f32.sqrt (local.get 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (result i32) (f32.sqrt (local.get 0))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (result i32) (f32.sqrt (local.get 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param i32) (result f64) (f64.sqrt (local.get 0))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param f64) (result i32) (f64.sqrt (local.get 0))))', mismatchError("f64", "i32"));
+wasmFailValidateText('(module (func (param i32) (result i32) (f64.sqrt (local.get 0))))', mismatchError("i32", "f64"));
 wasmFailValidateText('(module (func (f32.sqrt (nop))))', /popping value from empty stack/);
 
-wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (param f32) (result i32) (f32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.add (get_local 0) (get_local 1))))', mismatchError("i32", "f64"));
-wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.add (get_local 0) (get_local 1))))', mismatchError("i32", "f64"));
-wasmFailValidateText('(module (func (param f64) (param f64) (result i32) (f64.add (get_local 0) (get_local 1))))', mismatchError("f64", "i32"));
-wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f64.add (get_local 0) (get_local 1))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (param f32) (result i32) (f32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.add (local.get 0) (local.get 1))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.add (local.get 0) (local.get 1))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param f64) (param f64) (result i32) (f64.add (local.get 0) (local.get 1))))', mismatchError("f64", "i32"));
+wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f64.add (local.get 0) (local.get 1))))', mismatchError("i32", "f64"));
 
-wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (f32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f64"));
-wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f64"));
-wasmFailValidateText('(module (func (param f64) (param f64) (result f64) (f64.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (f32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f64"));
+wasmFailValidateText('(module (func (param f64) (param f64) (result f64) (f64.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f64"));
--- a/js/src/jit-test/tests/wasm/full-cycle.js
+++ b/js/src/jit-test/tests/wasm/full-cycle.js
@@ -1,10 +1,10 @@
 wasmFullPass(`(module
-    (func $test (result i32) (param i32) (param i32) (i32.add (get_local 0) (get_local 1)))
+    (func $test (result i32) (param i32) (param i32) (i32.add (local.get 0) (local.get 1)))
     (func $run (result i32) (call $test (i32.const 1) (i32.const ${Math.pow(2, 31) - 1})))
     (export "run" $run)
 )`, -Math.pow(2, 31));
 
 wasmFullPass(`(module
     (func (result i32)
         i32.const 1
         i32.const 42
@@ -18,34 +18,34 @@ wasmFullPass(`(module
     )
     (func) (func) (func)
 (export "run" 0))`, 43);
 
 wasmFullPass(`
 (module
   (import "env" "a" (global $a i32))
   (import "env" "b" (func $b (param i32) (result i32)))
-  (func (export "run") (param $0 i32) (result i32) get_local 0 call $b)
+  (func (export "run") (param $0 i32) (result i32) local.get 0 call $b)
 )`, 43, { env: { a: 1337, b: x => x+1 } }, 42);
 
 // Global section.
 wasmFullPass(`(module
  (import $imported "globals" "x" (global i32))
  (global $mut_local (mut i32) (i32.const 0))
  (global $imm_local i32 (i32.const 37))
- (global $imm_local_2 i32 (get_global 0))
+ (global $imm_local_2 i32 (global.get 0))
  (func $get (result i32)
   i32.const 13
-  set_global $mut_local
-  get_global $imported
-  get_global $mut_local
+  global.set $mut_local
+  global.get $imported
+  global.get $mut_local
   i32.add
-  get_global $imm_local
+  global.get $imm_local
   i32.add
-  get_global $imm_local_2
+  global.get $imm_local_2
   i32.add
  )
  (export "run" $get)
 )`, 13 + 42 + 37 + 42, { globals: {x: 42} });
 
 // Memory.
 wasmFullPass(`(module
     (memory (export "memory") 1 2)
@@ -74,75 +74,75 @@ wasmFullPass(`(module
     (table (export "table") 3 funcref)
     (type $t (func (result i32)))
     (func $foo (result i32) (i32.const 1))
     (func $bar (result i32) (i32.const 2))
     (func $baz (result i32) (i32.const 3))
     (elem (i32.const 0) $baz $bar)
     (elem (i32.const 2) $foo)
     (func (export "run") (param i32) (result i32)
-        get_local 0
+        local.get 0
         call_indirect $t
     )
 )`, 3, {}, 0);
 
 let table = new WebAssembly.Table({ element: 'funcref', initial: 3, maximum: 3 });
 
 wasmFullPass(`(module
     (table (import "" "table") 3 4 funcref)
     (type $t (func (result i32)))
     (func $foo (result i32) (i32.const 1))
     (func $bar (result i32) (i32.const 2))
     (func $baz (result i32) (i32.const 3))
     (elem (i32.const 0) $baz $bar)
     (elem (i32.const 2) $foo)
     (func (export "run") (param i32) (result i32)
-        get_local 0
+        local.get 0
         call_indirect $t
     )
 )`, 3, {"":{table}}, 0);
 
 // Start function.
 wasmFullPass(`(module
     (global $g (mut i32) (i32.const 0))
     (func $start
-        get_global $g
+        global.get $g
         i32.const 1
         i32.add
-        set_global $g
+        global.set $g
     )
     (start $start)
     (func (export "run") (result i32)
-        get_global $g
+        global.get $g
     )
 )`, 1);
 
 // Branch table.
 for (let [p, result] of [
     [0, 7],
     [1, 6],
     [2, 4],
     [42, 4]
 ]) {
     wasmFullPass(`(module
         (func (export "run") (result i32) (param $p i32) (local $n i32)
             i32.const 0
-            set_local $n
+            local.set $n
             block $c block $b block $a
-                get_local $p
+                local.get $p
                 br_table $a $b $c
             end $a
-                get_local $n
+                local.get $n
                 i32.const 1
                 i32.add
-                set_local $n
+                local.set $n
             end $b
-                get_local $n
+                local.get $n
                 i32.const 2
                 i32.add
-                set_local $n
+                local.set $n
             end $c
-            get_local $n
+            local.get $n
             i32.const 4
             i32.add
         )
     )`, result, {}, p);
 }
--- a/js/src/jit-test/tests/wasm/gc/TypedObject.js
+++ b/js/src/jit-test/tests/wasm/gc/TypedObject.js
@@ -132,18 +132,18 @@
 
 {
     let ins = wasmEvalText(
         `(module
           (gc_feature_opt_in 3)
           (type $p (struct (field i64)))
           (type $q (struct (field i32) (field i32)))
           (func $f (param anyref) (result i32)
-           (ref.is_null (struct.narrow anyref (ref $q) (get_local 0))))
+           (ref.is_null (struct.narrow anyref (ref $q) (local.get 0))))
           (func $g (param anyref) (result i32)
-           (ref.is_null (struct.narrow anyref (ref $p) (get_local 0))))
+           (ref.is_null (struct.narrow anyref (ref $p) (local.get 0))))
           (func (export "t1") (result i32)
            (call $f (struct.new $p (i64.const 0))))
           (func (export "t2") (result i32)
            (call $g (struct.new $q (i32.const 0) (i32.const 0)))))`).exports;
     assertEq(ins.t1(), 1);
     assertEq(ins.t2(), 1);
 }
--- a/js/src/jit-test/tests/wasm/gc/anyref-boxing-struct.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref-boxing-struct.js
@@ -41,50 +41,50 @@ let VALUES = [null,
 
 for (let v of VALUES)
 {
     let ins = wasmEvalText(
         `(module
            (gc_feature_opt_in 3)
            (type $S (struct (field $S.x (mut anyref))))
            (func (export "make") (param $v anyref) (result anyref)
-             (struct.new $S (get_local $v))))`);
+             (struct.new $S (local.get $v))))`);
     let x = ins.exports.make(v);
     assertEq(x._0, v);
 }
 
 // Write with JS setter, read with struct.get
 
 for (let v of VALUES)
 {
     let ins = wasmEvalText(
         `(module
            (gc_feature_opt_in 3)
            (type $S (struct (field $S.x (mut anyref))))
            (func (export "make") (result anyref)
              (struct.new $S (ref.null)))
            (func (export "get") (param $o anyref) (result anyref)
-             (struct.get $S 0 (struct.narrow anyref (ref $S) (get_local $o)))))`);
+             (struct.get $S 0 (struct.narrow anyref (ref $S) (local.get $o)))))`);
     let x = ins.exports.make();
     x._0 = v;
     assertEq(ins.exports.get(x), v);
 }
 
 // Write with JS constructor, read with struct.get
 
 for (let v of VALUES)
 {
     let ins = wasmEvalText(
         `(module
            (gc_feature_opt_in 3)
            (type $S (struct (field $S.x (mut anyref))))
            (func (export "make") (result anyref)
              (struct.new $S (ref.null)))
            (func (export "get") (param $o anyref) (result anyref)
-             (struct.get $S 0 (struct.narrow anyref (ref $S) (get_local $o)))))`);
+             (struct.get $S 0 (struct.narrow anyref (ref $S) (local.get $o)))))`);
     let constructor = ins.exports.make().constructor;
     let x = new constructor({_0: v});
     assertEq(ins.exports.get(x), v);
 }
 
 // TypedObject.WasmAnyRef exists and is an identity operation
 
 assertEq(typeof TypedObject.WasmAnyRef, "function");
@@ -142,17 +142,17 @@ for (let v of VALUES) {
                        /can't convert undefined/);
 }
 
 // Try to make sure anyrefs are properly traced
 
 {
     let fields = iota(10).map(() => `(field anyref)`).join(' ');
     let params = iota(10).map((i) => `(param $${i} anyref)`).join(' ');
-    let args = iota(10).map((i) => `(get_local $${i})`).join(' ');
+    let args = iota(10).map((i) => `(local.get $${i})`).join(' ');
     let txt = `(module
                  (gc_feature_opt_in 3)
                  (type $S (struct ${fields}))
                  (func (export "make") ${params} (result anyref)
                    (struct.new $S ${args})))`;
     let ins = wasmEvalText(txt);
     let x = ins.exports.make({x:0}, {x:1}, {x:2}, {x:3}, {x:4}, {x:5}, {x:6}, {x:7}, {x:8}, {x:9})
     gc('shrinking');
--- a/js/src/jit-test/tests/wasm/gc/anyref-boxing.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref-boxing.js
@@ -21,22 +21,22 @@ let VALUES = [null,
               Symbol("status"),
               () => 1337];
 
 // Global variables can receive values via several mechanisms:
 //
 // - on initialization when created from JS
 // - on initialization when created in Wasm, from an imported global
 // - through the "value" property if the value is mutable
-// - through the set_global wasm instruction, ditto
+// - through the global.set wasm instruction, ditto
 //
 // Their values can be obtained in several ways:
 //
 // - through the "value" property
-// - through the get_global wasm instruction
+// - through the global.get wasm instruction
 // - read when other globals are initialized from them
 
 // Set via initialization and read via 'value'
 
 for (let v of VALUES)
 {
     let g = new WebAssembly.Global({value: "anyref"}, v);
     assertEq(g.value, v);
@@ -46,40 +46,40 @@ for (let v of VALUES)
 
 for (let v of VALUES)
 {
     let g = new WebAssembly.Global({value: "anyref", mutable: true});
     g.value = v;
     assertEq(g.value, v);
 }
 
-// Set via initialization, then read via get_global and returned
+// Set via initialization, then read via global.get and returned
 
 for (let v of VALUES)
 {
     let g = new WebAssembly.Global({value: "anyref"}, v);
     let ins = wasmEvalText(
         `(module
            (import $glob "m" "g" (global anyref))
            (func (export "f") (result anyref)
-             (get_global $glob)))`,
+             (global.get $glob)))`,
         {m:{g}});
     assertEq(ins.exports.f(), v);
 }
 
-// Set via set_global, then read via 'value'
+// Set via global.set, then read via 'value'
 
 for (let v of VALUES)
 {
     let g = new WebAssembly.Global({value: "anyref", mutable: true});
     let ins = wasmEvalText(
         `(module
            (import $glob "m" "g" (global (mut anyref)))
            (func (export "f") (param $v anyref)
-             (set_global $glob (get_local $v))))`,
+             (global.set $glob (local.get $v))))`,
         {m:{g}});
     ins.exports.f(v);
     assertEq(g.value, v);
 }
 
 // Tables of anyref can receive values via several mechanisms:
 //
 // - through WebAssembly.Table.prototype.set()
@@ -107,17 +107,17 @@ for (let v of VALUES)
 
 for (let v of VALUES)
 {
     let t = new WebAssembly.Table({element: "anyref", initial: 10});
     let ins = wasmEvalText(
         `(module
            (import $t "m" "t" (table 10 anyref))
            (func (export "f") (param $v anyref)
-             (table.set $t (i32.const 3) (get_local $v))))`,
+             (table.set $t (i32.const 3) (local.get $v))))`,
         {m:{t}});
     ins.exports.f(v);
     assertEq(t.get(3), v);
 }
 
 // write with .set(), read with table.get
 
 for (let v of VALUES)
@@ -142,13 +142,13 @@ for (let v of VALUES)
     let receiver = function (w) { assertEq(w, v); };
     let ins = wasmEvalText(
         `(module
            (import $returner "m" "returner" (func (result anyref)))
            (import $receiver "m" "receiver" (func (param anyref)))
            (func (export "test_returner") (result anyref)
              (call $returner))
            (func (export "test_receiver") (param $v anyref)
-             (call $receiver (get_local $v))))`,
+             (call $receiver (local.get $v))))`,
         {m:{returner, receiver}});
     assertEq(ins.exports.test_returner(), v);
     ins.exports.test_receiver(v);
 }
--- a/js/src/jit-test/tests/wasm/gc/anyref-global-postbarrier.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref-global-postbarrier.js
@@ -7,35 +7,35 @@ function Baguette(calories) {
     this.calories = calories;
 }
 
 // Ensure the baseline compiler sync's before the postbarrier.
 (function() {
     wasmEvalText(`(module
         (global (mut anyref) (ref.null))
         (func (export "f")
-            get_global 0
+            global.get 0
             ref.null
-            set_global 0
-            set_global 0
+            global.set 0
+            global.set 0
         )
     )`).exports.f();
 })();
 
 let exportsPlain = wasmEvalText(`(module
     (global i32 (i32.const 42))
     (global $g (mut anyref) (ref.null))
-    (func (export "set") (param anyref) get_local 0 set_global $g)
-    (func (export "get") (result anyref) get_global $g)
+    (func (export "set") (param anyref) local.get 0 global.set $g)
+    (func (export "get") (result anyref) global.get $g)
 )`).exports;
 
 let exportsObj = wasmEvalText(`(module
     (global $g (export "g") (mut anyref) (ref.null))
-    (func (export "set") (param anyref) get_local 0 set_global $g)
-    (func (export "get") (result anyref) get_global $g)
+    (func (export "set") (param anyref) local.get 0 global.set $g)
+    (func (export "get") (result anyref) global.get $g)
 )`).exports;
 
 // 7 => Generational GC zeal.
 gczeal(7, 1);
 
 for (var i = 0; i < 100; i++) {
     new Baguette(i);
 }
--- a/js/src/jit-test/tests/wasm/gc/anyref-global-prebarrier.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref-global-prebarrier.js
@@ -6,17 +6,17 @@
 opts = getJitCompilerOptions();
 if (opts['ion.enable'] || opts['baseline.enable'])
   quit();
 
 const { startProfiling, endProfiling, assertEqPreciseStacks, isSingleStepProfilingEnabled } = WasmHelpers;
 
 let e = wasmEvalText(`(module
     (global $g (mut anyref) (ref.null))
-    (func (export "set") (param anyref) get_local 0 set_global $g)
+    (func (export "set") (param anyref) local.get 0 global.set $g)
 )`).exports;
 
 let obj = { field: null };
 
 // GCZeal mode 4 implies that prebarriers are being verified at many
 // locations in the interpreter, during interrupt checks, etc. It can be ultra
 // slow, so disable it with gczeal(0) when it's not strictly needed.
 gczeal(4, 1);
--- a/js/src/jit-test/tests/wasm/gc/anyref-refeq.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref-refeq.js
@@ -1,20 +1,20 @@
 // |jit-test| skip-if: !wasmGcEnabled()
 //
 // ref.eq is part of the gc feature, not the reftypes feature.
 
 let { exports } = wasmEvalText(`(module
     (gc_feature_opt_in 3)
 
     (func (export "ref_eq") (param $a anyref) (param $b anyref) (result i32)
-        (ref.eq (get_local $a) (get_local $b)))
+        (ref.eq (local.get $a) (local.get $b)))
 
     (func (export "ref_eq_for_control") (param $a anyref) (param $b anyref) (result f64)
-        (if f64 (ref.eq (get_local $a) (get_local $b))
+        (if f64 (ref.eq (local.get $a) (local.get $b))
             (f64.const 5.0)
             (f64.const 3.0))))`);
 
 assertEq(exports.ref_eq(null, null), 1);
 assertEq(exports.ref_eq(null, {}), 0);
 assertEq(exports.ref_eq(this, this), 1);
 assertEq(exports.ref_eq_for_control(null, null), 5);
 assertEq(exports.ref_eq_for_control(null, {}), 3);
--- a/js/src/jit-test/tests/wasm/gc/anyref-val-tracing.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref-val-tracing.js
@@ -1,12 +1,12 @@
 // |jit-test| skip-if: !wasmReftypesEnabled()
 
 gczeal(14, 1);
 let { exports } = wasmEvalText(`(module
     (global $anyref (import "glob" "anyref") anyref)
-    (func (export "get") (result anyref) get_global $anyref)
+    (func (export "get") (result anyref) global.get $anyref)
 )`, {
     glob: {
         anyref: { sentinel: "lol" },
     }
 });
 assertEq(exports.get().sentinel, "lol");
--- a/js/src/jit-test/tests/wasm/gc/anyref.js
+++ b/js/src/jit-test/tests/wasm/gc/anyref.js
@@ -37,17 +37,17 @@ assertErrorMessage(() => wasmEvalText(`(
 // Basic compilation tests.
 
 let simpleTests = [
     "(module (func (drop (ref.null))))",
     "(module (func $test (local anyref)))",
     "(module (func $test (param anyref)))",
     "(module (func $test (result anyref) (ref.null)))",
     "(module (func $test (block anyref (unreachable)) unreachable))",
-    "(module (func $test (local anyref) (result i32) (ref.is_null (get_local 0))))",
+    "(module (func $test (local anyref) (result i32) (ref.is_null (local.get 0))))",
     `(module (import "a" "b" (param anyref)))`,
     `(module (import "a" "b" (result anyref)))`,
     `(module (global anyref (ref.null)))`,
     `(module (global (mut anyref) (ref.null)))`,
 ];
 
 for (let src of simpleTests) {
     wasmEvalText(src, {a:{b(){}}});
@@ -58,72 +58,72 @@ for (let src of simpleTests) {
 
 let { exports } = wasmEvalText(`(module
     (func (export "is_null") (result i32)
         ref.null
         ref.is_null
     )
 
     (func $sum (result i32) (param i32)
-        get_local 0
+        local.get 0
         i32.const 42
         i32.add
     )
 
     (func (export "is_null_spill") (result i32)
         ref.null
         i32.const 58
         call $sum
         drop
         ref.is_null
     )
 
     (func (export "is_null_local") (result i32) (local anyref)
         ref.null
-        set_local 0
+        local.set 0
         i32.const 58
         call $sum
         drop
-        get_local 0
+        local.get 0
         ref.is_null
     )
     )`);
 
 assertEq(exports.is_null(), 1);
 assertEq(exports.is_null_spill(), 1);
 assertEq(exports.is_null_local(), 1);
 
 // Anyref param and result in wasm functions.
 
 exports = wasmEvalText(`(module
     (func (export "is_null") (result i32) (param $ref anyref)
-        get_local $ref
+        local.get $ref
         ref.is_null
     )
 
     (func (export "ref_or_null") (result anyref) (param $ref anyref) (param $selector i32)
-        get_local $ref
+        local.get $ref
         ref.null
-        get_local $selector
+        local.get $selector
         select
     )
 
     (func $recursive (export "nested") (result anyref) (param $ref anyref) (param $i i32)
         ;; i == 10 => ret $ref
-        get_local $i
+        local.get $i
         i32.const 10
         i32.eq
         if
-            get_local $ref
+            local.get $ref
             return
         end
 
-        get_local $ref
+        local.get $ref
 
-        get_local $i
+        local.get $i
         i32.const 1
         i32.add
 
         call $recursive
     )
 )`).exports;
 
 assertEq(exports.is_null(undefined), 0);
@@ -168,79 +168,79 @@ function assertJoin(body) {
     assertEq(wasmEvalText(`(module
         (func (export "test") (param $ref anyref) (param $i i32) (result anyref)
             ${body}
         )
     )`).exports.test(val), val);
     assertEq(val.i, -1);
 }
 
-assertJoin("(block anyref get_local $ref)");
-assertJoin("(block $out anyref get_local $ref br $out)");
-assertJoin("(loop anyref get_local $ref)");
+assertJoin("(block anyref local.get $ref)");
+assertJoin("(block $out anyref local.get $ref br $out)");
+assertJoin("(loop anyref local.get $ref)");
 
 assertJoin(`(block $out anyref (loop $top anyref
-    get_local $i
+    local.get $i
     i32.const 1
     i32.add
     tee_local $i
     i32.const 10
     i32.eq
     if
-        get_local $ref
+        local.get $ref
         return
     end
     br $top))
 `);
 
 assertJoin(`(block $out (loop $top
-    get_local $i
+    local.get $i
     i32.const 1
     i32.add
     tee_local $i
     i32.const 10
     i32.le_s
     if
         br $top
     else
-        get_local $ref
+        local.get $ref
         return
     end
     )) unreachable
 `);
 
 assertJoin(`(block $out anyref (loop $top
-    get_local $ref
-    get_local $i
+    local.get $ref
+    local.get $i
     i32.const 1
     i32.add
     tee_local $i
     i32.const 10
     i32.eq
     br_if $out
     br $top
     ) unreachable)
 `);
 
 assertJoin(`(block $out anyref (block $unreachable anyref (loop $top
-    get_local $ref
-    get_local $i
+    local.get $ref
+    local.get $i
     i32.const 1
     i32.add
     tee_local $i
     br_table $unreachable $out
     ) unreachable))
 `);
 
 let x = { i: 42 }, y = { f: 53 };
 exports = wasmEvalText(`(module
     (func (export "test") (param $lhs anyref) (param $rhs anyref) (param $i i32) (result anyref)
-        get_local $lhs
-        get_local $rhs
-        get_local $i
+        local.get $lhs
+        local.get $rhs
+        local.get $i
         select
     )
 )`).exports;
 
 let result = exports.test(x, y, 0);
 assertEq(result, y);
 assertEq(result.i, undefined);
 assertEq(result.f, 53);
@@ -285,18 +285,18 @@ let imports = {
     }
 };
 
 exports = wasmEvalText(`(module
     (import $ret "funcs" "ret" (result anyref))
     (import $param "funcs" "param" (param anyref))
 
     (func (export "param") (param $x anyref) (param $y anyref)
-        get_local $y
-        get_local $x
+        local.get $y
+        local.get $x
         call $param
         call $param
     )
 
     (func (export "ret") (result anyref)
         call $ret
     )
 )`, imports).exports;
@@ -317,46 +317,46 @@ exports = wasmEvalText(`(module
     (import $mirror "funcs" "mirror" (param anyref) (result anyref))
     (import $augment "funcs" "augment" (param anyref) (result anyref))
 
     (global $count_f (mut i32) (i32.const 0))
     (global $count_g (mut i32) (i32.const 0))
 
     (func $f (param $param anyref) (result anyref)
         i32.const 1
-        get_global $count_f
+        global.get $count_f
         i32.add
-        set_global $count_f
+        global.set $count_f
 
-        get_local $param
+        local.get $param
         call $augment
     )
 
     (func $g (param $param anyref) (result anyref)
         i32.const 1
-        get_global $count_g
+        global.get $count_g
         i32.add
-        set_global $count_g
+        global.set $count_g
 
-        get_local $param
+        local.get $param
         call $mirror
     )
 
     (table (export "table") 10 funcref)
     (elem (i32.const 0) $f $g $mirror $augment)
     (type $table_type (func (param anyref) (result anyref)))
 
     (func (export "call_indirect") (param $i i32) (param $ref anyref) (result anyref)
-        get_local $ref
-        get_local $i
+        local.get $ref
+        local.get $i
         call_indirect $table_type
     )
 
-    (func (export "count_f") (result i32) get_global $count_f)
-    (func (export "count_g") (result i32) get_global $count_g)
+    (func (export "count_f") (result i32) global.get $count_f)
+    (func (export "count_g") (result i32) global.get $count_g)
 )`, {
     funcs: {
         mirror(x) {
             return x;
         },
         augment(x) {
             x.i++;
             x.newProp = "hello";
@@ -417,32 +417,32 @@ imports = {
 exports = wasmEvalText(`(module
     (global $g_imp_imm_null  (import "constants" "imm_null") anyref)
     (global $g_imp_imm_bread (import "constants" "imm_bread") anyref)
 
     (global $g_imp_mut_null   (import "constants" "mut_null") (mut anyref))
     (global $g_imp_mut_bread  (import "constants" "mut_bread") (mut anyref))
 
     (global $g_imm_null     anyref (ref.null))
-    (global $g_imm_getglob  anyref (get_global $g_imp_imm_bread))
+    (global $g_imm_getglob  anyref (global.get $g_imp_imm_bread))
     (global $g_mut         (mut anyref) (ref.null))
 
-    (func (export "imm_null")      (result anyref) get_global $g_imm_null)
-    (func (export "imm_getglob")   (result anyref) get_global $g_imm_getglob)
+    (func (export "imm_null")      (result anyref) global.get $g_imm_null)
+    (func (export "imm_getglob")   (result anyref) global.get $g_imm_getglob)
 
-    (func (export "imp_imm_null")  (result anyref) get_global $g_imp_imm_null)
-    (func (export "imp_imm_bread") (result anyref) get_global $g_imp_imm_bread)
-    (func (export "imp_mut_null")  (result anyref) get_global $g_imp_mut_null)
-    (func (export "imp_mut_bread") (result anyref) get_global $g_imp_mut_bread)
+    (func (export "imp_imm_null")  (result anyref) global.get $g_imp_imm_null)
+    (func (export "imp_imm_bread") (result anyref) global.get $g_imp_imm_bread)
+    (func (export "imp_mut_null")  (result anyref) global.get $g_imp_mut_null)
+    (func (export "imp_mut_bread") (result anyref) global.get $g_imp_mut_bread)
 
-    (func (export "set_imp_null")  (param anyref) get_local 0 set_global $g_imp_mut_null)
-    (func (export "set_imp_bread") (param anyref) get_local 0 set_global $g_imp_mut_bread)
+    (func (export "set_imp_null")  (param anyref) local.get 0 global.set $g_imp_mut_null)
+    (func (export "set_imp_bread") (param anyref) local.get 0 global.set $g_imp_mut_bread)
 
-    (func (export "set_mut") (param anyref) get_local 0 set_global $g_mut)
-    (func (export "get_mut") (result anyref) get_global $g_mut)
+    (func (export "set_mut") (param anyref) local.get 0 global.set $g_mut)
+    (func (export "get_mut") (result anyref) global.get $g_mut)
 )`, imports).exports;
 
 assertEq(exports.imp_imm_null(), imports.constants.imm_null);
 assertEq(exports.imp_imm_bread(), imports.constants.imm_bread);
 
 assertEq(exports.imm_null(), null);
 assertEq(exports.imm_getglob(), imports.constants.imm_bread);
 
--- a/js/src/jit-test/tests/wasm/gc/debugger.js
+++ b/js/src/jit-test/tests/wasm/gc/debugger.js
@@ -1,24 +1,24 @@
 // |jit-test| skip-if: !wasmReftypesEnabled() || !wasmDebuggingIsSupported()
 
 (function() {
     let g = newGlobal({newCompartment: true});
     let dbg = new Debugger(g);
-    g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (result anyref) (param anyref) get_local 0) (export "" 0))')));`);
+    g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (result anyref) (param anyref) local.get 0) (export "" 0))')));`);
 })();
 
 (function() {
     var g = newGlobal({newCompartment: true});
     g.parent = this;
 
     let src = `
       (module
         (func (export "func") (result anyref) (param $ref anyref)
-            get_local $ref
+            local.get $ref
         )
       )
     `;
 
     g.eval(`
         var obj = { somekey: 'somevalue' };
         Debugger(parent).onEnterFrame = function(frame) {
             let v = frame.environment.getVariable('var0');
--- a/js/src/jit-test/tests/wasm/gc/disabled.js
+++ b/js/src/jit-test/tests/wasm/gc/disabled.js
@@ -5,17 +5,17 @@ const { CompileError, validate } = WebAs
 const UNRECOGNIZED_OPCODE_OR_BAD_TYPE = /unrecognized opcode|(Structure|reference) types not enabled|invalid inline block type|bad type/;
 
 let simpleTests = [
     "(module (func (drop (ref.null))))",
     "(module (func $test (local anyref)))",
     "(module (func $test (param anyref)))",
     "(module (func $test (result anyref) (ref.null)))",
     "(module (func $test (block anyref (unreachable)) unreachable))",
-    "(module (func $test (local anyref) (result i32) (ref.is_null (get_local 0))))",
+    "(module (func $test (local anyref) (result i32) (ref.is_null (local.get 0))))",
     `(module (import "a" "b" (param anyref)))`,
     `(module (import "a" "b" (result anyref)))`,
     `(module (type $s (struct)))`,
 ];
 
 // Two distinct failure modes:
 //
 // - if we have no compiled-in support for wasm-gc we'll get a syntax error when
--- a/js/src/jit-test/tests/wasm/gc/ref-global.js
+++ b/js/src/jit-test/tests/wasm/gc/ref-global.js
@@ -15,24 +15,24 @@
           (global $g1 (mut (ref $point)) (ref.null))
           (global $g2 (mut (ref $point)) (ref.null))
           (global $g3 (ref $point) (ref.null))
 
           ;; Restriction: cannot expose Refs outside the module, not even
           ;; as a return value.  See ref-restrict.js.
 
           (func (export "get") (result anyref)
-           (get_global $g1))
+           (global.get $g1))
 
           (func (export "copy")
-           (set_global $g2 (get_global $g1)))
+           (global.set $g2 (global.get $g1)))
 
           (func (export "clear")
-           (set_global $g1 (get_global $g3))
-           (set_global $g2 (ref.null))))`);
+           (global.set $g1 (global.get $g3))
+           (global.set $g2 (ref.null))))`);
 
     let mod = new WebAssembly.Module(bin);
     let ins = new WebAssembly.Instance(mod).exports;
 
     assertEq(ins.get(), null);
     ins.copy();                 // Should not crash
     ins.clear();                // Should not crash
 }
@@ -46,29 +46,29 @@
 
           (type $point (struct
                         (field $x f64)
                         (field $y f64)))
 
           (global $glob (mut (ref $point)) (ref.null))
 
           (func (export "init")
-           (set_global $glob (struct.new $point (f64.const 0.5) (f64.const 2.75))))
+           (global.set $glob (struct.new $point (f64.const 0.5) (f64.const 2.75))))
 
           (func (export "change")
-           (set_global $glob (struct.new $point (f64.const 3.5) (f64.const 37.25))))
+           (global.set $glob (struct.new $point (f64.const 3.5) (f64.const 37.25))))
 
           (func (export "clear")
-           (set_global $glob (ref.null)))
+           (global.set $glob (ref.null)))
 
           (func (export "x") (result f64)
-           (struct.get $point 0 (get_global $glob)))
+           (struct.get $point 0 (global.get $glob)))
 
           (func (export "y") (result f64)
-           (struct.get $point 1 (get_global $glob))))`);
+           (struct.get $point 1 (global.get $glob))))`);
 
     let mod = new WebAssembly.Module(bin);
     let ins = new WebAssembly.Instance(mod).exports;
 
     assertErrorMessage(() => ins.x(), WebAssembly.RuntimeError, /dereferencing null pointer/);
 
     ins.init();
     assertEq(ins.x(), 0.5);
@@ -84,19 +84,19 @@
 
 // Global value of type anyref for initializer from a WebAssembly.Global,
 // just check that it works.
 {
     let bin = wasmTextToBinary(
         `(module
           (gc_feature_opt_in 3)
           (import $g "" "g" (global anyref))
-          (global $glob anyref (get_global $g))
+          (global $glob anyref (global.get $g))
           (func (export "get") (result anyref)
-           (get_global $glob)))`);
+           (global.get $glob)))`);
 
     let mod = new WebAssembly.Module(bin);
     let obj = {zappa:37};
     let g = new WebAssembly.Global({value: "anyref"}, obj);
     let ins = new WebAssembly.Instance(mod, {"":{g}}).exports;
     assertEq(ins.get(), obj);
 }
 
--- a/js/src/jit-test/tests/wasm/gc/ref-restrict.js
+++ b/js/src/jit-test/tests/wasm/gc/ref-restrict.js
@@ -239,95 +239,95 @@ assertEq(typeof wasmCompile(
 
 assertErrorMessage(() => wasmCompile(
     `(module
       (gc_feature_opt_in 3)
       (type $box (struct (field $val i32)))
       (type $fn (func (param (ref $box))))
       (table (export "tbl") 1 funcref)
       (func (param i32)
-       (call_indirect $fn (ref.null) (get_local 0))))`),
+       (call_indirect $fn (ref.null) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /cannot expose reference type/);
 
 assertErrorMessage(() => wasmCompile(
     `(module
       (gc_feature_opt_in 3)
       (type $box (struct (field $val i32)))
       (type $fn (func (result (ref $box))))
       (table (export "tbl") 1 funcref)
       (func (param i32) (result (ref $box))
-       (call_indirect $fn (get_local 0))))`),
+       (call_indirect $fn (local.get 0))))`),
                    WebAssembly.CompileError,
                    /cannot expose reference type/);
 
 assertEq(typeof wasmCompile(
     `(module
       (type $fn (func (param anyref)))
       (table (export "tbl") 1 funcref)
       (func (param i32)
-       (call_indirect $fn (ref.null) (get_local 0))))`),
+       (call_indirect $fn (ref.null) (local.get 0))))`),
          "object");
 
 assertEq(typeof wasmCompile(
     `(module
       (type $fn (func (result anyref)))
       (table (export "tbl") 1 funcref)
       (func (param i32) (result anyref)
-       (call_indirect $fn (get_local 0))))`),
+       (call_indirect $fn (local.get 0))))`),
          "object");
 
 // Can't call via imported table with type that is exposed for Ref, though anyref is OK.
 
 assertErrorMessage(() => wasmCompile(
     `(module
       (gc_feature_opt_in 3)
       (type $box (struct (field $val i32)))
       (type $fn (func (param (ref $box))))
       (import "m" "tbl" (table 1 funcref))
       (func (param i32)
-       (call_indirect $fn (ref.null) (get_local 0))))`),
+       (call_indirect $fn (ref.null) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /cannot expose reference type/);
 
 assertErrorMessage(() => wasmCompile(
     `(module
       (gc_feature_opt_in 3)
       (type $box (struct (field $val i32)))
       (type $fn (func (result (ref $box))))
       (import "m" "tbl" (table 1 funcref))
       (func (param i32) (result (ref $box))
-       (call_indirect $fn (get_local 0))))`),
+       (call_indirect $fn (local.get 0))))`),
                    WebAssembly.CompileError,
                    /cannot expose reference type/);
 
 assertEq(typeof wasmCompile(
     `(module
       (type $fn (func (param anyref)))
       (import "m" "tbl" (table 1 funcref))
       (func (param i32)
-       (call_indirect $fn (ref.null) (get_local 0))))`),
+       (call_indirect $fn (ref.null) (local.get 0))))`),
          "object");
 
 assertEq(typeof wasmCompile(
     `(module
       (type $fn (func (result anyref)))
       (import "m" "tbl" (table 1 funcref))
       (func (param i32) (result anyref)
-       (call_indirect $fn (get_local 0))))`),
+       (call_indirect $fn (local.get 0))))`),
          "object");
 
 // We can call via a private table with a type that is exposed for Ref.
 
 {
     let m = wasmCompile(
         `(module
           (gc_feature_opt_in 3)
           (type $box (struct (field $val i32)))
           (type $fn (func (param (ref $box)) (result i32)))
           (table 1 funcref)
           (elem (i32.const 0) $f1)
           (func $f1 (param (ref $box)) (result i32) (i32.const 37))
           (func (export "f") (param i32) (result i32)
-           (call_indirect $fn (ref.null) (get_local 0))))`);
+           (call_indirect $fn (ref.null) (local.get 0))))`);
     let i = new WebAssembly.Instance(m).exports;
     assertEq(i.f(0), 37);
 }
--- a/js/src/jit-test/tests/wasm/gc/ref-struct.js
+++ b/js/src/jit-test/tests/wasm/gc/ref-struct.js
@@ -33,64 +33,64 @@ function checkInvalid(body, errorMessage
                          (field $left (mut (ref $wabbit)))
                          (field $right (mut (ref $wabbit)))))
 
           (global $g (mut (ref $wabbit)) (ref.null))
 
           (global $k (mut i32) (i32.const 0))
 
           (func (export "init") (param $n i32)
-                (set_global $g (call $make (get_local $n))))
+                (global.set $g (call $make (local.get $n))))
 
           (func $make (param $n i32) (result (ref $wabbit))
                 (local $tmp i32)
-                (set_local $tmp (get_global $k))
-                (set_global $k (i32.add (get_local $tmp) (i32.const 1)))
-                (if (ref $wabbit) (i32.le_s (get_local $n) (i32.const 2))
-                    (struct.new $wabbit (get_local $tmp) (ref.null) (ref.null))
+                (local.set $tmp (global.get $k))
+                (global.set $k (i32.add (local.get $tmp) (i32.const 1)))
+                (if (ref $wabbit) (i32.le_s (local.get $n) (i32.const 2))
+                    (struct.new $wabbit (local.get $tmp) (ref.null) (ref.null))
                     (block (ref $wabbit)
                       (struct.new $wabbit
-                                  (get_local $tmp)
-                                  (call $make (i32.sub (get_local $n) (i32.const 1)))
-                                  (call $make (i32.sub (get_local $n) (i32.const 2)))))))
+                                  (local.get $tmp)
+                                  (call $make (i32.sub (local.get $n) (i32.const 1)))
+                                  (call $make (i32.sub (local.get $n) (i32.const 2)))))))
 
           (func (export "accumulate") (result i32)
-                (call $accum (get_global $g)))
+                (call $accum (global.get $g)))
 
           (func $accum (param $w (ref $wabbit)) (result i32)
-                (if i32 (ref.is_null (get_local $w))
+                (if i32 (ref.is_null (local.get $w))
                     (i32.const 0)
-                    (i32.add (struct.get $wabbit 0 (get_local $w))
-                             (i32.sub (call $accum (struct.get $wabbit 1 (get_local $w)))
-                                      (call $accum (struct.get $wabbit 2 (get_local $w)))))))
+                    (i32.add (struct.get $wabbit 0 (local.get $w))
+                             (i32.sub (call $accum (struct.get $wabbit 1 (local.get $w)))
+                                      (call $accum (struct.get $wabbit 2 (local.get $w)))))))
 
           (func (export "reverse")
-                (call $reverse (get_global $g)))
+                (call $reverse (global.get $g)))
 
           (func $reverse (param $w (ref $wabbit))
                 (local $tmp (ref $wabbit))
-                (if (i32.eqz (ref.is_null (get_local $w)))
+                (if (i32.eqz (ref.is_null (local.get $w)))
                     (block
-                     (struct.set $wabbit 0 (get_local $w) (i32.mul (i32.const 2) (struct.get $wabbit 0 (get_local $w))))
-                     (set_local $tmp (struct.get $wabbit 1 (get_local $w)))
-                     (struct.set $wabbit 1 (get_local $w) (struct.get $wabbit 2 (get_local $w)))
-                     (struct.set $wabbit 2 (get_local $w) (get_local $tmp))
-                     (call $reverse (struct.get $wabbit 1 (get_local $w)))
-                     (call $reverse (struct.get $wabbit 2 (get_local $w))))))
+                     (struct.set $wabbit 0 (local.get $w) (i32.mul (i32.const 2) (struct.get $wabbit 0 (local.get $w))))
+                     (local.set $tmp (struct.get $wabbit 1 (local.get $w)))
+                     (struct.set $wabbit 1 (local.get $w) (struct.get $wabbit 2 (local.get $w)))
+                     (struct.set $wabbit 2 (local.get $w) (local.get $tmp))
+                     (call $reverse (struct.get $wabbit 1 (local.get $w)))
+                     (call $reverse (struct.get $wabbit 2 (local.get $w))))))
 
           (func (export "print")
-                (call $pr (get_global $g)))
+                (call $pr (global.get $g)))
 
           (func $pr (param $w (ref $wabbit))
-                (if (i32.eqz (ref.is_null (get_local $w)))
+                (if (i32.eqz (ref.is_null (local.get $w)))
                     (block
                      (call $print_lp)
-                     (call $print_int (struct.get $wabbit 0 (get_local $w)))
-                     (call $pr (struct.get $wabbit 1 (get_local $w)))
-                     (call $pr (struct.get $wabbit 2 (get_local $w)))
+                     (call $print_int (struct.get $wabbit 0 (local.get $w)))
+                     (call $pr (struct.get $wabbit 1 (local.get $w)))
+                     (call $pr (struct.get $wabbit 2 (local.get $w)))
                      (call $print_rp))))
          )`);
 
     let s = "";
     function pr_int(k) { s += k + " "; }
     function pr_lp() { s += "(" };
     function pr_rp() { s += ")" }
 
@@ -118,59 +118,59 @@ function checkInvalid(body, errorMessage
 // to test.
 
 wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field (mut (ref $node)))))
       (type $nix (struct (field (mut (ref $node))) (field i32)))
       (func $f (param $p (ref $node)) (param $q (ref $nix))
-       (struct.set $node 0 (get_local $p) (get_local $q))))`);
+       (struct.set $node 0 (local.get $p) (local.get $q))))`);
 
 // struct.narrow: if the pointer's null we get null
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field i32) (field f32)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2) (local.get $p)))
       (func (export "test") (result anyref)
        (call $f (ref.null))))`).exports.test(),
          null);
 
 // struct.narrow: if the downcast succeeds we get the original pointer
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field i32) (field f32)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2) (local.get $p)))
       (func (export "test") (result i32)
        (local $n (ref $node))
-       (set_local $n (struct.new $node2 (i32.const 0) (f32.const 12)))
-       (ref.eq (call $f (get_local $n)) (get_local $n))))`).exports.test(),
+       (local.set $n (struct.new $node2 (i32.const 0) (f32.const 12)))
+       (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(),
          1);
 
 // And once more with mutable fields
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field (mut i32))))
       (type $node2 (struct (field (mut i32)) (field f32)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2) (local.get $p)))
       (func (export "test") (result i32)
        (local $n (ref $node))
-       (set_local $n (struct.new $node2 (i32.const 0) (f32.const 12)))
-       (ref.eq (call $f (get_local $n)) (get_local $n))))`).exports.test(),
+       (local.set $n (struct.new $node2 (i32.const 0) (f32.const 12)))
+       (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(),
          1);
 
 // A more subtle case: the downcast is to a struct that looks like the original
 // struct should succeed because struct.narrow is a structural cast with nominal
 // per-field type equality.
 //
 // We use ref-typed fields here because they have the trickiest equality rules,
 // and we have two cases: one where the ref types are the same, and one where
@@ -181,109 +181,109 @@ assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
 
       (type $node (struct (field i32)))
       (type $node2a (struct (field i32) (field (ref $node))))
       (type $node2b (struct (field i32) (field (ref $node))))
 
       (func $f (param $p (ref $node)) (result (ref $node2b))
-       (struct.narrow (ref $node) (ref $node2b) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2b) (local.get $p)))
 
       (func (export "test") (result i32)
        (local $n (ref $node))
-       (set_local $n (struct.new $node2a (i32.const 0) (ref.null)))
-       (ref.eq (call $f (get_local $n)) (get_local $n))))`).exports.test(),
+       (local.set $n (struct.new $node2a (i32.const 0) (ref.null)))
+       (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(),
          1);
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
 
       (type $node (struct (field i32)))
       (type $nodeCopy (struct (field i32)))
       (type $node2a (struct (field i32) (field (ref $node))))
       (type $node2b (struct (field i32) (field (ref $nodeCopy))))
 
       (func $f (param $p (ref $node)) (result (ref $node2b))
-       (struct.narrow (ref $node) (ref $node2b) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2b) (local.get $p)))
 
       (func (export "test") (result i32)
        (local $n (ref $node))
-       (set_local $n (struct.new $node2a (i32.const 0) (ref.null)))
-       (ref.eq (call $f (get_local $n)) (get_local $n))))`).exports.test(),
+       (local.set $n (struct.new $node2a (i32.const 0) (ref.null)))
+       (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(),
          0);
 
 // Another subtle case: struct.narrow can target a type that is not the concrete
 // type of the object, but a prefix of that concrete type.
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field i32) (field f32)))
       (type $node3 (struct (field i32) (field f32) (field f64)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2) (local.get $p)))
       (func (export "test") (result i32)
        (local $n (ref $node))
-       (set_local $n (struct.new $node3 (i32.const 0) (f32.const 12) (f64.const 17)))
-       (ref.eq (call $f (get_local $n)) (get_local $n))))`).exports.test(),
+       (local.set $n (struct.new $node3 (i32.const 0) (f32.const 12) (f64.const 17)))
+       (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(),
          1);
 
 // struct.narrow: if the downcast fails we get null
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field i32) (field f32)))
       (type $snort (struct (field i32) (field f64)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local $p)))
+       (struct.narrow (ref $node) (ref $node2) (local.get $p)))
       (func (export "test") (result anyref)
        (call $f (struct.new $snort (i32.const 0) (f64.const 12)))))`).exports.test(),
          null);
 
 // struct.narrow: anyref -> struct when the anyref is the right struct;
 // special case since anyref requires unboxing
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func $f (param $p anyref) (result (ref $node))
-       (struct.narrow anyref (ref $node) (get_local $p)))
+       (struct.narrow anyref (ref $node) (local.get $p)))
       (func (export "test") (result i32)
        (local $n (ref $node))
-       (set_local $n (struct.new $node (i32.const 0)))
-       (ref.eq (call $f (get_local $n)) (get_local $n))))`).exports.test(),
+       (local.set $n (struct.new $node (i32.const 0)))
+       (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(),
          1);
 
 // struct.narrow: anyref -> struct when the anyref is some random gunk.
 
 assertEq(wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func (export "test") (param $p anyref) (result anyref)
-       (struct.narrow anyref (ref $node) (get_local $p))))`).exports.test({hi:37}),
+       (struct.narrow anyref (ref $node) (local.get $p))))`).exports.test({hi:37}),
          null);
 
 // Types are private to an instance and struct.narrow can't break this
 
 {
     let txt =
         `(module
           (gc_feature_opt_in 3)
           (type $node (struct (field i32)))
           (func (export "make") (param $n i32) (result anyref)
-           (struct.new $node (get_local $n)))
+           (struct.new $node (local.get $n)))
           (func (export "coerce") (param $p anyref) (result i32)
-           (ref.is_null (struct.narrow anyref (ref $node) (get_local $p)))))`;
+           (ref.is_null (struct.narrow anyref (ref $node) (local.get $p)))))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(txt));
     let ins1 = new WebAssembly.Instance(mod).exports;
     let ins2 = new WebAssembly.Instance(mod).exports;
     let obj = ins1.make(37);
     assertEq(obj._0, 37);
     assertEq(ins2.coerce(obj), 1);
 }
 
@@ -291,129 +291,129 @@ assertEq(wasmEvalText(
 
 // Attempting to mutate immutable field with struct.set
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func $f (param $p (ref $node))
-       (struct.set $node 0 (get_local $p) (i32.const 37))))`),
+       (struct.set $node 0 (local.get $p) (i32.const 37))))`),
                    WebAssembly.CompileError,
                    /field is not mutable/);
 
 // Attempting to store incompatible value in mutable field with struct.set
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field (mut i32))))
       (func $f (param $p (ref $node))
-       (struct.set $node 0 (get_local $p) (f32.const 37))))`),
+       (struct.set $node 0 (local.get $p) (f32.const 37))))`),
                    WebAssembly.CompileError,
                    /expression has type f32 but expected i32/);
 
 // Out-of-bounds reference for struct.get
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func $f (param $p (ref $node)) (result i32)
-       (struct.get $node 1 (get_local $p))))`),
+       (struct.get $node 1 (local.get $p))))`),
                    WebAssembly.CompileError,
                    /field index out of range/);
 
 // Out-of-bounds reference for struct.set
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field (mut i32))))
       (func $f (param $p (ref $node))
-       (struct.set $node 1 (get_local $p) (i32.const 37))))`),
+       (struct.set $node 1 (local.get $p) (i32.const 37))))`),
                    WebAssembly.CompileError,
                    /field index out of range/);
 
 // Base pointer is of unrelated type to stated type in struct.get
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $snort (struct (field f64)))
       (func $f (param $p (ref $snort)) (result i32)
-       (struct.get $node 0 (get_local $p))))`),
+       (struct.get $node 0 (local.get $p))))`),
                    WebAssembly.CompileError,
                    /expression has type.*but expected.*/);
 
 // Base pointer is of unrelated type to stated type in struct.set
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field (mut i32))))
       (type $snort (struct (field f64)))
       (func $f (param $p (ref $snort)) (result i32)
-       (struct.set $node 0 (get_local $p) (i32.const 0))))`),
+       (struct.set $node 0 (local.get $p) (i32.const 0))))`),
                    WebAssembly.CompileError,
                    /expression has type.*but expected.*/);
 
 // Base pointer is of unrelated type to stated type in struct.narrow
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field i32) (field f32)))
       (type $snort (struct (field f64)))
       (func $f (param $p (ref $snort)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local 0))))`),
+       (struct.narrow (ref $node) (ref $node2) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /expression has type.*but expected.*/);
 
 // source and target types are compatible except for mutability
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field (mut i32)) (field f32)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local 0))))`),
+       (struct.narrow (ref $node) (ref $node2) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /invalid narrowing operation/);
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field (mut i32))))
       (type $node2 (struct (field i32) (field f32)))
       (func $f (param $p (ref $node)) (result (ref $node2))
-       (struct.narrow (ref $node) (ref $node2) (get_local 0))))`),
+       (struct.narrow (ref $node) (ref $node2) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /invalid narrowing operation/);
 
 // source and target types must be ref types: source syntax
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func $f (param $p (ref $node)) (result anyref)
-       (struct.narrow i32 anyref (get_local 0))))`),
+       (struct.narrow i32 anyref (local.get 0))))`),
                    SyntaxError,
                    /struct.narrow requires ref type/);
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func $f (param $p (ref $node)) (result anyref)
-       (struct.narrow anyref i32 (get_local 0))))`),
+       (struct.narrow anyref i32 (local.get 0))))`),
                    SyntaxError,
                    /struct.narrow requires ref type/);
 
 // source and target types must be ref types: binary format
 
 checkInvalid(funcBody({locals:[],
                        body:[
                            RefNullCode,
@@ -432,55 +432,55 @@ checkInvalid(funcBody({locals:[],
 
 // target type is anyref so source type must be anyref as well (no upcasts)
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (func $f (param $p (ref $node)) (result anyref)
-       (struct.narrow (ref $node) anyref (get_local 0))))`),
+       (struct.narrow (ref $node) anyref (local.get 0))))`),
                    WebAssembly.CompileError,
                    /invalid type combination in struct.narrow/);
 
 // target type must be subtype of source type (no upcasts)
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32)))
       (type $node2 (struct (field i32) (field f32)))
       (func $f (param $p (ref $node2)) (result anyref)
-       (struct.narrow (ref $node2) (ref $node) (get_local 0))))`),
+       (struct.narrow (ref $node2) (ref $node) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /invalid narrowing operation/);
 
 // Null pointer dereference in struct.get
 
 assertErrorMessage(function() {
     let ins = wasmEvalText(
         `(module
           (gc_feature_opt_in 3)
           (type $node (struct (field i32)))
           (func (export "test")
            (drop (call $f (ref.null))))
           (func $f (param $p (ref $node)) (result i32)
-           (struct.get $node 0 (get_local $p))))`);
+           (struct.get $node 0 (local.get $p))))`);
     ins.exports.test();
 },
                    WebAssembly.RuntimeError,
                    /dereferencing null pointer/);
 
 // Null pointer dereference in struct.set
 
 assertErrorMessage(function() {
     let ins = wasmEvalText(
         `(module
           (gc_feature_opt_in 3)
           (type $node (struct (field (mut i32))))
           (func (export "test")
            (call $f (ref.null)))
           (func $f (param $p (ref $node))
-           (struct.set $node 0 (get_local $p) (i32.const 0))))`);
+           (struct.set $node 0 (local.get $p) (i32.const 0))))`);
     ins.exports.test();
 },
                    WebAssembly.RuntimeError,
                    /dereferencing null pointer/);
--- a/js/src/jit-test/tests/wasm/gc/ref.js
+++ b/js/src/jit-test/tests/wasm/gc/ref.js
@@ -25,68 +25,68 @@ var bin = wasmTextToBinary(
       ;; Note none of these functions are exported, as they use Ref types in their signatures.
 
       (func (param (ref $cons)) (result i32)
        (i32.const 0))
 
       (func $cdr (param $p (ref $cons)) (result (ref $cons))
        (local $l (ref $cons))
        ;; store null value of correct type
-       (set_local $l (ref.null))
+       (local.set $l (ref.null))
        ;; store local of correct type
-       (set_local $l (get_local $p))
+       (local.set $l (local.get $p))
        ;; store call result of correct type
-       (set_local $l (call $cdr (get_local $p)))
-       ;; TODO: eventually also a test with get_global
+       (local.set $l (call $cdr (local.get $p)))
+       ;; TODO: eventually also a test with global.get
        ;; blocks and if with result type
        (block (ref $cons)
         (if (ref $cons) (i32.eqz (i32.const 0))
             (unreachable)
             (ref.null))))
 
       (func (param (ref $even)) (result (ref $odd))
        (ref.null))
 
       (func (param (ref $odd)) (result (ref $even))
        (ref.null))
 
       (func (param (ref $cons))
-       (call $cdr (get_local 0))
+       (call $cdr (local.get 0))
        drop
-       (call $imp (get_local 0))
+       (call $imp (local.get 0))
        drop)
 
       (func (param (ref $cons))
-       (drop (ref.eq (get_local 0) (ref.null)))
-       (drop (ref.eq (ref.null) (get_local 0)))
-       (drop (ref.eq (get_local 0) (ref.null)))
-       (drop (ref.eq (ref.null) (get_local 0))))
+       (drop (ref.eq (local.get 0) (ref.null)))
+       (drop (ref.eq (ref.null) (local.get 0)))
+       (drop (ref.eq (local.get 0) (ref.null)))
+       (drop (ref.eq (ref.null) (local.get 0))))
      )`);
 
 // Validation
 
 assertEq(WebAssembly.validate(bin), true);
 
 // ref.is_null should work on any reference type
 
 new WebAssembly.Module(wasmTextToBinary(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct))
  (func $null (param (ref $s)) (result i32)
-   (ref.is_null (get_local 0))))
+   (ref.is_null (local.get 0))))
 `))
 
 // Automatic upcast to anyref
 
 new WebAssembly.Module(wasmTextToBinary(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
- (func $f (param (ref $s)) (call $g (get_local 0)))
+ (func $f (param (ref $s)) (call $g (local.get 0)))
  (func $g (param anyref) (unreachable)))
 `));
 
 // Misc failure modes
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
@@ -98,95 +98,95 @@ SyntaxError, /Type label.*not found/);
 // but not if the structs are incompatible.
 
 wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field i32)))
  (func $f (param (ref $s)) (unreachable))
- (func $g (param (ref $t)) (call $f (get_local 0)))
+ (func $g (param (ref $t)) (call $f (local.get 0)))
 )`);
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field f32))) ;; Incompatible type
  (func $f (param (ref $s)) (unreachable))
- (func $g (param (ref $t)) (call $f (get_local 0)))
+ (func $g (param (ref $t)) (call $f (local.get 0)))
 )`),
 WebAssembly.CompileError, /expression has type ref.*but expected ref/);
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field (mut i32)))) ;; Incompatible mutability
  (func $f (param (ref $s)) (unreachable))
- (func $g (param (ref $t)) (call $f (get_local 0)))
+ (func $g (param (ref $t)) (call $f (local.get 0)))
 )`),
 WebAssembly.CompileError, /expression has type ref.*but expected ref/);
 
 // Ref type mismatch in assignment to local but the prefix rule allows
 // the assignment to succeed if the structs are the same.
 
 wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field i32)))
- (func $f (param (ref $s)) (local (ref $t)) (set_local 1 (get_local 0))))
+ (func $f (param (ref $s)) (local (ref $t)) (local.set 1 (local.get 0))))
 `)
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field f32)))
- (func $f (param (ref $s)) (local (ref $t)) (set_local 1 (get_local 0))))
+ (func $f (param (ref $s)) (local (ref $t)) (local.set 1 (local.get 0))))
 `),
 WebAssembly.CompileError, /expression has type ref.*but expected ref/);
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field (mut i32))))
  (func $f (param (ref $s)) (unreachable))
- (func $g (param (ref $t)) (call $f (get_local 0)))
+ (func $g (param (ref $t)) (call $f (local.get 0)))
 )`),
 WebAssembly.CompileError, /expression has type ref.*but expected ref/);
 
 // Ref type mismatch in return but the prefix rule allows the return
 // to succeed if the structs are the same.
 
 wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field i32)))
- (func $f (param (ref $s)) (result (ref $t)) (get_local 0)))
+ (func $f (param (ref $s)) (result (ref $t)) (local.get 0)))
 `);
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field f32)))
- (func $f (param (ref $s)) (result (ref $t)) (get_local 0)))
+ (func $f (param (ref $s)) (result (ref $t)) (local.get 0)))
 `),
 WebAssembly.CompileError, /expression has type ref.*but expected ref/);
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
  (type $t (struct (field (mut i32))))
- (func $f (param (ref $s)) (result (ref $t)) (get_local 0)))
+ (func $f (param (ref $s)) (result (ref $t)) (local.get 0)))
 `),
 WebAssembly.CompileError, /expression has type ref.*but expected ref/);
 
 // Ref type can't reference a function type
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
@@ -204,12 +204,12 @@ assertErrorMessage(() => wasmEvalText(`
 WebAssembly.CompileError, /does not reference a struct type/);
 
 // No automatic downcast from anyref
 
 assertErrorMessage(() => wasmEvalText(`
 (module
  (gc_feature_opt_in 3)
  (type $s (struct (field i32)))
- (func $f (param anyref) (call $g (get_local 0)))
+ (func $f (param anyref) (call $g (local.get 0)))
  (func $g (param (ref $s)) (unreachable)))
 `),
 WebAssembly.CompileError, /expression has type anyref but expected ref/);
--- a/js/src/jit-test/tests/wasm/gc/stackmaps1.js
+++ b/js/src/jit-test/tests/wasm/gc/stackmaps1.js
@@ -27,49 +27,49 @@ let t =
      (import $alloc "" "alloc" (func (result anyref)))
 
      ;; -- fn 0
      (func $fn0 (export "fn0")
                 (result i32) (param $arg1 i32) (param $arg2 anyref) (param $arg3 i32)
                              (param $arg4 anyref) (param $arg5 anyref) (param $arg6 i32)
        (call $alloc)
        drop
-       (i32.add (i32.add (get_local $arg1) (get_local $arg3)) (get_local $arg6))
+       (i32.add (i32.add (local.get $arg1) (local.get $arg3)) (local.get $arg6))
 
        ;; Poke the ref-typed arguments, to be sure that they got kept alive
        ;; properly across any GC that the |alloc| call might have done.
-       (call $check3 (get_local $arg2) (get_local $arg4) (get_local $arg5))
+       (call $check3 (local.get $arg2) (local.get $arg4) (local.get $arg5))
      )
 
      ;; -- fn 1
      (func $fn1 (export "fn1") (param $arg1 anyref) (result i32)
        (local $i i32)
 
        (loop i32
          ;; call direct 0
-         (call $fn0 (i32.const 10) (get_local $arg1) (i32.const 12)
-                    (get_local $arg1) (get_local $arg1) (i32.const 15))
+         (call $fn0 (i32.const 10) (local.get $arg1) (i32.const 12)
+                    (local.get $arg1) (local.get $arg1) (i32.const 15))
 
          ;; call indirect 0
          (call_indirect $typeOfFn0
-                    (i32.const 10) (get_local $arg1) (i32.const 12)
-                    (get_local $arg1) (get_local $arg1) (i32.const 15)
+                    (i32.const 10) (local.get $arg1) (i32.const 12)
+                    (local.get $arg1) (local.get $arg1) (i32.const 15)
                     (i32.const 0)) ;; table index
 
          i32.add
 
          ;; Do 60k iterations of this loop, to get a good amount of allocation
-         (set_local $i (i32.add (get_local $i) (i32.const 1)))
-         (br_if 0 (i32.lt_s (get_local $i) (i32.const 60000)))
+         (local.set $i (i32.add (local.get $i) (i32.const 1)))
+         (br_if 0 (i32.lt_s (local.get $i) (i32.const 60000)))
        )
      )
 
      ;; -- fn 2
      (func $fn2 (export "fn2") (param $arg1 anyref) (result i32)
-       (call $fn1 (get_local $arg1))
+       (call $fn1 (local.get $arg1))
      )
    )`;
 
 function Croissant(chocolate, number) {
     this.chocolate = chocolate;
     this.number = number;
 }
 
--- a/js/src/jit-test/tests/wasm/gc/stackmaps2.js
+++ b/js/src/jit-test/tests/wasm/gc/stackmaps2.js
@@ -41,50 +41,50 @@ let t =
      ;; -- fn 0
      (func $fn0 (export "fn0")
                 (result i32) (param $arg1 i32) (param $arg2 anyref) (param $arg3 i32)
                              (param $arg4 anyref) (param $arg5 anyref) (param $arg6 i32)
        (local $i i32)
 
        ;; spinloop to waste time
        (loop
-         (set_local $i (i32.add (get_local $i) (i32.const 1)))
-         (br_if 0 (i32.lt_s (get_local $i) (i32.const 100)))
+         (local.set $i (i32.add (local.get $i) (i32.const 1)))
+         (br_if 0 (i32.lt_s (local.get $i) (i32.const 100)))
        )
 
-       (i32.add (i32.add (get_local $arg1) (get_local $arg3)) (get_local $arg6))
+       (i32.add (i32.add (local.get $arg1) (local.get $arg3)) (local.get $arg6))
 
        ;; Poke the ref-typed arguments, to be sure that they got kept alive
        ;; properly across any GC that might have happened.
-       (call $check3 (get_local $arg2) (get_local $arg4) (get_local $arg5))
+       (call $check3 (local.get $arg2) (local.get $arg4) (local.get $arg5))
      )
 
      ;; -- fn 1
      (func $fn1 (export "fn1") (param $arg1 anyref) (result i32)
        (loop i32
          ;; call direct to $fn0
-         (call $fn0 (i32.const 10) (get_local $arg1) (i32.const 12)
-                    (get_local $arg1) (get_local $arg1) (i32.const 15))
+         (call $fn0 (i32.const 10) (local.get $arg1) (i32.const 12)
+                    (local.get $arg1) (local.get $arg1) (i32.const 15))
 
          ;; call indirect to table index 0, which is $fn0
          (call_indirect $typeOfFn0
-                    (i32.const 10) (get_local $arg1) (i32.const 12)
-                    (get_local $arg1) (get_local $arg1) (i32.const 15)
+                    (i32.const 10) (local.get $arg1) (i32.const 12)
+                    (local.get $arg1) (local.get $arg1) (i32.const 15)
                     (i32.const 0)) ;; table index
 
          i32.add
 
          ;; Continue iterating until handler() has allocated enough
          (br_if 0 (i32.eq (call $quitp) (i32.const 0)))
        )
      )
 
      ;; -- fn 2
      (func $fn2 (export "fn2") (param $arg1 anyref) (result i32)
-       (call $fn1 (get_local $arg1))
+       (call $fn1 (local.get $arg1))
      )
    )`;
 
 function Croissant(chocolate, number) {
     this.chocolate = chocolate;
     this.number = number;
 }
 
--- a/js/src/jit-test/tests/wasm/gc/stackmaps3.js
+++ b/js/src/jit-test/tests/wasm/gc/stackmaps3.js
@@ -29,38 +29,38 @@ let t =
      (import $mkBoxedInt "" "mkBoxedInt" (func (result anyref)))
 
      (func $mkNil (result anyref)
        ref.null
      )
 
      (func $mkConsIgnoringScalar (result anyref)
               (param $hd anyref) (param i32) (param $tl anyref)
-        (get_local $hd)
-        (get_local $tl)
+        (local.get $hd)
+        (local.get $tl)
         call $mkCons
      )
 
      (func $mkList (export "mkList") (result anyref)
         call $mkList20
      )
 
      (func $mkList20 (result anyref)
        ;; create 20 pointers to boxed ints on the stack, plus a few
        ;; scalars for added confusion
        (local $scalar99 i32)
        (local $scalar97 i32)
-       (set_local $scalar99 (i32.const 99))
-       (set_local $scalar97 (i32.const 97))
+       (local.set $scalar99 (i32.const 99))
+       (local.set $scalar97 (i32.const 97))
 
        call $mkBoxedInt
-       get_local $scalar99
+       local.get $scalar99
        call $mkBoxedInt
        call $mkBoxedInt
-       get_local $scalar97
+       local.get $scalar97
        call $mkBoxedInt
        call $mkBoxedInt
        call $mkBoxedInt
        call $mkBoxedInt
        call $mkBoxedInt
        call $mkBoxedInt
        call $mkBoxedInt
        call $mkBoxedInt
--- a/js/src/jit-test/tests/wasm/gc/structs.js
+++ b/js/src/jit-test/tests/wasm/gc/structs.js
@@ -39,37 +39,37 @@ var bin = wasmTextToBinary(
 
       ;; Various ways to reference a type in the middle of the
       ;; type array, make sure we get the right one
 
       (func $x1 (import "m" "x1") (type $f1))
       (func $x2 (import "m" "x2") (type $f2))
 
       (func (export "hello") (param f64) (param i32) (result f64)
-       (call_indirect $f2 (get_local 0) (get_local 1)))
+       (call_indirect $f2 (local.get 0) (local.get 1)))
 
       (func $doit (param f64) (result f64)
-       (f64.sqrt (get_local 0)))
+       (f64.sqrt (local.get 0)))
 
       (func $doitagain (param f64) (result f64)
-       (f64.mul (get_local 0) (get_local 0)))
+       (f64.mul (local.get 0) (local.get 0)))
 
       (func (export "x1") (param i32) (result i32)
-       (call $x1 (get_local 0)))
+       (call $x1 (local.get 0)))
 
       (func (export "x2") (param f64) (result f64)
-       (call $x2 (get_local 0)))
+       (call $x2 (local.get 0)))
 
       ;; Useful for testing to ensure that the type is not type #0 here.
 
       (func (export "mk_point") (result anyref)
        (struct.new $point (i32.const 37) (i32.const 42)))
 
       (func (export "mk_int_node") (param i32) (param anyref) (result anyref)
-       (struct.new $int_node (get_local 0) (get_local 1)))
+       (struct.new $int_node (local.get 0) (local.get 1)))
 
       ;; Too big to fit in an InlineTypedObject.
 
       (type $bigger (struct
                      (field $a i32)
                      (field $b i32)
                      (field $c i32)
                      (field $d i32)
@@ -182,17 +182,17 @@ var bin = wasmTextToBinary(
                          (field $f2 f64)
                          (field $f3 anyref)
                          (field $f4 f32)
                          (field $f5 i32)))
 
       (func (export "mk_withfloats")
             (param f32) (param f64) (param anyref) (param f32) (param i32)
             (result anyref)
-            (struct.new $withfloats (get_local 0) (get_local 1) (get_local 2) (get_local 3) (get_local 4)))
+            (struct.new $withfloats (local.get 0) (local.get 1) (local.get 2) (local.get 3) (local.get 4)))
 
      )`)
 
 var mod = new WebAssembly.Module(bin);
 var ins = new WebAssembly.Instance(mod, {m:{x1(x){ return x*3 }, x2(x){ return Math.PI }}}).exports;
 
 assertEq(ins.hello(4.0, 0), 2.0)
 assertEq(ins.hello(4.0, 1), 16.0)
@@ -227,21 +227,21 @@ assertEq(withfloats._4, 0x1337);
 var stress = wasmTextToBinary(
     `(module
       (gc_feature_opt_in 3)
       (type $node (struct (field i32) (field (ref $node))))
       (func (export "iota1") (param $n i32) (result anyref)
        (local $list (ref $node))
        (block $exit
         (loop $loop
-         (br_if $exit (i32.eqz (get_local $n)))
-         (set_local $list (struct.new $node (get_local $n) (get_local $list)))
-         (set_local $n (i32.sub (get_local $n) (i32.const 1)))
+         (br_if $exit (i32.eqz (local.get $n)))
+         (local.set $list (struct.new $node (local.get $n) (local.get $list)))
+         (local.set $n (i32.sub (local.get $n) (i32.const 1)))
          (br $loop)))
-       (get_local $list)))`);
+       (local.get $list)))`);
 var stressIns = new WebAssembly.Instance(new WebAssembly.Module(stress)).exports;
 var stressLevel = conf.x64 && !conf.tsan && !conf.asan && !conf.valgrind ? 100000 : 1000;
 var the_list = stressIns.iota1(stressLevel);
 for (let i=1; i <= stressLevel; i++) {
     assertEq(the_list._0, i);
     the_list = the_list._1;
 }
 assertEq(the_list, null);
@@ -258,30 +258,30 @@ assertEq(the_list, null);
 
           (type $big (struct
                       (field (mut i32))
                       (field (mut i64))
                       (field (mut i32))))
 
           (func (export "set") (param anyref)
            (local (ref $big))
-           (set_local 1 (struct.narrow anyref (ref $big) (get_local 0)))
-           (struct.set $big 1 (get_local 1) (i64.const 0x3333333376544567)))
+           (local.set 1 (struct.narrow anyref (ref $big) (local.get 0)))
+           (struct.set $big 1 (local.get 1) (i64.const 0x3333333376544567)))
 
           (func (export "set2") (param $p anyref)
            (struct.set $big 1
-            (struct.narrow anyref (ref $big) (get_local $p))
+            (struct.narrow anyref (ref $big) (local.get $p))
             (i64.const 0x3141592653589793)))
 
           (func (export "low") (param $p anyref) (result i32)
-           (i32.wrap/i64 (struct.get $big 1 (struct.narrow anyref (ref $big) (get_local $p)))))
+           (i32.wrap/i64 (struct.get $big 1 (struct.narrow anyref (ref $big) (local.get $p)))))
 
           (func (export "high") (param $p anyref) (result i32)
            (i32.wrap/i64 (i64.shr_u
-                          (struct.get $big 1 (struct.narrow anyref (ref $big) (get_local $p)))
+                          (struct.get $big 1 (struct.narrow anyref (ref $big) (local.get $p)))
                           (i64.const 32))))
 
           (func (export "mk") (result anyref)
            (struct.new $big (i32.const 0x7aaaaaaa) (i64.const 0x4201020337) (i32.const 0x6bbbbbbb)))
 
          )`;
 
     let ins = wasmEvalText(txt).exports;
@@ -319,44 +319,44 @@ assertEq(the_list, null);
           (type $big (struct
                       (field (mut i32))
                       (field (mut i64))
                       (field (mut i32))))
 
           (global $g (mut (ref $big)) (ref.null))
 
           (func (export "make") (result anyref)
-           (set_global $g
+           (global.set $g
             (struct.new $big (i32.const 0x7aaaaaaa) (i64.const 0x4201020337) (i32.const 0x6bbbbbbb)))
-           (get_global $g))
+           (global.get $g))
 
           (func (export "update0") (param $x i32)
-           (struct.set $big 0 (get_global $g) (get_local $x)))
+           (struct.set $big 0 (global.get $g) (local.get $x)))
 
           (func (export "get0") (result i32)
-           (struct.get $big 0 (get_global $g)))
+           (struct.get $big 0 (global.get $g)))
 
           (func (export "update1") (param $hi i32) (param $lo i32)
-           (struct.set $big 1 (get_global $g)
+           (struct.set $big 1 (global.get $g)
             (i64.or
-             (i64.shl (i64.extend_u/i32 (get_local $hi)) (i64.const 32))
-             (i64.extend_u/i32 (get_local $lo)))))
+             (i64.shl (i64.extend_u/i32 (local.get $hi)) (i64.const 32))
+             (i64.extend_u/i32 (local.get $lo)))))
 
           (func (export "get1_low") (result i32)
-           (i32.wrap/i64 (struct.get $big 1 (get_global $g))))
+           (i32.wrap/i64 (struct.get $big 1 (global.get $g))))
 
           (func (export "get1_high") (result i32)
            (i32.wrap/i64
-            (i64.shr_u (struct.get $big 1 (get_global $g)) (i64.const 32))))
+            (i64.shr_u (struct.get $big 1 (global.get $g)) (i64.const 32))))
 
           (func (export "update2") (param $x i32)
-           (struct.set $big 2 (get_global $g) (get_local $x)))
+           (struct.set $big 2 (global.get $g) (local.get $x)))
 
           (func (export "get2") (result i32)
-           (struct.get $big 2 (get_global $g)))
+           (struct.get $big 2 (global.get $g)))
 
          )`;
 
     let ins = wasmEvalText(txt).exports;
 
     let v = ins.make();
     assertEq(v._0, 0x7aaaaaaa);
     assertEq(v._1_low, 0x01020337);
@@ -391,26 +391,26 @@ var bin = wasmTextToBinary(
     `(module
       (gc_feature_opt_in 3)
 
       (type $cons (struct (field i32) (field (ref $cons))))
 
       (global $g (mut (ref $cons)) (ref.null))
 
       (func (export "push") (param i32)
-       (set_global $g (struct.new $cons (get_local 0) (get_global $g))))
+       (global.set $g (struct.new $cons (local.get 0) (global.get $g))))
 
       (func (export "top") (result i32)
-       (struct.get $cons 0 (get_global $g)))
+       (struct.get $cons 0 (global.get $g)))
 
       (func (export "pop")
-       (set_global $g (struct.get $cons 1 (get_global $g))))
+       (global.set $g (struct.get $cons 1 (global.get $g))))
 
       (func (export "is_empty") (result i32)
-       (ref.is_null (get_global $g)))
+       (ref.is_null (global.get $g)))
 
       )`);
 
 var mod = new WebAssembly.Module(bin);
 var ins = new WebAssembly.Instance(mod).exports;
 ins.push(37);
 ins.push(42);
 ins.push(86);
@@ -432,17 +432,17 @@ assertErrorMessage(() => ins.pop(),
 {
     var ins = wasmEvalText(
         `(module
           (gc_feature_opt_in 3)
           (type $Node (struct (field i32)))
           (func (export "mk") (result anyref)
            (struct.new $Node (i32.const 37)))
           (func (export "f") (param $n anyref) (result anyref)
-           (struct.narrow anyref (ref $Node) (get_local $n))))`).exports;
+           (struct.narrow anyref (ref $Node) (local.get $n))))`).exports;
     var n = ins.mk();
     assertEq(ins.f(n), n);
     assertEq(ins.f(wrapWithProto(n, {})), null);
 }
 
 // Field names.
 
 // Test that names map to the right fields.
@@ -452,26 +452,26 @@ assertErrorMessage(() => ins.pop(),
         `(module
           (gc_feature_opt_in 3)
 
           (type $s (struct
                     (field $x i32)
                     (field $y i32)))
 
           (func $f (param $p (ref $s)) (result i32)
-           (struct.get $s $x (get_local $p)))
+           (struct.get $s $x (local.get $p)))
 
           (func $g (param $p (ref $s)) (result i32)
-           (struct.get $s $y (get_local $p)))
+           (struct.get $s $y (local.get $p)))
 
           (func (export "testf") (param $n i32) (result i32)
-           (call $f (struct.new $s (get_local $n) (i32.mul (get_local $n) (i32.const 2)))))
+           (call $f (struct.new $s (local.get $n) (i32.mul (local.get $n) (i32.const 2)))))
 
           (func (export "testg") (param $n i32) (result i32)
-           (call $g (struct.new $s (get_local $n) (i32.mul (get_local $n) (i32.const 2)))))
+           (call $g (struct.new $s (local.get $n) (i32.mul (local.get $n) (i32.const 2)))))
 
          )`))).exports;
 
     assertEq(ins.testf(10), 10);
     assertEq(ins.testg(10), 20);
 }
 
 // Test that field names must be unique in the module.
@@ -490,17 +490,17 @@ assertErrorMessage(() => wasmTextToBinar
 
 // Wrong type passed as initializer
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(`
 (module
   (gc_feature_opt_in 3)
   (type $r (struct (field i32)))
   (func $f (param f64) (result anyref)
-    (struct.new $r (get_local 0)))
+    (struct.new $r (local.get 0)))
 )`)),
 WebAssembly.CompileError, /type mismatch/);
 
 // Too few values passed for initializer
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(`
 (module
   (gc_feature_opt_in 3)
--- a/js/src/jit-test/tests/wasm/gc/tables-generalized-struct.js
+++ b/js/src/jit-test/tests/wasm/gc/tables-generalized-struct.js
@@ -7,21 +7,21 @@
 
 {
     let ins = wasmEvalText(
         `(module
            (gc_feature_opt_in 3)
            (table (export "t") 10 anyref)
            (type $dummy (struct (field i32)))
            (func (export "set_anyref") (param i32) (param anyref)
-             (table.set (get_local 0) (get_local 1)))
+             (table.set (local.get 0) (local.get 1)))
            (func (export "set_null") (param i32)
-             (table.set (get_local 0) (ref.null)))
+             (table.set (local.get 0) (ref.null)))
            (func (export "set_ref") (param i32) (param anyref)
-             (table.set (get_local 0) (struct.narrow anyref (ref $dummy) (get_local 1))))
+             (table.set (local.get 0) (struct.narrow anyref (ref $dummy) (local.get 1))))
            (func (export "make_struct") (result anyref)
              (struct.new $dummy (i32.const 37))))`);
     let x = {};
     ins.exports.set_anyref(3, x);
     assertEq(ins.exports.t.get(3), x);
     ins.exports.set_null(3);
     assertEq(ins.exports.t.get(3), null);
     let dummy = ins.exports.make_struct();
--- a/js/src/jit-test/tests/wasm/gc/tables-generalized.js
+++ b/js/src/jit-test/tests/wasm/gc/tables-generalized.js
@@ -157,135 +157,135 @@ function dummy() { return 37 }
 // table.get in bounds - returns right value type & value
 // table.get out of bounds - fails
 
 {
     let ins = wasmEvalText(
         `(module
            (table (export "t") 10 anyref)
            (func (export "f") (param i32) (result anyref)
-              (table.get (get_local 0))))`);
+              (table.get (local.get 0))))`);
     let x = {};
     ins.exports.t.set(0, x);
     assertEq(ins.exports.f(0), x);
     assertEq(ins.exports.f(1), null);
     assertErrorMessage(() => ins.exports.f(10), RangeError, /index out of bounds/);
     assertErrorMessage(() => ins.exports.f(-5), RangeError, /index out of bounds/);
 }
 
 // table.get with non-i32 index - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (table 10 anyref)
        (func (export "f") (param f64) (result anyref)
-         (table.get (get_local 0))))`)),
+         (table.get (local.get 0))))`)),
                    WebAssembly.CompileError,
                    /type mismatch/);
 
 // table.get on table of funcref - fails validation because funcref is not expressible
 // Both with and without anyref support
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (table 10 funcref)
        (func (export "f") (param i32)
-         (drop (table.get (get_local 0)))))`)),
+         (drop (table.get (local.get 0)))))`)),
                    WebAssembly.CompileError,
                    /table.get only on tables of anyref/);
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (table 10 funcref)
        (func (export "f") (param i32)
-         (drop (table.get (get_local 0)))))`)),
+         (drop (table.get (local.get 0)))))`)),
                    WebAssembly.CompileError,
                    /table.get only on tables of anyref/);
 
 // table.get when there are no tables - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (func (export "f") (param i32)
-         (drop (table.get (get_local 0)))))`)),
+         (drop (table.get (local.get 0)))))`)),
                    WebAssembly.CompileError,
                    /table index out of range for table.get/);
 
 // table.set in bounds with i32 x anyref - works, no value generated
 // table.set with null - works
 // table.set out of bounds - fails
 
 {
     let ins = wasmEvalText(
         `(module
            (table (export "t") 10 anyref)
            (func (export "set_anyref") (param i32) (param anyref)
-             (table.set (get_local 0) (get_local 1)))
+             (table.set (local.get 0) (local.get 1)))
            (func (export "set_null") (param i32)
-             (table.set (get_local 0) (ref.null))))`);
+             (table.set (local.get 0) (ref.null))))`);
     let x = {};
     ins.exports.set_anyref(3, x);
     assertEq(ins.exports.t.get(3), x);
     ins.exports.set_null(3);
     assertEq(ins.exports.t.get(3), null);
 
     assertErrorMessage(() => ins.exports.set_anyref(10, x), RangeError, /index out of bounds/);
     assertErrorMessage(() => ins.exports.set_anyref(-1, x), RangeError, /index out of bounds/);
 }
 
 // table.set with non-i32 index - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (table 10 anyref)
        (func (export "f") (param f64)
-         (table.set (get_local 0) (ref.null))))`)),
+         (table.set (local.get 0) (ref.null))))`)),
                    WebAssembly.CompileError,
                    /type mismatch/);
 
 // table.set with non-anyref value - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (table 10 anyref)
        (func (export "f") (param f64)
-         (table.set (i32.const 0) (get_local 0))))`)),
+         (table.set (i32.const 0) (local.get 0))))`)),
                    WebAssembly.CompileError,
                    /type mismatch/);
 
 // table.set on table of funcref - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
       (table 10 funcref)
       (func (export "f") (param anyref)
-       (table.set (i32.const 0) (get_local 0))))`)),
+       (table.set (i32.const 0) (local.get 0))))`)),
                    WebAssembly.CompileError,
                    /table.set only on tables of anyref/);
 
 // table.set when there are no tables - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
       (func (export "f") (param anyref)
-       (table.set (i32.const 0) (get_local 0))))`)),
+       (table.set (i32.const 0) (local.get 0))))`)),
                    WebAssembly.CompileError,
                    /table index out of range for table.set/);
 
 // we can grow table of anyref
 // table.grow with zero delta - always works even at maximum
 // table.grow with delta - works and returns correct old value
 // table.grow with delta at upper limit - fails
 // table.grow with negative delta - fails
 
 let ins = wasmEvalText(
     `(module
       (table (export "t") 10 20 anyref)
       (func (export "grow") (param i32) (result i32)
-       (table.grow (get_local 0) (ref.null))))`);
+       (table.grow (local.get 0) (ref.null))))`);
 assertEq(ins.exports.grow(0), 10);
 assertEq(ins.exports.t.length, 10);
 assertEq(ins.exports.grow(1), 10);
 assertEq(ins.exports.t.length, 11);
 assertEq(ins.exports.t.get(10), null);
 assertEq(ins.exports.grow(9), 11);
 assertEq(ins.exports.t.length, 20);
 assertEq(ins.exports.t.get(19), null);
@@ -303,17 +303,17 @@ assertEq(ins.exports.t.length, 20)
 
 // Special case for private tables without a maximum
 
 {
     let ins = wasmEvalText(
         `(module
           (table 10 anyref)
           (func (export "grow") (param i32) (result i32)
-           (table.grow (get_local 0) (ref.null))))`);
+           (table.grow (local.get 0) (ref.null))))`);
     assertEq(ins.exports.grow(0), 10);
     assertEq(ins.exports.grow(1), 10);
     assertEq(ins.exports.grow(9), 11);
     assertEq(ins.exports.grow(0), 20);
 }
 
 // Can't grow table of funcref yet
 
@@ -326,40 +326,40 @@ assertErrorMessage(() => wasmEvalText(
                    /table.grow only on tables of anyref/);
 
 // table.grow with non-i32 argument - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (table 10 anyref)
        (func (export "f") (param f64)
-        (table.grow (get_local 0) (ref.null))))`)),
+        (table.grow (local.get 0) (ref.null))))`)),
                    WebAssembly.CompileError,
                    /type mismatch/);
 
 // table.grow when there are no tables - fails validation
 
 assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(
     `(module
        (func (export "f") (param i32)
-        (table.grow (get_local 0) (ref.null))))`)),
+        (table.grow (local.get 0) (ref.null))))`)),
                    WebAssembly.CompileError,
                    /table index out of range for table.grow/);
 
 // table.size on table of anyref
 
 for (let visibility of ['', '(export "t")', '(import "m" "t")']) {
     let exp = {m:{t: new WebAssembly.Table({element:"anyref",
                                             initial: 10,
                                             maximum: 20})}};
     let ins = wasmEvalText(
         `(module
           (table ${visibility} 10 20 anyref)
           (func (export "grow") (param i32) (result i32)
-           (table.grow (get_local 0) (ref.null)))
+           (table.grow (local.get 0) (ref.null)))
           (func (export "size") (result i32)
            (table.size)))`,
         exp);
     assertEq(ins.exports.grow(0), 10);
     assertEq(ins.exports.size(), 10);
     assertEq(ins.exports.grow(1), 10);
     assertEq(ins.exports.size(), 11);
     assertEq(ins.exports.grow(9), 11);
@@ -409,17 +409,17 @@ let VALUES = [null,
     }
 }
 
 {
     let t = new WebAssembly.Table({element:"funcref", initial:0});
     let ins = wasmEvalText(
         `(module
            (func (export "f") (param i32) (result i32)
-             (get_local 0)))`);
+             (local.get 0)))`);
     t.grow(1);
     assertEq(t.get(t.length-1), null);
     t.grow(2, ins.exports.f);
     assertEq(t.get(t.length-3), null);
     assertEq(t.get(t.length-2), ins.exports.f);
     assertEq(t.get(t.length-1), ins.exports.f);
 }
 
--- a/js/src/jit-test/tests/wasm/gc/tables-multiple.js
+++ b/js/src/jit-test/tests/wasm/gc/tables-multiple.js
@@ -14,27 +14,27 @@
 var ins = wasmEvalText(
     `(module
       (table $t1 2 funcref)
       (table $t2 2 funcref)
       (type $ftype (func (param i32) (result i32)))
       (elem $t1 (i32.const 0) $f1 $f2)
       (elem $t2 (i32.const 0) $f3 $f4)
       (func $f1 (param $n i32) (result i32)
-       (i32.add (get_local $n) (i32.const 1)))
+       (i32.add (local.get $n) (i32.const 1)))
       (func $f2 (param $n i32) (result i32)
-       (i32.add (get_local $n) (i32.const 2)))
+       (i32.add (local.get $n) (i32.const 2)))
       (func $f3 (param $n i32) (result i32)
-       (i32.add (get_local $n) (i32.const 3)))
+       (i32.add (local.get $n) (i32.const 3)))
       (func $f4 (param $n i32) (result i32)
-       (i32.add (get_local $n) (i32.const 4)))
+       (i32.add (local.get $n) (i32.const 4)))
       (func (export "f") (param $fn i32) (param $n i32) (result i32)
-       (call_indirect $t1 $ftype (get_local $n) (get_local $fn)))
+       (call_indirect $t1 $ftype (local.get $n) (local.get $fn)))
       (func (export "g") (param $fn i32) (param $n i32) (result i32)
-       (call_indirect $t2 $ftype (get_local $n) (get_local $fn))))`).exports;
+       (call_indirect $t2 $ftype (local.get $n) (local.get $fn))))`).exports;
 
 assertEq(ins.f(0, 10), 11);
 assertEq(ins.f(1, 10), 12);
 assertEq(ins.g(0, 10), 13);
 assertEq(ins.g(1, 10), 14);
 
 // - export multiple tables.
 //   note the first and third tables make the export list not start at zero,
@@ -59,36 +59,36 @@ assertEq(ins.t2.length, 3);
 var exp = {m:{t0: new WebAssembly.Table({element:"funcref", initial:2}),
               t1: new WebAssembly.Table({element:"anyref", initial:3}),
               t2: new WebAssembly.Table({element:"funcref", initial:4}),
               t3: new WebAssembly.Table({element:"anyref", initial:5})}};
 var ins = wasmEvalText(
     `(module
       (table $t0 (import "m" "t0") 2 funcref)
       (type $id_i32_t (func (param i32) (result i32)))
-      (func $id_i32 (param i32) (result i32) (get_local 0))
+      (func $id_i32 (param i32) (result i32) (local.get 0))
       (elem $t0 (i32.const 1) $id_i32)
 
       (table $t1 (import "m" "t1") 3 anyref)
 
       (table $t2 (import "m" "t2") 4 funcref)
       (type $id_f64_t (func (param f64) (result f64)))
-      (func $id_f64 (param f64) (result f64) (get_local 0))
+      (func $id_f64 (param f64) (result f64) (local.get 0))
       (elem $t2 (i32.const 3) $id_f64)
 
       (table $t3 (import "m" "t3") 5 anyref)
 
       (func (export "f0") (param i32) (result i32)
-       (call_indirect $t0 $id_i32_t (get_local 0) (i32.const 1)))
+       (call_indirect $t0 $id_i32_t (local.get 0) (i32.const 1)))
 
       (func (export "f1") (param anyref)
-       (table.set $t1 (i32.const 2) (get_local 0)))
+       (table.set $t1 (i32.const 2) (local.get 0)))
 
       (func (export "f2") (param f64) (result f64)
-       (call_indirect $t2 $id_f64_t (get_local 0) (i32.const 3)))
+       (call_indirect $t2 $id_f64_t (local.get 0) (i32.const 3)))
 
       (func (export "f3")
        (table.set $t3 (i32.const 4) (table.get $t1 (i32.const 2)))))`,
 
     exp).exports;
 
 assertEq(ins.f0(37), 37);
 
@@ -128,40 +128,40 @@ assertEq(ins.exports.size1(), 8);
 
 var exp = {m:{t0: new WebAssembly.Table({element:"anyref", initial:2}),
               t1: new WebAssembly.Table({element:"anyref", initial:3})}};
 var ins = wasmEvalText(
     `(module
       (table $t0 (import "m" "t0") 2 anyref)
       (table $t1 (import "m" "t1") 3 anyref)
       (func (export "f") (param $dest i32) (param $src i32) (param $len i32)
-       (table.copy $t1 (get_local $dest) $t0 (get_local $src) (get_local $len))))`,
+       (table.copy $t1 (local.get $dest) $t0 (local.get $src) (local.get $len))))`,
     exp);
 
 exp.m.t0.set(0, {x:0});
 exp.m.t0.set(1, {x:1});
 ins.exports.f(1, 0, 2);
 assertEq(exp.m.t1.get(1), exp.m.t0.get(0));
 assertEq(exp.m.t1.get(2), exp.m.t0.get(1));
 
 // - the table.copy syntax makes sense even in the non-parenthesized case
 
 var ins = wasmEvalText(
     `(module
       (table $t0 2 anyref)
       (table $t1 2 anyref)
       (func (export "copy") (param $dest i32) (param $src i32) (param $len i32)
-       get_local $dest
-       get_local $src
-       get_local $len
+       local.get $dest
+       local.get $src
+       local.get $len
        table.copy $t1 $t0)
       (func (export "set") (param $n i32) (param $v anyref)
-       (table.set $t0 (get_local $n) (get_local $v)))
+       (table.set $t0 (local.get $n) (local.get $v)))
       (func (export "get") (param $n i32) (result anyref)
-       (table.get $t1 (get_local $n))))`,
+       (table.get $t1 (local.get $n))))`,
     exp);
 
 var values = [{x:0}, {x:1}];
 ins.exports.set(0, values[0]);
 ins.exports.set(1, values[1]);
 ins.exports.copy(0, 0, 2);
 assertEq(ins.exports.get(0), values[0]);
 assertEq(ins.exports.get(1), values[1]);
@@ -183,32 +183,32 @@ for (let [x,y,result,init] of [['(export
                                ['(import "m" "t")', '', arg*13, true],
                                ['', '(import "m" "t")', arg-11, false]])
 {
     var otherins = wasmEvalText(
         `(module
           (table $t (export "t") 2 funcref)
           (type $fn1 (func (param i32) (result i32)))
           (func $f1 (param $n i32) (result i32)
-           (i32.sub (get_local $n) (i32.const 11)))
+           (i32.sub (local.get $n) (i32.const 11)))
           (elem $t (i32.const 1) $f1))`);
 
     let text =
         `(module
           (table $t0 ${x} 2 funcref)
 
           (table $t1 ${y} 2 funcref)
           (type $fn1 (func (param i32) (result i32)))
           (func $f1 (param $n i32) (result i32)
-           (i32.mul (get_local $n) (i32.const 13)))
+           (i32.mul (local.get $n) (i32.const 13)))
           ${init ? "(elem $t1 (i32.const 1) $f1)" : ""}
 
           (func (export "f") (param $n i32) (result i32)
            (table.copy $t0 (i32.const 0) $t1 (i32.const 0) (i32.const 2))
-           (call_indirect $t0 $fn1 (get_local $n) (i32.const 1))))`;
+           (call_indirect $t0 $fn1 (local.get $n) (i32.const 1))))`;
     var ins = wasmEvalText(text, {m: otherins.exports});
 
     assertEq(ins.exports.f(arg), result);
 }
 
 // - a table can be imported multiple times, and when it is, and one of them is grown,
 //   they are all grown.
 // - test the (import "m" "t" (table ...)) syntax
@@ -242,21 +242,21 @@ assertEq(ins.exports.size(), 4);
 
 var ins = wasmEvalText(
     `(module
       (table $t0 2 funcref)
       (table $t1 2 funcref)
       (elem passive $f0 $f1) ;; 0
       (type $ftype (func (param i32) (result i32)))
       (func $f0 (param i32) (result i32)
-       (i32.mul (get_local 0) (i32.const 13)))
+       (i32.mul (local.get 0) (i32.const 13)))
       (func $f1 (param i32) (result i32)
-       (i32.sub (get_local 0) (i32.const 11)))
+       (i32.sub (local.get 0) (i32.const 11)))
       (func (export "call") (param i32) (param i32) (result i32)
-       (call_indirect $t1 $ftype (get_local 1) (get_local 0)))
+       (call_indirect $t1 $ftype (local.get 1) (local.get 0)))
       (func (export "init")
        (table.init $t1 0 (i32.const 0) (i32.const 0) (i32.const 2))))`);
 
 ins.exports.init();
 assertEq(ins.exports.call(0, 10), 130);
 assertEq(ins.exports.call(1, 10), -1);
 
 // - [white-box] if a multi-imported table of funcref is grown and the grown
@@ -272,31 +272,31 @@ assertEq(ins.exports.call(1, 10), -1);
 var tbl = new WebAssembly.Table({element:"funcref", initial:2});
 var exp = {m:{t0: tbl, t1: tbl}};
 var ins = wasmEvalText(
     `(module
       (import "m" "t0" (table $t0 2 funcref))
       (import "m" "t1" (table $t1 2 funcref))
       (type $ftype (func (param f64) (result f64)))
       (func (export "f") (param $n f64) (result f64)
-       (f64.mul (get_local $n) (f64.const 3.25)))
+       (f64.mul (local.get $n) (f64.const 3.25)))
       (func (export "do0") (param $i i32) (param $n f64) (result f64)
-       (call_indirect $t0 $ftype (get_local $n) (get_local $i)))
+       (call_indirect $t0 $ftype (local.get $n) (local.get $i)))
       (func (export "do1") (param $i i32) (param $n f64) (result f64)
-       (call_indirect $t1 $ftype (get_local $n) (get_local $i))))`,
+       (call_indirect $t1 $ftype (local.get $n) (local.get $i))))`,
     exp);
 var ins2 = wasmEvalText(
     `(module
       (import "m" "t0" (table $t0 2 funcref))
       (import "m" "t1" (table $t1 2 funcref))
       (type $ftype (func (param f64) (result f64)))
       (func (export "do0") (param $i i32) (param $n f64) (result f64)
-       (call_indirect $t0 $ftype (get_local $n) (get_local $i)))
+       (call_indirect $t0 $ftype (local.get $n) (local.get $i)))
       (func (export "do1") (param $i i32) (param $n f64) (result f64)
-       (call_indirect $t1 $ftype (get_local $n) (get_local $i))))`,
+       (call_indirect $t1 $ftype (local.get $n) (local.get $i))))`,
     exp);
 
 assertEq(tbl.grow(10), 2);
 tbl.set(11, ins.exports.f);
 assertEq(ins.exports.do0(11, 2.0), 6.5);
 assertEq(ins.exports.do1(11, 4.0), 13.0);
 assertEq(ins2.exports.do0(11, 2.0), 6.5);
 assertEq(ins2.exports.do1(11, 4.0), 13.0);
@@ -328,17 +328,17 @@ assertErrorMessage(() => wasmEvalText(
                    WebAssembly.CompileError,
                    /table index out of range for table.get/);
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (table $t0 2 anyref)
       (table $t1 2 anyref)
       (func $f (param anyref)
-       (table.set 2 (i32.const 0) (get_local 0))))`),
+       (table.set 2 (i32.const 0) (local.get 0))))`),
                    WebAssembly.CompileError,
                    /table index out of range for table.set/);
 
 assertErrorMessage(() => wasmEvalText(
     `(module
       (table $t0 2 anyref)
       (table $t1 2 anyref)
       (func $f (param anyref)
--- a/js/src/jit-test/tests/wasm/gc/tables-stress.js
+++ b/js/src/jit-test/tests/wasm/gc/tables-stress.js
@@ -7,34 +7,34 @@ for ( let prefix of ['', '(table $prefix
        (table $tbl 0 anyref)
        (import $item "m" "item" (func (result anyref)))
        (func (export "run") (param $numiters i32)
          (local $i i32)
          (local $j i32)
          (local $last i32)
          (local $iters i32)
          (local $tmp anyref)
-         (set_local $last (table.grow $tbl (i32.const 1) (ref.null)))
-         (table.set $tbl (get_local $last) (call $item))
+         (local.set $last (table.grow $tbl (i32.const 1) (ref.null)))
+         (table.set $tbl (local.get $last) (call $item))
          (loop $iter_continue
-           (set_local $i (i32.const 0))
-           (set_local $j (get_local $last))
+           (local.set $i (i32.const 0))
+           (local.set $j (local.get $last))
            (block $l_break
              (loop $l_continue
-               (br_if $l_break (i32.ge_s (get_local $j) (get_local $i)))
-               (set_local $tmp (table.get $tbl (get_local $i)))
-               (if (i32.eqz (i32.rem_s (get_local $i) (i32.const 3)))
-                   (set_local $tmp (call $item)))
-               (table.set $tbl (get_local $i) (table.get $tbl (get_local $j)))
-               (table.set $tbl (get_local $j) (get_local $tmp))
-               (set_local $i (i32.add (get_local $i) (i32.const 1)))
-               (set_local $j (i32.sub (get_local $j) (i32.const 1)))
+               (br_if $l_break (i32.ge_s (local.get $j) (local.get $i)))
+               (local.set $tmp (table.get $tbl (local.get $i)))
+               (if (i32.eqz (i32.rem_s (local.get $i) (i32.const 3)))
+                   (local.set $tmp (call $item)))
+               (table.set $tbl (local.get $i) (table.get $tbl (local.get $j)))
+               (table.set $tbl (local.get $j) (local.get $tmp))
+               (local.set $i (i32.add (local.get $i) (i32.const 1)))
+               (local.set $j (i32.sub (local.get $j) (i32.const 1)))
                (br $l_continue))
-           (set_local $iters (i32.add (get_local $iters) (i32.const 1)))
-           (br_if $iter_continue (i32.lt_s (get_local $iters) (get_local $numiters)))))))`));
+           (local.set $iters (i32.add (local.get $iters) (i32.const 1)))
+           (br_if $iter_continue (i32.lt_s (local.get $iters) (local.get $numiters)))))))`));
 
     for (let [mode,freq] of [[14,100],  // Compact every 100 allocations
                              [2,12],    // Collect every 12 allocations
                              [7,100],   // Minor gc every 100 allocations
                              [15,100]]) // Verify heap integrity
     {
         if (this.gczeal)
             this.gczeal(mode,freq);
--- a/js/src/jit-test/tests/wasm/globals-impl.js
+++ b/js/src/jit-test/tests/wasm/globals-impl.js
@@ -11,35 +11,35 @@ let txt =
      (global $dir32 (mut i32) (i32.const 2718))
      ;; -------- FUNCTION 0 --------
      (func (export "function0") (result i32)
        (local $loopctr i32)
        (local $sum     i32)
        (local $tmp64   i64)
        (local $tmp32   i32)
        (loop
-          (set_global $ind64 (i64.add (get_global $ind64) (i64.const 11)))
-          (set_global $ind32 (i32.add (get_global $ind32) (i32.const 22)))
-          (set_global $dir64 (i64.add (get_global $dir64) (i64.const 33)))
-          (set_global $dir32 (i32.add (get_global $dir32) (i32.const 44)))
+          (global.set $ind64 (i64.add (global.get $ind64) (i64.const 11)))
+          (global.set $ind32 (i32.add (global.get $ind32) (i32.const 22)))
+          (global.set $dir64 (i64.add (global.get $dir64) (i64.const 33)))
+          (global.set $dir32 (i32.add (global.get $dir32) (i32.const 44)))
 
-          (set_local $tmp64 (i64.and (get_global $ind64) (get_global $dir64)))
-          (set_local $tmp32 (i32.or  (get_global $ind32) (get_global $dir32)))
+          (local.set $tmp64 (i64.and (global.get $ind64) (global.get $dir64)))
+          (local.set $tmp32 (i32.or  (global.get $ind32) (global.get $dir32)))
 
-          (set_local $sum
-            (i32.sub (get_local $sum) (i32.xor (i32.wrap/i64 (get_local $tmp64))
-                                               (get_local $tmp32))))
+          (local.set $sum
+            (i32.sub (local.get $sum) (i32.xor (i32.wrap/i64 (local.get $tmp64))
+                                               (local.get $tmp32))))
 
-          (set_local $loopctr
-            (i32.add (get_local $loopctr) (i32.const 1)))
+          (local.set $loopctr
+            (i32.add (local.get $loopctr) (i32.const 1)))
           (br_if 0
-            (i32.lt_u (get_local $loopctr) (i32.const 10)))
+            (i32.lt_u (local.get $loopctr) (i32.const 10)))
 
        )
-       (get_local $sum)
+       (local.get $sum)
      )
    )`;
 
 function test_driver()
 {
     let bin  = wasmTextToBinary(txt);
     let inst = new WebAssembly.Instance(new WebAssembly.Module(bin));
     let res  = inst.exports.function0();
--- a/js/src/jit-test/tests/wasm/globals.js
+++ b/js/src/jit-test/tests/wasm/globals.js
@@ -6,29 +6,29 @@ assertErrorMessage(() => wasmEvalText(`(
 assertErrorMessage(() => wasmEvalText(`(module (global (mut i32)))`), SyntaxError, /parsing/);
 
 // Initializer expressions.
 wasmFailValidateText(`(module (global i32 (f32.const 13.37)))`, /type mismatch/);
 wasmFailValidateText(`(module (global f64 (f32.const 13.37)))`, /type mismatch/);
 wasmFailValidateText(`(module (global i32 (i32.add (i32.const 13) (i32.const 37))))`, /failed to read end/);
 
 wasmFailValidateText(`(module (global i32 (global.get 0)))`, /out of range/);
-wasmFailValidateText(`(module (global i32 (get_global 1)) (global i32 (i32.const 1)))`, /out of range/);
+wasmFailValidateText(`(module (global i32 (global.get 1)) (global i32 (i32.const 1)))`, /out of range/);
 
 // Test a well-defined global section.
 function testInner(type, initialValue, nextValue, coercion)
 {
     var module = wasmEvalText(`(module
         (global (mut ${type}) (${type}.const ${initialValue}))
         (global ${type} (${type}.const ${initialValue}))
 
-        (func $get (result ${type}) (get_global 0))
-        (func $set (param ${type}) (global.set 0 (get_local 0)))
+        (func $get (result ${type}) (global.get 0))
+        (func $set (param ${type}) (global.set 0 (local.get 0)))
 
-        (func $get_cst (result ${type}) (get_global 1))
+        (func $get_cst (result ${type}) (global.get 1))
 
         (export "get" $get)
         (export "get_cst" $get_cst)
 
         (export "set" $set)
     )`).exports;
 
     assertEq(module.get(), coercion(initialValue));
@@ -38,25 +38,25 @@ function testInner(type, initialValue, n
     assertEq(module.get_cst(), coercion(initialValue));
 }
 
 testInner('i32', 13, 37, x => x|0);
 testInner('f32', 13.37, 0.1989, Math.fround);
 testInner('f64', 13.37, 0.1989, x => +x);
 
 // Semantic errors.
-wasmFailValidateText(`(module (global (mut i32) (i32.const 1337)) (func (set_global 1 (i32.const 0))))`, /out of range/);
-wasmFailValidateText(`(module (global i32 (i32.const 1337)) (func (set_global 0 (i32.const 0))))`, /can't write an immutable global/);
+wasmFailValidateText(`(module (global (mut i32) (i32.const 1337)) (func (global.set 1 (i32.const 0))))`, /out of range/);
+wasmFailValidateText(`(module (global i32 (i32.const 1337)) (func (global.set 0 (i32.const 0))))`, /can't write an immutable global/);
 
 // Big module with many variables: test that setting one doesn't overwrite the
 // other ones.
 function get_set(i, type) {
     return `
-        (func $get_${i} (result ${type}) (get_global ${i}))
-        (func $set_${i} (param ${type}) (set_global ${i} (get_local 0)))
+        (func $get_${i} (result ${type}) (global.get ${i}))
+        (func $set_${i} (param ${type}) (global.set ${i} (local.get 0)))
     `;
 }
 
 var module = wasmEvalText(`(module
     (global (mut i32) (i32.const 42))
     (global (mut i32) (i32.const 10))
     (global (mut f32) (f32.const 13.37))
     (global (mut f64) (f64.const 13.37))
@@ -86,35 +86,35 @@ for (let i = 0; i < 5; i++) {
             continue;
         assertEq(module[`get${j}`](), values[j]);
     }
     assertEq(module[`set${i}`](values[i]), undefined);
     assertEq(module[`get${i}`](), values[i]);
 }
 
 // Initializer expressions can also be used in elem section initializers.
-wasmFailValidateText(`(module (import "globals" "a" (global f32)) (table 4 funcref) (elem (get_global 0) $f) (func $f))`, /type mismatch/);
+wasmFailValidateText(`(module (import "globals" "a" (global f32)) (table 4 funcref) (elem (global.get 0) $f) (func $f))`, /type mismatch/);
 
 module = wasmEvalText(`(module
     (import "globals" "a" (global i32))
     (table (export "tbl") 4 funcref)
-    (elem (get_global 0) $f)
+    (elem (global.get 0) $f)
     (func $f)
     (export "f" $f)
 )`, {
     globals: {
         a: 1
     }
 }).exports;
 assertEq(module.f, module.tbl.get(1));
 
 // Import/export semantics.
 module = wasmEvalText(`(module
  (import $g "globals" "x" (global i32))
- (func $get (result i32) (get_global $g))
+ (func $get (result i32) (global.get $g))
  (export "getter" $get)
  (export "value" global 0)
 )`, { globals: {x: 42} }).exports;
 
 assertEq(module.getter(), 42);
 
 // assertEq() will not trigger @@toPrimitive, so we must have a cast here.
 assertEq(Number(module.value), 42);
@@ -171,35 +171,35 @@ module = wasmEvalText(`(module
  (export "imported" global 0)
  (export "defined" global 1)
 )`, { globals: {x: 42} }).exports;
 
 assertEq(Number(module.imported), 42);
 assertEq(Number(module.defined), 1337);
 
 // Initializer expressions can reference an imported immutable global.
-wasmFailValidateText(`(module (global f32 (f32.const 13.37)) (global i32 (get_global 0)))`, /must reference a global immutable import/);
-wasmFailValidateText(`(module (global (mut f32) (f32.const 13.37)) (global i32 (get_global 0)))`, /must reference a global immutable import/);
-wasmFailValidateText(`(module (global (mut i32) (i32.const 0)) (global i32 (get_global 0)))`, /must reference a global immutable import/);
+wasmFailValidateText(`(module (global f32 (f32.const 13.37)) (global i32 (global.get 0)))`, /must reference a global immutable import/);
+wasmFailValidateText(`(module (global (mut f32) (f32.const 13.37)) (global i32 (global.get 0)))`, /must reference a global immutable import/);
+wasmFailValidateText(`(module (global (mut i32) (i32.const 0)) (global i32 (global.get 0)))`, /must reference a global immutable import/);
 
-wasmFailValidateText(`(module (import "globals" "a" (global f32)) (global i32 (get_global 0)))`, /type mismatch/);
+wasmFailValidateText(`(module (import "globals" "a" (global f32)) (global i32 (global.get 0)))`, /type mismatch/);
 
 function testInitExpr(type, initialValue, nextValue, coercion, assertFunc = assertEq) {
     var module = wasmEvalText(`(module
         (import "globals" "a" (global ${type}))
 
-        (global $glob_mut (mut ${type}) (get_global 0))
-        (global $glob_imm ${type} (get_global 0))
+        (global $glob_mut (mut ${type}) (global.get 0))
+        (global $glob_imm ${type} (global.get 0))
 
-        (func $get0 (result ${type}) (get_global 0))
+        (func $get0 (result ${type}) (global.get 0))
 
-        (func $get1 (result ${type}) (get_global 1))
-        (func $set1 (param ${type}) (set_global 1 (get_local 0)))
+        (func $get1 (result ${type}) (global.get 1))
+        (func $set1 (param ${type}) (global.set 1 (local.get 0)))
 
-        (func $get_cst (result ${type}) (get_global 2))
+        (func $get_cst (result ${type}) (global.get 2))
 
         (export "get0" $get0)
         (export "get1" $get1)
         (export "get_cst" $get_cst)
 
         (export "set1" $set1)
         (export "global_imm" (global $glob_imm))
     )`, {
@@ -250,17 +250,17 @@ assertErrorMessage(() => wasmEvalText(`(
 
     let i = wasmEvalText(`(module
                            (global (export "g") i64 (i64.const 37))
                            (global (export "h") (mut i64) (i64.const 37)))`);
 
     let j = wasmEvalText(`(module
                            (import "globals" "g" (global i64))
                            (func (export "f") (result i32)
-                            (i64.eq (get_global 0) (i64.const 37))))`,
+                            (i64.eq (global.get 0) (i64.const 37))))`,
                          {globals: {g: i.exports.g}});
 
     assertEq(j.exports.f(), 1);
 
     // We cannot read or write i64 global values from JS.
 
     let g = i.exports.g;
 
@@ -272,19 +272,19 @@ assertErrorMessage(() => wasmEvalText(`(
 }
 
 // Test inner
 var initialValue = '0x123456789abcdef0';
 var nextValue = '0x531642753864975F';
 wasmAssert(`(module
     (global (mut i64) (i64.const ${initialValue}))
     (global i64 (i64.const ${initialValue}))
-    (func $get (result i64) (get_global 0))
-    (func $set (param i64) (set_global 0 (get_local 0)))
-    (func $get_cst (result i64) (get_global 1))
+    (func $get (result i64) (global.get 0))
+    (func $set (param i64) (global.set 0 (local.get 0)))
+    (func $get_cst (result i64) (global.get 1))
     (export "get" $get)
     (export "get_cst" $get_cst)
     (export "set" $set)
 )`, [
     {type: 'i64', func: '$get', expected: initialValue},
     {type: 'i64', func: '$set', args: [`i64.const ${nextValue}`]},
     {type: 'i64', func: '$get', expected: nextValue},
     {type: 'i64', func: '$get_cst', expected: initialValue},
@@ -333,17 +333,17 @@ wasmAssert(`(module
 
     // The default init value is zero.
     assertEq((new Global({value: "i32"})).value, 0);
     assertEq((new Global({value: "f32"})).value, 0);
     assertEq((new Global({value: "f64"})).value, 0);
     let mod = wasmEvalText(`(module
                              (import "" "g" (global i64))
                              (func (export "f") (result i32)
-                              (i64.eqz (get_global 0))))`,
+                              (i64.eqz (global.get 0))))`,
                            {"":{g: new Global({value: "i64"})}});
     assertEq(mod.exports.f(), 1);
 
     {
         // "value" is enumerable and is the first enumerated value
         let x = new Global({value: "i32"});
         let s = "";
         for ( let i in x )
@@ -384,17 +384,17 @@ wasmAssert(`(module
         assertEq(typeof i.exports.g, "object");
         assertEq(i.exports.g instanceof Global, true);
 
         // An exported global can be imported into another instance even if
         // it is an object:
         let j = wasmEvalText(`(module
                                (global (import "" "g") i32)
                                (func (export "f") (result i32)
-                                (get_global 0)))`,
+                                (global.get 0)))`,
                              { "": { "g": i.exports.g }});
 
         // And when it is then accessed it has the right value:
         assertEq(j.exports.f(), 42);
     }
 
     // Identity of Global objects (independent of mutablity).
     {
@@ -429,26 +429,26 @@ wasmAssert(`(module
         assertEq(k.exports.x, k.exports.y);
     }
 
     // Mutability
     {
         let i = wasmEvalText(`(module
                                (global (export "g") (mut i32) (i32.const 37))
                                (func (export "getter") (result i32)
-                                (get_global 0))
+                                (global.get 0))
                                (func (export "setter") (param i32)
-                                (set_global 0 (get_local 0))))`);
+                                (global.set 0 (local.get 0))))`);
 
         let j = wasmEvalText(`(module
                                (import "" "g" (global (mut i32)))
                                (func (export "getter") (result i32)
-                                (get_global 0))
+                                (global.get 0))
                                (func (export "setter") (param i32)
-                                (set_global 0 (get_local 0))))`,
+                                (global.set 0 (local.get 0))))`,
                              {"": {g: i.exports.g}});
 
         // Initial values
         assertEq(i.exports.g.value, 37);
         assertEq(i.exports.getter(), 37);
         assertEq(j.exports.getter(), 37);
 
         // Set in i, observe everywhere
--- a/js/src/jit-test/tests/wasm/import-export.js
+++ b/js/src/jit-test/tests/wasm/import-export.js
@@ -403,17 +403,17 @@ assertEq(e4.baz === e4.foo, false);
 assertEq(e4.baz === e1.baz, false);
 assertEq(e4.tbl === e1.tbl, false);
 assertEq(e4.foo, e4.tbl.get(0));
 assertEq(e4.foo, e4.tbl.get(1));
 assertEq(e4.baz, e4.tbl.get(2));
 
 // i64 is fully allowed for imported wasm functions
 
-var code1 = wasmTextToBinary('(module (func $exp (param i64) (result i64) (i64.add (get_local 0) (i64.const 10))) (export "exp" $exp))');
+var code1 = wasmTextToBinary('(module (func $exp (param i64) (result i64) (i64.add (local.get 0) (i64.const 10))) (export "exp" $exp))');
 var e1 = new Instance(new Module(code1)).exports;
 var code2 = wasmTextToBinary('(module (import $i "a" "b" (param i64) (result i64)) (func $f (result i32) (i32.wrap/i64 (call $i (i64.const 42)))) (export "f" $f))');
 var e2 = new Instance(new Module(code2), {a:{b:e1.exp}}).exports;
 assertEq(e2.f(), 52);
 
 // i64 is disallowed when called from JS and will cause calls to fail before
 // arguments are coerced.
 
@@ -457,17 +457,17 @@ wasmFailValidateText('(module (import "a
 // Data segments on imports
 
 var m = new Module(wasmTextToBinary(`
     (module
         (import "a" "b" (memory 1 1))
         (data (i32.const 0) "\\0a\\0b")
         (data (i32.const 100) "\\0c\\0d")
         (func $get (param $p i32) (result i32)
-            (i32.load8_u (get_local $p)))
+            (i32.load8_u (local.get $p)))
         (export "get" $get))
 `));
 var mem = new Memory({initial:1, maximum:1});
 var {get} = new Instance(m, {a:{b:mem}}).exports;
 assertEq(get(0), 0xa);
 assertEq(get(1), 0xb);
 assertEq(get(2), 0x0);
 assertEq(get(100), 0xc);
@@ -482,17 +482,17 @@ assertEq(i8[101], 0xd);
 assertEq(i8[102], 0x0);
 
 // Data segments with imported offsets
 
 var m = new Module(wasmTextToBinary(`
     (module
         (import "glob" "a" (global i32))
         (memory 1)
-        (data (get_global 0) "\\0a\\0b"))
+        (data (global.get 0) "\\0a\\0b"))
 `));
 assertEq(new Instance(m, {glob:{a:0}}) instanceof Instance, true);
 assertEq(new Instance(m, {glob:{a:(64*1024 - 2)}}) instanceof Instance, true);
 assertErrorMessage(() => new Instance(m, {glob:{a:(64*1024 - 1)}}), LinkError, /data segment does not fit/);
 assertErrorMessage(() => new Instance(m, {glob:{a:64*1024}}), LinkError, /data segment does not fit/);
 
 var m = new Module(wasmTextToBinary(`
     (module
@@ -517,18 +517,18 @@ var m = new Module(wasmTextToBinary(`
         (import "a" "mem" (memory 1))
         (import "a" "tbl" (table 1 funcref))
         (import $memOff "a" "memOff" (global i32))
         (import $tblOff "a" "tblOff" (global i32))
         (func $f)
         (func $g)
         (data (i32.const 0) "\\01")
         (elem (i32.const 0) $f)
-        (data (get_global $memOff) "\\02")
-        (elem (get_global $tblOff) $g)
+        (data (global.get $memOff) "\\02")
+        (elem (global.get $tblOff) $g)
         (export "f" $f)
         (export "g" $g))
 `));
 
 // Active segments are applied in order (this is observable if they overlap).
 //
 // Without bulk memory, all range checking for tables and memory happens before
 // any writes happen, and any OOB will force no writing to happen at all.
@@ -673,17 +673,17 @@ var f = () => 42;
 new Instance(m, { "": { table: tbl, func: f} });
 assertEq(tbl.get(0), null);
 assertEq(tbl.get(1)(), 13);
 assertEq(tbl.get(2)(), 42);
 assertEq(tbl.get(3)(), undefined);
 
 // Cross-instance calls
 
-var i1 = new Instance(new Module(wasmTextToBinary(`(module (func) (func (param i32) (result i32) (i32.add (get_local 0) (i32.const 1))) (func) (export "f" 1))`)));
+var i1 = new Instance(new Module(wasmTextToBinary(`(module (func) (func (param i32) (result i32) (i32.add (local.get 0) (i32.const 1))) (func) (export "f" 1))`)));
 var i2 = new Instance(new Module(wasmTextToBinary(`(module (import $imp "a" "b" (param i32) (result i32)) (func $g (result i32) (call $imp (i32.const 13))) (export "g" $g))`)), {a:{b:i1.exports.f}});
 assertEq(i2.exports.g(), 14);
 
 var i1 = new Instance(new Module(wasmTextToBinary(`(module
     (memory 1 1)
     (data (i32.const 0) "\\42")
     (func $f (result i32) (i32.load (i32.const 0)))
     (export "f" $f)
@@ -691,31 +691,31 @@ var i1 = new Instance(new Module(wasmTex
 var i2 = new Instance(new Module(wasmTextToBinary(`(module
     (import $imp "a" "b" (result i32))
     (memory 1 1)
     (data (i32.const 0) "\\13")
     (table 2 2 funcref)
     (elem (i32.const 0) $imp $def)
     (func $def (result i32) (i32.load (i32.const 0)))
     (type $v2i (func (result i32)))
-    (func $call (param i32) (result i32) (call_indirect $v2i (get_local 0)))
+    (func $call (param i32) (result i32) (call_indirect $v2i (local.get 0)))
     (export "call" $call)
 )`)), {a:{b:i1.exports.f}});
 assertEq(i2.exports.call(0), 0x42);
 assertEq(i2.exports.call(1), 0x13);
 
 var m = new Module(wasmTextToBinary(`(module
     (import $val "a" "val" (global i32))
     (import $next "a" "next" (result i32))
     (memory 1)
-    (func $start (i32.store (i32.const 0) (get_global $val)))
+    (func $start (i32.store (i32.const 0) (global.get $val)))
     (start $start)
     (func $call (result i32)
         (i32.add
-            (get_global $val)
+            (global.get $val)
             (i32.add
                 (i32.load (i32.const 0))
                 (call $next))))
     (export "call" $call)
 )`));
 var e = {call:() => 1000};
 for (var i = 0; i < 10; i++)
     e = new Instance(m, {a:{val:i, next:e.call}}).exports;
@@ -755,32 +755,32 @@ assertEq(e.call(), 1090);
     i = wasmEvalText(`(module
         (import $ffi "a" "ffi" (param i32) (result i32))
 
         (import $missingOneArg "a" "sum" (param i32) (param i32) (result i32))
         (import $missingTwoArgs "a" "sum" (param i32) (result i32))
         (import $missingThreeArgs "a" "sum" (result i32))
 
         (func (export "foo") (param i32) (result i32)
-         get_local 0
+         local.get 0
          call $ffi
         )
 
         (func (export "missThree") (result i32)
          call $missingThreeArgs
         )
 
         (func (export "missTwo") (param i32) (result i32)
-         get_local 0
+         local.get 0
          call $missingTwoArgs
         )
 
         (func (export "missOne") (param i32) (param i32) (result i32)
-         get_local 0
-         get_local 1
+         local.get 0
+         local.get 1
          call $missingOneArg
         )
     )`, imports).exports;
 
     // Enable the jit exit for each JS callee.
     assertEq(i.foo(0), 42);
 
     assertEq(i.missThree(), 0);
--- a/js/src/jit-test/tests/wasm/integer.js
+++ b/js/src/jit-test/tests/wasm/integer.js
@@ -2,99 +2,99 @@ assertEq(wasmEvalText('(module (func (re
 assertEq(wasmEvalText('(module (func (result i32) (i32.const -2147483648)) (export "" 0))').exports[""](), -2147483648);
 assertEq(wasmEvalText('(module (func (result i32) (i32.const 4294967295)) (export "" 0))').exports[""](), -1);
 
 function testUnary(type, opcode, op, expect) {
     if (type === 'i64') {
         // Test with constant
         wasmFullPassI64(`(module (func $run (result ${type}) (${type}.${opcode} (${type}.const ${op}))))`, expect);
         // Test with param
-        wasmFullPassI64(`(module (func $run (param ${type}) (result ${type}) (${type}.${opcode} (get_local 0))))`, expect, {}, `i64.const ${op}`);
+        wasmFullPassI64(`(module (func $run (param ${type}) (result ${type}) (${type}.${opcode} (local.get 0))))`, expect, {}, `i64.const ${op}`);
         return;
     }
     // Test with constant
     wasmFullPass(`(module (func (result ${type}) (${type}.${opcode} (${type}.const ${op}))) (export "run" 0))`, expect);
     // Test with param
-    wasmFullPass(`(module (func (param ${type}) (result ${type}) (${type}.${opcode} (get_local 0))) (export "run" 0))`, expect, {}, op);
+    wasmFullPass(`(module (func (param ${type}) (result ${type}) (${type}.${opcode} (local.get 0))) (export "run" 0))`, expect, {}, op);
 }
 
 function testBinary64(opcode, lhs, rhs, expect) {
     let lsrc = `i64.const ${lhs}`;
     let rsrc = `i64.const ${rhs}`;
-    wasmFullPassI64(`(module (func $run (param i64) (param i64) (result i64) (i64.${opcode} (get_local 0) (get_local 1))))`, expect, {}, lsrc, rsrc);
+    wasmFullPassI64(`(module (func $run (param i64) (param i64) (result i64) (i64.${opcode} (local.get 0) (local.get 1))))`, expect, {}, lsrc, rsrc);
     // The same, but now the RHS is a constant.
-    wasmFullPassI64(`(module (func $run (param i64) (result i64) (i64.${opcode} (get_local 0) (i64.const ${rhs}))))`, expect, {}, lsrc);
+    wasmFullPassI64(`(module (func $run (param i64) (result i64) (i64.${opcode} (local.get 0) (i64.const ${rhs}))))`, expect, {}, lsrc);
     // LHS and RHS are constants.
     wasmFullPassI64(`(module (func $run (result i64) (i64.${opcode} (i64.const ${lhs}) (i64.const ${rhs}))))`, expect);
 }
 
 function testBinary32(opcode, lhs, rhs, expect) {
-    wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (get_local 0) (get_local 1))) (export "run" 0))`, expect, {}, lhs, rhs);
+    wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (local.get 0) (local.get 1))) (export "run" 0))`, expect, {}, lhs, rhs);
     // The same, but now the RHS is a constant.
-    wasmFullPass(`(module (func (param i32) (result i32) (i32.${opcode} (get_local 0) (i32.const ${rhs}))) (export "run" 0))`, expect, {}, lhs);
+    wasmFullPass(`(module (func (param i32) (result i32) (i32.${opcode} (local.get 0) (i32.const ${rhs}))) (export "run" 0))`, expect, {}, lhs);
     // LHS and RHS are constants.
     wasmFullPass(`(module (func (result i32) (i32.${opcode} (i32.const ${lhs}) (i32.const ${rhs}))) (export "run" 0))`, expect);
 }
 
 function testComparison32(opcode, lhs, rhs, expect) {
-    wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (get_local 0) (get_local 1))) (export "run" 0))`, expect, {}, lhs, rhs);
+    wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (local.get 0) (local.get 1))) (export "run" 0))`, expect, {}, lhs, rhs);
 }
 function testComparison64(opcode, lhs, rhs, expect) {
     let lsrc = `i64.const ${lhs}`;
     let rsrc = `i64.const ${rhs}`;
 
     wasmFullPass(`(module
-                    (func $cmp (param i64) (param i64) (result i32) (i64.${opcode} (get_local 0) (get_local 1)))
+                    (func $cmp (param i64) (param i64) (result i32) (i64.${opcode} (local.get 0) (local.get 1)))
                     (func $assert (result i32)
                      i64.const ${lhs}
                      i64.const ${rhs}
                      call $cmp
                     )
                     (export "run" $assert))`, expect);
 
     // Also test `if`, for the compare-and-branch path.
     wasmFullPass(`(module
                     (func $cmp (param i64) (param i64) (result i32)
-                      (if i32 (i64.${opcode} (get_local 0) (get_local 1))
+                      (if i32 (i64.${opcode} (local.get 0) (local.get 1))
                        (i32.const 1)
                        (i32.const 0)))
                     (func $assert (result i32)
                      i64.const ${lhs}
                      i64.const ${rhs}
                      call $cmp
                     )
                     (export "run" $assert))`, expect);
 }
 
 function testI64Eqz(input, expect) {
     wasmFullPass(`(module (func (result i32) (i64.eqz (i64.const ${input}))) (export "run" 0))`, expect, {});
     wasmFullPass(`(module
-        (func (param i64) (result i32) (i64.eqz (get_local 0)))
+        (func (param i64) (result i32) (i64.eqz (local.get 0)))
         (func $assert (result i32) (i64.const ${input}) (call 0))
         (export "run" $assert))`, expect);
 }
 
 function testTrap32(opcode, lhs, rhs, expect) {
-    assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (get_local 0) (get_local 1))) (export "" 0))`).exports[""](lhs, rhs), Error, expect);
+    assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (local.get 0) (local.get 1))) (export "" 0))`).exports[""](lhs, rhs), Error, expect);
     // The same, but now the RHS is a constant.
-    assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (result i32) (i32.${opcode} (get_local 0) (i32.const ${rhs}))) (export "" 0))`).exports[""](lhs), Error, expect);
+    assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (result i32) (i32.${opcode} (local.get 0) (i32.const ${rhs}))) (export "" 0))`).exports[""](lhs), Error, expect);
     // LHS and RHS are constants.
     assertErrorMessage(wasmEvalText(`(module (func (result i32) (i32.${opcode} (i32.const ${lhs}) (i32.const ${rhs}))) (export "" 0))`).exports[""], Error, expect);
 }
 
 function testTrap64(opcode, lhs, rhs, expect) {
     let $call = ``;
 
     assertErrorMessage(wasmEvalText(`(module
-        (func (param i64) (param i64) (result i64) (i64.${opcode} (get_local 0) (get_local 1)))
+        (func (param i64) (param i64) (result i64) (i64.${opcode} (local.get 0) (local.get 1)))
         (func $f (export "") (i64.const ${lhs}) (i64.const ${rhs}) (call 0) drop)
     )`).exports[""], Error, expect);
     // The same, but now the RHS is a constant.
     assertErrorMessage(wasmEvalText(`(module
-        (func (param i64) (result i64) (i64.${opcode} (get_local 0) (i64.const ${rhs})))
+        (func (param i64) (result i64) (i64.${opcode} (local.get 0) (i64.const ${rhs})))
         (func $f (export "") (i64.const ${lhs}) (call 0) drop)
     )`).exports[""], Error, expect);
     // LHS and RHS are constants.
     assertErrorMessage(wasmEvalText(`(module
         (func (result i64) (i64.${opcode} (i64.const ${lhs}) (i64.const ${rhs})))
         (func $f (export "") (call 0) drop)
     )`).exports[""], Error, expect);
 }
@@ -169,17 +169,17 @@ testComparison32('ge_s', 40, 40, 1);
 testComparison32('ge_u', 40, 40, 1);
 
 // On 32-bit debug builds, with --ion-eager, this test can run into our
 // per-process JIT code limits and OOM. Trigger a GC to discard code.
 if (getJitCompilerOptions()["ion.warmup.trigger"] === 0)
     gc();
 
 // Test MTest's GVN branch inversion.
-var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if i32 (i32.eqz (i32.trunc_s/f32 (get_local 0))) (i32.const 0) (i32.const 1))) (export "" 0))`).exports[""];
+var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if i32 (i32.eqz (i32.trunc_s/f32 (local.get 0))) (i32.const 0) (i32.const 1))) (export "" 0))`).exports[""];
 assertEq(testTrunc(0), 0);
 assertEq(testTrunc(13.37), 1);
 
 testBinary64('add', 40, 2, 42);
 testBinary64('add', "0x1234567887654321", -1, "0x1234567887654320");
 testBinary64('add', "0xffffffffffffffff", 1, 0);
 testBinary64('sub', 40, 2, 38);
 testBinary64('sub', "0x1234567887654321", "0x123456789", "0x12345677641fdb98");
@@ -363,31 +363,31 @@ testUnary('i64', 'popcnt', "0x0030000000
 testUnary('i64', 'popcnt', "0x0000800000000000", 1);
 testUnary('i64', 'popcnt', "0x00000000ffffffff", 32);
 testUnary('i64', 'popcnt', -1, 64);
 testUnary('i64', 'popcnt', 0, 0);
 
 testI64Eqz(40, 0);
 testI64Eqz(0, 1);
 
-wasmAssert(`(module (func $run (param i64) (result i64) (local i64) (set_local 1 (i64.shl (get_local 0) (get_local 0))) (i64.shl (get_local 1) (get_local 1))))`,
+wasmAssert(`(module (func $run (param i64) (result i64) (local i64) (local.set 1 (i64.shl (local.get 0) (local.get 0))) (i64.shl (local.get 1) (local.get 1))))`,
            [{ type: 'i64', func: '$run', args: ['i64.const 2'], expected: 2048}]);
 
 // Test MTest's GVN branch inversion.
-var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if i32 (i64.eqz (i64.trunc_s/f32 (get_local 0))) (i32.const 0) (i32.const 1))) (export "" 0))`).exports[""];
+var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if i32 (i64.eqz (i64.trunc_s/f32 (local.get 0))) (i32.const 0) (i32.const 1))) (export "" 0))`).exports[""];
 assertEq(testTrunc(0), 0);
 assertEq(testTrunc(13.37), 1);
 
-wasmAssert(`(module (func $run (result i64) (local i64) (set_local 0 (i64.rem_s (i64.const 1) (i64.const 0xf))) (i64.rem_s (get_local 0) (get_local 0))))`,
+wasmAssert(`(module (func $run (result i64) (local i64) (local.set 0 (i64.rem_s (i64.const 1) (i64.const 0xf))) (i64.rem_s (local.get 0) (local.get 0))))`,
            [{ type: 'i64', func: '$run', expected: 0 }]);
 
-wasmFailValidateText('(module (func (param f32) (result i32) (i32.clz (get_local 0))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (result f32) (i32.clz (get_local 0))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (result f32) (i32.clz (get_local 0))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param f32) (result i32) (i32.clz (local.get 0))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (result f32) (i32.clz (local.get 0))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (result f32) (i32.clz (local.get 0))))', mismatchError("f32", "i32"));
 
-wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.add (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
-wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (i32.add (get_local 0) (get_local 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (i32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32"));
 
-wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.eq (get_local 0) (get_local 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.eq (get_local 0) (get_local 1))))', mismatchError("f32", "i32"));
-wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.eq (get_local 0) (get_local 1))))', mismatchError("i32", "f32"));
+wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.eq (local.get 0) (local.get 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.eq (local.get 0) (local.get 1))))', mismatchError("f32", "i32"));
+wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32"));
--- a/js/src/jit-test/tests/wasm/ion-args.js
+++ b/js/src/jit-test/tests/wasm/ion-args.js
@@ -1,26 +1,26 @@
 let { exports } = wasmEvalText(`(module
     (func (export "i32") (result i32) (param i32)
-     get_local 0
+     local.get 0
     )
 
     (func (export "f32") (result f32) (param f32)
-     get_local 0
+     local.get 0
     )
 
     (func (export "f64") (result f64) (param f64)
-     get_local 0
+     local.get 0
     )
 
     (func (export "mixed_args") (result f64)
         (param i32) (param i32) (param i32) (param i32) (param i32) ;; 5 i32
         (param $f64 f64) ;; 1 f64
         (param i32)
-     get_local $f64
+     local.get $f64
     )
 )`);
 
 const options = getJitCompilerOptions();
 const jitThreshold = options['ion.warmup.trigger'] * 2 + 2;
 
 let coercions = {
     i32(x) { return x|0; },
@@ -77,34 +77,34 @@ function call(func, coercion, arg) {
 })();
 
 // Test high number of arguments.
 // All integers.
 let {func} = wasmEvalText(`(module
     (func (export "func") (result i32)
         ${Array(32).join('(param i32)')}
         (param $last i32)
-     get_local $last
+     local.get $last
     )
 )`).exports;
 
 (function() {
     for (let i = 0; i < 10; i++) {
         assertEq(func(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9, i+10, i+11, i+12, i+13, i+14, i+15,
                       i+16, i+17, i+18, i+19, i+20, i+21, i+22, i+23, i+24, i+25, i+26, i+27, i+28, i+29, i+30, i+31
                  ), i+31);
     }
 })();
 
 // All floats.
 func = wasmEvalText(`(module
     (func (export "func") (result i32)
         ${Array(32).join('(param f64)')}
         (param $last i32)
-     get_local $last
+     local.get $last
     )
 )`).exports.func;
 
 (function() {
     for (let i = 0; i < 10; i++) {
         assertEq(func(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9, i+10, i+11, i+12, i+13, i+14, i+15,
                       i+16, i+17, i+18, i+19, i+20, i+21, i+22, i+23, i+24, i+25, i+26, i+27, i+28, i+29, i+30, i+31
                  ), i+31);
@@ -119,17 +119,17 @@ for (let i = 0; i < 32; i++) {
                 'f64'
                );
 }
 
 func = wasmEvalText(`(module
     (func (export "func") (result i32)
         ${Array(32).join('(param f64)')}
         (param $last i32)
-     get_local $last
+     local.get $last
     )
 )`).exports.func;
 
 (function() {
     for (let i = 0; i < 10; i++) {
         assertEq(func(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9, i+10, i+11, i+12, i+13, i+14, i+15,
                       i+16, i+17, i+18, i+19, i+20, i+21, i+22, i+23, i+24, i+25, i+26, i+27, i+28, i+29, i+30, i+31
                  ), i+31);
--- a/js/src/jit-test/tests/wasm/ion-error-i64.js
+++ b/js/src/jit-test/tests/wasm/ion-error-i64.js
@@ -5,31 +5,31 @@ const { nextLineNumber, startProfiling, 
 
 const options = getJitCompilerOptions();
 const TRIGGER = options['ion.warmup.trigger'] + 10;
 const ITER = 2 * TRIGGER;
 const EXCEPTION_ITER = ITER - 2;
 
 var instance = wasmEvalText(`(module
     (func $add (export "add") (result i32) (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i32.add
     )
 
     (func $addi64 (export "add64") (result i64) (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      call $add
      i64.extend_s/i32
     )
 
     (func $add_two_i64 (export "add_two_i64") (result i64) (param i64) (param i64)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i64.add
     )
 )`).exports;
 
 (function() {
     // In ion-eager mode, make sure we don't try to inline a function that
     // takes or returns i64 arguments.
     assertErrorMessage(() => instance.add_two_i64(0, 1), TypeError, /cannot pass i64 to or from JS/);
--- a/js/src/jit-test/tests/wasm/ion-error-ool.js
+++ b/js/src/jit-test/tests/wasm/ion-error-ool.js
@@ -14,18 +14,18 @@ const INLINED_CALL_STACK = ['', '0', '']
 const FAST_OOL_ENTRY_STACK = ['', '>', '<,>', 'ool>,>', '<,>', '>', '0,>', '>', ''];
 const EXCEPTION_ENTRY_STACK = ['', '>', '<,>', 'ool>,>', '<,>', '>', ''];
 
 enableGeckoProfiling();
 
 for (let type of ['i32', 'f32', 'f64']) {
     var instance = wasmEvalText(`(module
         (func $add (export "add") (result ${type}) (param ${type}) (param ${type})
-         get_local 0
-         get_local 1
+         local.get 0
+         local.get 1
          ${type}.add
         )
     )`).exports;
 
     function loopBody(a, b) {
         var caught = null;
         try {
             instance.add(a, b);
--- a/js/src/jit-test/tests/wasm/ion-error-throw.js
+++ b/js/src/jit-test/tests/wasm/ion-error-throw.js
@@ -2,25 +2,25 @@
 // These tests need at least baseline to make sense.
 
 const { assertStackTrace, startProfiling, endProfiling, assertEqPreciseStacks } = WasmHelpers;
 
 enableGeckoProfiling();
 
 let { add } = wasmEvalText(`(module
     (func $add (export "add") (result i32) (param i32) (param i32)
-     get_local 0
+     local.get 0
      i32.const 42
      i32.eq
      if
          unreachable
      end
 
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i32.add
     )
 )`).exports;
 
 const SLOW_ENTRY_STACK = ['', '!>', '0,!>', '!>', ''];
 const FAST_ENTRY_STACK = ['', '>', '0,>', '>', ''];
 const INLINED_CALL_STACK = ['', '0', ''];
 
--- a/js/src/jit-test/tests/wasm/ion-error-trace.js
+++ b/js/src/jit-test/tests/wasm/ion-error-trace.js
@@ -15,30 +15,30 @@ var imports = {
             debug();
         }
     }
 };
 
 var instance = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module
     (import $main "main" "f" (func))
     (func $lol (export "add") (result i32) (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      call $add
     )
     (func $add (result i32) (param i32) (param i32)
-     get_local 0
+     local.get 0
      i32.const 5000
      i32.eq
      if
          call $main
      end
 
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i32.add
     )
 )`)), imports).exports;
 
 function loopBody(i) {
     var caught = null;
     try {
         assertEq(instance.add(i, i), 2 * i);
@@ -78,31 +78,31 @@ var imports = {
             debug();
         }
     }
 };
 
 var instance = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module
     (import $main "main" "f" (func))
     (func $lol (export "add") (result i32) (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      call $add
     )
     (func $add (result i32) (param i32) (param i32)
-     get_local 0
+     local.get 0
      i32.const 5000
      i32.eq
      if
          call $main
          unreachable
      end
 
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i32.add
     )
 )`)), imports).exports;
 
 function loopBody(i) {
     var caught = null;
     try {
         assertEq(instance.add(i, i), 2 * i);
--- a/js/src/jit-test/tests/wasm/ion-gc.js
+++ b/js/src/jit-test/tests/wasm/ion-gc.js
@@ -4,18 +4,18 @@
 const options = getJitCompilerOptions();
 const TRIGGER = options['baseline.warmup.trigger'] + 10;
 const ITER = 2 * TRIGGER;
 const EXCEPTION_ITER = TRIGGER + 5;
 
 for (let type of ['i32', 'f32', 'f64']) {
     var instance = wasmEvalText(`(module
         (func $add (export "add") (result ${type}) (param ${type}) (param ${type})
-         get_local 0
-         get_local 1
+         local.get 0
+         local.get 1
          ${type}.add
         )
     )`).exports;
 
     function loopBody(a, b) {
         var caught = null;
         try {
             instance.add(a, b);
--- a/js/src/jit-test/tests/wasm/ion-lazy-tables.js
+++ b/js/src/jit-test/tests/wasm/ion-lazy-tables.js
@@ -11,18 +11,18 @@ const EXCEPTION_ITER = TRIGGER + 5;
 const SLOW_ENTRY_STACK = ['', '!>', '0,!>', '!>', ''];
 const FAST_ENTRY_STACK = ['', '>', '0,>', '>', ''];
 const INLINED_CALL_STACK = ['', '0', ''];
 const EXPECTED_STACKS = [SLOW_ENTRY_STACK, FAST_ENTRY_STACK, INLINED_CALL_STACK];
 
 function main() {
     var { table } = wasmEvalText(`(module
         (func $add (result i32) (param i32) (param i32)
-         get_local 0
-         get_local 1
+         local.get 0
+         local.get 1
          i32.add
         )
         (table (export "table") 10 funcref)
         (elem (i32.const 0) $add)
     )`).exports;
 
     for (var i = 0; i < ITER; i++) {
         startProfiling();
@@ -31,18 +31,18 @@ function main() {
     }
 }
 
 function withTier2() {
     setJitCompilerOption('wasm.delay-tier2', 1);
 
     var module = new WebAssembly.Module(wasmTextToBinary(`(module
         (func $add (result i32) (param i32) (param i32)
-         get_local 0
-         get_local 1
+         local.get 0
+         local.get 1
          i32.add
         )
         (table (export "table") 10 funcref)
         (elem (i32.const 0) $add)
     )`));
     var { table } = new WebAssembly.Instance(module).exports;
 
     let i = 0;
--- a/js/src/jit-test/tests/wasm/ion2wasm.js
+++ b/js/src/jit-test/tests/wasm/ion2wasm.js
@@ -1,40 +1,40 @@
 var ITERATIONS = 10;
 var INNER_ITERATIONS = 100;
 
 let instance = wasmEvalText(`(module
     (func (export "add") (result i32) (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i32.add
     )
 
     (func (export "no_arg") (result i32)
      i32.const 42
      i32.const 58
      i32.add
     )
 
     (global $g (mut i32) (i32.const 0))
 
     (func (export "set_global_one") (param i32)
-     get_local 0
-     set_global $g
+     local.get 0
+     global.set $g
     )
 
     (func (export "set_global_two") (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      i32.add
-     set_global $g
+     global.set $g
     )
 
     (func (export "glob") (result i32)
-     get_global $g
+     global.get $g
     )
 )`).exports;
 
 function run(name, func) {
     for (let i = ITERATIONS; i --> 0;) {
         func();
     }
 }
--- a/js/src/jit-test/tests/wasm/memory-aliasing.js
+++ b/js/src/jit-test/tests/wasm/memory-aliasing.js
@@ -1,21 +1,21 @@
 var i = wasmEvalText(
 `(module
    (memory 1) (data (i32.const 0) "\\01\\02\\03\\04\\05\\06\\07\\08")
    (func $off1 (param $base i32) (result i32)
      (i32.add
-       (i32.load8_u (get_local $base))
-       (i32.load8_u offset=1 (get_local $base)))
+       (i32.load8_u (local.get $base))
+       (i32.load8_u offset=1 (local.get $base)))
    )
    (export "off1" $off1)
    (func $off2 (param $base i32) (result i32)
      (i32.add
-       (i32.load8_u offset=1 (get_local $base))
-       (i32.load8_u offset=2 (get_local $base)))
+       (i32.load8_u offset=1 (local.get $base))
+       (i32.load8_u offset=2 (local.get $base)))
    )
    (export "off2" $off2)
 )`).exports;
 assertEq(i.off1(0), 3);
 assertEq(i.off1(1), 5);
 assertEq(i.off1(2), 7);
 assertEq(i.off1(3), 9);
 assertEq(i.off2(0), 5);
--- a/js/src/jit-test/tests/wasm/memory-sharing.js
+++ b/js/src/jit-test/tests/wasm/memory-sharing.js
@@ -60,56 +60,56 @@ const WASMPAGE = 65536;
 		       /maximum length required for shared memory/);
 }
 
 // Importing shared memory and being provided with shared should work
 
 {
     let text = `(module
 		 (memory (import "" "memory") 1 1 shared)
-		 (func (export "id") (param i32) (result i32) (get_local 0)))`;
+		 (func (export "id") (param i32) (result i32) (local.get 0)))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(text));
     let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true});
     let ins = new WebAssembly.Instance(mod, {"": {memory: mem}});
     assertEq(ins.exports.id(0x12345678), 0x12345678);
 }
 
 // Importing shared memory but being provided with unshared should fail
 
 {
     let text = `(module
 		 (memory (import "" "memory") 1 1 shared)
-		 (func (export "id") (param i32) (result i32) (get_local 0)))`;
+		 (func (export "id") (param i32) (result i32) (local.get 0)))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(text));
     let mem = new WebAssembly.Memory({initial: 1, maximum: 1});
     assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem}}),
 		       WebAssembly.LinkError,
 		       /unshared memory but shared required/);
 }
 
 // Importing unshared memory but being provided with shared should fail
 
 {
     let text = `(module
 		 (memory (import "" "memory") 1 1)
-		 (func (export "id") (param i32) (result i32) (get_local 0)))`;
+		 (func (export "id") (param i32) (result i32) (local.get 0)))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(text));
     let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true});
     assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem}}),
 		       WebAssembly.LinkError,
 		       /shared memory but unshared required/);
 }
 
 // Importing shared memory and being provided with shared memory with
 // incompatible parameters should fail
 
 {
     let text = `(module
 		 (memory (import "" "memory") 2 4 shared)
-		 (func (export "id") (param i32) (result i32) (get_local 0)))`;
+		 (func (export "id") (param i32) (result i32) (local.get 0)))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(text));
 
     // some cases that are non-matching are allowed, eg, initial > declared min
 
     // initial < declared min
     let mem3 = new WebAssembly.Memory({initial: 1, maximum: 4, shared: true});
     assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem3}}),
 		       WebAssembly.LinkError,
@@ -132,18 +132,18 @@ const WASMPAGE = 65536;
 // basic memory.size and memory.grow operation, with bounds checking near the
 // valid/invalid boundary
 
 {
     let text = `(module
 		 (memory (export "memory") 2 4 shared)
 		 (func (export "c") (result i32) memory.size)
 		 (func (export "g") (result i32) (memory.grow (i32.const 1)))
-		 (func (export "l") (param i32) (result i32) (i32.load (get_local 0)))
-		 (func (export "s") (param i32) (param i32) (i32.store (get_local 0) (get_local 1))))`;
+		 (func (export "l") (param i32) (result i32) (i32.load (local.get 0)))
+		 (func (export "s") (param i32) (param i32) (i32.store (local.get 0) (local.get 1))))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(text));
     let ins = new WebAssembly.Instance(mod);
     let exp = ins.exports;
     let mem = exp.memory;
 
     let b1 = mem.buffer;
     assertEq(exp.c(), 2);
     assertEq(b1.byteLength, WASMPAGE*2);
@@ -195,16 +195,16 @@ const WASMPAGE = 65536;
 }
 
 // Initializing shared memory with data
 
 {
     let text = `(module
 		 (memory (import "" "memory") 2 4 shared)
 		 (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz")
-		 (func (export "l") (param i32) (result i32) (i32.load8_u (get_local 0))))`;
+		 (func (export "l") (param i32) (result i32) (i32.load8_u (local.get 0))))`;
     let mod = new WebAssembly.Module(wasmTextToBinary(text));
     let mem = new WebAssembly.Memory({initial: 2, maximum: 4, shared: true});
     let ins = new WebAssembly.Instance(mod, {"": {memory: mem}});
     let exp = ins.exports;
     assertEq(exp.l(12), "a".charCodeAt(0) + 12);
 }
 
--- a/js/src/jit-test/tests/wasm/memory.js
+++ b/js/src/jit-test/tests/wasm/memory.js
@@ -6,17 +6,17 @@ function loadModuleSrc(type, ext, offset
     return `(module
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (func $load (param i32) ${maybeResult}
          (${type}.load${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 0)
+          (local.get 0)
          )
          ${maybeDrop}
        ) (export "" 0))`;
 }
 function loadModule(type, ext, offset, align, drop = false) {
     return wasmEvalText(loadModuleSrc(type, ext, offset, align, drop)).exports[""];
 }
 
@@ -25,25 +25,25 @@ function storeModuleSrc(type, ext, offse
     return `(module
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (func $store (param i32) (param ${type})
          (${type}.store${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 0)
-          (get_local 1)
+          (local.get 0)
+          (local.get 1)
          )
        ) (export "store" 0)
        (func $load (param i32) (result ${type})
         (${type}.load${load_ext}
          offset=${offset}
          ${align != 0 ? 'align=' + align : ''}
-         (get_local 0)
+         (local.get 0)
         )
        ) (export "load" 1))`;
 }
 function storeModule(type, ext, offset, align) {
     return wasmEvalText(storeModuleSrc(type, ext, offset, align)).exports;
 }
 
 function storeModuleCstSrc(type, ext, offset, align, value) {
@@ -51,25 +51,25 @@ function storeModuleCstSrc(type, ext, of
     return `(module
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
        (func $store (param i32)
          (${type}.store${ext}
           offset=${offset}
           ${align != 0 ? 'align=' + align : ''}
-          (get_local 0)
+          (local.get 0)
           (${type}.const ${value})
          )
        ) (export "store" 0)
        (func $load (param i32) (result ${type})
         (${type}.load${load_ext}
          offset=${offset}
          ${align != 0 ? 'align=' + align : ''}
-         (get_local 0)
+         (local.get 0)
         )
        ) (export "load" 1))`;
 }
 function storeModuleCst(type, ext, offset, align, value) {
     return wasmEvalText(storeModuleCstSrc(type, ext, offset, align, value)).exports;
 }
 
 function testLoad(type, ext, base, offset, align, expect) {
@@ -117,21 +117,21 @@ function testStoreOOB(type, ext, base, o
             [{type, func: '$store', args: [`i32.const ${base}`, `i64.const ${value}`]}]
         ), RuntimeError, /index out of bounds/);
     } else {
         assertErrorMessage(() => storeModule(type, ext, offset, align).store(base, value), RuntimeError, /index out of bounds/);
     }
 }
 
 function badLoadModule(type, ext) {
-    wasmFailValidateText( `(module (func (param i32) (${type}.load${ext} (get_local 0))) (export "" 0))`, /can't touch memory/);
+    wasmFailValidateText( `(module (func (param i32) (${type}.load${ext} (local.get 0))) (export "" 0))`, /can't touch memory/);
 }
 
 function badStoreModule(type, ext) {
-    wasmFailValidateText(`(module (func (param i32) (${type}.store${ext} (get_local 0) (${type}.const 0))) (export "" 0))`, /can't touch memory/);
+    wasmFailValidateText(`(module (func (param i32) (${type}.store${ext} (local.get 0) (${type}.const 0))) (export "" 0))`, /can't touch memory/);
 }
 
 // Can't touch memory.
 for (let [type, ext] of [
     ['i32', ''],
     ['i32', '8_s'],
     ['i32', '8_u'],
     ['i32', '16_s'],
@@ -305,40 +305,40 @@ for (var foldOffsets = 0; foldOffsets <=
         // Test high number of registers.
         function testRegisters() {
             assertEq(wasmEvalText(
                 `(module
               (memory 1)
               (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
               (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
               (func (param i32) (local i32 i32 i32 i32 f32 f64) (result i32)
-               (set_local 1 (i32.load8_s offset=4 (get_local 0)))
-               (set_local 2 (i32.load16_s (get_local 1)))
-               (i32.store8 offset=4 (get_local 0) (get_local 1))
-               (set_local 3 (i32.load16_u (get_local 2)))
-               (i32.store16 (get_local 1) (get_local 2))
-               (set_local 4 (i32.load (get_local 2)))
-               (i32.store (get_local 1) (get_local 2))
-               (set_local 5 (f32.load (get_local 4)))
-               (f32.store (get_local 4) (get_local 5))
-               (set_local 6 (f64.load (get_local 4)))
-               (f64.store (get_local 4) (get_local 6))
+               (local.set 1 (i32.load8_s offset=4 (local.get 0)))
+               (local.set 2 (i32.load16_s (local.get 1)))
+               (i32.store8 offset=4 (local.get 0) (local.get 1))
+               (local.set 3 (i32.load16_u (local.get 2)))
+               (i32.store16 (local.get 1) (local.get 2))
+               (local.set 4 (i32.load (local.get 2)))
+               (i32.store (local.get 1) (local.get 2))
+               (local.set 5 (f32.load (local.get 4)))
+               (f32.store (local.get 4) (local.get 5))
+               (local.set 6 (f64.load (local.get 4)))
+               (f64.store (local.get 4) (local.get 6))
                (i32.add
                 (i32.add
-                 (get_local 0)
-                 (get_local 1)
+                 (local.get 0)
+                 (local.get 1)
                 )
                 (i32.add
                  (i32.add
-                  (get_local 2)
-                  (get_local 3)
+                  (local.get 2)
+                  (local.get 3)
                  )
                  (i32.add
-                  (get_local 4)
-                  (i32.reinterpret/f32 (get_local 5))
+                  (local.get 4)
+                  (i32.reinterpret/f32 (local.get 5))
                  )
                 )
                )
               ) (export "" 0))`
             ).exports[""](1), 50464523);
         }
 
         testRegisters();
--- a/js/src/jit-test/tests/wasm/nan-semantics.js
+++ b/js/src/jit-test/tests/wasm/nan-semantics.js
@@ -79,51 +79,51 @@ wasmAssert(`(module
     (global (mut f32) (f32.const 0))
     (global (mut f64) (f64.const 0))
 
     ;; An example where a signaling nan gets transformed into a quiet nan:
     ;; snan + 0.0 = qnan
     (func $add (result f32) (f32.add ${f32_snan_code} (f32.const 0)))
 
     ;; Shouldn't affect NaNess.
-    (func $set_get_global_f32 (result f32)
+    (func $global.set.get_f32 (result f32)
         ${f32_snan_code}
-        set_global 0
-        get_global 0
+        global.set 0
+        global.get 0
     )
 
     ;; Shouldn't affect NaNess.
-    (func $set_get_global_f64 (result f64)
+    (func $global.set.get_f64 (result f64)
         ${f64_snan_code}
-        set_global 1
-        get_global 1
+        global.set 1
+        global.get 1
     )
 )`, [
     { type: 'f32', func: '$add', expected: f32_qnan },
-    { type: 'f32', func: '$set_get_global_f32', expected: f32_snan },
-    { type: 'f64', func: '$set_get_global_f64', expected: f64_snan },
+    { type: 'f32', func: '$global.set.get_f32', expected: f32_snan },
+    { type: 'f64', func: '$global.set.get_f64', expected: f64_snan },
 ]);
 
 // NaN propagation behavior.
 function test(type, opcode, lhs_code, rhs_code) {
     let qnan_code = type === 'f32' ? f32_qnan : f64_qnan;
 
     let t = type;
     let op = opcode;
 
     // Test all forms:
     // - (constant, constant),
     // - (constant, variable),
     // - (variable, constant),
     // - (variable, variable)
     wasmAssert(`(module
         (func $1 (result ${t}) (${t}.${op} ${lhs_code} ${rhs_code}))
-        (func $2 (param ${t}) (result ${t}) (${t}.${op} (get_local 0) ${rhs_code}))
-        (func $3 (param ${t}) (result ${t}) (${t}.${op} ${lhs_code} (get_local 0)))
-        (func $4 (param ${t}) (param ${t}) (result ${t}) (${t}.${op} (get_local 0) (get_local 1)))
+        (func $2 (param ${t}) (result ${t}) (${t}.${op} (local.get 0) ${rhs_code}))
+        (func $3 (param ${t}) (result ${t}) (${t}.${op} ${lhs_code} (local.get 0)))
+        (func $4 (param ${t}) (param ${t}) (result ${t}) (${t}.${op} (local.get 0) (local.get 1)))
     )`, [
         { type, func: '$1', expected: qnan_code },
         { type, func: '$2', args: [lhs_code], expected: qnan_code },
         { type, func: '$3', args: [rhs_code], expected: qnan_code },
         { type, func: '$4', args: [lhs_code, rhs_code], expected: qnan_code },
     ]);
 }
 
--- a/js/src/jit-test/tests/wasm/passive-segs-nonboundary.js
+++ b/js/src/jit-test/tests/wasm/passive-segs-nonboundary.js
@@ -55,17 +55,17 @@ function gen_tab_impmod_t(insn)
      (func (result i32) (i32.const 8))
      (func (result i32) (i32.const 9))  ;; index 9
 
      (func (export "setup")
        ${insn})
      (func (export "check") (param i32) (result i32)
        ;; call the selected table entry, which will either return a value,
        ;; or will cause an exception.
-       get_local 0      ;; callIx
+       local.get 0      ;; callIx
        call_indirect 0  ;; and its return value is our return value.
      )
    )`;
    return t;
 };
 
 // This is the test driver.  It constructs the abovementioned module, using
 // the given |instruction| to modify the table, and then probes the table
@@ -349,17 +349,17 @@ checkPassiveElemSegment("end", /failed t
            (elem (i32.const 6) $m)
            (elem (i32.const 8) $m)
            (elem passive $f ref.null $g ref.null $h)
            (func $m)
            (func $f)
            (func $g)
            (func $h)
            (func (export "doit") (param $idx i32)
-             (table.init 4 (get_local $idx) (i32.const 0) (i32.const 5))))`;
+             (table.init 4 (local.get $idx) (i32.const 0) (i32.const 5))))`;
     let ins = wasmEvalText(txt);
     ins.exports.doit(0);
     ins.exports.doit(5);
     assertEq(typeof ins.exports.t.get(0), "function");
     assertEq(ins.exports.t.get(1), null);
     assertEq(typeof ins.exports.t.get(2), "function");
     assertEq(ins.exports.t.get(0) == ins.exports.t.get(2), false);
     assertEq(ins.exports.t.get(3), null);
--- a/js/src/jit-test/tests/wasm/passive-segs-partial-mem.js
+++ b/js/src/jit-test/tests/wasm/passive-segs-partial-mem.js
@@ -18,17 +18,17 @@ const PAGESIZE = 65536;
 // Arithmetic overflow of memory offset + len should not affect the behavior, we
 // should still fill up to the limit.
 
 function mem_fill(min, max, shared, backup, write=backup*2) {
     let ins = wasmEvalText(
         `(module
            (memory (export "mem") ${min} ${max} ${shared})
            (func (export "run") (param $offs i32) (param $val i32) (param $len i32)
-             (memory.fill (get_local $offs) (get_local $val) (get_local $len))))`);
+             (memory.fill (local.get $offs) (local.get $val) (local.get $len))))`);
     // A fill past the end should throw *and* have filled all the way up to the end
     let offs = min*PAGESIZE - backup;
     let val = 37;
     assertErrorMessage(() => ins.exports.run(offs, val, write),
                        WebAssembly.RuntimeError,
                        /index out of bounds/);
     let v = new Uint8Array(ins.exports.mem.buffer);
     for (let i=0; i < backup; i++)
@@ -55,17 +55,17 @@ mem_fill(2, 4, "shared", 257, 0xFFFFFFFF
 const mem_init_len = 16;
 
 function mem_init(min, max, shared, backup, write) {
     let ins = wasmEvalText(
         `(module
            (memory (export "mem") ${min} ${max} ${shared})
            (data passive "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42")
            (func (export "run") (param $offs i32) (param $len i32)
-             (memory.init 0 (get_local $offs) (i32.const 0) (get_local $len))))`);
+             (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))`);
     // A fill writing past the end of the memory should throw *and* have filled
     // all the way up to the end.
     //
     // A fill reading past the end of the segment should throw *and* have filled
     // memory with as much data as was available.
     let offs = min*PAGESIZE - backup;
     assertErrorMessage(() => ins.exports.run(offs, write),
                        WebAssembly.RuntimeError,
@@ -113,17 +113,17 @@ mem_init(1, "", "", PAGESIZE, 0xFFFFFFFC
 // - target address oob
 // - both oob
 
 function mem_copy(min, max, shared, srcOffs, targetOffs, len, copyDown=false) {
     let ins = wasmEvalText(
         `(module
            (memory (export "mem") ${min} ${max} ${shared})
            (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
-             (memory.copy (get_local $targetOffs) (get_local $srcOffs) (get_local $len))))`);
+             (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))`);
 
     let v = new Uint8Array(ins.exports.mem.buffer);
 
     let targetAvail = v.length - targetOffs;
     let srcAvail = v.length - srcOffs;
     let targetLim = targetOffs + Math.min(len, targetAvail, srcAvail);
     let srcLim = srcOffs + Math.min(len, targetAvail, srcAvail);
     let immediateOOB = copyDown && (srcOffs + len > v.length || targetOffs + len > v.length);
--- a/js/src/jit-test/tests/wasm/passive-segs-partial-table.js
+++ b/js/src/jit-test/tests/wasm/passive-segs-partial-table.js
@@ -28,17 +28,17 @@ function tbl_init(min, max, backup, writ
            (func $f9 (export "f9"))
            (func $f10 (export "f10"))
            (func $f11 (export "f11"))
            (func $f12 (export "f12"))
            (func $f13 (export "f13"))
            (func $f14 (export "f14"))
            (func $f15 (export "f15"))
            (func (export "run") (param $offs i32) (param $len i32)
-             (table.init 0 (get_local $offs) (i32.const ${segoffs}) (get_local $len))))`);
+             (table.init 0 (local.get $offs) (i32.const ${segoffs}) (local.get $len))))`);
     // A fill writing past the end of the table should throw *and* have filled
     // all the way up to the end.
     //
     // A fill reading past the end of the segment should throw *and* have filled
     // table with as much data as was available.
     let offs = min - backup;
     assertErrorMessage(() => ins.exports.run(offs, write),
                        WebAssembly.RuntimeError,
@@ -104,17 +104,17 @@ function tbl_copy(min, max, srcOffs, tar
            (func $f9 (export "f9"))
            (func $f10 (export "f10"))
            (func $f11 (export "f11"))
            (func $f12 (export "f12"))
            (func $f13 (export "f13"))
            (func $f14 (export "f14"))
            (func $f15 (export "f15"))
            (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
-             (table.copy (get_local $targetOffs) (get_local $srcOffs) (get_local $len))))`);
+             (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))`);
 
     let tbl = ins.exports.tbl;
 
     let targetAvail = tbl.length - targetOffs;
     let srcAvail = tbl.length - srcOffs;
     let targetLim = targetOffs + Math.min(len, targetAvail, srcAvail);
     let srcLim = srcOffs + Math.min(len, targetAvail, srcAvail);
     let immediateOOB = copyDown && (srcOffs + len > tbl.length || targetOffs + len > tbl.length);
--- a/js/src/jit-test/tests/wasm/profiling.js
+++ b/js/src/jit-test/tests/wasm/profiling.js
@@ -58,29 +58,29 @@ test(
     (export "" $bar)
 )`,
 {"":{foo:()=>{}}},
 ["", ">", "1,>", "0,1,>", "<,0,1,>", "0,1,>", "1,>", ">", ""]);
 
 test(`(module
     (import $f32 "Math" "sin" (param f32) (result f32))
     (func (export "") (param f32) (result f32)
-        get_local 0
+        local.get 0
         call $f32
     )
 )`,
 this,
 ["", ">", "1,>", "<,1,>", "1,>", ">", ""]);
 
 if (getBuildConfiguration()["arm-simulator"]) {
     // On ARM, some int64 operations are calls to C++.
     for (let op of ['div_s', 'rem_s', 'div_u', 'rem_u']) {
         test(`(module
             (func (export "") (param i32) (result i32)
-                get_local 0
+                local.get 0
                 i64.extend_s/i32
                 i64.const 0x1a2b3c4d5e6f
                 i64.${op}
                 i32.wrap/i64
             )
         )`,
         this,
         ["", ">", "0,>", "<,0,>", `i64.${op},0,>`, "<,0,>", "0,>", ">", ""],
@@ -111,17 +111,17 @@ this,
 ["", ">", "0,>", "<,0,>", "memory.grow,0,>", "<,0,>", "0,>", ">", ""],
 );
 
 // A few math builtins.
 for (let type of ['f32', 'f64']) {
     for (let func of ['ceil', 'floor', 'nearest', 'trunc']) {
         test(`(module
             (func (export "") (param ${type}) (result ${type})
-                get_local 0
+                local.get 0
                 ${type}.${func}
             )
         )`,
         this,
         ["", ">", "0,>", "<,0,>", `${type}.${func},0,>`, "<,0,>", "0,>", ">", ""]);
     }
 }
 
@@ -201,17 +201,17 @@ for (let type of ['f32', 'f64']) {
     disableGeckoProfiling();
 
     var e2 = wasmEvalText(`
     (module
         (type $v2i (func (result i32)))
         (import "a" "b" (table 10 funcref))
         (elem (i32.const 2) $bar)
         (func $bar (result i32) (i32.const 99))
-        (func $baz (param $i i32) (result i32) (call_indirect $v2i (get_local $i)))
+        (func $baz (param $i i32) (result i32) (call_indirect $v2i (local.get $i)))
         (export "baz" $baz)
     )`, {a:{b:e.tbl}}).exports;
 
     enableGeckoProfiling();
     enableSingleStepProfiling();
     assertEq(e2.baz(0), 42);
     assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]);
     disableGeckoProfiling();
@@ -276,21 +276,21 @@ for (let type of ['f32', 'f64']) {
     enableGeckoProfiling();
 
     var m = new Module(wasmTextToBinary(`(module
         (import $ffi "a" "ffi" (param i32) (result i32))
 
         (import $missingOneArg "a" "sumTwo" (param i32) (result i32))
 
         (func (export "foo") (param i32) (result i32)
-         get_local 0
+         local.get 0
          call $ffi)
 
         (func (export "id") (param i32) (result i32)
-         get_local 0
+         local.get 0
          call $missingOneArg
         )
     )`));
 
     var valueToConvert = 0;
     function ffi(n) {
         new Error().stack; // enter VM to clobber FP register.
         if (n == 1337) { return valueToConvert };
@@ -383,23 +383,23 @@ for (let type of ['f32', 'f64']) {
 
  disableSingleStepProfiling();
  disableGeckoProfiling();
 })();
 
 // Ion->wasm calls.
 let func = wasmEvalText(`(module
     (func $inner (result i32) (param i32) (param i32)
-        get_local 0
-        get_local 1
+        local.get 0
+        local.get 1
         i32.add
     )
     (func (export "add") (result i32) (param i32) (param i32)
-     get_local 0
-     get_local 1
+     local.get 0
+     local.get 1
      call $inner
     )
 )`).exports.add;
 
 (function() {
     enableGeckoProfiling();
     // 10 is enough in ion eager mode.
     for (let i = 0; i < 10; i++) {
--- a/js/src/jit-test/tests/wasm/regress/baseline-arm64-chunk-pop.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-arm64-chunk-pop.js
@@ -1,27 +1,27 @@
 var bin = wasmTextToBinary(
     `(module
        (func (export "f4786") (result i32)
          (local i32 i64 i64 i64 f32)
          i32.const 1
          tee_local 0
-         get_local 0
-         get_local 0
-         get_local 0
-         get_local 0
-         get_local 0
-         get_local 0
-         get_local 0
+         local.get 0
+         local.get 0
+         local.get 0
+         local.get 0
+         local.get 0
+         local.get 0
+         local.get 0
          if i32
-           get_local 0
+           local.get 0
          else
-           get_local 0
+           local.get 0
            tee_local 0
-           get_local 0
+           local.get 0
            br_if 1
          end
          drop
          drop
          drop
          drop
          drop
          drop
--- a/js/src/jit-test/tests/wasm/regress/baseline-builtin-abi.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-builtin-abi.js
@@ -7,14 +7,14 @@ var prog = wasmEvalText(
          (local $dummy0 i32)
          (local $dummy1 i32)
          (local $dummy2 i32)
          (local $dummy3 i32)
          (local $dummy4 i32)
          (local $x f64)
          (local $y f64)
          (local $z f64)
-         (set_local $x (get_local $a))
-         (set_local $y (get_local $b))
-         (set_local $z (f64.floor (f64.div (get_local $x) (get_local $y))))
-         (get_local $z)))`);
+         (local.set $x (local.get $a))
+         (local.set $y (local.get $b))
+         (local.set $z (f64.floor (f64.div (local.get $x) (local.get $y))))
+         (local.get $z)))`);
 
 assertEq(prog.exports.test(16096, 32), 503);
--- a/js/src/jit-test/tests/wasm/regress/baseline-bytereg.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-bytereg.js
@@ -10,25 +10,25 @@
 // assembler.
 //
 // If the baseline compiler starts allocating registers in a different order
 // then this test will be ineffective.
 
 wasmEvalText(`(module
     (memory 1)
     (func $run (param i64) (param i32) (param i32)
-        get_local 1
-        get_local 2
+        local.get 1
+        local.get 2
         i32.add
 
-        get_local 1
-        get_local 2
+        local.get 1
+        local.get 2
         i32.add
 
         i32.const 0
-        get_local 0
+        local.get 0
         i64.store8
 
         drop
         drop
     )
     (export "run" $run)
 )`);
--- a/js/src/jit-test/tests/wasm/regress/baseline-extend8.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-extend8.js
@@ -5,27 +5,27 @@
 // with values so as eventually to force the source operand for extend8_s into a
 // register that does not have a byte personality.
 
 for ( let i=0; i < 8; i++) {
     let txt =
         `(module
            (func (export "f") (param i32) (result i32)
            ${adds(i)}
-           (set_local 0 (i32.extend8_s (i32.add (get_local 0) (i32.const 1))))
+           (local.set 0 (i32.extend8_s (i32.add (local.get 0) (i32.const 1))))
            ${drops(i)}
-           (get_local 0)))`;
+           (local.get 0)))`;
     let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(txt)));
     assertEq(ins.exports.f(254), -1);
 }
 
 function adds(n) {
     let s = ""
     for ( let i=0; i < n; i++ )
-        s += "(i32.add (get_local 0) (i32.const 1))\n";
+        s += "(i32.add (local.get 0) (i32.const 1))\n";
     return s;
 }
 
 function drops(n) {
     let s = "";
     for ( let i=0; i < n; i++ )
         s += "drop\n";
     return s;
--- a/js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js
@@ -1,58 +1,58 @@
 new WebAssembly.Module(wasmTextToBinary(`
 (module
     (global $g (mut i32) (i32.const 42))
     (func (param $i i32)
-        get_local $i
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
+        local.get $i
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
         unreachable
     )
 )
 `));
 
 new WebAssembly.Module(wasmTextToBinary(`
 (module
     (global $g (mut i32) (i32.const 42))
     (func (param $i i32)
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_global $g
-        get_local $i
-        set_global $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        global.get $g
+        local.get $i
+        global.set $g
         unreachable
     )
 )
 `));
--- a/js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js
@@ -2,15 +2,15 @@
 // the baseline compiler on x86 debug builds (and would just generate bad code
 // on non-debug builds) because of register starvation.
 
 wasmEvalText(
     `(module
       (func $run (param i64) (param i64) (result i64)
         block i64
 	  i64.const 1
-          (i64.lt_s (get_local 0) (get_local 1))
+          (i64.lt_s (local.get 0) (local.get 1))
 	  br_if 0
 	  drop
           i64.const 2
         end)
       (export "run" $run))`
 );
--- a/js/src/jit-test/tests/wasm/regress/baseline-nops-jumptable.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-nops-jumptable.js
@@ -1,12 +1,12 @@
 // |jit-test| --arm-asm-nop-fill=1
 var f = wasmEvalText(`(module (func (result i32) (param i32)
       (block $0
        (block $1
         (block $2
          (block $default
-          (br_table $0 $1 $2 $default (get_local 0))))))
+          (br_table $0 $1 $2 $default (local.get 0))))))
       (return (i32.const 0)))
     (export "" 0)
 )`).exports[""];
 
 f(0);
--- a/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js
+++ b/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js
@@ -1,12 +1,12 @@
 // Bug 1316181
 
 // There are locals with different values here to ensure that the
-// get_local at the end picks up the right one even if the stack might
+// local.get at the end picks up the right one even if the stack might
 // have become unbalanced by a failure to adjust SP along the branch
 // edge.  The logic is that we use SP-relative addressing, and if the
 // actual SP is not what the compiler thinks it is we will read
 // something other than the expected value.
 
 var o = wasmEvalText(
     `(module
       (func (result i32)
@@ -14,26 +14,26 @@ var o = wasmEvalText(
        (local $v1 i32)
        (local $v2 i32)
        (local $v3 i32)
        (local $v4 i32)
        (local $v5 i32)
        (local $v6 i32)
        (local $v7 i32)
        (local $res i32)
-       (set_local $v0 (i32.const 0xDEADBEEF))
-       (set_local $v1 (i32.const 0xFDEADBEE))
-       (set_local $v2 (i32.const 0xEFDEADBE))
-       (set_local $v3 (i32.const 0xEEFDEADB))
-       (set_local $v4 (i32.const 0xBEEFDEAD))
-       (set_local $v5 (i32.const 0xDBEEFDEA))
-       (set_local $v6 (i32.const 0xADBEEFDE))
-       (set_local $v7 (i32.const 0xEADBEEFD))
+       (local.set $v0 (i32.const 0xDEADBEEF))
+       (local.set $v1 (i32.const 0xFDEADBEE))
+       (local.set $v2 (i32.const 0xEFDEADBE))
+       (local.set $v3 (i32.const 0xEEFDEADB))
+       (local.set $v4 (i32.const 0xBEEFDEAD))
+       (local.set $v5 (i32.const 0xDBEEFDEA))
+       (local.set $v6 (i32.const 0xADBEEFDE))
+       (local.set $v7 (i32.const 0xEADBEEFD))
        (block $b
-	(set_local $res
+	(local.set $res
 	 (i32.add
 	  (i32.add (i32.const 1) (i32.const 2))
 	  (i32.add
 	   (i32.add (i32.const 3) (i32.const 4))
 	   (i32.add
 	    (i32.add (i32.const 5) (i32.const 6))
 	    (i32.add
 	     (i32.add (i32.const 7) (i32.const 8))
@@ -55,12 +55,12 @@ var o = wasmEvalText(
 		     (i32.add (i32.const 23) (i32.const 24))
 		     (i32.add
 		      (i32.add (i32.const 25) (i32.const 26))
 		      (i32.add
 		       (i32.add (i32.const 27) (i32.const 28))
 		       (i32.add
 			(i32.add (i32.const 29) (i32.const 30))
 			(br_if $b (i32.const 31) (i32.const 1)))))))))))))))))))
-       (return (get_local $v3)))
+       (return (local.get $v3)))
       (export "a" 0))`).exports;
 
 assertEq(o["a"](), 0xEEFDEADB|0);
--- a/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js
+++ b/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js
@@ -4,14 +4,14 @@ assertEq(wasmEvalText(`
     block $out
       i32.const 0
       if
         i32.const 1
         tee_local $p
         br_table $out $out
       end
     end
-    get_local $p
+    local.get $p
     br_if 0
   )
   (export "f" $f)
 )
 `).exports.f(42), undefined);
--- a/js/src/jit-test/tests/wasm/regress/bug1392105.js
+++ b/js/src/jit-test/tests/wasm/regress/bug1392105.js
@@ -1,8 +1,8 @@
 // |jit-test| --arm-asm-nop-fill=1
 
 var code = "(module ";
 for (var i = 0; i < 100; i++)
-  code += "(func (param i32) (result i32) (i32.add (i32.const 1) (get_local 0))) ";
+  code += "(func (param i32) (result i32) (i32.add (i32.const 1) (local.get 0))) ";
 code += ")";
 var buf = wasmTextToBinary(code);
 WebAssembly.compile(buf);
--- a/js/src/jit-test/tests/wasm/regress/bug1450800.js
+++ b/js/src/jit-test/tests/wasm/regress/bug1450800.js
@@ -4,24 +4,24 @@ gczeal(9, 10);
 function wasmEvalText(str, imports) {
     let binary = wasmTextToBinary(str);
     m = new WebAssembly.Module(binary);
     return new WebAssembly.Instance(m, imports);
 }
 assertEq(wasmEvalText(`(module
                         (global (import "a" "b") i32)
                         (export "g" (global 0))
-                        (func (export "get") (result i32) get_global 0))`,
+                        (func (export "get") (result i32) global.get 0))`,
                       { a: { b: 42 }}).exports.get(),
          42);
 for (let v of []) {}
 function testInitExpr(type, initialValue, nextValue, coercion, assertFunc = assertEq) {
     var module = wasmEvalText(`(module
         (import "globals" "a" (global ${type}))
-        (global $glob_imm ${type} (get_global 0))
+        (global $glob_imm ${type} (global.get 0))
         (export "global_imm" (global $glob_imm))
     )`, {
         globals: {
             a: coercion(initialValue)
         }
     }).exports;
 }
 testInitExpr('i32', 13, 37, x => x | 0);
--- a/js/src/jit-test/tests/wasm/regress/bug1467415.js
+++ b/js/src/jit-test/tests/wasm/regress/bug1467415.js
@@ -8,22 +8,22 @@ let mt = `
   (memory 1 1)
   (data (i32.const 0) "\\01\\00\\00\\00\\01\\00\\00\\00\\01\\00\\00\\00")
   (import "m" "g" (global (mut i32)))
   (import "m" "h" (global (mut i32)))
   (func (export "f") (result i32)
     (local i32)
     (local i32)
     (block i32
-      (set_local 0 (get_global 0))
+      (local.set 0 (global.get 0))
       (block i32
-        (set_global 1 (i32.const 37))
+        (global.set 1 (i32.const 37))
         (block i32
-          (set_local 1 (get_global 0))
-          (i32.add (get_local 0) (get_local 1)))))))
+          (local.set 1 (global.get 0))
+          (i32.add (local.get 0) (local.get 1)))))))
 `;
 
 let glob = new WebAssembly.Global({value:'i32', mutable:true}, 88);
 let module = new WebAssembly.Module(wasmTextToBinary(mt));
 let ins = new WebAssembly.Instance(module, {m:{g:glob, h:glob}});
 
 let shouldBe125 = ins.exports.f();
 assertEq(shouldBe125, 125);
--- a/js/src/jit-test/tests/wasm/regress/current-memory-tls.js
+++ b/js/src/jit-test/tests/wasm/regress/current-memory-tls.js
@@ -17,27 +17,27 @@ let i = new WebAssembly.Instance(new Web
     (func $maybeGrow (param $i i32) (local $smem i32)
      ;; get memory.size in number of bytes, not pages.
      memory.size
      i64.extend_u/i32
      i64.const 65536
      i64.mul
 
      ;; get the last byte index accessed by an int32 access.
-     get_local $i
+     local.get $i
      i32.const 3
      i32.add
      tee_local $i
      i64.extend_u/i32
 
      ;; if the memory is too small, grow it.
      i64.le_u
      if
          ;; get the floor of the accessed *page* index.
-         get_local $i
+         local.get $i
          i64.extend_u/i32
          i64.const 65536
          i64.div_u
 
          ;; subtract to that the size of the current memory in pages;
          ;; that's the amount of pages we want to grow, minus one.
          memory.size
          i64.extend_u/i32
@@ -51,25 +51,25 @@ let i = new WebAssembly.Instance(new Web
          ;; get back to i32 and grow memory.
          i32.wrap/i64
          memory.grow
          drop
      end
     )
 
     (func (export "set") (param $i i32) (param $v i32)
-     get_local $i
+     local.get $i
      call $maybeGrow
-     get_local $i
-     get_local $v
+     local.get $i
+     local.get $v
      i32.store
     )
 
     (func (export "get") (param $i i32) (result i32)
-     get_local $i
+     local.get $i
      i32.load
     )
 )
 `))).exports;
 
 assertEq(i.cur_mem(), 0);
 
 i.set(0, 1);
--- a/js/src/jit-test/tests/wasm/regress/frame-offset-stack-arg.js
+++ b/js/src/jit-test/tests/wasm/regress/frame-offset-stack-arg.js
@@ -19,18 +19,18 @@ function f(a,b,c,d,e,f,g,h,i,j) {
 }
 
 var bin = wasmTextToBinary(
     `(module
        (import $f "m" "f" (func (param i32) (param i32) (param i32) (param i32) (param i32)
                                 (param i32) (param i32) (param i32) (param i32) (param i32)))
        (func (export "test") (param $a i32) (param $b i32) (param $c i32) (param $d i32) (param $e i32)
                              (param $f i32) (param $g i32) (param $h i32) (param $i i32) (param $j i32)
-         (call $f (get_local $a) (get_local $b) (get_local $c) (get_local $d) (get_local $e)
-                  (get_local $f) (get_local $g) (get_local $h) (get_local $i) (get_local $j))))`);
+         (call $f (local.get $a) (local.get $b) (local.get $c) (local.get $d) (local.get $e)
+                  (local.get $f) (local.get $g) (local.get $h) (local.get $i) (local.get $j))))`);
 
 var mod = new WebAssembly.Module(bin);
 var ins = new WebAssembly.Instance(mod, {m:{f}});
 
 // Enough iterations for the jit to kick in and the stub to become optimized.
 
 for ( let i=0; i < 100; i++ ) {
     loop_counter = i;
--- a/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js
+++ b/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js
@@ -1,20 +1,20 @@
 wasmEvalText(`(module
   (type $type0 (func (param i32)))
   (func $f (param $p i32)
     (local $x i32) (local $y i32)
     loop $top
-      get_local $x
-      get_local $p
-      get_local $x
+      local.get $x
+      local.get $p
+      local.get $x
       br_if $top
       i32.const 1
       tee_local $p
-      get_local $y
-      set_local $x
+      local.get $y
+      local.set $x
       i32.add
       call $f
       br_if $top
       return
     end
   )
 )`);
--- a/js/src/jit-test/tests/wasm/regress/ion-error-gc-fakeexitframe.js
+++ b/js/src/jit-test/tests/wasm/regress/ion-error-gc-fakeexitframe.js
@@ -17,22 +17,22 @@ var letext =`(module
   (type $type0 (func (param i32 i64)))
   (type $type1 (func (param i32) (result i64)))
   (type $type2 (func (result i32)))
   (memory 1)
   (export "store" $func0)
   (export "load" $func1)
   (export "assert_0" $func2)
   (func $func0 (param $var0 i32) (param $var1 i64)
-    get_local $var0
-    get_local $var1
+    local.get $var0
+    local.get $var1
     i64.store16 offset=16
   )
   (func $func1 (param $var0 i32) (result i64)
-    get_local $var0
+    local.get $var0
     i64.load16_s offset=16
   )
   (func $func2 (result i32)
     i32.const 65519
     i64.const -32768
     call $func0
     i32.const 1
   )
--- a/js/src/jit-test/tests/wasm/regress/ion-inlinedcall-resumepoint.js
+++ b/js/src/jit-test/tests/wasm/regress/ion-inlinedcall-resumepoint.js
@@ -21,17 +21,17 @@ function importedFunc(k) {
 }
 
 let { exports } = new WebAssembly.Instance(
     new WebAssembly.Module(
         wasmTextToBinary(`
         (module
             (func $imp (import "env" "importedFunc") (param i32))
             (func (export "exp") (param i32)
-                get_local 0
+                local.get 0
                 call $imp
             )
         )
         `)
     ), {
         env: {
             importedFunc
         }
--- a/js/src/jit-test/tests/wasm/regress/ion-lazy-stubs-jit.js
+++ b/js/src/jit-test/tests/wasm/regress/ion-lazy-stubs-jit.js
@@ -1,33 +1,33 @@
 (function coerceinplace() {
     var { table } = wasmEvalText(`(module
         (func $add (result i32) (param i32) (param i32)
-         get_local 0
+         local.get 0
         )
         (table (export "table") 10 funcref)
         (elem (i32.const 0) $add)
     )`).exports;
 
     for (var i = 0; i < 100; i++) {
       table.get(0)((true).get++, i*2+1);
     }
 })();
 
 (function reporti64() {
     var instance = wasmEvalText(`(module
         (func $add (export "add") (result i32) (param i32) (param i32)
-            get_local 0
-            get_local 1
+            local.get 0
+            local.get 1
             i32.add
         )
 
         (func $addi64 (result i64) (param i32) (param i32)
-            get_local 0
-            get_local 1
+            local.get 0
+            local.get 1
             call $add
             i64.extend_s/i32
         )
 
         (table (export "table") 10 funcref)
         (elem (i32.const 0) $add $addi64)
     )`).exports;
 
--- a/js/src/jit-test/tests/wasm/regress/jit-updatepcquad.js
+++ b/js/src/jit-test/tests/wasm/regress/jit-updatepcquad.js
@@ -9,17 +9,17 @@ var evalInFrame = (function (global) {
         return completion.return;
     };
 })(this);
 
 const { exports } = wasmEvalText(`
     (module
         (import "global" "func" (param i32) (result i32))
         (func (export "func_0") (param i32)(result i32)
-         get_local 0
+         local.get 0
          call 0
         )
     )
 `, {
     global: {
         func: function jscode(i) {
             return evalInFrame(`a = ${i}`);
         }
--- a/js/src/jit-test/tests/wasm/regress/misc-control-flow.js
+++ b/js/src/jit-test/tests/wasm/regress/misc-control-flow.js
@@ -1,29 +1,29 @@
 wasmFailValidateText(`(module
    (func (result i32) (param i32)
-     (loop (if (i32.const 0) (br 0)) (get_local 0)))
+     (loop (if (i32.const 0) (br 0)) (local.get 0)))
    (export "" 0)
 )`, /unused values not explicitly dropped by end of block/);
 
 wasmFailValidateText(`(module
    (func (param i32)
-     (loop (if (i32.const 0) (br 0)) (get_local 0)))
+     (loop (if (i32.const 0) (br 0)) (local.get 0)))
    (export "" 0)
 )`, /unused values not explicitly dropped by end of block/);
 
 wasmFailValidateText(`(module
    (func (result i32) (param i32)
-     (loop (if (i32.const 0) (br 0)) (drop (get_local 0))))
+     (loop (if (i32.const 0) (br 0)) (drop (local.get 0))))
    (export "" 0)
 )`, emptyStackError);
 
 assertEq(wasmEvalText(`(module
    (func (result i32) (param i32)
-     (loop (if (i32.const 0) (br 0))) (get_local 0))
+     (loop (if (i32.const 0) (br 0))) (local.get 0))
    (export "" 0)
 )`).exports[""](42), 42);
 
 wasmEvalText(`(module (func $func$0
       (block (if (i32.const 1) (loop (br_table 0 (br 0)))))
   )
 )`);
 
@@ -80,18 +80,18 @@ wasmEvalText(`
  (export "" 1)
 )
 `).exports[""]();
 
 wasmEvalText(`
 (module
     (import "check" "one" (param i32))
     (import "check" "two" (param i32) (param i32))
-    (func (param i32) (call 0 (get_local 0)))
-    (func (param i32) (param i32) (call 1 (get_local 0) (get_local 1)))
+    (func (param i32) (call 0 (local.get 0)))
+    (func (param i32) (param i32) (call 1 (local.get 0) (local.get 1)))
     (func
         (call 1
             (i32.const 43)
             (block $b i32
                 (if (i32.const 1)
                     (call 0
                         (block i32
                             (call 0 (i32.const 42))
--- a/js/src/jit-test/tests/wasm/regress/movable-traps.js
+++ b/js/src/jit-test/tests/wasm/regress/movable-traps.js
@@ -19,19 +19,19 @@ let bodies = [
     `
 ];
 
 for (let body of bodies) {
     wasmFullPass(`
     (module
         (func $f (param $x i32) (result i32)
             loop $top i32
-                get_local $x
+                local.get $x
                 if
-                    get_local $x
+                    local.get $x
                     br 2
                 end
                 ${body}
                 br $top
             end
         )
         (export "run" $f)
     )`, 42, {}, 42);
--- a/js/src/jit-test/tests/wasm/regress/oom-masm-baseline.js
+++ b/js/src/jit-test/tests/wasm/regress/oom-masm-baseline.js
@@ -3,17 +3,17 @@
 // Test baseline compiler only.
 if (typeof wasmCompileMode === 'undefined' || wasmCompileMode() != 'baseline')
     quit();
 
 try {
     var bin = wasmTextToBinary(
 	`(module (func (result i32) (param f64) (param f32)
                 i64.const 0
-                get_local 0
+                local.get 0
                 drop
                 i32.wrap/i64
                 f64.const 0
                 f64.const 0
                 i32.const 0
                 select
                 f32.const 0
                 f32.const 0
--- a/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js
+++ b/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js
@@ -1,13 +1,13 @@
 var params = '';
 var locals = '';
 for (let i = 0; i < 20; i++) {
     params += '(param i64) ';
-    locals += `(get_local ${i}) `;
+    locals += `(local.get ${i}) `;
 }
 
 wasmEvalText(`
 (module
     (func
         ${params}
         (call 0 ${locals})
     )
--- a/js/src/jit-test/tests/wasm/regress/regalloc-i64-load-store-global.js
+++ b/js/src/jit-test/tests/wasm/regress/regalloc-i64-load-store-global.js
@@ -1,18 +1,18 @@
 wasmFullPassI64(`
     (module
         (global (mut i64) (i64.const 9970292656026947164))
-        (func (export "get_global_0") (result i64) get_global 0)
+        (func (export "global.get_0") (result i64) global.get 0)
 
         (func $run (result i64) (param i32)
             i64.const 8692897571457488645
             i64.const 1028567229461950342
             i64.mul
-            get_global 0
+            global.get 0
             f32.const 3.141592653
             f32.floor
             f32.const -13.37
             f32.floor
             f32.copysign
             drop
             i64.div_u
         )
--- a/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js
+++ b/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js
@@ -1,16 +1,16 @@
 // Bug 1280933, excerpted from binary test case provided there.
 
 wasmEvalText(
 `(module
   (func $func0 (param $arg0 i32) (result i32) (local $var0 i64)
-	(set_local $var0 (i64.extend_u/i32 (get_local $arg0)))
+	(local.set $var0 (i64.extend_u/i32 (local.get $arg0)))
 	(i32.wrap/i64
 	 (i64.add
 	  (block i64
 	   (loop $label1 $label0
 		(drop (block $label2 i64
-		       (br_table $label2 (i64.const 0) (get_local $arg0))))
-		(set_local $var0 (i64.mul (i64.const 2) (get_local $var0))))
-	   (tee_local $var0 (i64.add (i64.const 4) (get_local $var0))))
+		       (br_table $label2 (i64.const 0) (local.get $arg0))))
+		(local.set $var0 (i64.mul (i64.const 2) (local.get $var0))))
+	   (tee_local $var0 (i64.add (i64.const 4) (local.get $var0))))
 	  (i64.const 1))))
   (export "" 0))`);
--- a/js/src/jit-test/tests/wasm/regress/teavm-bugs.js
+++ b/js/src/jit-test/tests/wasm/regress/teavm-bugs.js
@@ -4,20 +4,20 @@ let locals = '';
 let tests = '(i64.const 0)';
 
 for (let i = 15; i --> 0;) {
     params += `\n(param i64)`;
     locals += `\n(local i64)`;
     tests = `
     (if i64
         (i64.eq
-            (get_local ${i + 8})
-            (get_local ${i})
+            (local.get ${i + 8})
+            (local.get ${i})
         )
-        (get_local ${i + 8})
+        (local.get ${i + 8})
         ${tests}
     )`;
 }
 
 let code = `(module
    (func $i64 (result i64)
      ${params} ${locals}
      ${tests}
@@ -25,29 +25,29 @@ let code = `(module
 )`
 
 wasmEvalText(code);
 
 // Bounds check elimination.
 assertEq(wasmEvalText(`(module
     (memory 1)
     (func (param $p i32) (local $l i32) (result i32)
-        (set_local $l (i32.const 0))
+        (local.set $l (i32.const 0))
         (if
-            (get_local $p)
-            (set_local $l
+            (local.get $p)
+            (local.set $l
                (i32.add
-                  (get_local $l)
-                  (i32.load8_s (get_local $p))
+                  (local.get $l)
+                  (i32.load8_s (local.get $p))
                )
             )
         )
-        (set_local $l
+        (local.set $l
            (i32.add
-              (get_local $l)
-              (i32.load8_s (get_local $p))
+              (local.get $l)
+              (i32.load8_s (local.get $p))
            )
         )
-        (get_local $l)
+        (local.get $l)
     )
     (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
     (export "test" 0)
 )`).exports["test"](3), 6);
--- a/js/src/jit-test/tests/wasm/regress/unaligned-store64.js
+++ b/js/src/jit-test/tests/wasm/regress/unaligned-store64.js
@@ -1,17 +1,17 @@
 var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(
     `(module
        (memory (export "mem") 1 1)
        (func (export "store_32_1") (param $ptr i32)
-         (i64.store32 align=1 (get_local $ptr) (i64.const 0xabba1337)))
+         (i64.store32 align=1 (local.get $ptr) (i64.const 0xabba1337)))
        (func (export "store_32_2") (param $ptr i32)
-         (i64.store32 align=2 (get_local $ptr) (i64.const 0xabba1337)))
+         (i64.store32 align=2 (local.get $ptr) (i64.const 0xabba1337)))
        (func (export "store_16") (param $ptr i32)
-         (i64.store16 align=1 (get_local $ptr) (i64.const 0x1337))))`))).exports;
+         (i64.store16 align=1 (local.get $ptr) (i64.const 0x1337))))`))).exports;
 
 var mem = new Uint8Array(ins.mem.buffer);
 
 ins.store_16(1);
 assertEq(mem[1], 0x37);
 assertEq(mem[2], 0x13);
 
 ins.store_32_1(11);
--- a/js/src/jit-test/tests/wasm/resizing.js
+++ b/js/src/jit-test/tests/wasm/resizing.js
@@ -79,23 +79,23 @@ tbl.set(0, exports1.grow);
 assertEq(exports2.test(), 111);
 
 // Test for coherent length/contents
 
 var mem = new Memory({initial:1});
 new Int32Array(mem.buffer)[0] = 42;
 var mod = new Module(wasmTextToBinary(`(module
     (import "" "mem" (memory 1))
-    (func $gm (param i32) (result i32) (memory.grow (get_local 0)))
+    (func $gm (param i32) (result i32) (memory.grow (local.get 0)))
     (export "grow_memory" $gm)
     (func $cm (result i32) (memory.size))
     (export "current_memory" $cm)
-    (func $ld (param i32) (result i32) (i32.load (get_local 0)))
+    (func $ld (param i32) (result i32) (i32.load (local.get 0)))
     (export "load" $ld)
-    (func $st (param i32) (param i32) (i32.store (get_local 0) (get_local 1)))
+    (func $st (param i32) (param i32) (i32.store (local.get 0) (local.get 1)))
     (export "store" $st)
 )`));
 var exp1 = new Instance(mod, {"":{mem}}).exports;
 var exp2 = new Instance(mod, {"":{mem}}).exports;
 assertEq(exp1.current_memory(), 1);
 assertEq(exp1.load(0), 42);
 assertEq(exp2.current_memory(), 1);
 assertEq(exp2.load(0), 42);
@@ -193,17 +193,17 @@ var src = wasmEvalText(`(module
     (export "three" $three)
 )`).exports;
 var tbl = new Table({element:"funcref", initial:1});
 tbl.set(0, src.one);
 
 var mod = new Module(wasmTextToBinary(`(module
     (type $v2i (func (result i32)))
     (table (import "" "tbl") 1 funcref)
-    (func $ci (param i32) (result i32) (call_indirect $v2i (get_local 0)))
+    (func $ci (param i32) (result i32) (call_indirect $v2i (local.get 0)))
     (export "call_indirect" $ci)
 )`));
 var exp1 = new Instance(mod, {"":{tbl}}).exports;
 var exp2 = new Instance(mod, {"":{tbl}}).exports;
 assertEq(exp1.call_indirect(0), 1);
 assertErrorMessage(() => exp1.call_indirect(1), RuntimeError, /index out of bounds/);
 assertEq(exp2.call_indirect(0), 1);
 assertErrorMessage(() => exp2.call_indirect(1), RuntimeError, /index out of bounds/);
--- a/js/src/jit-test/tests/wasm/stack.js
+++ b/js/src/jit-test/tests/wasm/stack.js
@@ -31,17 +31,17 @@ wasmFullPass(` (module
        i32.const 501
      end
      end
      end
      drop
      i32.const 0
      i32.load
      f64.const 5.0
-     set_local $local
+     local.set $local
      f64.const 5.0
      tee_local $local
      drop
      block
        i32.const 0
        i32.const 18
        i32.store
        nop
--- a/js/src/jit-test/tests/wasm/table-gc.js
+++ b/js/src/jit-test/tests/wasm/table-gc.js
@@ -2,17 +2,17 @@
 // Turn off baseline and since it messes up the GC finalization assertions by
 // adding spurious edges to the GC graph.
 
 const Module = WebAssembly.Module;
 const Instance = WebAssembly.Instance;
 const Table = WebAssembly.Table;
 const RuntimeError = WebAssembly.RuntimeError;
 
-var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect $v2i (get_local $i))) (export "call" $call)`
+var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect $v2i (local.get $i))) (export "call" $call)`
 var callee = i => `(func $f${i} (type $v2i) (i32.const ${i}))`;
 
 // A table should not hold exported functions alive and exported functions
 // should not hold their originating table alive. Live exported functions should
 // hold instances alive and instances hold imported tables alive. Nothing
 // should hold the export object alive.
 resetFinalizeCount();
 var i = wasmEvalText(`(module (table 2 funcref) (export "tbl" table) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`);
@@ -199,20 +199,20 @@ var i = wasmEvalText(
     {a:{b:runTest}}
 );
 i.edge = makeFinalizeObserver();
 tbl.set(0, i.exports.f);
 var m = new Module(wasmTextToBinary(`(module
     (import "a" "b" (table ${N} funcref))
     (type $i2i (func (param i32) (result i32)))
     (func $f (param $i i32) (result i32)
-        (set_local $i (i32.sub (get_local $i) (i32.const 1)))
+        (local.set $i (i32.sub (local.get $i) (i32.const 1)))
         (i32.add
             (i32.const 1)
-            (call_indirect $i2i (get_local $i) (get_local $i))))
+            (call_indirect $i2i (local.get $i) (local.get $i))))
     (export "f" $f)
 )`));
 for (var i = 1; i < N; i++) {
     var inst = new Instance(m, {a:{b:tbl}});
     inst.edge = makeFinalizeObserver();
     tbl.set(i, inst.exports.f);
 }
 inst = null;
--- a/js/src/jit-test/tests/wasm/tables.js
+++ b/js/src/jit-test/tests/wasm/tables.js
@@ -11,36 +11,36 @@ wasmFailValidateText(`(module (elem (i32
 wasmFailValidateText(`(module (table 10 funcref) (elem (i32.const 0) 0))`, /table element out of range/);
 wasmFailValidateText(`(module (table 10 funcref) (func) (elem (i32.const 0) 0 1))`, /table element out of range/);
 wasmFailValidateText(`(module (table 10 funcref) (func) (elem (f32.const 0) 0) ${callee(0)})`, /type mismatch/);
 
 assertErrorMessage(() => wasmEvalText(`(module (table 10 funcref) (elem (i32.const 10) $f0) ${callee(0)})`), LinkError, /elem segment does not fit/);
 assertErrorMessage(() => wasmEvalText(`(module (table 10 funcref) (elem (i32.const 8) $f0 $f0 $f0) ${callee(0)})`), LinkError, /elem segment does not fit/);
 assertErrorMessage(() => wasmEvalText(`(module (table 0 funcref) (func) (elem (i32.const 0x10001)))`), LinkError, /elem segment does not fit/);
 
-assertErrorMessage(() => wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (get_global 0) $f0) ${callee(0)})`, {globals:{a:10}}), LinkError, /elem segment does not fit/);
-assertErrorMessage(() => wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (get_global 0) $f0 $f0 $f0) ${callee(0)})`, {globals:{a:8}}), LinkError, /elem segment does not fit/);
+assertErrorMessage(() => wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (global.get 0) $f0) ${callee(0)})`, {globals:{a:10}}), LinkError, /elem segment does not fit/);
+assertErrorMessage(() => wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (global.get 0) $f0 $f0 $f0) ${callee(0)})`, {globals:{a:8}}), LinkError, /elem segment does not fit/);
 
 assertEq(new Module(wasmTextToBinary(`(module (table 10 funcref) (elem (i32.const 1) $f0 $f0) (elem (i32.const 0) $f0) ${callee(0)})`)) instanceof Module, true);
 assertEq(new Module(wasmTextToBinary(`(module (table 10 funcref) (elem (i32.const 1) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`)) instanceof Module, true);
-wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (i32.const 1) $f0 $f0) (elem (get_global 0) $f0) ${callee(0)})`, {globals:{a:0}});
-wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (get_global 0) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`, {globals:{a:1}});
+wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (i32.const 1) $f0 $f0) (elem (global.get 0) $f0) ${callee(0)})`, {globals:{a:0}});
+wasmEvalText(`(module (table 10 funcref) (import "globals" "a" (global i32)) (elem (global.get 0) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`, {globals:{a:1}});
 
 var m = new Module(wasmTextToBinary(`
     (module
         (import "globals" "table" (table 10 funcref))
         (import "globals" "a" (global i32))
-        (elem (get_global 0) $f0 $f0)
+        (elem (global.get 0) $f0 $f0)
         ${callee(0)})
 `));
 var tbl = new Table({initial:50, element:"funcref"});
 assertEq(new Instance(m, {globals:{a:20, table:tbl}}) instanceof Instance, true);
 assertErrorMessage(() => new Instance(m, {globals:{a:50, table:tbl}}), LinkError, /elem segment does not fit/);
 
-var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect $v2i (get_local $i))) (export "call" $call)`
+var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect $v2i (local.get $i))) (export "call" $call)`
 var callee = i => `(func $f${i} (type $v2i) (i32.const ${i}))`;
 
 var call = wasmEvalText(`(module (table 10 funcref) ${callee(0)} ${caller})`).exports.call;
 assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/);
 assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/);
 
 var call = wasmEvalText(`(module (table 10 funcref) (elem (i32.const 0)) ${callee(0)} ${caller})`).exports.call;
 assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/);
@@ -125,21 +125,21 @@ var m = new Module(wasmTextToBinary(`(mo
     (import "a" "mem" (memory 1))
     (import "a" "tbl" (table 10 funcref))
     (import $imp "a" "imp" (result i32))
     (func $call (param $i i32) (result i32)
         (i32.add
             (call $imp)
             (i32.add
                 (i32.load (i32.const 0))
-                (if i32 (i32.eqz (get_local $i))
+                (if i32 (i32.eqz (local.get $i))
                     (then (i32.const 0))
                     (else
-                        (set_local $i (i32.sub (get_local $i) (i32.const 1)))
-                        (call_indirect $i2i (get_local $i) (get_local $i)))))))
+                        (local.set $i (i32.sub (local.get $i) (i32.const 1)))
+                        (call_indirect $i2i (local.get $i) (local.get $i)))))))
     (export "call" $call)
 )`));
 var failTime = false;
 var tbl = new Table({initial:10, element:"funcref"});
 var mem1 = new Memory({initial:1});
 var e1 = new Instance(m, {a:{mem:mem1, tbl, imp() {if (failTime) throw new Error("ohai"); return 1}}}).exports;
 tbl.set(0, e1.call);
 var mem2 = new Memory({initial:1});
@@ -159,41 +159,41 @@ assertErrorMessage(() => e3.call(2), Err
 var call = wasmEvalText(`(module
     (type $v2i1 (func (result i32)))
     (type $v2i2 (func (result i32)))
     (type $i2v (func (param i32)))
     (table funcref (elem $a $b $c))
     (func $a (type $v2i1) (i32.const 0))
     (func $b (type $v2i2) (i32.const 1))
     (func $c (type $i2v))
-    (func $call (param i32) (result i32) (call_indirect $v2i1 (get_local 0)))
+    (func $call (param i32) (result i32) (call_indirect $v2i1 (local.get 0)))
     (export "call" $call)
 )`).exports.call;
 assertEq(call(0), 0);
 assertEq(call(1), 1);
 assertErrorMessage(() => call(2), RuntimeError, /indirect call signature mismatch/);
 
 var call = wasmEvalText(`(module
     (type $A (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (type $B (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (type $C (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (type $D (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (type $E (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (type $F (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (type $G (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32)))
     (table funcref (elem $a $b $c $d $e $f $g))
-    (func $a (type $A) (get_local 7))
-    (func $b (type $B) (get_local 8))
-    (func $c (type $C) (get_local 9))
-    (func $d (type $D) (get_local 10))
-    (func $e (type $E) (get_local 11))
-    (func $f (type $F) (get_local 12))
-    (func $g (type $G) (get_local 13))
+    (func $a (type $A) (local.get 7))
+    (func $b (type $B) (local.get 8))
+    (func $c (type $C) (local.get 9))
+    (func $d (type $D) (local.get 10))
+    (func $e (type $E) (local.get 11))
+    (func $f (type $F) (local.get 12))
+    (func $g (type $G) (local.get 13))
     (func $call (param i32) (result i32)
-        (call_indirect $A (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 42) (get_local 0)))
+        (call_indirect $A (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 42) (local.get 0)))
     (export "call" $call)
 )`).exports.call;
 assertEq(call(0), 42);
 for (var i = 1; i < 7; i++)
     assertErrorMessage(() => call(i), RuntimeError, /indirect call signature mismatch/);
 assertErrorMessage(() => call(7), RuntimeError, /index out of bounds/);
 
 // Function identity isn't lost:
@@ -218,17 +218,17 @@ assertEq(tbl.get(0).foo, 42);
     g.tbl = new Table({initial:3, element:"funcref"});
     var i1 = g.evaluate("new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`" + src + "`)), {a:{t:tbl,m:mem}})");
 
     var call = new Instance(new Module(wasmTextToBinary(`
         (module
             (import "a" "t" (table 3 funcref))
             (import "a" "m" (memory 1))
             (type $v2i (func (result i32)))
-            (func $call (param $i i32) (result i32) (i32.add (call_indirect $v2i (get_local $i)) (memory.size)))
+            (func $call (param $i i32) (result i32) (i32.add (call_indirect $v2i (local.get $i)) (memory.size)))
             (export "call" $call))
     `)), {a:{t:g.tbl,m:g.mem}}).exports.call;
 
     for (var i = 0; i < 10; i++)
         assertEq(call(0), 11);
 })();
 
 
--- a/js/src/jit-test/tests/wasm/text.js
+++ b/js/src/jit-test/tests/wasm/text.js
@@ -7,21 +7,21 @@ assertErrorMessage(() => wasmEvalText('(
 assertErrorMessage(() => wasmEvalText('(moduler'), SyntaxError, parsingError);
 assertErrorMessage(() => wasmEvalText('(module (func) (export "a'), SyntaxError, parsingError);
 assertErrorMessage(() => wasmEvalText('(module (func (local $a i32) (param $b f32)))'), SyntaxError, parsingError);
 
 assertErrorMessage(() => wasmEvalText('(module (func $a) (func) (export "a" $a) (export "b" $b))'), SyntaxError, /Function label '\$b' not found/);
 assertErrorMessage(() => wasmEvalText('(module (import $foo "a" "b") (import $foo "a" "b"))'), SyntaxError, /duplicate import/);
 assertErrorMessage(() => wasmEvalText('(module (func $foo) (func $foo))'), SyntaxError, /duplicate function/);
 assertErrorMessage(() => wasmEvalText('(module (func (param $a i32) (local $a i32)))'), SyntaxError, /duplicate var/);
-assertErrorMessage(() => wasmEvalText('(module (func (get_local $a)))'), SyntaxError, /Local label '\$a' not found/);
+assertErrorMessage(() => wasmEvalText('(module (func (local.get $a)))'), SyntaxError, /Local label '\$a' not found/);
 assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (type $a (func (param i32))))'), SyntaxError, /duplicate signature/);
 assertErrorMessage(() => wasmEvalText('(module (import "a" "") (func (call $abc)))'), SyntaxError, /Function label '\$abc' not found/);
 assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (type $b) (i32.const 13)))'), SyntaxError, /Signature label '\$b' not found/);
-assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (call_indirect $c (i32.const 0) (get_local 0))))'), SyntaxError, /Signature label '\$c' not found/);
+assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (call_indirect $c (i32.const 0) (local.get 0))))'), SyntaxError, /Signature label '\$c' not found/);
 assertErrorMessage(() => wasmEvalText('(module (func (br $a)))'), SyntaxError, /branch target label '\$a' not found/);
 assertErrorMessage(() => wasmEvalText('(module (func (block $a ) (br $a)))'), SyntaxError, /branch target label '\$a' not found/);
 
 assertErrorMessage(() => wasmEvalText(`(module (func (call ${0xffffffff})))`), SyntaxError, parsingError);
 assertErrorMessage(() => wasmEvalText(`(module (export "func" ${0xffffffff}))`), SyntaxError, parsingError);
 
 wasmEvalText('(module (func (param $a i32)))');
 wasmEvalText('(module (func (param i32)))');
@@ -75,17 +75,17 @@ wasmEvalText('(module (func $t (import "
 wasmEvalText('(module (func $t (import "mod" "func")(result i32) (param i32)))', { mod: {func} });
 
 assertErrorMessage(() => wasmEvalText('(module (func $t (import "mod" "func") (type)))', { mod: {func} }), SyntaxError, parsingError);
 wasmEvalText('(module (type $t (func)) (func $t (import "mod" "func") (type $t)))', { mod: {func} });
 
 assertErrorMessage(() => wasmEvalText('(module (func $t (export))))'), SyntaxError, parsingError);
 wasmEvalText('(module (func (export "f")))');
 wasmEvalText('(module (func $f (export "f")))');
-wasmEvalText('(module (func $f (export "f") (result i32) (param i32) (i32.add (get_local 0) (i32.const 42))))');
+wasmEvalText('(module (func $f (export "f") (result i32) (param i32) (i32.add (local.get 0) (i32.const 42))))');
 
 assertErrorMessage(() => wasmEvalText(`
     (module
         (type $tf (func (param i32) (result i32)))
         (func (import "mod" "a") (type $tf))
         (func (export "f1"))
         (func (import "mod" "b") (type $tf))
         (func (export "f2"))
--- a/js/src/jit-test/tests/wasm/timeout/interrupt-multi-instance-activation.js
+++ b/js/src/jit-test/tests/wasm/timeout/interrupt-multi-instance-activation.js
@@ -1,20 +1,20 @@
 // |jit-test| exitstatus: 6; skip-if: !wasmIsSupported()
 
 const {Module, Instance} = WebAssembly;
 
 const {innerWasm} = new Instance(new Module(wasmTextToBinary(`(module
     (func (export "innerWasm") (result i32)
         (local i32)
         (loop $top
-            (set_local 0 (i32.add (get_local 0) (i32.const 1)))
-            (br_if $top (i32.lt_u (get_local 0) (i32.const 100000)))
+            (local.set 0 (i32.add (local.get 0) (i32.const 1)))
+            (br_if $top (i32.lt_u (local.get 0) (i32.const 100000)))
         )
-        (get_local 0)
+        (local.get 0)
     )
 )`))).exports;
 
 function middleJS() {
     innerWasm();
 }
 
 const {outerWasm} = new Instance(new Module(wasmTextToBinary(`(module
--- a/js/src/jit-test/tests/wasm/utf8.js
+++ b/js/src/jit-test/tests/wasm/utf8.js
@@ -1,12 +1,12 @@
 /*
 (module
  (func (param i32) (result i32)
-       (i32.add (get_local 0) (get_local 0)))
+       (i32.add (local.get 0) (local.get 0)))
  (export "hello" (func 0)))
 */
 
 var txt =
 `00 61 73 6d 01 00 00 00 01 06 01 60 01 7f 01 7f
  03 02 01 00 07 09 01 05 68 65 6c 6c 6f 00 00 0a
  09 01 07 00 20 00 20 00 6a 0b`
 
--- a/js/src/jit-test/tests/wasm/wasm-abi.js
+++ b/js/src/jit-test/tests/wasm/wasm-abi.js
@@ -3,18 +3,18 @@ for (let numLocals of [3, 4, 5, 6, 17, 1
         let locals = `       (local `;
         let setLocals = ``;
         let getLocals = ``;
         let adds = ``;
         let sum = 0;
         for (let i = 0; i < numLocals; i++) {
             sum += i + 1;
             locals += `i32 `;
-            setLocals += `       (set_local ${i + 1} (i32.add (get_local 0) (i32.const ${i + 1})))\n`;
-            getLocals += `       get_local ${i + 1}\n`;
+            setLocals += `       (local.set ${i + 1} (i32.add (local.get 0) (i32.const ${i + 1})))\n`;
+            getLocals += `       local.get ${i + 1}\n`;
             if (i > 0)
               adds += `       i32.add\n`;
         }
         locals += `)\n`;
 
         var callee = `    (func $f (param `;
         var caller = `       (call $f `;
         for (let i = 0; i < numParams; i++) {
--- a/js/src/jit-test/tests/wasm/worker-kill.js
+++ b/js/src/jit-test/tests/wasm/worker-kill.js
@@ -1,10 +1,10 @@
 // |jit-test| skip-if: helperThreadCount() === 0
 
 evalInWorker(`
     var code = "(module ";
     for (var i = 0; i < 100; i++)
-        code += "(func (param i32) (result i32) (i32.add (i32.const 1) (get_local 0))) ";
+        code += "(func (param i32) (result i32) (i32.add (i32.const 1) (local.get 0))) ";
     code += ")";
     var buf = wasmTextToBinary(code);
     WebAssembly.compile(buf);
 `);
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -2568,20 +2568,19 @@ bool BaselineCompilerCodeGen::emit_JSOP_
   JSObject* obj =
       ObjectGroup::getOrFixupCopyOnWriteObject(cx, scriptRoot, handler.pc());
   if (!obj) {
     return false;
   }
 
   prepareVMCall();
 
-  pushArg(Imm32(gc::DefaultHeap));
   pushArg(ImmGCPtr(obj));
 
-  using Fn = ArrayObject* (*)(JSContext*, HandleArrayObject, gc::InitialHeap);
+  using Fn = ArrayObject* (*)(JSContext*, HandleArrayObject);
   if (!callVM<Fn, js::NewDenseCopyOnWriteArray>()) {
     return false;
   }
 
   // Box and push return value.
   masm.tagValue(JSVAL_TYPE_OBJECT, ReturnReg, R0);
   frame.push(R0);
   return true;
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -6490,20 +6490,19 @@ void CodeGenerator::visitOutOfLineNewArr
 
 void CodeGenerator::visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite* lir) {
   Register objReg = ToRegister(lir->output());
   Register tempReg = ToRegister(lir->temp());
   ArrayObject* templateObject = lir->mir()->templateObject();
   gc::InitialHeap initialHeap = lir->mir()->initialHeap();
 
   // If we have a template object, we can inline call object creation.
-  using Fn = ArrayObject* (*)(JSContext*, HandleArrayObject, gc::InitialHeap);
+  using Fn = ArrayObject* (*)(JSContext*, HandleArrayObject);
   OutOfLineCode* ool = oolCallVM<Fn, js::NewDenseCopyOnWriteArray>(
-      lir, ArgList(ImmGCPtr(templateObject), Imm32(initialHeap)),
-      StoreRegisterTo(objReg));
+      lir, ArgList(ImmGCPtr(templateObject)), StoreRegisterTo(objReg));
 
   TemplateObject templateObj(templateObject);
   templateObj.setDenseElementsAreCopyOnWrite();
   masm.createGCObject(objReg, tempReg, templateObj, initialHeap, ool->entry());
 
   masm.bind(ool->rejoin());
 }
 
--- a/js/src/jit/Recover.cpp
+++ b/js/src/jit/Recover.cpp
@@ -1249,32 +1249,28 @@ bool RNewArray::recover(JSContext* cx, S
   result.setObject(*resultObject);
   iter.storeInstructionResult(result);
   return true;
 }
 
 bool MNewArrayCopyOnWrite::writeRecoverData(CompactBufferWriter& writer) const {
   MOZ_ASSERT(canRecoverOnBailout());
   writer.writeUnsigned(uint32_t(RInstruction::Recover_NewArrayCopyOnWrite));
-  writer.writeByte(initialHeap());
   return true;
 }
 
-RNewArrayCopyOnWrite::RNewArrayCopyOnWrite(CompactBufferReader& reader) {
-  initialHeap_ = gc::InitialHeap(reader.readByte());
-}
+RNewArrayCopyOnWrite::RNewArrayCopyOnWrite(CompactBufferReader& reader) {}
 
 bool RNewArrayCopyOnWrite::recover(JSContext* cx,
                                    SnapshotIterator& iter) const {
   RootedArrayObject templateObject(cx,
                                    &iter.read().toObject().as<ArrayObject>());
   RootedValue result(cx);
 
-  ArrayObject* resultObject =
-      NewDenseCopyOnWriteArray(cx, templateObject, initialHeap_);
+  ArrayObject* resultObject = NewDenseCopyOnWriteArray(cx, templateObject);
   if (!resultObject) {
     return false;
   }
 
   result.setObject(*resultObject);
   iter.storeInstructionResult(result);
   return true;
 }
--- a/js/src/jit/Recover.h
+++ b/js/src/jit/Recover.h
@@ -612,19 +612,16 @@ class RNewArray final : public RInstruct
  public:
   RINSTRUCTION_HEADER_NUM_OP_(NewArray, 1)
 
   MOZ_MUST_USE bool recover(JSContext* cx,
                             SnapshotIterator& iter) const override;
 };
 
 class RNewArrayCopyOnWrite final : public RInstruction {
- private:
-  gc::InitialHeap initialHeap_;
-
  public:
   RINSTRUCTION_HEADER_NUM_OP_(NewArrayCopyOnWrite, 1)
 
   MOZ_MUST_USE bool recover(JSContext* cx,
                             SnapshotIterator& iter) const override;
 };
 
 class RNewIterator final : public RInstruction {
--- a/js/src/vm/ArrayObject-inl.h
+++ b/js/src/vm/ArrayObject-inl.h
@@ -37,16 +37,18 @@ inline void ArrayObject::setLength(JSCon
     HandleObjectGroup group, AutoSetNewObjectMetadata&) {
   const js::Class* clasp = group->clasp();
   MOZ_ASSERT(shape && group);
   MOZ_ASSERT(clasp == shape->getObjectClass());
   MOZ_ASSERT(clasp == &ArrayObject::class_);
   MOZ_ASSERT_IF(clasp->hasFinalize(), heap == gc::TenuredHeap);
   MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
                 heap == js::gc::TenuredHeap);
+  MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration(),
+                heap == gc::TenuredHeap);
 
   // Arrays can use their fixed slots to store elements, so can't have shapes
   // which allow named properties to be stored in the fixed slots.
   MOZ_ASSERT(shape->numFixedSlots() == 0);
 
   size_t nDynamicSlots = dynamicSlotsCount(0, shape->slotSpan(), clasp);
   JSObject* obj = js::AllocateObject(cx, kind, nDynamicSlots, heap, clasp);
   if (!obj) {
--- a/js/src/vm/EnvironmentObject.cpp
+++ b/js/src/vm/EnvironmentObject.cpp
@@ -74,19 +74,21 @@ PropertyName* js::EnvironmentCoordinateN
 CallObject* CallObject::create(JSContext* cx, HandleShape shape,
                                HandleObjectGroup group) {
   MOZ_ASSERT(!group->singleton());
 
   gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
   MOZ_ASSERT(CanBeFinalizedInBackground(kind, &CallObject::class_));
   kind = gc::GetBackgroundAllocKind(kind);
 
+  gc::InitialHeap heap = GetInitialHeap(GenericObject, group);
+
   JSObject* obj;
-  JS_TRY_VAR_OR_RETURN_NULL(
-      cx, obj, NativeObject::create(cx, kind, gc::DefaultHeap, shape, group));
+  JS_TRY_VAR_OR_RETURN_NULL(cx, obj,
+                            NativeObject::create(cx, kind, heap, shape, group));
 
   return &obj->as<CallObject>();
 }
 
 /*
  * Create a CallObject for a JSScript that is not initialized to any particular
  * callsite. This object can either be initialized (with an enclosing scope and
  * callee) or used as a template for jit compilation.
@@ -103,16 +105,19 @@ CallObject* CallObject::createTemplateOb
   if (!group) {
     return nullptr;
   }
 
   gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
   MOZ_ASSERT(CanBeFinalizedInBackground(kind, &class_));
   kind = gc::GetBackgroundAllocKind(kind);
 
+  // The JITs assume the result is nursery allocated unless we collected the
+  // nursery, so don't change |heap| here.
+
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(cx, obj,
                             NativeObject::create(cx, kind, heap, shape, group));
 
   CallObject* callObj = &obj->as<CallObject>();
   callObj->initEnclosingEnvironment(enclosing);
 
   if (scope->hasParameterExprs()) {
@@ -238,16 +243,23 @@ VarEnvironmentObject* VarEnvironmentObje
   if (!group) {
     return nullptr;
   }
 
   gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
   MOZ_ASSERT(CanBeFinalizedInBackground(kind, &class_));
   kind = gc::GetBackgroundAllocKind(kind);
 
+  {
+    AutoSweepObjectGroup sweep(group);
+    if (group->shouldPreTenure(sweep)) {
+      heap = gc::TenuredHeap;
+    }
+  }
+
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(cx, obj,
                             NativeObject::create(cx, kind, heap, shape, group));
 
   VarEnvironmentObject* env = &obj->as<VarEnvironmentObject>();
   MOZ_ASSERT(!env->inDictionaryMode());
   MOZ_ASSERT(env->isDelegate());
 
@@ -272,19 +284,18 @@ VarEnvironmentObject* VarEnvironmentObje
     MOZ_ASSERT_IF(
         frame.callee()->needsCallObject(),
         &frame.environmentChain()->as<CallObject>().callee() == frame.callee());
   }
 #endif
 
   RootedScript script(cx, frame.script());
   RootedObject envChain(cx, frame.environmentChain());
-  gc::InitialHeap heap = gc::DefaultHeap;
   RootedShape shape(cx, scope->environmentShape());
-  VarEnvironmentObject* env = create(cx, shape, envChain, heap);
+  VarEnvironmentObject* env = create(cx, shape, envChain, gc::DefaultHeap);
   if (!env) {
     return nullptr;
   }
   env->initScope(scope);
   return env;
 }
 
 /* static */
@@ -882,16 +893,19 @@ LexicalEnvironmentObject* LexicalEnviron
 
   RootedObjectGroup group(
       cx, ObjectGroup::defaultNewGroup(cx, &LexicalEnvironmentObject::class_,
                                        TaggedProto(nullptr)));
   if (!group) {
     return nullptr;
   }
 
+  // The JITs assume the result is nursery allocated unless we collected the
+  // nursery, so don't change |heap| here.
+
   gc::AllocKind allocKind = gc::GetGCObjectKind(shape->numFixedSlots());
   MOZ_ASSERT(
       CanBeFinalizedInBackground(allocKind, &LexicalEnvironmentObject::class_));
   allocKind = GetBackgroundAllocKind(allocKind);
 
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(
       cx, obj, NativeObject::create(cx, allocKind, heap, shape, group));
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -5298,17 +5298,17 @@ ArrayObject* js::NewArrayCopyOnWriteOper
   MOZ_ASSERT(*pc == JSOP_NEWARRAY_COPYONWRITE);
 
   RootedArrayObject baseobj(
       cx, ObjectGroup::getOrFixupCopyOnWriteObject(cx, script, pc));
   if (!baseobj) {
     return nullptr;
   }
 
-  return NewDenseCopyOnWriteArray(cx, baseobj, gc::DefaultHeap);
+  return NewDenseCopyOnWriteArray(cx, baseobj);
 }
 
 void js::ReportRuntimeLexicalError(JSContext* cx, unsigned errorNumber,
                                    HandleId id) {
   MOZ_ASSERT(errorNumber == JSMSG_UNINITIALIZED_LEXICAL ||
              errorNumber == JSMSG_BAD_CONST_ASSIGN);
   if (UniqueChars printable =
           IdToPrintableUTF8(cx, id, IdToPrintableBehavior::IdIsIdentifier)) {
--- a/js/src/vm/Iteration.cpp
+++ b/js/src/vm/Iteration.cpp
@@ -614,17 +614,17 @@ static PropertyIteratorObject* NewProper
   if (!shape) {
     return nullptr;
   }
 
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(
       cx, obj,
       NativeObject::create(cx, ITERATOR_FINALIZE_KIND,
-                           GetInitialHeap(GenericObject, clasp), shape, group));
+                           GetInitialHeap(GenericObject, group), shape, group));
 
   PropertyIteratorObject* res = &obj->as<PropertyIteratorObject>();
 
   // CodeGenerator::visitIteratorStartO assumes the iterator object is not
   // inside the nursery when deciding whether a barrier is necessary.
   MOZ_ASSERT(!js::gc::IsInsideNursery(res));
 
   MOZ_ASSERT(res->numFixedSlots() == PropertyIteratorObject::NUM_FIXED_SLOTS);
@@ -990,18 +990,17 @@ JSObject* js::CreateIterResultObject(JSC
   RootedObject templateObject(
       cx, cx->realm()->getOrCreateIterResultTemplateObject(cx));
   if (!templateObject) {
     return nullptr;
   }
 
   NativeObject* resultObj;
   JS_TRY_VAR_OR_RETURN_NULL(
-      cx, resultObj,
-      NativeObject::createWithTemplate(cx, gc::DefaultHeap, templateObject));
+      cx, resultObj, NativeObject::createWithTemplate(cx, templateObject));
 
   // Step 3.
   resultObj->setSlot(Realm::IterResultObjectValueSlot, value);
 
   // Step 4.
   resultObj->setSlot(Realm::IterResultObjectDoneSlot,
                      done ? TrueHandleValue : FalseHandleValue);
 
--- a/js/src/vm/JSObject-inl.h
+++ b/js/src/vm/JSObject-inl.h
@@ -394,16 +394,43 @@ MOZ_ALWAYS_INLINE bool ToPropertyKey(JSC
  * its own object. Such a function object must not be accessible to script
  * or embedding code.
  */
 inline bool IsInternalFunctionObject(JSObject& funobj) {
   JSFunction& fun = funobj.as<JSFunction>();
   return fun.isInterpreted() && !fun.environment();
 }
 
+inline gc::InitialHeap GetInitialHeap(NewObjectKind newKind,
+                                      const Class* clasp) {
+  if (newKind == NurseryAllocatedProxy) {
+    MOZ_ASSERT(clasp->isProxy());
+    MOZ_ASSERT(clasp->hasFinalize());
+    MOZ_ASSERT(!CanNurseryAllocateFinalizedClass(clasp));
+    return gc::DefaultHeap;
+  }
+  if (newKind != GenericObject) {
+    return gc::TenuredHeap;
+  }
+  if (clasp->hasFinalize() && !CanNurseryAllocateFinalizedClass(clasp)) {
+    return gc::TenuredHeap;
+  }
+  return gc::DefaultHeap;
+}
+
+inline gc::InitialHeap GetInitialHeap(NewObjectKind newKind,
+                                      ObjectGroup* group) {
+  AutoSweepObjectGroup sweep(group);
+  if (group->shouldPreTenure(sweep)) {
+    return gc::TenuredHeap;
+  }
+
+  return GetInitialHeap(newKind, group->clasp());
+}
+
 /*
  * Make an object with the specified prototype. If parent is null, it will
  * default to the prototype's global if the prototype is non-null.
  */
 JSObject* NewObjectWithGivenTaggedProto(JSContext* cx, const Class* clasp,
                                         Handle<TaggedProto> proto,
                                         gc::AllocKind allocKind,
                                         NewObjectKind newKind,
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -787,17 +787,17 @@ static inline JSObject* NewObject(JSCont
                       : GetGCKindSlots(kind, clasp);
 
   RootedShape shape(cx, EmptyShape::getInitialShape(cx, clasp, group->proto(),
                                                     nfixed, initialShapeFlags));
   if (!shape) {
     return nullptr;
   }
 
-  gc::InitialHeap heap = GetInitialHeap(newKind, clasp);
+  gc::InitialHeap heap = GetInitialHeap(newKind, group);
 
   JSObject* obj;
   if (clasp->isJSFunction()) {
     JS_TRY_VAR_OR_RETURN_NULL(cx, obj,
                               JSFunction::create(cx, kind, heap, shape, group));
   } else if (MOZ_LIKELY(clasp->isNative())) {
     JS_TRY_VAR_OR_RETURN_NULL(
         cx, obj, NativeObject::create(cx, kind, heap, shape, group));
@@ -969,18 +969,18 @@ JSObject* js::NewObjectWithGroupCommon(J
     allocKind = GetBackgroundAllocKind(allocKind);
   }
 
   bool isCachable = NewObjectWithGroupIsCachable(cx, group, newKind);
   if (isCachable) {
     NewObjectCache& cache = cx->caches().newObjectCache;
     NewObjectCache::EntryIndex entry = -1;
     if (cache.lookupGroup(group, allocKind, &entry)) {
-      JSObject* obj = cache.newObjectFromHit(
-          cx, entry, GetInitialHeap(newKind, group->clasp()));
+      JSObject* obj =
+          cache.newObjectFromHit(cx, entry, GetInitialHeap(newKind, group));
       if (obj) {
         return obj;
       }
     }
   }
 
   JSObject* obj = NewObject(cx, group, allocKind, newKind);
   if (!obj) {
@@ -4293,16 +4293,23 @@ void JSObject::debugCheckNewObject(Objec
 
   MOZ_ASSERT_IF(clasp->hasFinalize(),
                 heap == gc::TenuredHeap ||
                     CanNurseryAllocateFinalizedClass(clasp) ||
                     clasp->isProxy());
   MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
                 heap == gc::TenuredHeap);
 
+  // Check that the group's shouldPreTenure flag is respected but ignore
+  // environment objects that the JIT expects to be nursery allocated.
+  MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration() &&
+                    clasp != &CallObject::class_ &&
+                    clasp != &LexicalEnvironmentObject::class_,
+                heap == gc::TenuredHeap);
+
   MOZ_ASSERT(!group->realm()->hasObjectPendingMetadata());
 
   // Non-native classes manage their own data and slots, so numFixedSlots and
   // slotSpan are always 0. Note that proxy classes can have reserved slots
   // but they're also not included in numFixedSlots/slotSpan.
   if (!clasp->isNative()) {
     MOZ_ASSERT_IF(!clasp->isProxy(), JSCLASS_RESERVED_SLOTS(clasp) == 0);
     MOZ_ASSERT(!clasp->hasPrivate());
--- a/js/src/vm/JSObject.h
+++ b/js/src/vm/JSObject.h
@@ -797,33 +797,16 @@ Value GetThisValueOfWith(JSObject* env);
 
 using ClassInitializerOp = JSObject* (*)(JSContext* cx,
                                          Handle<GlobalObject*> global);
 
 } /* namespace js */
 
 namespace js {
 
-inline gc::InitialHeap GetInitialHeap(NewObjectKind newKind,
-                                      const Class* clasp) {
-  if (newKind == NurseryAllocatedProxy) {
-    MOZ_ASSERT(clasp->isProxy());
-    MOZ_ASSERT(clasp->hasFinalize());
-    MOZ_ASSERT(!CanNurseryAllocateFinalizedClass(clasp));
-    return gc::DefaultHeap;
-  }
-  if (newKind != GenericObject) {
-    return gc::TenuredHeap;
-  }
-  if (clasp->hasFinalize() && !CanNurseryAllocateFinalizedClass(clasp)) {
-    return gc::TenuredHeap;
-  }
-  return gc::DefaultHeap;
-}
-
 bool NewObjectWithTaggedProtoIsCachable(JSContext* cx,
                                         Handle<TaggedProto> proto,
                                         NewObjectKind newKind,
                                         const Class* clasp);
 
 // ES6 9.1.15 GetPrototypeFromConstructor.
 extern bool GetPrototypeFromConstructor(JSContext* cx,
                                         js::HandleObject newTarget,
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -517,19 +517,21 @@ inline bool NativeObject::isInWholeCellB
   }
 
   js::gc::gcTracer.traceCreateObject(nobj);
 
   return nobj;
 }
 
 /* static */ inline JS::Result<NativeObject*, JS::OOM&>
-NativeObject::createWithTemplate(JSContext* cx, js::gc::InitialHeap heap,
-                                 HandleObject templateObject) {
+NativeObject::createWithTemplate(JSContext* cx, HandleObject templateObject) {
   RootedObjectGroup group(cx, templateObject->group());
+
+  gc::InitialHeap heap = GetInitialHeap(GenericObject, group);
+
   RootedShape shape(cx, templateObject->as<NativeObject>().lastProperty());
 
   gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
   MOZ_ASSERT(CanBeFinalizedInBackground(kind, shape->getObjectClass()));
   kind = gc::GetBackgroundAllocKind(kind);
 
   return create(cx, kind, heap, shape, group);
 }
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -560,17 +560,17 @@ class NativeObject : public ShapedObject
 
   inline bool isInWholeCellBuffer() const;
 
   static inline JS::Result<NativeObject*, JS::OOM&> create(
       JSContext* cx, js::gc::AllocKind kind, js::gc::InitialHeap heap,
       js::HandleShape shape, js::HandleObjectGroup group);
 
   static inline JS::Result<NativeObject*, JS::OOM&> createWithTemplate(
-      JSContext* cx, js::gc::InitialHeap heap, HandleObject templateObject);
+      JSContext* cx, HandleObject templateObject);
 
 #ifdef DEBUG
   static void enableShapeConsistencyChecks();
 #endif
 
  protected:
 #ifdef DEBUG
   friend class js::AutoCheckShapeConsistency;
--- a/js/src/vm/ObjectGroup-inl.h
+++ b/js/src/vm/ObjectGroup-inl.h
@@ -49,18 +49,23 @@ inline bool ObjectGroup::hasAllFlags(con
 
 inline bool ObjectGroup::unknownProperties(const AutoSweepObjectGroup& sweep) {
   MOZ_ASSERT_IF(flags(sweep) & OBJECT_FLAG_UNKNOWN_PROPERTIES,
                 hasAllFlags(sweep, OBJECT_FLAG_DYNAMIC_MASK));
   return !!(flags(sweep) & OBJECT_FLAG_UNKNOWN_PROPERTIES);
 }
 
 inline bool ObjectGroup::shouldPreTenure(const AutoSweepObjectGroup& sweep) {
-  return hasAnyFlags(sweep, OBJECT_FLAG_PRE_TENURE) &&
-         !unknownProperties(sweep);
+  MOZ_ASSERT(sweep.group() == this);
+  return shouldPreTenureDontCheckGeneration();
+}
+
+inline bool ObjectGroup::shouldPreTenureDontCheckGeneration() {
+  return hasAnyFlagsDontCheckGeneration(OBJECT_FLAG_PRE_TENURE) &&
+         !unknownPropertiesDontCheckGeneration();
 }
 
 inline bool ObjectGroup::canPreTenure(const AutoSweepObjectGroup& sweep) {
   return !unknownProperties(sweep);
 }
 
 inline bool ObjectGroup::fromAllocationSite(const AutoSweepObjectGroup& sweep) {
   return flags(sweep) & OBJECT_FLAG_FROM_ALLOCATION_SITE;
--- a/js/src/vm/ObjectGroup.h
+++ b/js/src/vm/ObjectGroup.h
@@ -399,30 +399,35 @@ class ObjectGroup : public gc::TenuredCe
   inline ObjectGroup(const Class* clasp, TaggedProto proto, JS::Realm* realm,
                      ObjectGroupFlags initialFlags);
 
   inline bool hasAnyFlags(const AutoSweepObjectGroup& sweep,
                           ObjectGroupFlags flags);
   inline bool hasAllFlags(const AutoSweepObjectGroup& sweep,
                           ObjectGroupFlags flags);
 
+  bool hasAnyFlagsDontCheckGeneration(ObjectGroupFlags flags) {
+    MOZ_ASSERT((flags & OBJECT_FLAG_DYNAMIC_MASK) == flags);
+    return !!(this->flagsDontCheckGeneration() & flags);
+  }
   bool hasAllFlagsDontCheckGeneration(ObjectGroupFlags flags) {
     MOZ_ASSERT((flags & OBJECT_FLAG_DYNAMIC_MASK) == flags);
     return (this->flagsDontCheckGeneration() & flags) == flags;
   }
 
   inline bool unknownProperties(const AutoSweepObjectGroup& sweep);
 
   bool unknownPropertiesDontCheckGeneration() {
     MOZ_ASSERT_IF(flagsDontCheckGeneration() & OBJECT_FLAG_UNKNOWN_PROPERTIES,
                   hasAllFlagsDontCheckGeneration(OBJECT_FLAG_DYNAMIC_MASK));
     return !!(flagsDontCheckGeneration() & OBJECT_FLAG_UNKNOWN_PROPERTIES);
   }
 
   inline bool shouldPreTenure(const AutoSweepObjectGroup& sweep);
+  inline bool shouldPreTenureDontCheckGeneration();
 
   gc::InitialHeap initialHeap(CompilerConstraintList* constraints);
 
   inline bool canPreTenure(const AutoSweepObjectGroup& sweep);
   inline bool fromAllocationSite(const AutoSweepObjectGroup& sweep);
   inline void setShouldPreTenure(const AutoSweepObjectGroup& sweep,
                                  JSContext* cx);
 
--- a/js/src/vm/ProxyObject.cpp
+++ b/js/src/vm/ProxyObject.cpp
@@ -179,17 +179,17 @@ void ProxyObject::nuke() {
     if (!shape) {
       return cx->alreadyReportedOOM();
     }
 
     MOZ_ASSERT(group->realm() == realm);
     realm->newProxyCache.add(group, shape);
   }
 
-  gc::InitialHeap heap = GetInitialHeap(newKind, clasp);
+  gc::InitialHeap heap = GetInitialHeap(newKind, group);
   debugCheckNewObject(group, shape, allocKind, heap);
 
   JSObject* obj =
       js::AllocateObject(cx, allocKind, /* nDynamicSlots = */ 0, heap, clasp);
   if (!obj) {
     return cx->alreadyReportedOOM();
   }
 
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -870,17 +870,17 @@ UnboxedPlainObject* UnboxedPlainObject::
 
   MOZ_ASSERT(group->clasp() == &class_);
 
   gc::AllocKind allocKind;
   {
     AutoSweepObjectGroup sweep(group);
     allocKind = group->unboxedLayout(sweep).getAllocKind();
   }
-  gc::InitialHeap heap = GetInitialHeap(newKind, &class_);
+  gc::InitialHeap heap = GetInitialHeap(newKind, group);
 
   MOZ_ASSERT(newKind != SingletonObject);
 
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(cx, obj,
                             createInternal(cx, allocKind, heap, group));
 
   UnboxedPlainObject* uobj = static_cast<UnboxedPlainObject*>(obj);
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/1428892.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<script>
+img = new Image(0, 2)
+document.documentElement.appendChild(img)
+frm = document.createElement("iframe")
+frm.align = "right"
+document.documentElement.appendChild(frm)
+img.append(undefined, undefined, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\rAAAAA=[AAAAAAAAAAAAAA\u066B\bAAAAAAAAAAAAAAAA*<AAAAAA")
+</script>
+<style>
+html { width: 300px; -moz-column-width: 100px; height: 100px; }
+</style>
+<div style="float: left; height: 5px;"></div>
+<div style="clear: left;"><feDiffuseLighting><div style="float: right;"></div></div>
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/1470499.html
@@ -0,0 +1,22 @@
+<script>
+function go() {
+  a.reset();
+}
+function eh1() {
+  var d = f.gradientTransform.baseVal.consolidate();
+  b.addEventListener("DOMSubtreeModified", eh1);
+  d.setRotate(0,0,6);
+}
+function eh2() {
+  var c = document.createElement("t");
+  b.insertAdjacentElement("beforeEnd",f);
+  var g = new MutationObserver(eh1);
+  g.observe(c, { attributes: true });
+  c.setAttribute("m", "");
+}
+</script>
+<body onload=go()>
+<form id="a" onreset="eh2()">
+<svg>
+<animateMotion id="b" />
+<radialGradient id="f" gradientTransform="matrix(0 2 0 0 0 0)">
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -511,16 +511,17 @@ load 1414100.html
 load 1414303.html
 load 1419762.html
 load 1419802.html
 load 1420533.html
 load 1423216.html
 load 1425893.html
 load 1425959.html
 load 1428353.html
+load 1428892.html
 load 1429088.html
 load 1429961.html
 load 1429962.html
 load 1435015.html
 load 1437155.html
 load 1439016.html
 load 1442506.html
 load 1443027-1.html
@@ -535,16 +536,17 @@ load 1461812.html
 load 1462412.html
 load 1463940.html
 HTTP load 1464641.html
 load 1464737.html
 load 1466638.html
 load 1467688.html
 load 1467964.html
 load 1469354.html
+load 1470499.html
 pref(layout.accessiblecaret.enabled,true) load 1472020.html
 load 1472027.html
 load 1477847.html
 skip-if(verify&&Android) pref(layout.accessiblecaret.enabled,true) load 1486521.html
 load 1489149.html
 load 1490037.html
 load 1494332.html
 load 1494030.html