Bug 1614303: API changes for newest Cranelift version; r=rhunt

Differential Revision: https://phabricator.services.mozilla.com/D62234

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Benjamin Bouvier 2020-02-10 16:50:59 +00:00
Родитель 399c0377a9
Коммит 2ab02cf31b
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -259,9 +259,9 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
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);
}
@ -513,7 +513,7 @@ impl<'a> EmitEnv<'a> {
}
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!();
}

Просмотреть файл

@ -667,7 +667,7 @@ impl<'a, 'b, 'c> FuncEnvironment for TransEnv<'a, 'b, 'c> {
// 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)?));
}