Support for "simple block" optimization, where we can run blocks

directly if there are no arguments or redirections to the block itself
This commit is contained in:
ridiculousfish
2014-01-07 10:45:36 -08:00
parent 45852f0497
commit cb6be2a50d
2 changed files with 72 additions and 5 deletions

View File

@@ -64,6 +64,7 @@ class parse_execution_context_t
/* Wildcard error helper */
parse_execution_result_t report_unmatched_wildcard_error(const parse_node_t &unmatched_wildcard);
/* Command not found support */
void handle_command_not_found(const wcstring &cmd, const parse_node_t &statement_node, int err_code);
/* Utilities */
@@ -72,6 +73,9 @@ class parse_execution_context_t
node_offset_t get_offset(const parse_node_t &node) const;
const parse_node_t *infinite_recursive_statement_in_job_list(const parse_node_t &job_list, wcstring *out_func_name) const;
/* Indicates whether a job is a simple block (one block, no redirections) */
bool job_is_simple_block(const parse_node_t &node) const;
enum process_type_t process_type_for_command(const parse_node_t &plain_statement, const wcstring &cmd) const;
/* These create process_t structures from statements */