//
// Notes:
// The last statement may be an embedded statement, when in linear order,
-// so this method is provided to obtain the last top-level statment, which
+// so this method is provided to obtain the last top-level statement, which
// will also contain the last tree nodes in execution order.
GenTreeStmt* BasicBlock::lastTopLevelStmt()
*
* Insert the given statement "stmt" after GT_STMT node "insertionPoint".
* Returns the newly inserted GT_STMT node.
- * Note that the gtPrev list of statment nodes is circular, but the gtNext list is not.
+ * Note that the gtPrev list of statement nodes is circular, but the gtNext list is not.
*/
GenTreePtr Compiler::fgInsertStmtAfter(BasicBlock* block,
// The nearest one might be 'stmt' itself.
//
// Arguments:
-// stmt - The statment to start the search with.
+// stmt - The statement to start the search with.
//
// Return Value:
// The nearest top-level statement, walking backwards.
//------------------------------------------------------------------------
-// fgTreeIsInStmt: return 'true' if 'tree' is in the execution order list of statment 'stmt'.
+// fgTreeIsInStmt: return 'true' if 'tree' is in the execution order list of statement 'stmt'.
// This works for a single node or an entire tree, assuming a well-formed tree, where the entire
// tree's set of nodes are in the statement execution order list.
//
fgInsertTreeInListBefore(tree, insertionPoint, stmt);
// While inserting a statement as embedded, the parent specified has to be a top-level statement
- // since we could be inserting it ahead of an already existing embedded statment
+ // since we could be inserting it ahead of an already existing embedded statement
// in execution order.
GenTreeStmt* topStmt = fgFindTopLevelStmtBackwards(stmt);
GenTreeStmt* result = fgMakeEmbeddedStmt(block, tree, topStmt);
//
// Detach the GT_CALL node from the original statement by hanging a "nothing" node under it,
- // so that fgMorphStmts can remove the statment once we return from here.
+ // so that fgMorphStmts can remove the statement once we return from here.
//
iciStmt->gtStmt.gtStmtExpr = gtNewNothingNode();
}
// this should be moved to a common function
if (isEmbeddedStmt)
{
- // Find a parent statment containing storeIndHigh.
+ // Find a parent statement containing storeIndHigh.
GenTree* parentStmt = currStmt;
while ((parentStmt != nullptr) && (!parentStmt->AsStmt()->gtStmtIsTopLevel()))
{
if (isEmbeddedStmt)
{
- // Find a parent statment containing storeIndHigh.
+ // Find a parent statement containing storeIndHigh.
GenTree* parentStmt = currStmt;
while ((parentStmt != nullptr) && (!parentStmt->AsStmt()->gtStmtIsTopLevel()))
{
}
/**
- * Takes care of replaing a GenTree node's child with a new tree.
+ * Takes care of replacing a GenTree node's child with a new tree.
*
* Assumptions:
* a) replacementNode has been unlinked (orphaned) and the expression it represents
// For this case, we are actually going to insert it BEFORE parentStmt.
// However if we have a new prevStmt (i.e. there are some embedded statements
// to be included in newStmt) then those need to be moved as well.
- // Note, however, that all the tree links have alraedy been fixed up.
+ // Note, however, that all the tree links have already been fixed up.
fgInsertStmtBefore(block, parentStmt, newStmt);
if (foundEmbeddedStmts)
{
// The new statement.
//
// Assumptions:
-// The callee must ensure that '*ppTree' is part of compCurStmt, and that
+// The caller must ensure that '*ppTree' is part of compCurStmt, and that
// compCurStmt is in compCurBB;
GenTreeStmt*
loc = RewriteSimpleTransforms(loc);
DBEXEC(TRUE, ValidateStatement(loc));
- JITDUMP("comma processing top level statment:\n");
+ JITDUMP("comma processing top level statement:\n");
DISPTREE(loc.tree);
JITDUMP("\n");