mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 23:18:48 +00:00
Update dependencies
This commit is contained in:
@@ -247,11 +247,14 @@ impl IsEquiv for Expression {
|
||||
}
|
||||
(Self::Member(member), Self::Member(other_member)) => member.is_equiv(other_member),
|
||||
(Self::Call(call), Self::Call(other_call)) => call.is_equiv(other_call),
|
||||
(Self::SizeOf(typename), Self::SizeOf(other_typename)) => {
|
||||
typename.is_equiv(other_typename)
|
||||
(Self::SizeOfTy(size_of_ty), Self::SizeOfTy(other_size_of_ty)) => {
|
||||
size_of_ty.is_equiv(other_size_of_ty)
|
||||
}
|
||||
(Self::AlignOf(typename), Self::AlignOf(other_typename)) => {
|
||||
typename.is_equiv(other_typename)
|
||||
(Self::SizeOfVal(size_of_val), Self::SizeOfVal(other_size_of_val)) => {
|
||||
size_of_val.is_equiv(other_size_of_val)
|
||||
}
|
||||
(Self::AlignOf(align_of), Self::AlignOf(other_align_of)) => {
|
||||
align_of.is_equiv(other_align_of)
|
||||
}
|
||||
(Self::UnaryOperator(unary), Self::UnaryOperator(other_unary)) => {
|
||||
unary.node.operator.is_equiv(&other_unary.node.operator)
|
||||
@@ -506,6 +509,24 @@ impl IsEquiv for CallExpression {
|
||||
}
|
||||
}
|
||||
|
||||
impl IsEquiv for SizeOfTy {
|
||||
fn is_equiv(&self, other: &Self) -> bool {
|
||||
self.0.is_equiv(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl IsEquiv for SizeOfVal {
|
||||
fn is_equiv(&self, other: &Self) -> bool {
|
||||
self.0.is_equiv(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl IsEquiv for AlignOf {
|
||||
fn is_equiv(&self, other: &Self) -> bool {
|
||||
self.0.is_equiv(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn assert_ast_equiv(lhs: &TranslationUnit, rhs: &TranslationUnit) {
|
||||
if !lhs.is_equiv(rhs) {
|
||||
panic!(
|
||||
|
||||
@@ -466,8 +466,9 @@ impl AssertSupported for Expression {
|
||||
Self::Member(member) => member.assert_supported(),
|
||||
Self::Call(call) => call.assert_supported(),
|
||||
Self::CompoundLiteral(_) => panic!("Expression::CompoundLiteral"),
|
||||
Self::SizeOf(typename) => typename.assert_supported(),
|
||||
Self::AlignOf(typename) => typename.assert_supported(),
|
||||
Self::SizeOfTy(size_of_ty) => size_of_ty.assert_supported(),
|
||||
Self::SizeOfVal(size_of_val) => size_of_val.assert_supported(),
|
||||
Self::AlignOf(align_of) => align_of.assert_supported(),
|
||||
Self::UnaryOperator(unary) => unary.assert_supported(),
|
||||
Self::Cast(cast) => cast.assert_supported(),
|
||||
Self::BinaryOperator(binary) => binary.assert_supported(),
|
||||
@@ -591,3 +592,21 @@ impl AssertSupported for ConditionalExpression {
|
||||
self.else_expression.assert_supported();
|
||||
}
|
||||
}
|
||||
|
||||
impl AssertSupported for SizeOfTy {
|
||||
fn assert_supported(&self) {
|
||||
self.0.assert_supported();
|
||||
}
|
||||
}
|
||||
|
||||
impl AssertSupported for SizeOfVal {
|
||||
fn assert_supported(&self) {
|
||||
self.0.assert_supported();
|
||||
}
|
||||
}
|
||||
|
||||
impl AssertSupported for AlignOf {
|
||||
fn assert_supported(&self) {
|
||||
self.0.assert_supported();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ mod write_ir;
|
||||
use core::convert::TryFrom;
|
||||
use core::fmt;
|
||||
use core::ops::{Deref, DerefMut};
|
||||
use hexf::{parse_hexf32, parse_hexf64};
|
||||
use hexf_parse::{parse_hexf32, parse_hexf64};
|
||||
use lang_c::ast;
|
||||
use ordered_float::OrderedFloat;
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
|
||||
Reference in New Issue
Block a user