Bug 1614303: API changes for newest Cranelift version; r=rhunt
authorBenjamin Bouvier <benj@benj.me>
Mon, 10 Feb 2020 16:50:59 +0000
changeset 513693 7df1967010af976aadade5e6e964731c6c9680e1
parent 513692 57d10ca6fbee57242db7eea07d5e5e685e00b006
child 513694 196df09edf62fa8d154b7bf3c3cdc7f9733bc390
push id37120
push usercbrindusan@mozilla.com
push dateThu, 13 Feb 2020 18:21:33 +0000
treeherdermozilla-central@b47e32ff95b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1614303
milestone75.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 1614303: API changes for newest Cranelift version; r=rhunt Differential Revision: https://phabricator.services.mozilla.com/D62234
js/src/wasm/cranelift/src/compile.rs
js/src/wasm/cranelift/src/wasm2clif.rs
--- a/js/src/wasm/cranelift/src/compile.rs
+++ b/js/src/wasm/cranelift/src/compile.rs
@@ -254,19 +254,19 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
     fn emit_metadata(
         &self,
         metadata: &mut Vec<bindings::MetadataEntry>,
         mut stackmaps: bindings::Stackmaps,
     ) {
         let encinfo = self.isa.encoding_info();
         let func = &self.context.func;
         let stack_slots = &func.stack_slots;
-        for ebb in func.layout.ebbs() {
+        for block in func.layout.blocks() {
             let mut pending_safepoint = None;
-            for (offset, inst, inst_size) in func.inst_offsets(ebb, &encinfo) {
+            for (offset, inst, inst_size) in func.inst_offsets(block, &encinfo) {
                 if let Some(stackmap) = pending_safepoint.take() {
                     stackmaps.add_stackmap(stack_slots, offset + inst_size, stackmap);
                 }
                 let opcode = func.dfg[inst].opcode();
                 match opcode {
                     ir::Opcode::Call => self.call_metadata(metadata, inst, offset + inst_size),
                     ir::Opcode::CallIndirect => {
                         self.indirect_call_metadata(metadata, inst, offset + inst_size)
@@ -508,17 +508,17 @@ impl<'a> EmitEnv<'a> {
         EmitEnv {
             metadata,
             rodata_relocs,
         }
     }
 }
 
 impl<'a> RelocSink for EmitEnv<'a> {
-    fn reloc_ebb(&mut self, _offset: CodeOffset, _reloc: Reloc, _ebb_offset: CodeOffset) {
+    fn reloc_block(&mut self, _offset: CodeOffset, _reloc: Reloc, _block_offset: CodeOffset) {
         unimplemented!();
     }
 
     fn reloc_external(
         &mut self,
         offset: CodeOffset,
         _reloc: Reloc,
         name: &ir::ExternalName,
--- a/js/src/wasm/cranelift/src/wasm2clif.rs
+++ b/js/src/wasm/cranelift/src/wasm2clif.rs
@@ -662,17 +662,17 @@ impl<'a, 'b, 'c> FuncEnvironment for Tra
         func: &mut ir::Function,
         index: GlobalIndex,
     ) -> WasmResult<GlobalVariable> {
         let global = self.env.global(index);
         if global.is_constant() {
             // Constant globals have a known value at compile time. We insert an instruction to
             // materialize the constant at the front of the entry block.
             let mut pos = FuncCursor::new(func);
-            pos.next_ebb().expect("empty function");
+            pos.next_block().expect("empty function");
             pos.next_inst();
             return Ok(GlobalVariable::Const(global.emit_constant(&mut pos)?));
         }
 
         match global.value_type()? {
             ir::types::R32 | ir::types::R64 => {
                 return Ok(GlobalVariable::Custom);
             }