Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Refactor of attribute lookahead processing #84

Merged
merged 144 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
fc2f434
add arithmetic expression tests
asmelko Apr 14, 2020
779ec5c
fix unary op prio in ca epxr
asmelko Apr 21, 2020
6c3d7fe
add logical expression tests
asmelko Apr 21, 2020
54c508b
add character expresssions test
asmelko May 4, 2020
e74baf4
add base ca expr architecture
asmelko May 5, 2020
225401a
add separate semantic variable symbol class
asmelko May 11, 2020
0b884fe
separate concatenation and concatenation terms
asmelko May 11, 2020
66cf494
renaming concatenation structures
asmelko May 11, 2020
d5d7ddc
separate variable symbol from var_sym struct
asmelko May 11, 2020
df79af0
fig bug missing clear chain in collector
asmelko May 11, 2020
29ec582
add yet not defined attribute ref retrieval
asmelko May 14, 2020
17d0a01
add diagnosable to ca_expr
asmelko May 18, 2020
faa867a
add expr_list resolution
asmelko May 18, 2020
19af3b8
add specialized ca operator classes
asmelko May 18, 2020
a3f81d8
implemented ca expr policy
asmelko May 18, 2020
c728320
add generic method for resolving expression tree
asmelko May 20, 2020
210d2ab
finish resolve expr tree method
asmelko May 20, 2020
497b15a
split ca_operator to unary and binary
asmelko May 21, 2020
25b5b1c
added specialized ca operators
asmelko May 21, 2020
b1e14af
add generic ca expr evaluate
asmelko May 21, 2020
297b5a4
remove semantics/operand include from highlighting_info
asmelko May 21, 2020
ca13614
add impl to unary operator evaluate
asmelko May 21, 2020
23779b0
add evaluate impl to basic binary ca exprs
asmelko May 21, 2020
44bc1d5
binary start impl
asmelko May 22, 2020
c7a1960
add bin op evaluate
asmelko Jun 1, 2020
c5cef7c
add evaluate impl to string, vs, constant, symbol
asmelko Jun 1, 2020
bf8265c
add diagnosable_ctx to evaluation_context
asmelko Jun 2, 2020
e935277
moved unary functions to separate methods
asmelko Jun 2, 2020
9492694
move FIND and INDEX to separate methods
asmelko Jun 2, 2020
32b2506
add impl of HLASM SET functions (DCVAL, X2A, ...)
asmelko Jun 3, 2020
10c3a5a
ca_term to separate class files
asmelko Jun 4, 2020
2288fe5
add overflow checks for ca exprs
asmelko Jun 4, 2020
2affa55
add dupl factor evaluation for fucntion terms
asmelko Jun 4, 2020
ed5458d
add evaluate to var sym and concat chain
asmelko Jun 5, 2020
845c923
add imp to ca_symbol_attributes
asmelko Jun 8, 2020
9d04856
get rid of default arg in count and number methods of variable symbols
asmelko Jun 8, 2020
95e3f8d
changed signature of try_get_symbol_name method in context manager
asmelko Jun 8, 2020
9a46b38
change signature of variable symbol value retrieval methods in contex…
asmelko Jun 8, 2020
d9dc42c
add destructor to context manager to automatically collect diags
asmelko Jun 8, 2020
909ba4e
change signature of ca function methods to implement evaluation of se…
asmelko Jun 9, 2020
0eb53fe
add ca_expr to variable symbol instead of antlr tree
asmelko Jun 9, 2020
4da2f55
refactor out parserrulecontext pointers
asmelko Jun 11, 2020
e0e2fc4
refactor rules according to the new ca_expressions
asmelko Jun 12, 2020
2d40177
parser calls resolve_expression_tree on created expressions
asmelko Jun 12, 2020
4e04475
rewrite tests
asmelko Jun 12, 2020
f5fca0b
fixes
asmelko Jul 7, 2020
e75a742
refactor type conversions
asmelko Jul 7, 2020
e8d5253
add default type to default set_t constructor
asmelko Jul 7, 2020
b55d784
change signature of dependency solver method
asmelko Jul 7, 2020
b6c853b
refactor get_attribute_value_ca
asmelko Jul 7, 2020
41fed6e
fixes
asmelko Jul 7, 2020
99c5295
add forgotten expr_kind to var_sym
asmelko Jul 8, 2020
ee8c5c6
add add_diagnostic(diagnostic_s) to diagnostic_ctx, fixes
asmelko Jul 8, 2020
83a06a0
fix self def term parsing
asmelko Jul 8, 2020
2ffb44d
add handling for terms with no separator, e.g. ((2)EQ(3))
asmelko Jul 8, 2020
6496645
hide arithmetic limits test
asmelko Jul 8, 2020
7c4fc9c
master merge
asmelko Jul 8, 2020
9603e87
reset parsing structures instead of append
asmelko Jul 8, 2020
a6c27e6
remove old visitors
asmelko Jul 9, 2020
1f6efde
merge development
asmelko Jul 9, 2020
52f5a95
add ca_function tests
asmelko Jul 9, 2020
aa064f3
add fixes, remove expression_test from parser test
asmelko Jul 9, 2020
3fe8f77
add tests for ca operations, fixes
asmelko Jul 10, 2020
dd2a951
remove warnings
asmelko Jul 10, 2020
d4a8395
remove warnings wsl
asmelko Jul 10, 2020
632013d
apply format
asmelko Jul 10, 2020
c9908f9
merge development
asmelko Jul 10, 2020
13910d4
apply format
asmelko Jul 10, 2020
303850e
merge development
asmelko Jul 10, 2020
fa69ed0
apply format
asmelko Jul 10, 2020
42be4f0
add clear chain to model op
asmelko Jul 10, 2020
cb95d82
fix bugs
asmelko Jul 13, 2020
ff184ed
fix code smells
asmelko Jul 13, 2020
8eb90bf
remove duplicities
asmelko Jul 13, 2020
ccb5a11
fix
asmelko Jul 13, 2020
8d63251
apply format
asmelko Jul 13, 2020
7bfa216
add tests
asmelko Jul 14, 2020
821a7df
apply format
asmelko Jul 14, 2020
4ac11fa
change docs, add drawio diagrams to the svg files
asmelko Jul 14, 2020
a164f53
remove code smells
asmelko Jul 14, 2020
ea62b75
make operation method of some ca_binary_ops const
asmelko Jul 14, 2020
045328b
add lexing::token_stream field to parser_impl
asmelko Jul 14, 2020
bc996dc
made operator() in ranged_diag_collector non const
asmelko Jul 14, 2020
f95ba23
remove context_manager destructor
asmelko Jul 14, 2020
c9f1f28
clang fixes
asmelko Jul 14, 2020
fe8d72a
apply format
asmelko Jul 15, 2020
8dc9d99
change signature of evaluate method in ca_expression
asmelko Jul 15, 2020
2aeed99
remove code smells
asmelko Jul 15, 2020
a084209
add comments
asmelko Jul 15, 2020
8c2ae39
add fix
asmelko Jul 15, 2020
2732350
change grammar rules from recursive to asterisk notation
asmelko Jul 15, 2020
7ff5344
Apply suggestions from code review
asmelko Aug 14, 2020
46fb787
changed message of substring diag,
asmelko Aug 14, 2020
610f699
change message in ce004
asmelko Aug 14, 2020
c7a8454
add comments for ca_epxr_list and ca_expr_policy
asmelko Aug 14, 2020
2452115
Merge branch 'ca-expr-rewrite' of https://github.com/eclipse/che-che4…
asmelko Aug 14, 2020
161210e
apply format
asmelko Aug 14, 2020
7281fe9
rename and move src/checking/ranged_diagnostic_collector to src/diagn…
asmelko Aug 14, 2020
da01b4c
add comments
asmelko Aug 14, 2020
6e0182f
add tests for diagnostics and asserts that check diagnostic codes
asmelko Aug 14, 2020
c4bf817
add tests for ca_expr list
asmelko Aug 17, 2020
cacd5d8
apply format
asmelko Aug 17, 2020
9e6db23
add comments
asmelko Aug 17, 2020
7614f5d
add fixes and test when expression is not complete
asmelko Aug 17, 2020
1af31f9
extracted process_instruction() method from grammar rules
asmelko Aug 18, 2020
8c51468
implement evaluable_operand virtual method for expr_assembler_operand…
asmelko Aug 19, 2020
e5d0d86
apply format
asmelko Aug 19, 2020
13ad8f3
Update Expressions.md
zeibura Aug 19, 2020
518a96c
separate process_statement() from parse_rest rules
asmelko Aug 20, 2020
47101eb
separate process_statement method from parse_rest parser and reparser
asmelko Aug 26, 2020
b82432f
separate process_ methods from lookahead rules, removed redundant par…
asmelko Aug 26, 2020
afc1dc6
Merge branch 'ca-expr-rewrite' into attr-lookahead-refactor
asmelko Aug 27, 2020
3ea5aaa
removed unnecessary push_line_end method from opencode provider
asmelko Aug 28, 2020
0f67232
refactor process_next in copy and macro statement provider
asmelko Aug 28, 2020
5aaa1d3
rename common_statement provider to members_statement_provider
asmelko Aug 28, 2020
48b97b5
refactored process_next in members_provider to easily trigger attr lo…
asmelko Aug 28, 2020
2c88a51
add support for attribute lookahead in all statement providers; add e…
asmelko Aug 31, 2020
921f3ed
changed signature of get_undefined_attributed_symbols method in ca_ex…
asmelko Sep 1, 2020
4cc10e5
change signature and implement statement_provider::try_trigger_attrib…
asmelko Sep 1, 2020
c21eb15
refactored processing manager and lookahead_processor to provide attr…
asmelko Sep 1, 2020
1d4ca6d
add abstract class for macro operands
asmelko Sep 2, 2020
a69bd2f
implement statement_provider::try_trigger_attribute_lookahead(statement)
asmelko Sep 2, 2020
025d324
fix tests
asmelko Sep 2, 2020
60294cc
fix bug with improperly created shared pointers in members_statement_…
asmelko Sep 3, 2020
e68d8f3
implement optimization for lookahead
asmelko Sep 3, 2020
fabc6b1
add method to create start and end statement snapshot
asmelko Sep 3, 2020
7dd1bd9
add functionality to extract first term from substituted machine expr…
asmelko Sep 4, 2020
aacb482
apply format
asmelko Sep 4, 2020
cce3cb0
Merge branch 'development' into ca-expr-rewrite
asmelko Sep 4, 2020
26d19e1
Merge branch 'ca-expr-rewrite' into attr-lookahead-refactor
asmelko Sep 4, 2020
1791d2c
fix server test error
asmelko Sep 4, 2020
52f453e
remove code smells
asmelko Sep 4, 2020
5e3fa6f
apply format
asmelko Sep 4, 2020
52c51b0
apply format
asmelko Sep 4, 2020
7ed231f
resolve comment suggestions
asmelko Sep 7, 2020
cbc7ee6
refactor try_get_symbol_name method in context_manager
asmelko Sep 7, 2020
5c2d01e
add test for access_operand methods
asmelko Sep 8, 2020
b36e69e
remove unused method
asmelko Sep 8, 2020
04df73b
Merge remote-tracking branch 'origin/development' into attr-lookahead…
asmelko Sep 8, 2020
e9ba18f
add tests
asmelko Sep 9, 2020
b3d8172
Merge remote-tracking branch 'origin/development' into attr-lookahead…
asmelko Sep 10, 2020
5bc9207
fix bugs
asmelko Sep 11, 2020
fe343d8
fix try_extract_leading_symbol method to support using prefixes
asmelko Sep 14, 2020
e5f509b
refactor ordinary_assembly_context::add_symbol_reference method
asmelko Sep 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parser_library/src/analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ analyzer::analyzer(const std::string& text,
*parser_,
tracer)
{
parser_->initialize(&hlasm_ctx_ref_, &lsp_proc_);
parser_->initialize(&hlasm_ctx_ref_, &lsp_proc_, &lib_provider, &mngr_);
parser_->setErrorHandler(std::make_shared<error_strategy>());
parser_->removeErrorListeners();
parser_->addErrorListener(&listener_);
Expand Down
62 changes: 57 additions & 5 deletions parser_library/src/context/hlasm_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "ebcdic_encoding.h"
#include "expressions/conditional_assembly/terms/ca_constant.h"
#include "expressions/conditional_assembly/terms/ca_symbol_attribute.h"
#include "instruction.h"

namespace hlasm_plugin::parser_library::context {
Expand Down Expand Up @@ -262,6 +263,45 @@ void hlasm_context::set_source_indices(size_t begin_index, size_t end_index, siz
source_stack_.back().end_line = end_line;
}

std::pair<source_position, source_snapshot> hlasm_context::get_begin_snapshot(bool ignore_macros) const
{
context::source_position statement_position;

bool is_in_macros = ignore_macros ? false : scope_stack_.size() > 1;

if (!is_in_macros && current_copy_stack().empty())
{
statement_position.file_offset = current_source().begin_index;
statement_position.file_line = current_source().current_instruction.pos.line;
}
else
{
statement_position.file_offset = current_source().end_index;
statement_position.file_line = current_source().end_line + 1;
}

context::source_snapshot snapshot = current_source().create_snapshot();

if (snapshot.copy_frames.size() && is_in_macros)
++snapshot.copy_frames.back().statement_offset;

return std::make_pair(std::move(statement_position), std::move(snapshot));
}

std::pair<source_position, source_snapshot> hlasm_context::get_end_snapshot() const
{
context::source_position statement_position;
statement_position.file_offset = current_source().end_index;
statement_position.file_line = current_source().end_line + 1;

context::source_snapshot snapshot = current_source().create_snapshot();

if (snapshot.copy_frames.size())
++snapshot.copy_frames.back().statement_offset;

return std::make_pair(std::move(statement_position), std::move(snapshot));
}

void hlasm_context::push_statement_processing(const processing::processing_kind kind)
{
assert(!proc_stack_.empty());
Expand Down Expand Up @@ -322,6 +362,11 @@ const std::deque<code_scope>& hlasm_context::scope_stack() const { return scope_

const source_context& hlasm_context::current_source() const { return source_stack_.back(); }

const std::vector<copy_member_invocation>& hlasm_context::current_copy_stack() const
{
return source_stack_.back().copy_stack;
}

std::vector<copy_member_invocation>& hlasm_context::current_copy_stack() { return source_stack_.back().copy_stack; }

std::vector<id_index> hlasm_context::whole_copy_stack() const
Expand Down Expand Up @@ -366,11 +411,8 @@ var_sym_ptr hlasm_context::get_var_sym(id_index name)

void hlasm_context::add_sequence_symbol(sequence_symbol_ptr seq_sym)
{
if (curr_scope()->is_in_macro())
throw std::runtime_error("adding sequence symbols to macro definition not allowed");

if (curr_scope()->sequence_symbols.find(seq_sym->name) == curr_scope()->sequence_symbols.end())
curr_scope()->sequence_symbols.emplace(seq_sym->name, std::move(seq_sym));
auto& opencode = scope_stack_.front();
opencode.sequence_symbols.try_emplace(seq_sym->name, std::move(seq_sym));
}

const sequence_symbol* hlasm_context::get_sequence_symbol(id_index name) const
Expand All @@ -394,6 +436,14 @@ const sequence_symbol* hlasm_context::get_sequence_symbol(id_index name) const
return nullptr;
}

const sequence_symbol* hlasm_context::get_opencode_sequence_symbol(id_index name) const
{
if (const auto& sym = scope_stack_.front().sequence_symbols.find(name);
sym != scope_stack_.front().sequence_symbols.end())
return sym->second.get();
return nullptr;
}

void hlasm_context::set_branch_counter(A_t value)
{
curr_scope()->branch_counter = value;
Expand Down Expand Up @@ -541,6 +591,8 @@ C_t hlasm_context::get_type_attr(var_sym_ptr var_symbol, const std::vector<size_
if (value.empty())
return "O";

expressions::ca_symbol_attribute::try_extract_leading_symbol(value);

auto res = expressions::ca_constant::try_self_defining_term(value);
if (res)
return "N";
Expand Down
9 changes: 8 additions & 1 deletion parser_library/src/context/hlasm_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class hlasm_context
// sets current source file indices
void set_source_indices(size_t begin_index, size_t end_index, size_t end_line);

std::pair<source_position, source_snapshot> get_begin_snapshot(bool ignore_macros) const;
std::pair<source_position, source_snapshot> get_end_snapshot() const;

// pushes new kind of statement processing
void push_statement_processing(const processing::processing_kind kind);
// pushes new kind of statement processing as well as new source
Expand All @@ -107,6 +110,7 @@ class hlasm_context
// gets macro nest
const std::deque<code_scope>& scope_stack() const;
// gets copy nest of current statement processing
const std::vector<copy_member_invocation>& current_copy_stack() const;
std::vector<copy_member_invocation>& current_copy_stack();
// gets names of whole copy nest
std::vector<id_index> whole_copy_stack() const;
Expand Down Expand Up @@ -139,6 +143,9 @@ class hlasm_context
// return sequence symbol in current scope
// returns nullptr if there is none in the current scope
const sequence_symbol* get_sequence_symbol(id_index name) const;
// return opencode sequence symbol
// returns nullptr if there is none
const sequence_symbol* get_opencode_sequence_symbol(id_index name) const;

void set_branch_counter(A_t value);
A_t get_branch_counter() const;
Expand Down Expand Up @@ -205,7 +212,7 @@ class hlasm_context
return glob->second;
}

set_sym_ptr val(std::make_shared<set_symbol<T>>(id, is_scalar, true));
auto val = std::make_shared<set_symbol<T>>(id, is_scalar, true);

globals_.insert({ id, val });
curr_scope()->variables.insert({ id, val });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

#include "alignment.h"

using namespace hlasm_plugin::parser_library;
using namespace hlasm_plugin::parser_library::context;
namespace hlasm_plugin::parser_library::context {

void ordinary_assembly_context::create_private_section()
{
Expand Down Expand Up @@ -55,6 +54,15 @@ bool ordinary_assembly_context::create_symbol(
return ok;
}

void ordinary_assembly_context::add_symbol_reference(symbol sym) { symbol_refs_.try_emplace(sym.name, std::move(sym)); }
asmelko marked this conversation as resolved.
Show resolved Hide resolved

const symbol* ordinary_assembly_context::get_symbol_reference(context::id_index name) const
{
auto tmp = symbol_refs_.find(name);

return tmp == symbol_refs_.end() ? nullptr : &tmp->second;
}

const symbol* ordinary_assembly_context::get_symbol(id_index name) const
{
auto tmp = symbols_.find(name);
Expand Down Expand Up @@ -255,4 +263,6 @@ std::pair<address, space_ptr> ordinary_assembly_context::reserve_storage_area_sp
return std::make_pair(ret_addr, sp);
}
return std::make_pair(curr_section_->current_location_counter().reserve_storage_area(length, align).first, nullptr);
}
}

} // namespace hlasm_plugin::parser_library::context
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#include "symbol_dependency_tables.h"


namespace hlasm_plugin {
namespace parser_library {
namespace context {
namespace hlasm_plugin::parser_library::context {

// class holding complete information about the 'ordinary assembly' (assembler and machine instructions)
// it contains 'sections' ordinary 'symbols' and all dependencies between them
Expand All @@ -37,6 +35,8 @@ class ordinary_assembly_context : public dependency_solver
std::vector<std::unique_ptr<section>> sections_;
// list of visited symbols
std::unordered_map<id_index, symbol> symbols_;
// list of lookaheaded symbols
std::unordered_map<id_index, symbol> symbol_refs_;

section* curr_section_;

Expand All @@ -57,6 +57,9 @@ class ordinary_assembly_context : public dependency_solver
[[nodiscard]] bool create_symbol(
id_index name, symbol_value value, symbol_attributes attributes, location symbol_location);

void add_symbol_reference(symbol sym);
const symbol* get_symbol_reference(context::id_index name) const;

// gets symbol by name
virtual const symbol* get_symbol(id_index name) const override;
symbol* get_symbol(id_index name);
Expand Down Expand Up @@ -111,7 +114,6 @@ class ordinary_assembly_context : public dependency_solver
std::pair<address, space_ptr> reserve_storage_area_space(size_t length, alignment align);
};

} // namespace context
} // namespace parser_library
} // namespace hlasm_plugin
} // namespace hlasm_plugin::parser_library::context

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ enum class symbol_origin
SECT,
MACH,
EQU,
DAT
DAT,
UNKNOWN
};

// structure wrapping attributes of the symbol
Expand Down
27 changes: 21 additions & 6 deletions parser_library/src/context/source_snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#include "id_storage.h"
#include "range.h"

namespace hlasm_plugin {
namespace parser_library {
namespace context {
namespace hlasm_plugin::parser_library::context {

// helper structure representing position in source file
struct source_position
Expand Down Expand Up @@ -69,6 +67,24 @@ struct source_snapshot
size_t end_line;
std::vector<copy_frame> copy_frames;

source_snapshot()
: begin_index(0)
, end_index(0)
, end_line(0)
{}

source_snapshot(location instruction,
size_t begin_index,
size_t end_index,
size_t end_line,
std::vector<copy_frame> copy_frames)
: instruction(std::move(instruction))
, begin_index(begin_index)
, end_index(end_index)
, end_line(end_line)
, copy_frames(std::move(copy_frames))
{}

bool operator==(const source_snapshot& oth) const
{
if (!(end_line == oth.end_line && begin_index == oth.begin_index && end_index == oth.end_index
Expand All @@ -83,7 +99,6 @@ struct source_snapshot
}
};

} // namespace context
} // namespace parser_library
} // namespace hlasm_plugin
} // namespace hlasm_plugin::parser_library::context

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ca_expression : public diagnosable_op_impl
ca_expression(context::SET_t_enum expr_kind, range expr_range);

// retrieves set of attributed symbols that are not yet defined
virtual undef_sym_set get_undefined_attributed_symbols(const context::dependency_solver& solver) const = 0;
virtual undef_sym_set get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const = 0;

// builds parts of the expression tree that could not be built during parsing
virtual void resolve_expression_tree(context::SET_t_enum kind) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ ca_binary_operator::ca_binary_operator(
, right_expr(std::move(right_expr))
{}

undef_sym_set ca_binary_operator::get_undefined_attributed_symbols(const context::dependency_solver& solver) const
undef_sym_set ca_binary_operator::get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const
{
auto tmp = left_expr->get_undefined_attributed_symbols(solver);
tmp.merge(right_expr->get_undefined_attributed_symbols(solver));
auto tmp = left_expr->get_undefined_attributed_symbols(eval_ctx);
tmp.merge(right_expr->get_undefined_attributed_symbols(eval_ctx));
return tmp;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ca_binary_operator : public ca_expression

ca_binary_operator(ca_expr_ptr left_expr, ca_expr_ptr right_expr, context::SET_t_enum expr_kind, range expr_range);

virtual undef_sym_set get_undefined_attributed_symbols(const context::dependency_solver& solver) const override;
virtual undef_sym_set get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const override;

virtual void resolve_expression_tree(context::SET_t_enum kind) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ ca_unary_operator::ca_unary_operator(ca_expr_ptr expr, context::SET_t_enum expr_
, expr(std::move(expr))
{}

undef_sym_set ca_unary_operator::get_undefined_attributed_symbols(const context::dependency_solver& solver) const
undef_sym_set ca_unary_operator::get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const
{
return expr->get_undefined_attributed_symbols(solver);
return expr->get_undefined_attributed_symbols(eval_ctx);
}

void ca_unary_operator::resolve_expression_tree(context::SET_t_enum kind)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ca_unary_operator : public ca_expression

ca_unary_operator(ca_expr_ptr expr, context::SET_t_enum expr_kind, range expr_range);

virtual undef_sym_set get_undefined_attributed_symbols(const context::dependency_solver& solver) const override;
virtual undef_sym_set get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const override;

virtual void resolve_expression_tree(context::SET_t_enum kind) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ ca_constant::ca_constant(context::A_t value, range expr_range)
, value(value)
{}

undef_sym_set ca_constant::get_undefined_attributed_symbols(const context::dependency_solver&) const
{
return undef_sym_set();
}
undef_sym_set ca_constant::get_undefined_attributed_symbols(const evaluation_context&) const { return undef_sym_set(); }

void ca_constant::resolve_expression_tree(context::SET_t_enum kind)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ca_constant : public ca_expression

ca_constant(context::A_t value, range expr_range);

virtual undef_sym_set get_undefined_attributed_symbols(const context::dependency_solver& solver) const override;
virtual undef_sym_set get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const override;

virtual void resolve_expression_tree(context::SET_t_enum kind) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ ca_expr_list::ca_expr_list(std::vector<ca_expr_ptr> expr_list, range expr_range)
, expr_list(std::move(expr_list))
{}

undef_sym_set ca_expr_list::get_undefined_attributed_symbols(const context::dependency_solver& solver) const
undef_sym_set ca_expr_list::get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const
{
undef_sym_set tmp;
for (auto&& expr : expr_list)
tmp.merge(expr->get_undefined_attributed_symbols(solver));
tmp.merge(expr->get_undefined_attributed_symbols(eval_ctx));
return tmp;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ca_expr_list : public ca_expression

ca_expr_list(std::vector<ca_expr_ptr> expr_list, range expr_range);

virtual undef_sym_set get_undefined_attributed_symbols(const context::dependency_solver& solver) const override;
virtual undef_sym_set get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const override;

virtual void resolve_expression_tree(context::SET_t_enum kind) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ ca_function::ca_function(context::id_index function_name,
, duplication_factor(std::move(duplication_factor))
{}

undef_sym_set ca_function::get_undefined_attributed_symbols(const context::dependency_solver& solver) const
undef_sym_set ca_function::get_undefined_attributed_symbols(const evaluation_context& eval_ctx) const
{
undef_sym_set ret;
for (auto&& expr : parameters)
ret.merge(expr->get_undefined_attributed_symbols(solver));
ret.merge(expr->get_undefined_attributed_symbols(eval_ctx));
if (duplication_factor)
ret.merge(duplication_factor->get_undefined_attributed_symbols(solver));
ret.merge(duplication_factor->get_undefined_attributed_symbols(eval_ctx));
return ret;
}

Expand Down
Loading