Skip to content

Commit

Permalink
set empty source span for IR nodes that can only fail at runtime due …
Browse files Browse the repository at this point in the history
…the the invalid type of args

which should be eliminated by the type checking during the compilation;
  • Loading branch information
greenhat committed Aug 21, 2023
1 parent 4ecb9fb commit b019605
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions ergotree-ir/src/source_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,70 +92,70 @@ impl Expr {
match self {
Expr::Append(op) => op.source_span,
Expr::Const(_) => SourceSpan::empty(),
Expr::ConstPlaceholder(_) => todo!(),
Expr::ConstPlaceholder(_) => SourceSpan::empty(),
Expr::SubstConstants(_) => todo!(),
Expr::ByteArrayToLong(_) => todo!(),
Expr::ByteArrayToBigInt(_) => todo!(),
Expr::LongToByteArray(_) => todo!(),
Expr::Collection(_) => todo!(),
Expr::Tuple(_) => todo!(),
Expr::CalcBlake2b256(_) => todo!(),
Expr::CalcSha256(_) => todo!(),
Expr::Context => todo!(),
Expr::Global => todo!(),
Expr::LongToByteArray(_) => SourceSpan::empty(),
Expr::Collection(_) => SourceSpan::empty(),
Expr::Tuple(_) => SourceSpan::empty(),
Expr::CalcBlake2b256(_) => SourceSpan::empty(),
Expr::CalcSha256(_) => SourceSpan::empty(),
Expr::Context => SourceSpan::empty(),
Expr::Global => SourceSpan::empty(),
Expr::GlobalVars(_) => SourceSpan::empty(),
Expr::FuncValue(_) => todo!(),
Expr::Apply(_) => todo!(),
Expr::FuncValue(_) => SourceSpan::empty(),
Expr::Apply(_) => SourceSpan::empty(),
Expr::MethodCall(_) => todo!(),
Expr::ProperyCall(_) => todo!(),
Expr::BlockValue(op) => op.source_span,
Expr::ValDef(op) => op.source_span,
Expr::ValUse(_) => SourceSpan::empty(),
Expr::If(_) => todo!(),
Expr::If(_) => SourceSpan::empty(),
Expr::BinOp(op) => op.source_span,
Expr::And(_) => todo!(),
Expr::Or(_) => todo!(),
Expr::Xor(_) => todo!(),
Expr::Atleast(_) => todo!(),
Expr::LogicalNot(_) => todo!(),
Expr::And(_) => SourceSpan::empty(),
Expr::Or(_) => SourceSpan::empty(),
Expr::Xor(_) => SourceSpan::empty(),
Expr::Atleast(_) => SourceSpan::empty(),
Expr::LogicalNot(_) => SourceSpan::empty(),
Expr::Negation(_) => todo!(),
Expr::BitInversion(_) => todo!(),
Expr::BitInversion(_) => SourceSpan::empty(),
Expr::OptionGet(_) => todo!(),
Expr::OptionIsDefined(_) => todo!(),
Expr::OptionGetOrElse(_) => todo!(),
Expr::ExtractAmount(_) => todo!(),
Expr::ExtractAmount(_) => SourceSpan::empty(),
Expr::ExtractRegisterAs(_) => todo!(),
Expr::ExtractBytes(_) => todo!(),
Expr::ExtractBytesWithNoRef(_) => todo!(),
Expr::ExtractScriptBytes(_) => todo!(),
Expr::ExtractCreationInfo(_) => todo!(),
Expr::ExtractId(_) => todo!(),
Expr::ExtractBytes(_) => SourceSpan::empty(),
Expr::ExtractBytesWithNoRef(_) => SourceSpan::empty(),
Expr::ExtractScriptBytes(_) => SourceSpan::empty(),
Expr::ExtractCreationInfo(_) => SourceSpan::empty(),
Expr::ExtractId(_) => SourceSpan::empty(),
Expr::ByIndex(op) => op.source_span,
Expr::SizeOf(_) => todo!(),
Expr::SizeOf(_) => SourceSpan::empty(),
Expr::Slice(_) => todo!(),
Expr::Fold(_) => todo!(),
Expr::Map(_) => todo!(),
Expr::Filter(_) => todo!(),
Expr::Exists(_) => todo!(),
Expr::ForAll(_) => todo!(),
Expr::SelectField(_) => todo!(),
Expr::BoolToSigmaProp(_) => todo!(),
Expr::Upcast(_) => todo!(),
Expr::Downcast(_) => todo!(),
Expr::CreateProveDlog(_) => todo!(),
Expr::CreateProveDhTuple(_) => todo!(),
Expr::SigmaPropBytes(_) => todo!(),
Expr::DecodePoint(_) => todo!(),
Expr::SigmaAnd(_) => todo!(),
Expr::SigmaOr(_) => todo!(),
Expr::BoolToSigmaProp(_) => SourceSpan::empty(),
Expr::Upcast(_) => SourceSpan::empty(),
Expr::Downcast(_) => SourceSpan::empty(),
Expr::CreateProveDlog(_) => SourceSpan::empty(),
Expr::CreateProveDhTuple(_) => SourceSpan::empty(),
Expr::SigmaPropBytes(_) => SourceSpan::empty(),
Expr::DecodePoint(_) => SourceSpan::empty(),
Expr::SigmaAnd(_) => SourceSpan::empty(),
Expr::SigmaOr(_) => SourceSpan::empty(),
Expr::GetVar(_) => todo!(),
Expr::DeserializeRegister(_) => todo!(),
Expr::DeserializeContext(_) => todo!(),
Expr::MultiplyGroup(_) => todo!(),
Expr::Exponentiate(_) => todo!(),
Expr::XorOf(_) => todo!(),
Expr::MultiplyGroup(_) => SourceSpan::empty(),
Expr::Exponentiate(_) => SourceSpan::empty(),
Expr::XorOf(_) => SourceSpan::empty(),
Expr::TreeLookup(_) => todo!(),
Expr::CreateAvlTree(_) => todo!(),
Expr::CreateAvlTree(_) => SourceSpan::empty(),
}
}
}

0 comments on commit b019605

Please sign in to comment.