Bug 1643082 - Transpile StringFromCharCodeResult. r=iain
authorTom Schuster <evilpies@gmail.com>
Thu, 04 Jun 2020 09:34:17 +0000
changeset 597940 e592218473ff8f259d492db86c1f6dd6c98b5d54
parent 597939 b047adce771a9c57c3208ad0645df8a3c09a1021
child 597941 9d25fef91ab12ba23193958ddae616811d728ac6
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersiain
bugs1643082
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1643082 - Transpile StringFromCharCodeResult. r=iain Differential Revision: https://phabricator.services.mozilla.com/D78115
js/src/jit/CacheIROps.yaml
js/src/jit/WarpCacheIRTranspiler.cpp
--- a/js/src/jit/CacheIROps.yaml
+++ b/js/src/jit/CacheIROps.yaml
@@ -688,17 +688,17 @@
 - name: IsConstructorResult
   shared: true
   transpile: true
   args:
     obj: ObjId
 
 - name: StringFromCharCodeResult
   shared: false
-  transpile: false
+  transpile: true
   args:
     code: Int32Id
 
 - name: MathAbsInt32Result
   shared: true
   transpile: true
   args:
     input: Int32Id
--- a/js/src/jit/WarpCacheIRTranspiler.cpp
+++ b/js/src/jit/WarpCacheIRTranspiler.cpp
@@ -694,16 +694,27 @@ bool WarpCacheIRTranspiler::emitLoadStri
 
   auto* charCode = MCharCodeAt::New(alloc(), str, index);
   add(charCode);
 
   pushResult(charCode);
   return true;
 }
 
+bool WarpCacheIRTranspiler::emitStringFromCharCodeResult(
+    Int32OperandId codeId) {
+  MDefinition* code = getOperand(codeId);
+
+  auto* fromCharCode = MFromCharCode::New(alloc(), code);
+  add(fromCharCode);
+
+  pushResult(fromCharCode);
+  return true;
+}
+
 bool WarpCacheIRTranspiler::emitStoreDynamicSlot(ObjOperandId objId,
                                                  uint32_t offsetOffset,
                                                  ValOperandId rhsId) {
   int32_t offset = int32StubField(offsetOffset);
 
   MDefinition* obj = getOperand(objId);
   size_t slotIndex = NativeObject::getDynamicSlotIndexFromOffset(offset);
   MDefinition* rhs = getOperand(rhsId);