mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 17:18:01 +00:00
experimental: support for debug info (#118)
Signed-off-by: wpt967 <matt.aw@parity.io> Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -47,7 +47,11 @@ impl Assignment {
|
||||
.into());
|
||||
}
|
||||
};
|
||||
let length = identifier.inner.len();
|
||||
let length = identifier
|
||||
.inner
|
||||
.len()
|
||||
.try_into()
|
||||
.map_err(|_| Error::Parser(ParserError::InvalidLength))?;
|
||||
|
||||
match lexer.peek()? {
|
||||
Token {
|
||||
@@ -115,6 +119,8 @@ where
|
||||
mut self,
|
||||
context: &mut revive_llvm_context::PolkaVMContext<D>,
|
||||
) -> anyhow::Result<()> {
|
||||
context.set_debug_location(self.location.line, 0, None)?;
|
||||
|
||||
let value = match self.initializer.into_llvm(context)? {
|
||||
Some(value) => value,
|
||||
None => return Ok(()),
|
||||
@@ -142,6 +148,8 @@ where
|
||||
context.build_store(tuple_pointer, value.to_llvm())?;
|
||||
|
||||
for (index, binding) in self.bindings.into_iter().enumerate() {
|
||||
context.set_debug_location(self.location.line, 0, None)?;
|
||||
|
||||
let field_pointer = context.build_gep(
|
||||
tuple_pointer,
|
||||
&[
|
||||
|
||||
Reference in New Issue
Block a user