Skip to content

Commit

Permalink
Merge pull request #28467 from cuibuwei/mainnet
Browse files Browse the repository at this point in the history
chore: remove redundant words and fix some typos in comment
  • Loading branch information
d0cd authored Dec 16, 2024
2 parents 76a6fbc + 5564edc commit b90f958
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/passes/src/common/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<N: Node> DiGraph<N> {
// Detects if there is a cycle in the graph starting from the given node, via a recursive depth-first search.
// If there is no cycle, returns `None`.
// If there is a cycle, returns the node that was most recently discovered.
// Nodes are added to to `finished` in post-order order.
// Nodes are added to `finished` in post-order order.
fn contains_cycle_from(&self, node: N, discovered: &mut IndexSet<N>, finished: &mut IndexSet<N>) -> Option<N> {
// Add the node to the set of discovered nodes.
discovered.insert(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl ExpressionConsumer for StaticSingleAssigner<'_> {
(Expression::Identifier(place), vec![statement])
}

/// Consumes and returns the locator expression without making any modifciations
/// Consumes and returns the locator expression without making any modifications
fn consume_locator(&mut self, input: LocatorExpression) -> Self::Output {
(Expression::Locator(input), Vec::new())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ impl StatementConsumer for StaticSingleAssigner<'_> {
let if_true = create_phi_argument(&if_table, **symbol);
let if_false = create_phi_argument(&else_table, **symbol);

// Create a new node ID for the the phi function.
// Create a new node ID for the phi function.
let id = self.node_builder.next_id();
// Update the type of the node ID.
let type_ = match self.type_table.get(&if_true.id()) {
Expand Down
2 changes: 1 addition & 1 deletion compiler/passes/src/symbol_table_creation/creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl<'a> ProgramVisitor<'a> for SymbolTableCreator<'a> {
fn visit_function_stub(&mut self, input: &'a FunctionStub) {
// Construct the location for the function.
let location = Location::new(self.program_name, input.name());
// Initalize the function symbol.
// Initialize the function symbol.
if let Err(err) = self.symbol_table.insert_fn(location.clone(), &Function::from(input.clone())) {
self.handler.emit_err(err);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/passes/src/type_checking/check_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ impl<'a, N: Network> ExpressionVisitor<'a> for TypeChecker<'a, N> {
self.scope_state.is_call = true;
let (mut input_futures, mut inferred_finalize_inputs) = (Vec::new(), Vec::new());
for (expected, argument) in func.input.iter().zip(input.arguments.iter()) {
// Get the type of the expression. If the type is not known, do not attempt to attempt any futher inference.
// Get the type of the expression. If the type is not known, do not attempt to attempt any further inference.
let ty = self.visit_expression(argument, &Some(expected.type_().clone()))?;
// Extract information about futures that are being consumed.
if func.variant == Variant::AsyncFunction && matches!(expected.type_(), Type::Future(_)) {
Expand Down
2 changes: 1 addition & 1 deletion compiler/passes/src/type_checking/check_statements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<'a, N: Network> StatementVisitor<'a> for TypeChecker<'a, N> {
}

// If the variable exists and its in an async function, then check that it is in the current scope.
// Note that this unwrap is safe because the scope state is initalized before traversing the function.
// Note that this unwrap is safe because the scope state is initialized before traversing the function.
if self.scope_state.variant.unwrap().is_async_function()
&& self.scope_state.is_conditional
&& self
Expand Down

0 comments on commit b90f958

Please sign in to comment.