]>
Commit | Line | Data |
---|---|---|
109c11f6 GA |
1 | 2023-09-07 David Malcolm <dmalcolm@redhat.com> |
2 | ||
3 | * rust-diagnostics.cc (rust_error_at): New overload. | |
4 | * rust-diagnostics.h (struct ErrorCode): New struct. | |
5 | (rust_error_at): New. | |
6 | (rust_be_error_at): Likewise. | |
7 | * rust-gcc-diagnostics.cc (class rust_error_code_rule): New class. | |
8 | (rust_be_error_at): New function. | |
9 | * typecheck/rust-casts.cc (TypeCastRules::emit_cast_error): Emit E0054 | |
10 | when reporting invalid cast error. | |
11 | ||
5158918a GA |
12 | 2023-07-05 Robin Dapp <rdapp@ventanamicro.com> |
13 | Juzhe-Zhong <juzhe.zhong@rivai.ai> | |
14 | ||
15 | * backend/rust-tree.cc (c_common_type_for_mode): Ditto. | |
16 | ||
270742ce GA |
17 | 2023-06-22 Paul E. Murphy <murphyp@linux.ibm.com> |
18 | ||
19 | * rust-object-export.cc [TARGET_AIX]: Rename and update usage to | |
20 | TARGET_AIX_OS. | |
21 | ||
a8c8351c GA |
22 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> |
23 | ||
24 | * parse/rust-parse-impl.h | |
25 | (Parser::parse_stmt): Handle unsafe expression statements. | |
26 | ||
27 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
28 | ||
29 | * parse/rust-parse-impl.h | |
30 | (Parser::parse_expr_stmt): Remove hypothetical unsafe + expr_stmt_without_block handling. | |
31 | ||
32 | 2023-04-06 M V V S Manoj Kumar <mvvsmanojkumar@gmail.com> | |
33 | ||
34 | * ast/rust-ast-full-decls.h (class InlineAsm):Added class declaration. | |
35 | * ast/rust-expr.h (class InlineAsm):Added class definition. | |
36 | ||
37 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
38 | ||
39 | * rust-diagnostics.h (struct Error): Add new Kind enum and various new | |
40 | static constructors to allow for hints as well. | |
41 | * rust-diagnostics.cc (Error::Error): Use new `kind` field properly. | |
42 | * checks/errors/privacy/rust-visibility-resolver.cc | |
43 | (VisibilityResolver::resolve_module_path): Use new Error API. | |
44 | * expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Likewise. | |
45 | * expand/rust-macro-expand.cc (parse_many): Likewise. | |
46 | (transcribe_type): Likewise. | |
47 | * parse/rust-parse-impl.h (Parser::parse_crate): Likewise. | |
48 | * rust-session-manager.cc (Session::handle_crate_name): Likewise. | |
49 | * ast/rust-ast.cc (Module::load_items): Likewise. | |
50 | ||
51 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
52 | ||
53 | * ast/rust-ast.h: Keep location in TraitItem base class | |
54 | * ast/rust-item.h (class TraitItemFunc): Use base class location instead. | |
55 | (class TraitItemMethod): Likewise. | |
56 | (class TraitItemConst): Likewise. | |
57 | (class TraitItemType): Likewise. | |
58 | * ast/rust-macro.h: Likewise. | |
59 | ||
60 | 2023-04-06 SainiAditya1 <Adityasaini10012001@outlook.com> | |
61 | ||
62 | * hir/tree/rust-hir-full-test.cc: Moved to... | |
63 | * hir/tree/rust-hir.cc: ...here. | |
64 | * Make-lang.in: Rename rust-hir-full-test. | |
65 | ||
66 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
67 | ||
68 | * ast/rust-ast-dump.cc | |
69 | (Dump::visit): Add AltPattern visitor. | |
70 | * ast/rust-ast-dump.h: | |
71 | (Dump::visit): Add AltPattern visitor. | |
72 | * ast/rust-ast-full-decls.h | |
73 | (class AltPattern): Add declaration. | |
74 | * ast/rust-ast-visitor.h: | |
75 | (ASTVisitor::visit): Add AltPattern visitor. | |
76 | * ast/rust-ast.cc | |
77 | (AltPattern::as_string): Add definition. | |
78 | (AltPattern::accept_vis): Add definition. | |
79 | * ast/rust-pattern.h | |
80 | (class AltPattern): Add declaration. | |
81 | * checks/errors/rust-feature-gate.h: | |
82 | (FeatureGate::visit) Add AltPattern visitor | |
83 | * expand/rust-attribute-visitor.cc | |
84 | (AttrVisitor::visit): Add AltPattern visitor. | |
85 | * expand/rust-attribute-visitor.h: | |
86 | (AttrVisitor::visit): Add AltPattern visitor. | |
87 | * hir/rust-ast-lower-base.cc | |
88 | (ASTLoweringBase::visit): Add AltPattern visitor. | |
89 | * hir/rust-ast-lower-base.h: | |
90 | (ASTLoweringBase::visit): Add AltPattern visitor. | |
91 | * resolve/rust-ast-resolve-base.cc | |
92 | (ResolverBase::visit): Add AltPattern visitor. | |
93 | * resolve/rust-ast-resolve-base.h: | |
94 | (ResolverBase::visit): Add AltPattern visitor. | |
95 | * resolve/rust-early-name-resolver.cc | |
96 | (EarlyNameResolver::visit): Add AltPattern visitor. | |
97 | * resolve/rust-early-name-resolver.h: | |
98 | (EarlyNameResolver::visit): Add AltPattern visitor. | |
99 | * util/rust-attributes.cc | |
100 | (AttributeChecker::visit): Add AltPattern visitor. | |
101 | * util/rust-attributes.h: | |
102 | (AttributeChecker::visit): Add AltPattern visitor. | |
103 | ||
104 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
105 | ||
106 | * ast/rust-pattern.h: Fix formatting. | |
107 | ||
108 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
109 | ||
110 | * expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Do not | |
111 | return nullptr token in expansion of `include!()` | |
112 | ||
113 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
114 | ||
115 | * checks/errors/rust-feature-gate.h: Add trailing newline before EOF. | |
116 | ||
117 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
118 | ||
119 | * typecheck/rust-hir-trait-reference.cc (TraitReference::clear_associated_types): make const | |
120 | (TraitReference::clear_associated_type_projections): new interface | |
121 | * typecheck/rust-hir-trait-reference.h: | |
122 | * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): refactor | |
123 | (TraitItemReference::associated_type_reset): reset projections | |
124 | * typecheck/rust-hir-type-bounds.h: | |
125 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): fix bounds | |
126 | * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::TypeBoundsProbe): refactor into cc file | |
127 | (TypeBoundsProbe::Probe): refactor | |
128 | (TypeBoundsProbe::is_bound_satisfied_for_type): likewise | |
129 | (TypeBoundsProbe::assemble_sized_builtin): add builtin for Sized | |
130 | (TypeCheckBase::get_predicate_from_bound): refactor | |
131 | (TypeBoundPredicate::lookup_associated_type): refactor | |
132 | * typecheck/rust-tyty-subst.cc (SubstitutionRef::lookup_associated_impl) | |
133 | (SubstitutionRef::prepare_higher_ranked_bounds): new interface to clear hanging bounds | |
134 | (SubstitutionRef::monomorphize): refactor | |
135 | * typecheck/rust-tyty-subst.h: | |
136 | * typecheck/rust-tyty.cc (BaseType::get_locus): helper | |
137 | (BaseType::satisfies_bound): ensure bounds are satisfied and assoicated types | |
138 | (ParamType::ParamType): new field in constructor | |
139 | (ParamType::clone): update clone | |
140 | (ParamType::set_implicit_self_trait): new interface | |
141 | (ParamType::is_implicit_self_trait): likewise | |
142 | * typecheck/rust-tyty.h: cleanup | |
143 | * util/rust-hir-map.cc (Mappings::Mappings): builtin marker | |
144 | (Mappings::~Mappings): delete marker | |
145 | (Mappings::lookup_builtin_marker): lookup | |
146 | * util/rust-hir-map.h: update header | |
147 | ||
148 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
149 | ||
150 | * hir/tree/rust-hir-item.h: implement virtual function | |
151 | * hir/tree/rust-hir.h: add virtual function | |
152 | ||
153 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
154 | ||
155 | * Make-lang.in: add new dependancy | |
156 | * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type): refactor | |
157 | * typecheck/rust-hir-type-check-base.h: refactor | |
158 | * typecheck/rust-hir-type-check.h (RUST_HIR_TYPE_CHECK): refactor | |
159 | * typecheck/rust-type-util.cc: New file. | |
160 | * typecheck/rust-type-util.h: New file. | |
161 | ||
162 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
163 | ||
164 | * expand/rust-macro-builtins.cc | |
165 | (MacroBuiltin::include_str_handler): Add check for valid UTF-8. | |
166 | ||
167 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
168 | ||
169 | * parse/rust-parse-impl.h | |
170 | (Parser::parse_grouped_or_tuple_pattern): Add support for empty tuple patterns. | |
171 | ||
172 | 2023-04-06 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | |
173 | ||
174 | * lex/rust-lex.h: Add file type check. | |
175 | ||
176 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
177 | ||
178 | * backend/rust-compile-pattern.cc | |
179 | (CompilePatternLet::visit): Simplify WildcardPattern compilation for let statements. | |
180 | * backend/rust-compile-var-decl.h: | |
181 | (CompileVarDecl::visit): Remove variable declaration for WildcardPattern. | |
182 | * resolve/rust-ast-resolve-pattern.h: | |
183 | (PatternDeclaration::visit): Remove name resolution for WildcardPattern. | |
184 | ||
185 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
186 | ||
187 | * typecheck/rust-tyty-call.cc | |
188 | (TypeCheckCallExpr::visit): Add variadic argument type checking. | |
189 | (TypeCheckCallExpr::visit): Fix comment spelling ("varadic"). | |
190 | ||
191 | 2023-04-06 mxlol233 <mxlol233@outlook.com> | |
192 | ||
193 | * checks/errors/rust-feature-gate.cc: Add implementation for | |
194 | `void FeatureGate::visit (AST::ExternBlock &block)`. Add `valid_feature` | |
195 | construction process in `FeatureGate::check`. | |
196 | * checks/errors/rust-feature-gate.h: Add declaration for | |
197 | `void FeatureGate::visit (AST::ExternBlock &block)`. Add private | |
198 | variable `valid_feature`. | |
199 | * checks/errors/rust-feature.h: Change `issue` to `m_issue`. | |
200 | ||
201 | 2023-04-06 Thomas Schwinge <thomas@codesourcery.com> | |
202 | ||
203 | * ast/rust-ast-fragment.cc: Update copyright years. | |
204 | * ast/rust-ast-fragment.h: Likewise. | |
205 | * ast/rust-macro.cc: Likewise. | |
206 | * checks/errors/rust-feature-gate.cc: Likewise. | |
207 | * checks/errors/rust-feature-gate.h: Likewise. | |
208 | * checks/errors/rust-feature.cc: Likewise. | |
209 | * checks/errors/rust-feature.h: Likewise. | |
210 | * hir/rust-ast-lower-expr.cc: Likewise. | |
211 | * hir/rust-ast-lower-type.cc: Likewise. | |
212 | * resolve/rust-early-name-resolver.cc: Likewise. | |
213 | * resolve/rust-early-name-resolver.h: Likewise. | |
214 | * rust-gcc.h: Likewise. | |
215 | * typecheck/rust-hir-path-probe.cc: Likewise. | |
216 | * typecheck/rust-hir-trait-reference.cc: Likewise. | |
217 | * typecheck/rust-tyty-bounds.h: Likewise. | |
218 | * typecheck/rust-tyty-subst.cc: Likewise. | |
219 | * typecheck/rust-tyty-subst.h: Likewise. | |
220 | * typecheck/rust-tyty-util.cc: Likewise. | |
221 | * typecheck/rust-tyty-util.h: Likewise. | |
222 | * typecheck/rust-unify.cc: Likewise. | |
223 | * typecheck/rust-unify.h: Likewise. | |
224 | * util/rust-inline-visitor.h: Likewise. | |
225 | ||
226 | 2023-04-06 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | |
227 | ||
228 | * rust-session-manager.cc (Session::compile_crate): Update the | |
229 | environment variable name. | |
230 | ||
231 | 2023-04-06 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | |
232 | ||
233 | * Make-lang.in: Add `rust-hir-trait-reference.o`. | |
234 | * typecheck/rust-hir-trait-reference.h: Remove multiple function body. | |
235 | * typecheck/rust-hir-trait-reference.cc: Add multiple function body. | |
236 | ||
237 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
238 | ||
239 | * expand/rust-macro-expand.cc (MacroExpander::expand_eager_invocations): | |
240 | Add documentation explaining the algorithm. | |
241 | ||
242 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
243 | ||
244 | * ast/rust-macro.cc: New file. | |
245 | * Make-lang.in: Add `rust-macro.o` object | |
246 | * ast/rust-ast-fragment.cc (Fragment::Fragment): Change API around | |
247 | the construction of AST fragments. | |
248 | (Fragment::operator=): Correct `Fragment::operator=` to take into | |
249 | account the fragment tokens. | |
250 | (Fragment::create_error): Use new constructor. | |
251 | (Fragment::complete): Remove in favor of new constructor. | |
252 | (Fragment::unexpanded): Remove as that Fragment type is no longer used | |
253 | or possible. | |
254 | (Fragment::get_tokens): Add helper to access a fragment's tokens. | |
255 | * ast/rust-ast-fragment.h (enum class): Remove `FragmentKind::Unused` | |
256 | * ast/rust-ast.cc (MacroInvocation::as_string): Display | |
257 | builtin macro invocations properly. | |
258 | * ast/rust-ast.h: Fix `DelimTokenTree` class copy constructors and | |
259 | handling of its token vector. | |
260 | * ast/rust-macro.h (class MacroMatcher): Format. | |
261 | (class MetaItemSeq): Likewise. | |
262 | (builtin_macro_from_string): Get a `BuiltinMacroKind` from a given | |
263 | string, i.e the name of the macro (`assert!`, `cfg!` and so on). | |
264 | * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Do not expand | |
265 | macros recursively anymore. | |
266 | (AttrVisitor::maybe_expand_expr): Likewise. | |
267 | (AttrVisitor::maybe_expand_type): Likewise. | |
268 | * expand/rust-attribute-visitor.h: Likewise, and remove | |
269 | `expand_macro_fragment_recursively` function. | |
270 | * expand/rust-macro-builtins.cc (make_token): Add shorthand for | |
271 | returning `std::unique_ptr<AST::Token>`s. | |
272 | (make_macro_invocation): Add shorthand for returning fragments | |
273 | containing builtin macro invocations. | |
274 | (try_expand_macro_expression): Do not expand macros recursively. | |
275 | (try_expand_single_string_literal): Likewise. | |
276 | (try_expand_many_expr): Likewise. | |
277 | (parse_single_string_literal): Error out more appropriately. | |
278 | (MacroBuiltin::compile_error_handler): Add explanation for eager | |
279 | invocation | |
280 | (MacroBuiltin::file_handler): Return the proper tokens associated with | |
281 | macro invocation, and builtin macros in the case of necessary eager | |
282 | expansion. | |
283 | (MacroBuiltin::column_handler): Likewise. | |
284 | (MacroBuiltin::include_bytes_handler): Likewise. | |
285 | (MacroBuiltin::include_str_handler): Likewise. | |
286 | (MacroBuiltin::concat_handler): Likewise. | |
287 | (MacroBuiltin::env_handler): Likewise. | |
288 | (MacroBuiltin::cfg_handler): Likewise. | |
289 | (MacroBuiltin::include_handler): Likewise. | |
290 | (MacroBuiltin::line_handler): Likewise. | |
291 | * expand/rust-macro-expand.cc (MacroExpander::expand_eager_invocations): | |
292 | Add function to expand eager invocations *once* in the fixed point | |
293 | pipeline. | |
294 | (MacroExpander::expand_invoc): Call into `expand_eager_invocations` for | |
295 | builtin macro invocations. | |
296 | (MacroExpander::expand_crate): Use new `AttrVisitor` API. | |
297 | (parse_many): Return tokens in `AST::Fragment`. | |
298 | (transcribe_expression): Likewise. | |
299 | (transcribe_type): Likewise. | |
300 | * expand/rust-macro-expand.h (struct MacroExpander): Add `has_changed` | |
301 | flag for fixed point checking. | |
302 | * resolve/rust-early-name-resolver.cc (EarlyNameResolver::EarlyNameResolver): | |
303 | Keep track of the current macro scope. | |
304 | (EarlyNameResolver::go): Use `scoped` API. | |
305 | (EarlyNameResolver::visit): Likewise. | |
306 | * resolve/rust-early-name-resolver.h: Add `scoped` API. | |
307 | * rust-session-manager.cc (Session::expansion): Perform macro expansion | |
308 | in a fixed-point fashion. | |
309 | ||
310 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
311 | ||
312 | * expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::get_token_slice): | |
313 | Add API to retrieve token slices when lexing macro expansions. | |
314 | * expand/rust-macro-invoc-lexer.h: Declare `get_token_slice`. | |
315 | ||
316 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
317 | ||
318 | * parse/rust-parse.h: Move `parse_macro_invocation` to public API. | |
319 | ||
320 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
321 | ||
322 | * ast/rust-item.h (class BlockExpr): Remove forward declaration of | |
323 | class `BlockExpr`. | |
324 | ||
325 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
326 | ||
327 | * hir/tree/rust-hir-pattern.h | |
328 | (TuplePatternItemsRanged::get_lower_patterns): Add method. | |
329 | (TuplePatternItemsRanged::get_upper_patterns): Add method. | |
330 | * backend/rust-compile-pattern.cc | |
331 | (CompilePatternLet::visit): Implement TuplePattern visitor. | |
332 | * backend/rust-compile-pattern.h | |
333 | (CompilePatternLet::visit): Move TuplePattern visitor out of header file. | |
334 | ||
335 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
336 | ||
337 | * typecheck/rust-unify.cc (UnifyRules::go): ensure the bounds are checked | |
338 | ||
339 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
340 | ||
341 | * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove error message | |
342 | ||
343 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
344 | ||
345 | * typecheck/rust-hir-trait-reference.h: add const infterface | |
346 | * typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_generic_param): make const | |
347 | (SubstitutionRef::monomorphize): fix issue | |
348 | * typecheck/rust-tyty-subst.h: constify interface | |
349 | ||
350 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
351 | ||
352 | * util/rust-lang-item.h: | |
353 | ||
354 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
355 | ||
356 | * typecheck/rust-tyty-subst.cc (SubstitutionArg::is_conrete): fix check | |
357 | ||
358 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
359 | ||
360 | * Make-lang.in: update names | |
361 | * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): | |
362 | update to use new interface | |
363 | * typecheck/rust-coercion.cc (TypeCoercionRules::coerce_borrowed_pointer): likewise | |
364 | * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site): likewise | |
365 | * typecheck/rust-tyty.cc (BaseType::destructure): likewise | |
366 | (InferType::unify): removed old unify interface | |
367 | (ErrorType::unify): likewise | |
368 | (ADTType::unify): likewise | |
369 | (TupleType::unify): likewise | |
370 | (FnType::unify): likewise | |
371 | (FnPtr::unify): likewise | |
372 | (ClosureType::unify): likewise | |
373 | (ArrayType::unify): likewise | |
374 | (SliceType::unify): likewise | |
375 | (BoolType::unify): likewise | |
376 | (IntType::unify): likewise | |
377 | (UintType::unify): likewise | |
378 | (FloatType::unify): likewise | |
379 | (USizeType::unify): likewise | |
380 | (ISizeType::unify): likewise | |
381 | (CharType::unify): likewise | |
382 | (ReferenceType::unify): likewise | |
383 | (PointerType::unify): likewise | |
384 | (ParamType::unify): likewise | |
385 | (StrType::unify): likewise | |
386 | (NeverType::unify): likewise | |
387 | (PlaceholderType::unify): likewise | |
388 | (ProjectionType::unify): likewise | |
389 | (DynamicObjectType::unify): likewise | |
390 | * typecheck/rust-tyty.h: update destructure interface | |
391 | * typecheck/rust-tyty-rules.h: Removed. | |
392 | * typecheck/rust-unify.cc: New file. | |
393 | * typecheck/rust-unify.h: New file. | |
394 | ||
395 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
396 | ||
397 | * typecheck/rust-hir-trait-reference.h: change interface to return self | |
398 | * typecheck/rust-hir-trait-resolve.cc: likewise | |
399 | * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): likewise | |
400 | * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove monomorphization hack | |
401 | ||
402 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
403 | ||
404 | * typecheck/rust-tyty-subst.cc: add missing callback | |
405 | ||
406 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
407 | ||
408 | * typecheck/rust-tyty-subst.cc: update copy constructors | |
409 | ||
410 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
411 | ||
412 | * typecheck/rust-tyty-bounds.cc: refactor to take a reference | |
413 | * typecheck/rust-tyty-subst.cc: likewise | |
414 | (SubstitutionRef::get_substitution_arguments): likewise | |
415 | (SubstitutionRef::infer_substitions): likewise | |
416 | * typecheck/rust-tyty-subst.h: likewise | |
417 | * typecheck/rust-tyty.cc (ADTType::handle_substitions): likewise | |
418 | (TupleType::handle_substitions): likewise | |
419 | (FnType::handle_substitions): likewise | |
420 | (ClosureType::handle_substitions): likewise | |
421 | (ArrayType::handle_substitions): likewise | |
422 | (SliceType::handle_substitions): likewise | |
423 | (ReferenceType::handle_substitions): likewise | |
424 | (PointerType::handle_substitions): likewise | |
425 | (ParamType::handle_substitions): likewise | |
426 | (ProjectionType::handle_substitions): likewise | |
427 | * typecheck/rust-tyty.h: likewise | |
428 | ||
429 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
430 | ||
431 | * typecheck/rust-hir-trait-ref.h: Moved to... | |
432 | * typecheck/rust-hir-trait-reference.h: ...here. | |
433 | * typecheck/rust-hir-trait-resolve.cc: refactor | |
434 | * typecheck/rust-hir-trait-resolve.h (RUST_HIR_TRAIT_RESOLVE_H): likewise | |
435 | * typecheck/rust-hir-type-check.h: likewise | |
436 | * typecheck/rust-tyty.cc: likewise | |
437 | ||
438 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
439 | ||
440 | * Make-lang.in: update name | |
441 | * typecheck/rust-tyctx.cc: Moved to... | |
442 | * typecheck/rust-typecheck-context.cc: ...here. | |
443 | ||
444 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
445 | ||
446 | * typecheck/rust-hir-type-check.h: refactor | |
447 | * typecheck/rust-tyctx.cc (TypeCheckContext::iterate): refactor | |
448 | (TypeCheckContext::have_loop_context): likewise | |
449 | (TypeCheckContext::push_new_loop_context): likewise | |
450 | (TypeCheckContext::push_new_while_loop_context): likewise | |
451 | (TypeCheckContext::peek_loop_context): likewise | |
452 | (TypeCheckContext::pop_loop_context): likewise | |
453 | (TypeCheckContext::swap_head_loop_context): likewise | |
454 | (TypeCheckContext::insert_trait_reference): likewise | |
455 | (TypeCheckContext::lookup_trait_reference): likewise | |
456 | (TypeCheckContext::insert_receiver): likewise | |
457 | (TypeCheckContext::lookup_receiver): likewise | |
458 | (TypeCheckContext::insert_associated_type_mapping): likewise | |
459 | (TypeCheckContext::clear_associated_type_mapping): likewise | |
460 | (TypeCheckContext::lookup_associated_type_mapping): likewise | |
461 | (TypeCheckContext::insert_variant_definition): likewise | |
462 | (TypeCheckContext::lookup_variant_definition): likewise | |
463 | (TypeCheckContext::insert_operator_overload): likewise | |
464 | (TypeCheckContext::lookup_operator_overload): likewise | |
465 | (TypeCheckContext::insert_unconstrained_check_marker): likewise | |
466 | (TypeCheckContext::have_checked_for_unconstrained): likewise | |
467 | (TypeCheckContext::insert_resolved_predicate): likewise | |
468 | (TypeCheckContext::lookup_predicate): likewise | |
469 | (TypeCheckContext::insert_query): likewise | |
470 | (TypeCheckContext::query_completed): likewise | |
471 | (TypeCheckContext::query_in_progress): likewise | |
472 | (TypeCheckContext::insert_trait_query): likewise | |
473 | (TypeCheckContext::trait_query_completed): likewise | |
474 | (TypeCheckContext::trait_query_in_progress): likewise | |
475 | (TypeCheckContextItem::Item::Item): likewise | |
476 | (TypeCheckContextItem::TypeCheckContextItem): likewise | |
477 | (TypeCheckContextItem::get_item): likewise | |
478 | (TypeCheckContextItem::get_impl_item): likewise | |
479 | (TypeCheckContextItem::get_trait_item): likewise | |
480 | (TypeCheckContextItem::get_type): likewise | |
481 | * typecheck/rust-tyty.cc (StructFieldType::StructFieldType): likewise | |
482 | (StructFieldType::get_ref): likewise | |
483 | (StructFieldType::get_name): likewise | |
484 | (StructFieldType::get_field_type): likewise | |
485 | (StructFieldType::set_field_type): likewise | |
486 | (StructFieldType::is_concrete): likewise | |
487 | (StructFieldType::debug): likewise | |
488 | (StructFieldType::get_locus): likewise | |
489 | (VariantDef::variant_type_string): likewise | |
490 | (VariantDef::VariantDef): likewise | |
491 | (VariantDef::operator=): likewise | |
492 | (VariantDef::get_error_node): likewise | |
493 | (VariantDef::is_error): likewise | |
494 | (VariantDef::get_id): likewise | |
495 | (VariantDef::get_defid): likewise | |
496 | (VariantDef::get_variant_type): likewise | |
497 | (VariantDef::is_data_variant): likewise | |
498 | (VariantDef::is_dataless_variant): likewise | |
499 | (VariantDef::get_identifier): likewise | |
500 | (VariantDef::num_fields): likewise | |
501 | (VariantDef::get_field_at_index): likewise | |
502 | (VariantDef::get_fields): likewise | |
503 | (VariantDef::lookup_field): likewise | |
504 | (VariantDef::get_discriminant): likewise | |
505 | (VariantDef::as_string): likewise | |
506 | (VariantDef::is_equal): likewise | |
507 | (VariantDef::clone): likewise | |
508 | (VariantDef::monomorphized_clone): likewise | |
509 | (VariantDef::get_ident): likewise | |
510 | (TupleType::TupleType): likewise | |
511 | (TupleType::get_unit_type): likewise | |
512 | (TupleType::is_unit): likewise | |
513 | (TupleType::num_fields): likewise | |
514 | (TupleType::is_concrete): likewise | |
515 | (TupleType::get_fields): likewise | |
516 | (BoolType::BoolType): likewise | |
517 | (BoolType::get_name): likewise | |
518 | (BoolType::is_concrete): likewise | |
519 | (IntType::IntType): likewise | |
520 | (IntType::get_name): likewise | |
521 | (IntType::get_int_kind): likewise | |
522 | (IntType::is_concrete): likewise | |
523 | (UintType::UintType): likewise | |
524 | (UintType::get_name): likewise | |
525 | (UintType::get_uint_kind): likewise | |
526 | (UintType::is_concrete): likewise | |
527 | (FloatType::FloatType): likewise | |
528 | (FloatType::get_name): likewise | |
529 | (FloatType::get_float_kind): likewise | |
530 | (FloatType::is_concrete): likewise | |
531 | (USizeType::USizeType): likewise | |
532 | (USizeType::get_name): likewise | |
533 | (USizeType::is_concrete): likewise | |
534 | (ISizeType::ISizeType): likewise | |
535 | (ISizeType::get_name): likewise | |
536 | (ISizeType::is_concrete): likewise | |
537 | (CharType::CharType): likewise | |
538 | (CharType::is_concrete): likewise | |
539 | (CharType::get_name): likewise | |
540 | (ReferenceType::ReferenceType): likewise | |
541 | (ReferenceType::is_concrete): likewise | |
542 | (ReferenceType::mutability): likewise | |
543 | (ReferenceType::is_mutable): likewise | |
544 | (ReferenceType::is_dyn_object): likewise | |
545 | (ReferenceType::is_dyn_slice_type): likewise | |
546 | (ReferenceType::is_dyn_str_type): likewise | |
547 | (PointerType::PointerType): likewise | |
548 | (PointerType::is_concrete): likewise | |
549 | (PointerType::mutability): likewise | |
550 | (PointerType::is_mutable): likewise | |
551 | (PointerType::is_const): likewise | |
552 | (PointerType::is_dyn_object): likewise | |
553 | (PointerType::is_dyn_slice_type): likewise | |
554 | (PointerType::is_dyn_str_type): likewise | |
555 | (ParamType::ParamType): likewise | |
556 | (ParamType::get_generic_param): likewise | |
557 | (ParamType::can_resolve): likewise | |
558 | (ParamType::is_concrete): likewise | |
559 | (StrType::StrType): likewise | |
560 | (StrType::get_name): likewise | |
561 | (StrType::is_concrete): likewise | |
562 | (NeverType::NeverType): likewise | |
563 | (NeverType::get_name): likewise | |
564 | (NeverType::is_unit): likewise | |
565 | (NeverType::is_concrete): likewise | |
566 | (PlaceholderType::PlaceholderType): likewise | |
567 | (PlaceholderType::get_name): likewise | |
568 | (PlaceholderType::is_unit): likewise | |
569 | (PlaceholderType::get_symbol): likewise | |
570 | (PlaceholderType::is_concrete): likewise | |
571 | (ProjectionType::is_unit): likewise | |
572 | (ProjectionType::get_name): likewise | |
573 | (ProjectionType::needs_generic_substitutions): likewise | |
574 | (ProjectionType::supports_substitutions): likewise | |
575 | (ProjectionType::has_subsititions_defined): likewise | |
576 | (ProjectionType::get): likewise | |
577 | (ProjectionType::is_concrete): likewise | |
578 | (DynamicObjectType::is_concrete): likewise | |
579 | * typecheck/rust-tyty.h: likewise | |
580 | ||
581 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
582 | ||
583 | * typecheck/rust-hir-path-probe.cc (PathProbeCandidate::Candidate::Candidate): refactor | |
584 | (PathProbeCandidate::PathProbeCandidate): likewise | |
585 | (PathProbeCandidate::as_string): likewise | |
586 | (PathProbeCandidate::is_enum_candidate): likewise | |
587 | (PathProbeCandidate::is_impl_candidate): likewise | |
588 | (PathProbeCandidate::is_trait_candidate): likewise | |
589 | (PathProbeCandidate::is_full_trait_item_candidate): likewise | |
590 | (PathProbeCandidate::get_error): likewise | |
591 | (PathProbeCandidate::is_error): likewise | |
592 | (PathProbeCandidate::get_defid): likewise | |
593 | (PathProbeCandidate::operator<): likewise | |
594 | * typecheck/rust-hir-path-probe.h (struct PathProbeCandidate): likewise | |
595 | ||
596 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
597 | ||
598 | * typecheck/rust-hir-path-probe.cc (PathProbeType::PathProbeType): refactor | |
599 | (PathProbeType::Probe): likewise | |
600 | (PathProbeType::visit): likewise | |
601 | (PathProbeType::process_enum_item_for_candiates): likewise | |
602 | (PathProbeType::process_impl_items_for_candidates): likewise | |
603 | (PathProbeType::is_reciever_generic): likewise | |
604 | (PathProbeImplTrait::PathProbeImplTrait): likewise | |
605 | (PathProbeImplTrait::Probe): likewise | |
606 | (PathProbeImplTrait::process_trait_impl_items_for_candidates): likewise | |
607 | * typecheck/rust-hir-path-probe.h (struct PathProbeCandidate): likewise | |
608 | * typecheck/rust-hir-trait-resolve.cc | |
609 | (PathProbeImplTrait::process_trait_impl_items_for_candidates): likewise | |
610 | ||
611 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
612 | ||
613 | * typecheck/rust-tyty.cc (BaseType::BaseType): refactor | |
614 | (BaseType::~BaseType): likewise | |
615 | (BaseType::get_ref): likewise | |
616 | (BaseType::set_ref): likewise | |
617 | (BaseType::get_ty_ref): likewise | |
618 | (BaseType::set_ty_ref): likewise | |
619 | (BaseType::is_equal): likewise | |
620 | (BaseType::is_unit): likewise | |
621 | (BaseType::get_kind): likewise | |
622 | (BaseType::get_combined_refs): likewise | |
623 | (BaseType::append_reference): likewise | |
624 | (BaseType::supports_substitutions): likewise | |
625 | (BaseType::has_subsititions_defined): likewise | |
626 | (BaseType::can_substitute): likewise | |
627 | (BaseType::needs_generic_substitutions): likewise | |
628 | (BaseType::contains_type_parameters): likewise | |
629 | (BaseType::get_ident): likewise | |
630 | (BaseType::get_locus): likewise | |
631 | (InferType::InferType): likewise | |
632 | (InferType::get_infer_kind): likewise | |
633 | (InferType::get_name): likewise | |
634 | (InferType::is_concrete): likewise | |
635 | (ErrorType::ErrorType): likewise | |
636 | (ErrorType::is_unit): likewise | |
637 | (ErrorType::is_concrete): likewise | |
638 | (ErrorType::get_name): likewise | |
639 | (ErrorType::monomorphized_clone): likewise | |
640 | * typecheck/rust-tyty.h (class SubstitutionArgumentMappings): likewise | |
641 | ||
642 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
643 | ||
644 | * typecheck/rust-substitution-mapper.cc (SubstMapper::SubstMapper): refactor | |
645 | (SubstMapper::Resolve): likewise | |
646 | (SubstMapper::InferSubst): likewise | |
647 | (SubstMapper::have_generic_args): likewise | |
648 | (SubstMapper::visit): likewise | |
649 | (SubstMapperInternal::visit): likewise | |
650 | (SubstMapperFromExisting::SubstMapperFromExisting): likewise | |
651 | (SubstMapperFromExisting::Resolve): likewise | |
652 | (SubstMapperFromExisting::visit): likewise | |
653 | (GetUsedSubstArgs::GetUsedSubstArgs): likewise | |
654 | (GetUsedSubstArgs::From): likewise | |
655 | (GetUsedSubstArgs::visit): likewise | |
656 | * typecheck/rust-substitution-mapper.h: refactor | |
657 | * typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_generic_param): likewise | |
658 | ||
659 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
660 | ||
661 | * Make-lang.in: update the makefile | |
662 | * typecheck/rust-tyty.cc (SubstitutionParamMapping::need_substitution): likewise | |
663 | (SubstitutionParamMapping::override_context): likewise | |
664 | (SubstitutionRef::get_mappings_from_generic_args): likewise | |
665 | (SubstitutionRef::infer_substitions): likewise | |
666 | (SubstitutionRef::are_mappings_bound): likewise | |
667 | (SubstitutionRef::solve_missing_mappings_from_this): likewise | |
668 | (SubstitutionRef::monomorphize): likewise | |
669 | * typecheck/rust-tyty.h (class SubstitutionParamMapping): likewise | |
670 | (class SubstitutionArg): likewise | |
671 | (std::function<void): likewise | |
672 | (class SubstitutionArgumentMappings): likewise | |
673 | (class SubstitutionRef): likewise | |
674 | * typecheck/rust-tyty-subst.cc: New file. | |
675 | * typecheck/rust-tyty-subst.h: New file. | |
676 | ||
677 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
678 | ||
679 | * Make-lang.in: update makefile | |
680 | * typecheck/rust-tyty.cc (TyVar::TyVar): move to new file | |
681 | (TyVar::get_tyty): likewise | |
682 | (TyVar::get_implicit_infer_var): likewise | |
683 | (TyVar::subst_covariant_var): likewise | |
684 | (TyVar::clone): likewise | |
685 | (TyVar::monomorphized_clone): likewise | |
686 | (TyWithLocation::TyWithLocation): likewise | |
687 | * typecheck/rust-tyty.h (class BaseType): cleanup | |
688 | (class TypeBoundPredicate): move to its own file | |
689 | (class TypeBoundPredicateItem): likewise | |
690 | (class TypeBoundsMappings): likewise | |
691 | (class TyVar): likewise | |
692 | (class TyWithLocation): likewise | |
693 | * typecheck/rust-tyty-bounds.h: New file. | |
694 | * typecheck/rust-tyty-util.cc: New file. | |
695 | * typecheck/rust-tyty-util.h: New file. | |
696 | ||
697 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
698 | ||
699 | * typecheck/rust-tyty-bounds.cc (TypeBoundPredicateItem::error): refactor | |
700 | (TypeBoundPredicateItem::is_error): likewise | |
701 | (TypeBoundPredicateItem::get_parent): likewise | |
702 | * typecheck/rust-tyty.h: Move the implementation for the above | |
703 | ||
704 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
705 | ||
706 | * backend/rust-compile-expr.cc (CompileExpr::visit): Removed copy-pasted comment. | |
707 | ||
708 | 2023-04-06 mxlol233 <mxlol233@outlook.com> | |
709 | ||
710 | * Make-lang.in: Add object files: `rust-feature.o` and `rust-feature-gate.o` | |
711 | * checks/errors/rust-feature-gate.cc: New file. | |
712 | * checks/errors/rust-feature-gate.h: New file. | |
713 | * checks/errors/rust-feature.cc: New file. | |
714 | * checks/errors/rust-feature.h: New file. | |
715 | * rust-session-manager.cc: Add FeatureGate check. | |
716 | ||
717 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
718 | ||
719 | * parse/rust-parse-impl.h (Parser::parse_closure_expr): Advance tokens | |
720 | properly when parsing closure param list. | |
721 | ||
722 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
723 | ||
724 | * parse/rust-parse-impl.h (Parser::parse_generic_arg): Handle type | |
725 | paths and nested generics properly. | |
726 | ||
727 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
728 | ||
729 | * ast/rust-pattern.h: | |
730 | (ReferencePattern::is_double_reference): Add method. | |
731 | (ReferencePattern::get_is_mut): Add method. | |
732 | * hir/rust-ast-lower-pattern.cc | |
733 | (ASTLoweringPattern::visit): Add ReferencePattern visitor. | |
734 | * hir/rust-ast-lower-pattern.h: | |
735 | (ASTLoweringPattern::visit): Add ReferencePattern visitor. | |
736 | ||
737 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
738 | ||
739 | * hir/tree/rust-hir-pattern.h | |
740 | (class ReferencePattern): Remove has_two_amps field. | |
741 | * hir/tree/rust-hir-full-test.cc | |
742 | (ReferencePattern::as_string): Remove usage of ReferencePattern::has_two_amps. | |
743 | ||
744 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
745 | ||
746 | * backend/rust-compile-fnparam.h | |
747 | (CompileFnParam::visit): Remove HIR::GroupedPattern visitor. | |
748 | * backend/rust-compile-pattern.cc | |
749 | (CompilePatternCaseLabelExpr::visit): Remove HIR::GroupedPattern visitor. | |
750 | (CompilePatternBindings::visit): Remove HIR::GroupedPattern visitor. | |
751 | * backend/rust-compile-pattern.h | |
752 | (CompilePatternCaseLabelExpr::visit): Remove HIR::GroupedPattern visitor. | |
753 | (CompilePatternBindings::visit): Remove HIR::GroupedPattern visitor. | |
754 | (CompilePatternLet::visit): Remove HIR::GroupedPattern visitor. | |
755 | * backend/rust-compile-resolve-path.h | |
756 | (ResolvePathRef::visit): Remove HIR::GroupedPattern visitor. | |
757 | * backend/rust-compile-var-decl.h | |
758 | (CompileVarDecl::visit): Remove HIR::GroupedPattern visitor. | |
759 | * checks/errors/rust-const-checker.cc | |
760 | (ConstChecker::visit): Remove HIR::GroupedPattern visitor. | |
761 | * checks/errors/rust-const-checker.h | |
762 | (ConstChecker::visit): Remove HIR::GroupedPattern visitor. | |
763 | * checks/errors/rust-unsafe-checker.cc | |
764 | (UnsafeChecker::visit): Remove HIR::GroupedPattern visitor. | |
765 | * checks/errors/rust-unsafe-checker.h | |
766 | (UnsafeChecker::visit): Remove HIR::GroupedPattern visitor. | |
767 | * hir/rust-hir-dump.cc (Dump::visit): Remove HIR::GroupedPattern visitor. | |
768 | * hir/rust-hir-dump.h (Dump::visit): Remove HIR::GroupedPattern visitor. | |
769 | * hir/tree/rust-hir-full-decls.h (class GroupedPattern): Remove class. | |
770 | * hir/tree/rust-hir-full-test.cc (GroupedPattern::accept_vis): Remove method. | |
771 | * hir/tree/rust-hir-pattern.h (class GroupedPattern): Remove class. | |
772 | * hir/tree/rust-hir-visitor.h | |
773 | (HIRFullVisitor::visit): Remove HIR::GroupedPattern visitor. | |
774 | (HIRFullVisitorBase::visit): Remove HIR::GroupedPattern visitor. | |
775 | (HIRPatternVisitor::visit): Remove HIR::GroupedPattern visitor. | |
776 | * typecheck/rust-hir-type-check-pattern.cc | |
777 | (TypeCheckPattern::visit): Remove HIR::GroupedPattern visitor. | |
778 | * typecheck/rust-hir-type-check-pattern.h | |
779 | (TypeCheckPattern::visit): Remove HIR::GroupedPattern visitor. | |
780 | ||
781 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
782 | ||
783 | * hir/rust-ast-lower-pattern.cc | |
784 | (ASTLoweringPattern::visit): Lower AST::GroupedPattern to its inner pattern. | |
785 | ||
786 | 2023-04-06 MAHAD <mahadtxt@gmail.com> | |
787 | ||
788 | * rust-buffered-queue.h: Moved to... | |
789 | * util/rust-buffered-queue.h: ...here. | |
790 | ||
791 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
792 | ||
793 | * parse/rust-parse-impl.h (Parser::parse_type): Handle double ampersan | |
794 | properly | |
795 | (Parser::parse_reference_type): Call into `parse_reference_type_inner` | |
796 | and wrap double reference types in another `AST::ReferenceType` node | |
797 | (Parser::parse_reference_type_inner): Add parsing implementation | |
798 | which does not care about the leading token (& or &&) | |
799 | (Parser::parse_type_no_bounds): Handle double ampersand properly | |
800 | * parse/rust-parse.h: Declare `parse_reference_type_inner` | |
801 | ||
802 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
803 | ||
804 | * backend/rust-compile-pattern.cc (CompilePatternLet::visit): New function. | |
805 | * backend/rust-compile-stmt.cc (CompileStmt::visit): Likewise. | |
806 | * backend/rust-compile-pattern.h (class CompilePatternLet): New visitor. | |
807 | ||
808 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
809 | ||
810 | * ast/rust-macro.h (enum class): Add `BuiltinMacro` enum class. | |
811 | * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Mention | |
812 | switching on `macro.kind` once builtin macro invocations are properly | |
813 | handled. | |
814 | * parse/rust-parse-impl.h (Parser::parse_macro_invocation): Switch to new MacroInvocation | |
815 | API. | |
816 | (Parser::parse_type): Likewise. | |
817 | (Parser::parse_type_no_bounds): Likewise. | |
818 | ||
819 | 2023-04-06 Abdul Rafey <abdulrafeyq@gmail.com> | |
820 | ||
821 | * ast/rust-ast-dump.cc (Dump::visit): removed extra indentations in trait ast dump | |
822 | ||
823 | 2023-04-06 Abdul Rafey <abdulrafeyq@gmail.com> | |
824 | ||
825 | * parse/rust-parse-impl.h (Parser::null_denotation): Add proper error | |
826 | when seeing wildcard var on right side of assignment. | |
827 | ||
828 | 2023-04-06 Abdul Rafey <abdulrafeyq@gmail.com> | |
829 | ||
830 | * ast/rust-ast.cc: Fix include list. | |
831 | * ast/rust-expr.h: Likewise. | |
832 | * hir/tree/rust-hir-expr.h: Likewise. | |
833 | * rust-backend.h: Likewise. | |
834 | * util/rust-lang-item.h: Likewise. | |
835 | * operator.h: Moved to... | |
836 | * util/rust-operators.h: ...here. | |
837 | ||
838 | 2023-04-06 Parthib <parthibdutta02@gmail.com> | |
839 | ||
840 | * Make-lang.in: Rename object file. | |
841 | * ast/rust-ast-full-test.cc: Moved to... | |
842 | * ast/rust-ast.cc: ...here. | |
843 | ||
844 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
845 | ||
846 | * backend/rust-compile-pattern.cc (CompilePatternCaseLabelExpr::visit): Add proper | |
847 | visitor. | |
848 | (CompilePatternBindings::visit): Likewise. | |
849 | * backend/rust-compile-pattern.h: Declare them. | |
850 | ||
851 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
852 | ||
853 | * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Add proper | |
854 | visitor. | |
855 | ||
856 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
857 | ||
858 | * hir/tree/rust-hir-pattern.h: Add get_item method. | |
859 | ||
860 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
861 | ||
862 | * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit): Add proper visitor. | |
863 | * hir/rust-ast-lower-pattern.h: Declare it. | |
864 | ||
865 | 2023-04-06 Lyra <teromene@teromene.fr> | |
866 | ||
867 | * expand/rust-macro-expand.cc (transcribe_expression): Fix ICE when expanding | |
868 | empty macros. | |
869 | ||
870 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
871 | ||
872 | * resolve/rust-ast-resolve-pattern.h: Support GroupedPattern properly. | |
873 | ||
874 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
875 | ||
876 | * backend/rust-compile-base.cc (HIRCompileBase::compile_locals_for_block): | |
877 | Allow patterns to declare zero or multiple variables. | |
878 | * backend/rust-compile-var-decl.h: Change function declaration. | |
879 | ||
880 | 2023-04-06 mxlol233 <mxlol233@outlook.com> | |
881 | ||
882 | * lex/rust-lex.cc (Lexer::build_token): Make location enclose entire token. | |
883 | (Lexer::parse_byte_char): Likewise. | |
884 | (Lexer::parse_byte_string): Likewise. | |
885 | (Lexer::parse_raw_byte_string): Likewise. | |
886 | (Lexer::parse_raw_identifier): Likewise. | |
887 | (Lexer::parse_string): Likewise. | |
888 | (Lexer::parse_identifier_or_keyword): Likewise. | |
889 | (Lexer::parse_raw_string): Likewise. | |
890 | (Lexer::parse_non_decimal_int_literal): Likewise. | |
891 | (Lexer::parse_decimal_int_or_float): Likewise. | |
892 | (Lexer::parse_char_or_lifetime): Likewise. | |
893 | ||
894 | 2023-04-06 mxlol233 <mxlol233@outlook.com> | |
895 | ||
896 | * ast/rust-ast.h: Add get_locus method. | |
897 | * ast/rust-expr.h: Likewise. | |
898 | * ast/rust-macro.h: Likewise. | |
899 | ||
900 | 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com> | |
901 | ||
902 | * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Cleanup LetStmt | |
903 | type checking. | |
904 | ||
905 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
906 | ||
907 | * hir/tree/rust-hir-path.h: Add const get_identifier and get_type method. | |
908 | * typecheck/rust-hir-path-probe.h: Use new SubstitutionArgumentMappings constructor. | |
909 | * typecheck/rust-hir-trait-resolve.cc: Likewise. | |
910 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise. | |
911 | * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound): | |
912 | Do not assert failure on size mismatch anymore. | |
913 | (TypeBoundPredicate::TypeBoundPredicate): Use new SubstitutionArgumentMappings constructor. | |
914 | (TypeBoundPredicate::operator=): Likewise. | |
915 | (TypeBoundPredicate::apply_generic_arguments): Likewise. | |
916 | (TypeBoundPredicateItem::get_tyty_for_receiver): Likewise. | |
917 | (TypeBoundPredicate::get_num_associated_bindings): Likewise. | |
918 | (TypeBoundPredicate::lookup_associated_type): Fix implementation for new system. | |
919 | (TypeBoundPredicate::get_associated_type_items): Likewise. | |
920 | * typecheck/rust-tyty.cc (SubstitutionRef::get_mappings_from_generic_args): Add new | |
921 | behavior. | |
922 | (SubstitutionRef::infer_substitions): Use new constructor and add comment. | |
923 | (SubstitutionRef::solve_missing_mappings_from_this): Use new constructor. | |
924 | * typecheck/rust-tyty.h: Define new constructors. | |
925 | ||
926 | 2023-04-06 Philip Herron <herron.philip@googlemail.com> | |
927 | ||
928 | * resolve/rust-ast-resolve-type.cc (ResolveGenericArgs::go): Add name resolution to | |
929 | Trait items. | |
930 | ||
931 | 2023-04-06 Raiki Tamura <tamaron1203@gmail.com> | |
932 | ||
933 | * ast/rust-ast-full-decls.h (class MacroItem): Remove forward declaration. | |
934 | * ast/rust-ast-full-test.cc (MacroRulesDefinition): | |
935 | Rework MacroRulesDefinition class | |
936 | * ast/rust-ast.h (class MacroItem): Remove abstract class. | |
937 | * ast/rust-item.h (class MacroItem): Remove forward declaration. | |
938 | * ast/rust-macro.h (class MacroItem): Likewise. | |
939 | (class MacroRulesDefinition): Add MacroKind enum. | |
940 | (class MacroInvocation): Fix inheritance. | |
941 | * lex/rust-token.h: Token "macro" is now used. | |
942 | * parse/rust-parse-impl.h (Parser::parse_item): Add handling for MACRO. | |
943 | (Parser::parse_vis_item): Call into parse_decl_macro_def. | |
944 | (Parser::parse_macro_item): Delete function. | |
945 | (Parser::parse_macro_rules_def): Return MBE macros only. | |
946 | (Parser::parse_decl_macro_def): New function. | |
947 | (Parser::parse_stmt): Handle MACRO token. | |
948 | (Parser::parse_stmt_or_expr_without_block): Call into parse_macro_rules_def. | |
949 | * parse/rust-parse.h: Declare new function. | |
950 | ||
951 | 2023-04-06 mxlol233 <mxlol233@outlook.com> | |
952 | ||
953 | * parse/rust-parse-impl.h (Parser::parse_generic_arg): Add proper bound parsing. | |
954 | ||
955 | 2023-04-06 Dave <dme2223@gmail.com> | |
956 | ||
957 | * checks/errors/rust-const-checker.cc (ConstChecker::visit): Use StackedContext | |
958 | class. | |
959 | ||
960 | 2023-04-06 Prajwal S N <prajwalnadig21@gmail.com> | |
961 | ||
962 | * checks/errors/rust-unsafe-checker.cc (check_target_attr): New function. | |
963 | (UnsafeChecker::check_function_attr): Call into `check_target_attr`. | |
964 | (UnsafeChecker::visit): Check for target_feature attributes. | |
965 | * checks/errors/rust-unsafe-checker.h: Add declarations. | |
966 | * util/rust-attributes.cc: Add attribute. | |
967 | ||
968 | 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com> | |
969 | ||
970 | * rust-session-manager.cc (Session::compile_crate): Fix typo. | |
971 | ||
b6f98991 GA |
972 | 2023-02-22 Thomas Schwinge <thomas@codesourcery.com> |
973 | ||
974 | * rust-lang.cc (grs_langhook_type_for_mode): Also consider all | |
975 | 'int_n' modes/types. | |
976 | ||
977 | 2023-02-22 Thomas Schwinge <thomas@codesourcery.com> | |
978 | ||
979 | * rust-lang.cc (grs_langhook_init): Do not initialize | |
980 | void_list_node. | |
981 | ||
982 | 2023-02-22 Thomas Schwinge <thomas@codesourcery.com> | |
983 | ||
984 | * config-lang.in (target_libs): Remove. | |
985 | ||
c3bf22d9 GA |
986 | 2023-02-21 Raiki Tamura <tamaron1203@gmail.com> |
987 | ||
988 | * backend/rust-builtins.cc (BuiltinsContext::setup_math_fns): New functions. | |
989 | ||
990 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
991 | ||
992 | * backend/rust-constexpr.cc (get_nth_callarg): Remove function. | |
993 | (rs_bind_parameters_in_call): Use CALL_EXPR_ARG instead. | |
994 | (potential_constant_expression_1): Likewise. | |
995 | ||
996 | 2023-02-21 Thomas Schwinge <thomas@codesourcery.com> | |
997 | ||
998 | * lang.opt: Fix ordering of file. | |
999 | ||
1000 | 2023-02-21 Philip Herron <herron.philip@googlemail.com> | |
1001 | ||
1002 | * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Remove unused parameters. | |
1003 | * backend/rust-constexpr.cc (constant_value_1): Likewise. | |
1004 | (fold_non_dependent_init): Likewise. | |
1005 | * backend/rust-tree.cc (publicly_uniquely_derived_p): Likewise. | |
1006 | (instantiation_dependent_expression_p): Likewise. | |
1007 | (type_has_nontrivial_copy_init): Likewise. | |
1008 | (is_normal_capture_proxy): Likewise. | |
1009 | (resolve_nondeduced_context): Likewise. | |
1010 | (undeduced_auto_decl): Likewise. | |
1011 | (require_deduced_type): Likewise. | |
1012 | * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise. | |
1013 | * checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit): Likewise. | |
1014 | * checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::visit): Likewise. | |
1015 | * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise. | |
1016 | * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise. | |
1017 | * checks/lints/rust-lint-marklive.cc (MarkLive::go): Likewise. | |
1018 | * checks/lints/rust-lint-unused-var.cc (unused_var_walk_fn): Likewise. | |
1019 | * expand/rust-macro-builtins.cc (try_expand_single_string_literal): Likewise. | |
1020 | (try_expand_many_expr): Likewise. | |
1021 | (parse_single_string_literal): Likewise. | |
1022 | (MacroBuiltin::assert_handler): Likewise. | |
1023 | (MacroBuiltin::file_handler): Likewise. | |
1024 | (MacroBuiltin::column_handler): Likewise. | |
1025 | (MacroBuiltin::concat_handler): Likewise. | |
1026 | (MacroBuiltin::env_handler): Likewise. | |
1027 | (MacroBuiltin::line_handler): Likewise. | |
1028 | * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise. | |
1029 | (ASTLoweringBase::handle_doc_item_attribute): Likewise. | |
1030 | * hir/rust-hir-dump.cc (Dump::visit): Likewise. | |
1031 | * hir/tree/rust-hir-full-test.cc (ConstGenericParam::accept_vis): Likewise. | |
1032 | * lex/rust-lex.cc (Lexer::parse_utf8_escape): Likewise. | |
1033 | (Lexer::parse_string): Likewise. | |
1034 | (Lexer::parse_char_or_lifetime): Likewise. | |
1035 | * lex/rust-lex.h: Likewise. | |
1036 | * metadata/rust-export-metadata.cc: Likewise. | |
1037 | * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise. | |
1038 | * resolve/rust-ast-resolve-type.cc (ResolveType::visit): Likewise. | |
1039 | (ResolveTypeToCanonicalPath::visit): Likewise. | |
1040 | * resolve/rust-ast-verify-assignee.h: Likewise. | |
1041 | * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise. | |
1042 | * typecheck/rust-hir-type-check-expr.h: Likewise. | |
1043 | * typecheck/rust-hir-type-check-item.h: Likewise. | |
1044 | * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise. | |
1045 | * typecheck/rust-tyty-rules.h: Likewise. | |
1046 | * util/rust-attributes.cc (AttributeChecker::visit): Likewise. | |
1047 | ||
1048 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1049 | ||
1050 | * hir/tree/rust-hir-expr.h: Add const `get_method_name`. | |
1051 | * hir/tree/rust-hir-full-decls.h (struct GenericArgs): Move from `struct`... | |
1052 | (class GenericArgs): ...to `class`. | |
1053 | * hir/tree/rust-hir-path.h (struct GenericArgs): Likewise. | |
1054 | (class GenericArgs): Clear `type_args` in copy constructor. | |
1055 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Reorder | |
1056 | debug print. | |
1057 | * typecheck/rust-tyty.h: Add default constructors for `SubstitutionArgumentMappings`. | |
1058 | ||
1059 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1060 | ||
1061 | * backend/rust-compile-context.cc (Context::push_closure_context): New function. | |
1062 | (Context::pop_closure_context): Likewise. | |
1063 | (Context::insert_closure_binding): Likewise. | |
1064 | (Context::lookup_closure_binding): Likewise. | |
1065 | * backend/rust-compile-context.h: Declare new functions and closure mappings. | |
1066 | * backend/rust-compile-expr.cc (CompileExpr::visit): Visit captures properly. | |
1067 | (CompileExpr::generate_closure_function): Compile captures properly. | |
1068 | * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): Check for | |
1069 | closure bindings. | |
1070 | * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Compile capture list's | |
1071 | types as well. | |
1072 | ||
1073 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1074 | ||
1075 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Pass captures | |
1076 | properly to `TyTy::ClosureType` constructor. | |
1077 | * typecheck/rust-tyty.cc (ClosureType::as_string): Fix string representation. | |
1078 | (ClosureType::clone): Pass `captures` argument. | |
1079 | * typecheck/rust-tyty.h: Add `captures` field. | |
1080 | ||
1081 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1082 | ||
1083 | * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Use proper closure | |
1084 | contexts. | |
1085 | * resolve/rust-name-resolver.cc (Scope::lookup_decl_type): New function. | |
1086 | (Scope::lookup_rib_for_decl): Likewise. | |
1087 | (Resolver::insert_resolved_name): Insert captured items. | |
1088 | (Resolver::push_closure_context): New function. | |
1089 | (Resolver::pop_closure_context): Likewise. | |
1090 | (Resolver::insert_captured_item): Likewise. | |
1091 | (Resolver::decl_needs_capture): Likewise. | |
1092 | (Resolver::get_captures): Likewise. | |
1093 | * resolve/rust-name-resolver.h: Declare new functions. | |
1094 | ||
1095 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1096 | ||
1097 | * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Add Rib argument. | |
1098 | (ResolveExpr::resolve_closure_param): Likewise. | |
1099 | * resolve/rust-ast-resolve-implitem.h: Likewise. | |
1100 | * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): Likewise. | |
1101 | (ResolveItem::visit): Likewise. | |
1102 | * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit): Likewise. | |
1103 | * resolve/rust-ast-resolve-pattern.h: Likewise. | |
1104 | * resolve/rust-ast-resolve-stmt.h: Likewise. | |
1105 | * resolve/rust-ast-resolve-toplevel.h: Likewise. | |
1106 | * resolve/rust-ast-resolve-type.h: Likewise. | |
1107 | * resolve/rust-name-resolver.cc (Rib::lookup_decl_type): Likewise. | |
1108 | (Scope::insert): Likewise. | |
1109 | (Resolver::insert_builtin_types): Likewise. | |
1110 | * resolve/rust-name-resolver.h: Likewise. | |
1111 | ||
1112 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1113 | ||
1114 | * resolve/rust-name-resolver.cc (MKBUILTIN_TYPE): Remove macro. | |
1115 | (Rib::Rib): Remove `mappings` field. | |
1116 | (Resolver::generate_builtins): Use `setup_builtin` instead of macro. | |
1117 | (Resolver::setup_builtin): New function. | |
1118 | * resolve/rust-name-resolver.h: Declare `setup_builtin`, add FIXME | |
1119 | comment. | |
1120 | ||
1121 | 2023-02-21 Raiki Tamura <tamaron1203@gmail.com> | |
1122 | ||
1123 | * lex/rust-lex.cc (Lexer::Lexer): Add `dump_lex` boolean flag. | |
1124 | (Lexer::skip_token): Dump tokens if flag is enabled. | |
1125 | (Lexer::dump_and_skip): New function. | |
1126 | * lex/rust-lex.h: Include optional.h and declare functions. | |
1127 | * parse/rust-parse-impl.h (Parser::debug_dump_lex_output): Remove old | |
1128 | unused function. | |
1129 | * parse/rust-parse.h: Likewise. | |
1130 | * rust-session-manager.cc (Session::compile_crate): Pass lexer dump | |
1131 | option to lexer. | |
1132 | (Session::dump_lex): New function. | |
1133 | * util/rust-optional.h: Add missing constructor. | |
1134 | ||
1135 | 2023-02-21 Dave <dme2223@gmail.com> | |
1136 | ||
1137 | * ast/rust-item.h: Remoe default location for Visibility class. | |
1138 | * parse/rust-parse-impl.h (Parser::parse_visibility): Pass proper location | |
1139 | when instantiating visibilities. | |
1140 | ||
1141 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1142 | ||
1143 | * ast/rust-ast-dump.cc (Dump::visit): Fix dumping of fn params. | |
1144 | ||
1145 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1146 | ||
1147 | * ast/rust-ast-dump.cc (Dump::visit): Remove extraneous string when | |
1148 | dumping statements. | |
1149 | ||
1150 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1151 | ||
1152 | * ast/rust-ast-dump.cc: Remove unused include. | |
1153 | ||
1154 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1155 | ||
1156 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1157 | * ast/rust-ast-dump.h: Likewise. | |
1158 | ||
1159 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1160 | ||
1161 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1162 | ||
1163 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1164 | ||
1165 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1166 | ||
1167 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1168 | ||
1169 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1170 | ||
1171 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1172 | ||
1173 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1174 | ||
1175 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1176 | ||
1177 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1178 | ||
1179 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1180 | ||
1181 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1182 | ||
1183 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1184 | ||
1185 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1186 | * ast/rust-ast-dump.h: Add missing getter declaration. | |
1187 | * ast/rust-ast-full-test.cc (BareFunctionType::as_string): Fix bare function | |
1188 | string representation. | |
1189 | * ast/rust-type.h (class BareFunctionType): Declare said getter. | |
1190 | ||
1191 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1192 | ||
1193 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. | |
1194 | ||
1195 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1196 | ||
1197 | * ast/rust-ast-dump.cc (Dump::visit): Add missing tuple type visitor. | |
1198 | ||
1199 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1200 | ||
1201 | * ast/rust-ast-dump.cc (Dump::visit): Add missing never type visitor. | |
1202 | ||
1203 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1204 | ||
1205 | * ast/rust-ast-dump.cc (Dump::visit): Add missing RawPointer visitor. | |
1206 | ||
1207 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1208 | ||
1209 | * ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor | |
1210 | ||
1211 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1212 | ||
1213 | * ast/rust-ast-dump.cc (Dump::visit): Add missing slice visitor. | |
1214 | ||
1215 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1216 | ||
1217 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitors. | |
1218 | * ast/rust-ast-dump.h: Likewise. | |
1219 | * ast/rust-ast.h: Add `get_lifetime_bounds` method. | |
1220 | * ast/rust-item.h: Add missing getter for lifetimes. | |
1221 | * ast/rust-type.h: Likewise. | |
1222 | ||
1223 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1224 | ||
1225 | * ast/rust-ast-dump.cc (Dump::visit): Add new reference visitor wrapper. | |
1226 | * ast/rust-ast-dump.h: Declare it. | |
1227 | * ast/rust-item.h: Add mutable visibility getters. | |
1228 | ||
1229 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1230 | ||
1231 | * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Fix extra call | |
1232 | to `delete`. | |
1233 | ||
1234 | 2023-02-21 Dave <dme2223@gmail.com> | |
1235 | ||
1236 | * ast/rust-item.h: Add location member. | |
1237 | * hir/rust-ast-lower.cc (translate_visibility): Pass location argument. | |
1238 | * hir/tree/rust-hir-item.h: Fix constructor to accept Location argument. | |
1239 | ||
1240 | 2023-02-21 Raiki Tamura <tamaron1203@gmail.com> | |
1241 | ||
1242 | * util/rust-lang-item.h: Add handling for `phantom_data` lang item. | |
1243 | ||
1244 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1245 | ||
1246 | * ast/rust-ast-dump.cc (Dump::visit): Add handling for unit structures. | |
1247 | ||
1248 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1249 | ||
1250 | * ast/rust-ast-dump.h: Fix documentation. | |
1251 | ||
1252 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1253 | ||
1254 | * ast/rust-ast-dump.cc (Dump::go): Use new API. | |
1255 | (Dump::format_function_param): Refactor. | |
1256 | (Dump::visit_items_joined_by_separator): New function. | |
1257 | (Dump::emit_attrib): Refactor. | |
1258 | (Dump::visit_as_line): New function. | |
1259 | (Dump::visit_items_as_lines): Likewise. | |
1260 | (Dump::visit_items_as_block): Likewise. | |
1261 | (Dump::visit): Use new API. | |
1262 | (Dump::emit_visibility): Likewise. | |
1263 | (Dump::emit_indented_string): Likewise. | |
1264 | (Dump::emit_generic_params): Likewise. | |
1265 | (Dump::format_tuple_field): Likewise. | |
1266 | (Dump::format_struct_field): Likewise. | |
1267 | (Dump::format_function_common): Likewise. | |
1268 | (Dump::visit_function_common): Likewise. | |
1269 | * ast/rust-ast-dump.h: Declare new functions and add documentation. | |
1270 | ||
1271 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1272 | ||
1273 | * ast/rust-ast-dump.cc (Dump::visit): Add new visit function for overloading. | |
1274 | * ast/rust-ast-dump.h: Add documentation for layer. | |
1275 | ||
1276 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1277 | ||
1278 | * backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): Declare atomic | |
1279 | load intrinsics. | |
1280 | * backend/rust-compile-intrinsic.cc (atomic_load_handler_inner): New handler. | |
1281 | (atomic_load_handler): Likewise. | |
1282 | (unchecked_op_handler): Remove `static` function qualifier. | |
1283 | (build_atomic_builtin_name): Handle load intrinsics. | |
1284 | (atomic_store_handler_inner): New handler. | |
1285 | ||
1286 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1287 | ||
1288 | * backend/rust-compile-intrinsic.cc (check_for_basic_integer_type): New function. | |
1289 | (build_atomic_builtin_name): Use HIR Type instead of `tree`. | |
1290 | (atomic_store_handler_inner): Cleanup error handling. | |
1291 | (unchecked_op_inner): Likewise. | |
1292 | ||
1293 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1294 | ||
1295 | * backend/rust-compile-intrinsic.cc (wrapping_op_handler): Refactor to return | |
1296 | an `std::function`. | |
1297 | (wrapping_op_handler_inner): Rename. | |
1298 | (wrapping_add_handler): Remove function. | |
1299 | (wrapping_sub_handler): Likewise. | |
1300 | (wrapping_mul_handler): Likewise. | |
1301 | ||
1302 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1303 | ||
1304 | * backend/rust-compile-intrinsic.cc (is_basic_integer_type): New function. | |
1305 | (unchecked_op_inner): New handler. | |
1306 | (unchecked_op_handler): New handler. | |
1307 | ||
1308 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1309 | ||
1310 | * backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): New function. | |
1311 | (BuiltinsContext::setup): Call `setup_atomic_fns`. | |
1312 | * backend/rust-builtins.h: Declare `setup_atomic_fns`. | |
1313 | * backend/rust-compile-intrinsic.cc (atomic_store_handler_inner): New function. | |
1314 | (atomic_store_handler): New handler. | |
1315 | (make_unsigned_long_tree): Add helper around making unsigned long trees. | |
1316 | (prefetch_data_handler): Use `make_unsigned_long_tree`. | |
1317 | (build_atomic_builtin_name): New function. | |
1318 | ||
1319 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1320 | ||
1321 | * backend/rust-constexpr.cc (build_anon_member_initialization): Workaround uninitialized | |
1322 | values. | |
1323 | (build_data_member_initialization): Likewise. | |
1324 | ||
1325 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1326 | ||
1327 | * backend/rust-compile-intrinsic.cc (sorry_handler): New intrinsic handler. | |
1328 | ||
1329 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1330 | ||
1331 | * expand/rust-macro-builtins.cc (MacroBuiltin::assert): Rename to... | |
1332 | (MacroBuiltin::assert_handler): ..this. | |
1333 | (MacroBuiltin::file): Rename to... | |
1334 | (MacroBuiltin::file_handler): ..this. | |
1335 | (MacroBuiltin::column): Rename to... | |
1336 | (MacroBuiltin::column_handler): ..this. | |
1337 | (MacroBuiltin::include_bytes): Rename to... | |
1338 | (MacroBuiltin::include_bytes_handler): ..this. | |
1339 | (MacroBuiltin::include_str): Rename to... | |
1340 | (MacroBuiltin::include_str_handler): ..this. | |
1341 | (MacroBuiltin::compile_error): Rename to... | |
1342 | (MacroBuiltin::compile_error_handler): ..this. | |
1343 | (MacroBuiltin::concat): Rename to... | |
1344 | (MacroBuiltin::concat_handler): ..this. | |
1345 | (MacroBuiltin::env): Rename to... | |
1346 | (MacroBuiltin::env_handler): ..this. | |
1347 | (MacroBuiltin::cfg): Rename to... | |
1348 | (MacroBuiltin::cfg_handler): ..this. | |
1349 | (MacroBuiltin::include): Rename to... | |
1350 | (MacroBuiltin::include_handler): ..this. | |
1351 | (MacroBuiltin::line): Rename to... | |
1352 | (MacroBuiltin::line_handler): ..this. | |
1353 | * expand/rust-macro-builtins.h: Rename all handlers. | |
1354 | * util/rust-hir-map.cc (Mappings::insert_macro_def): Use new handler | |
1355 | names. | |
1356 | ||
1357 | 2023-02-21 Simon Cook <simon.cook@embecosm.com> | |
1358 | ||
1359 | * util/rust-inline-visitor.h: Remove some offending system includes. | |
1360 | ||
1361 | 2023-02-21 YizhePKU <yizhe@pku.edu.cn> | |
1362 | ||
1363 | * util/rust-inline-visitor.h: New file. | |
1364 | ||
1365 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1366 | ||
1367 | * backend/rust-compile-expr.cc (CompileExpr::visit): Refactor checking of closures. | |
1368 | (CompileExpr::generate_possible_fn_trait_call): New function. | |
1369 | * backend/rust-compile-expr.h: Declare `generate_possible_fn_trait_call`. | |
1370 | ||
1371 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1372 | ||
1373 | * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound): Add missing | |
1374 | implementation. | |
1375 | ||
1376 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1377 | ||
1378 | * Make-lang.in: Compile rust-ast-lower-type.cc. | |
1379 | * ast/rust-path.h: Add `get_locus` method to `TypePathFunction`. | |
1380 | * hir/rust-ast-lower-base.cc (ASTLowerTypePath::visit): Move implementation to | |
1381 | rust-ast-lower-type.cc. | |
1382 | (ASTLowerQualifiedPathInType::visit): Likewise. | |
1383 | (ASTLoweringType::visit): Likewise. | |
1384 | * hir/rust-ast-lower-type.h: Move implementations to source file. | |
1385 | * hir/tree/rust-hir-path.h: Likewise. | |
1386 | * hir/rust-ast-lower-type.cc: New file. | |
1387 | ||
1388 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1389 | ||
1390 | * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Add missing handling of | |
1391 | function case. | |
1392 | ||
1393 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1394 | ||
1395 | * backend/rust-compile-context.h: Add new functions: `insert_closure_decl` and | |
1396 | `lookup_closure_decl`. | |
1397 | * backend/rust-compile-expr.cc (CompileExpr::visit): Start compiling Closures properly. | |
1398 | (CompileExpr::generate_closure_function): New function. | |
1399 | (CompileExpr::generate_closure_fntype): Likewise. | |
1400 | * backend/rust-compile-expr.h: Declare `generate_closure_function` and | |
1401 | `generate_closure_fntype`. | |
1402 | * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Visit closure types properly. | |
1403 | * backend/rust-mangle.cc (legacy_mangle_name): Add support for closures. | |
1404 | * backend/rust-tree.h (RS_CLOSURE_FLAG): Add new tree macro. | |
1405 | (RS_CLOSURE_TYPE_P): And checking for it on tree nodes. | |
1406 | * typecheck/rust-tyty.cc (ClosureType::is_equal): Add implementation. | |
1407 | ||
1408 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1409 | ||
1410 | * hir/tree/rust-hir-expr.h: Add `get_params` method. | |
1411 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Typecheck closure nodes. | |
1412 | (TypeCheckExpr::resolve_fn_trait_call): New function. | |
1413 | * typecheck/rust-hir-type-check-expr.h: Declare `resolve_fn_trait_call` and | |
1414 | `resolve_possible_fn_trait_call_method_name`. | |
1415 | * typecheck/rust-hir-type-check.h: Declare `get_context_type`. | |
1416 | * typecheck/rust-tyctx.cc (TypeCheckContextItem::get_context_type): New function. | |
1417 | * typecheck/rust-tyty-cmp.h: Visit closures properly. | |
1418 | * typecheck/rust-tyty-rules.h: Likewise. | |
1419 | * typecheck/rust-tyty.cc (BaseType::bounds_compatible): Add commented out assertin. | |
1420 | (ClosureType::as_string): Implement it. | |
1421 | (ClosureType::clone): Fix closure cloning. | |
1422 | (ClosureType::setup_fn_once_output): New function. | |
1423 | * typecheck/rust-tyty.h: Improve `ClosureType` class and declare `setup_fn_once_output`. | |
1424 | ||
1425 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1426 | ||
1427 | * checks/errors/rust-const-checker.cc (ConstChecker::visit): Visit closures properly. | |
1428 | * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise. | |
1429 | * checks/lints/rust-lint-marklive.h: Likewise. | |
1430 | ||
1431 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1432 | ||
1433 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Simplify method | |
1434 | call type checking by removing visitor and instead using one static cast. Use the | |
1435 | new interface. | |
1436 | * typecheck/rust-tyty-call.cc (TypeCheckMethodCallExpr::visit): Likewise. | |
1437 | (TypeCheckMethodCallExpr::go): Likewise. | |
1438 | (TypeCheckMethodCallExpr::check): Likewise. | |
1439 | * typecheck/rust-tyty-call.h (class TypeCheckMethodCallExpr): Likewise. | |
1440 | (class Argument): Likewise. | |
1441 | ||
1442 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1443 | ||
1444 | * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Visit closure properly when | |
1445 | name resolving. | |
1446 | (ResolveExpr::resolve_closure_param): Implement closure name resolving. | |
1447 | * resolve/rust-ast-resolve-expr.h: Declare visitors for closure types. | |
1448 | ||
1449 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1450 | ||
1451 | * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::ASTLoweringPattern): | |
1452 | Improve formatting. | |
1453 | (ASTLoweringPattern::translate): Likewise. | |
1454 | * hir/rust-ast-lower-pattern.h: Likewise. | |
1455 | * resolve/rust-ast-resolve-expr.h: Likewise. | |
1456 | ||
1457 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1458 | ||
1459 | * Make-lang.in: Add new object file for expression lowering. | |
1460 | * ast/rust-expr.h: Move implementation of expr lowering to source file. | |
1461 | * backend/rust-compile-block.h: Likewise. | |
1462 | * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise. | |
1463 | * backend/rust-compile-expr.h: Likewise. | |
1464 | * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise. | |
1465 | * checks/errors/privacy/rust-privacy-reporter.h: Likewise. | |
1466 | * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise. | |
1467 | * checks/errors/rust-const-checker.h: Likewise. | |
1468 | * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise. | |
1469 | * checks/errors/rust-unsafe-checker.h: Likewise. | |
1470 | * hir/rust-ast-lower-base.h: Likewise. | |
1471 | * hir/rust-ast-lower-expr.h (RUST_AST_LOWER_EXPR): Likewise. | |
1472 | * hir/rust-ast-lower.cc (ASTLoweringBase::lower_closure_param): Likewise. | |
1473 | * hir/rust-hir-dump.cc (Dump::visit): Likewise. | |
1474 | * hir/rust-hir-dump.h: Likewise. | |
1475 | * hir/tree/rust-hir-expr.h (class ClosureExpr): Likewise. | |
1476 | (class ClosureExprInner): Likewise. | |
1477 | (class ClosureExprInnerTyped): Likewise. | |
1478 | * hir/tree/rust-hir-full-decls.h (class ClosureExprInner): Likewise. | |
1479 | (class ClosureExprInnerTyped): Likewise. | |
1480 | * hir/tree/rust-hir-full-test.cc (ClosureExprInnerTyped::as_string): Likewise. | |
1481 | (ClosureExprInner::as_string): Likewise. | |
1482 | (ClosureExprInner::accept_vis): Likewise. | |
1483 | (ClosureExpr::accept_vis): Likewise. | |
1484 | (ClosureExprInnerTyped::accept_vis): Likewise. | |
1485 | * hir/tree/rust-hir-visitor.h: Likewise. | |
1486 | * hir/tree/rust-hir.h (class Expr): Likewise. | |
1487 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise. | |
1488 | * typecheck/rust-hir-type-check-expr.h: Likewise. | |
1489 | * hir/rust-ast-lower-expr.cc: New file. | |
1490 | ||
1491 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1492 | ||
1493 | * util/rust-lang-item.h: Add handling for `fn_once_output`. | |
1494 | ||
1495 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1496 | ||
1497 | * ast/rust-ast-fragment.cc (Fragment::Fragment): Add better APIs. | |
1498 | (Fragment::complete): New function. | |
1499 | (Fragment::unexpanded): New function. | |
1500 | * ast/rust-ast-fragment.h: Declare new APIs and add documentation. | |
1501 | * expand/rust-attribute-visitor.h: Use new Fragment API. | |
1502 | * expand/rust-macro-builtins.cc (MacroBuiltin::file): Likewise. | |
1503 | (MacroBuiltin::column): Likewise. | |
1504 | (MacroBuiltin::include_bytes): Likewise. | |
1505 | (MacroBuiltin::include_str): Likewise. | |
1506 | (MacroBuiltin::concat): Likewise. | |
1507 | (MacroBuiltin::env): Likewise. | |
1508 | (MacroBuiltin::cfg): Likewise. | |
1509 | (MacroBuiltin::include): Likewise. | |
1510 | (MacroBuiltin::line): Likewise. | |
1511 | * expand/rust-macro-expand.cc (parse_many): Likewise. | |
1512 | (transcribe_expression): Likewise. | |
1513 | (transcribe_type): Likewise. | |
1514 | * expand/rust-macro-expand.h (struct MacroExpander): Likewise. | |
1515 | ||
1516 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1517 | ||
1518 | * ast/rust-ast.h (class ASTFragment): Remove old ASTFragment class. | |
1519 | * ast/rust-macro.h (class MacroRulesDefinition): Use new Fragment API. | |
1520 | * expand/rust-attribute-visitor.h: Likewise. | |
1521 | * expand/rust-macro-builtins.cc (macro_end_token): Likewise. | |
1522 | (MacroBuiltin::assert): Likewise. | |
1523 | (MacroBuiltin::file): Likewise. | |
1524 | (MacroBuiltin::column): Likewise. | |
1525 | (MacroBuiltin::include_bytes): Likewise. | |
1526 | (MacroBuiltin::include_str): Likewise. | |
1527 | (MacroBuiltin::compile_error): Likewise. | |
1528 | (MacroBuiltin::concat): Likewise. | |
1529 | (MacroBuiltin::env): Likewise. | |
1530 | (MacroBuiltin::cfg): Likewise. | |
1531 | (MacroBuiltin::include): Likewise. | |
1532 | (MacroBuiltin::line): Likewise. | |
1533 | * expand/rust-macro-builtins.h: Likewise. | |
1534 | * expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Likewise. | |
1535 | (MacroExpander::expand_invoc): Likewise. | |
1536 | (MacroExpander::match_repetition): Likewise. | |
1537 | (parse_many): Likewise. | |
1538 | (transcribe_many_items): Likewise. | |
1539 | (transcribe_many_ext): Likewise. | |
1540 | (transcribe_many_trait_items): Likewise. | |
1541 | (transcribe_many_impl_items): Likewise. | |
1542 | (transcribe_many_trait_impl_items): Likewise. | |
1543 | (transcribe_expression): Likewise. | |
1544 | (transcribe_type): Likewise. | |
1545 | (transcribe_on_delimiter): Likewise. | |
1546 | (tokens_to_str): Likewise. | |
1547 | * expand/rust-macro-expand.h (struct MacroExpander): Likewise. | |
1548 | * util/rust-hir-map.cc (Mappings::insert_macro_def): Likewise. | |
1549 | ||
1550 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1551 | ||
1552 | * Make-lang.in: Add `rust-ast-fragment.o` object file. | |
1553 | * ast/rust-ast-fragment.cc: New file. | |
1554 | * ast/rust-ast-fragment.h: New file. | |
1555 | ||
1556 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1557 | ||
1558 | * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): Check if a | |
1559 | trait query is currently in progress. | |
1560 | * typecheck/rust-hir-type-check.h (class TraitQueryGuard): Add helpers around | |
1561 | checking for trait queries and inserting them. | |
1562 | ||
1563 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1564 | ||
1565 | * ast/rust-ast-dump.cc (Dump::visit): Add missing visitors for macro definition dumping. | |
1566 | (get_delimiters): New function. | |
1567 | * ast/rust-ast-dump.h: Declare `get_delimiters` and add documentation. | |
1568 | * ast/rust-macro.h: Add `get_token_tree` method. | |
1569 | ||
1570 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1571 | ||
1572 | * ast/rust-ast-dump.cc (Dump::visit): Properly handle unloaded modules. | |
1573 | ||
1574 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1575 | ||
1576 | * ast/rust-ast-dump.cc (Dump::visit): Fix formatting when dumping modules. | |
1577 | ||
1578 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1579 | ||
1580 | * ast/rust-ast-dump.cc (Dump::visit): Dump items in modules properly. | |
1581 | ||
1582 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1583 | ||
1584 | * ast/rust-ast-dump.cc: Emit visibility when dumping items. | |
1585 | ||
1586 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1587 | ||
1588 | * hir/rust-ast-lower-base.h (class ItemWrapper): New class. | |
1589 | * hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_outer_attributes): Use | |
1590 | `ItemWrapper` class. | |
1591 | (ASTLoweringBase::handle_doc_item_attribute): Likewise. | |
1592 | (ASTLoweringBase::handle_lang_item_attribute): Likewise. | |
1593 | * hir/rust-ast-lower-implitem.h: Check outer attributes on items. | |
1594 | * hir/tree/rust-hir-item.h: Add `get_trait_locus` methods. | |
1595 | * hir/tree/rust-hir.h: Likewise. | |
1596 | * util/rust-hir-map.h: Add defId mappings and associated functions. | |
1597 | * util/rust-hir-map.cc (Mappings::insert_defid_mapping): Implement insertion to said | |
1598 | mappings. | |
1599 | (Mappings::lookup_trait_item_defid): And looking up said mappings. | |
1600 | ||
1601 | 2023-02-21 Jakub Dupak <dev@jakubdupak.com> | |
1602 | ||
1603 | * ast/rust-ast-dump.cc (Dump::visit): Add code for dumping type aliases. | |
1604 | ||
1605 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1606 | ||
1607 | * typecheck/rust-hir-trait-resolve.cc (TraitResolver::TraitResolver): Do not nullptr init | |
1608 | `resolved_trait_reference` anymore. | |
1609 | (TraitResolver::resolve_path): Simplify function and rename to... | |
1610 | (TraitResolver::resolve_path_to_trait): ...this. | |
1611 | (TraitResolver::lookup_path): Use new interface. | |
1612 | * typecheck/rust-hir-trait-resolve.h (class TraitResolver): Do not inherit `HIRFullVisitor` | |
1613 | class anymore. | |
1614 | ||
1615 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1616 | ||
1617 | * ast/rust-ast-dump.cc (Dump::visit): Add dump for RangeExprs. | |
1618 | ||
1619 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1620 | ||
1621 | * ast/rust-ast-dump.cc (Dump::visit): Add dump for, BorrowExpr, DereferenceExpr, | |
1622 | ErrorPropagationExpr, NegationExpr, TypeCastExpr and GroupedExpr. | |
1623 | ||
1624 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1625 | ||
1626 | * ast/rust-ast-dump.cc (Dump::visit): Add dump code for ArrayExpr. | |
1627 | ||
1628 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1629 | ||
1630 | * ast/rust-ast-dump.cc (Dump::visit): Add dumps for ComparisonExpr and | |
1631 | LazyBooleanExpr. | |
1632 | ||
1633 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1634 | ||
1635 | * ast/rust-ast-dump.cc (Dump::visit): Fix IfExpr formatting. | |
1636 | ||
1637 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1638 | ||
1639 | * ast/rust-ast-dump.cc (Dump::visit): Fix block formatting. | |
1640 | ||
1641 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1642 | ||
1643 | * typecheck/rust-autoderef.cc: Add support for multiple resolution candidates. | |
1644 | * typecheck/rust-hir-dot-operator.cc (MethodResolver::MethodResolver): Edit | |
1645 | `try_result` field and change constructor. | |
1646 | (MethodResolver::Probe): Return set of candidates instead of singular candidate. | |
1647 | (MethodResolver::select): Add better implementation to account for multiple | |
1648 | candidates. | |
1649 | * typecheck/rust-hir-dot-operator.h (struct MethodCandidate): Overload comparison | |
1650 | operator in order to store them in `std::set`. | |
1651 | * typecheck/rust-hir-inherent-impl-overlap.h: Do not fail assertion on missing type. | |
1652 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Adapt code to use | |
1653 | multiple candidates. | |
1654 | * typecheck/rust-tyty.cc (set_cmp_autoderef_mode): Add code to handle automatic | |
1655 | derefs properly. | |
1656 | (reset_cmp_autoderef_mode): Add helper function to reset said mode. | |
1657 | * typecheck/rust-tyty.h (set_cmp_autoderef_mode): Declare function. | |
1658 | (reset_cmp_autoderef_mode): Likewise. | |
1659 | * typecheck/rust-tyty-cmp.h: Add handling of `autoderef_cmp_flag` | |
1660 | ||
1661 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1662 | ||
1663 | * util/rust-abi.cc (get_abi_from_string): Add missing "rust-call" | |
1664 | possibility for ABI variant. | |
1665 | ||
1666 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1667 | ||
1668 | * util/rust-lang-item.h: Add `fn_once` lang item. | |
1669 | ||
1670 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1671 | ||
1672 | * backend/rust-compile.cc: Add note about missing support for super | |
1673 | traits. | |
1674 | * typecheck/rust-tyty.cc (BaseType::satisfies_bound): New function. | |
1675 | (BaseType::bounds_compatible): New function. | |
1676 | (DynamicObjectType::get_object_items): New function. | |
1677 | * typecheck/rust-hir-trait-ref.h: Use new API to perform type resolution | |
1678 | on dyn objects. | |
1679 | ||
1680 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1681 | ||
1682 | * Make-lang.in: Compile early name resolver. | |
1683 | * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Move macro | |
1684 | name resolution. | |
1685 | * expand/rust-macro-builtins.cc (try_expand_macro_expression): Run ENR | |
1686 | when recursively expanding macros. | |
1687 | * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): No longer | |
1688 | perform name resolution in `expand_invoc`. | |
1689 | * expand/rust-macro-expand.h (struct MacroExpander): Keep ENR within | |
1690 | MacroExpander. | |
1691 | * rust-session-manager.cc (Session::expansion): Run ENR. | |
1692 | * resolve/rust-early-name-resolver.cc: New file. | |
1693 | * resolve/rust-early-name-resolver.h: New file. | |
1694 | ||
1695 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1696 | ||
1697 | * ast/rust-path.h: Add `accept_vis` method to `GenericArg` class. | |
1698 | ||
1699 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1700 | ||
1701 | * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Add note for | |
1702 | glob import resolving. | |
1703 | ||
1704 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1705 | ||
1706 | * util/rust-hir-map.h: Add new mappings. | |
1707 | * util/rust-hir-map.cc (Mappings::insert_macro_invocation): Add insertion | |
1708 | function into mappings. | |
1709 | (Mappings::lookup_macro_invocation): Add lookup function for mappings. | |
1710 | ||
1711 | 2023-02-21 Marc Poulhiès <dkm@kataplop.net> | |
1712 | ||
1713 | * parse/rust-parse-impl.h (Parser::parse_stmt_or_expr_without_block): | |
1714 | Check if `expr` is valid after parsing it. | |
1715 | ||
1716 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1717 | ||
1718 | * backend/rust-builtins.cc (BuiltinsContext::setup): Declare prefetch | |
1719 | intrinsics. | |
1720 | * backend/rust-compile-intrinsic.cc (enum class Prefetch): Add kinds of | |
1721 | prefetch intrinsics. | |
1722 | (prefetch_data_handler): New function. | |
1723 | (prefetch_read_data): Likewise. | |
1724 | (prefetch_write_data): Likewise. | |
1725 | ||
1726 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1727 | ||
1728 | * ast/rust-ast-dump.cc (Dump::visit): Fill empty functions for | |
1729 | structs, enums and unions. | |
1730 | ||
1731 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1732 | ||
1733 | * ast/rust-ast-dump.cc (Dump::format_tuple_field): New. | |
1734 | (Dump::format_struct_field): New. | |
1735 | * ast/rust-ast-dump.h (format_tuple_field): New. | |
1736 | (format_struct_field): New. | |
1737 | ||
1738 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1739 | ||
1740 | * ast/rust-ast-dump.cc (Dump::visit): move generic params dump ... | |
1741 | (Dump::emit_generic_params): ... here. | |
1742 | * ast/rust-ast-dump.h (emit_generic_params): New. | |
1743 | ||
1744 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1745 | ||
1746 | * typecheck/rust-hir-trait-ref.h (lookup_trait_item): Add lookup | |
1747 | in super_trait. | |
1748 | ||
1749 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1750 | ||
1751 | * backend/rust-compile-expr.cc | |
1752 | (CompileExpr::resolve_method_address): Use auto and minor change | |
1753 | in candidate init. | |
1754 | * typecheck/rust-hir-type-check-path.cc | |
1755 | (TypeCheckExpr::resolve_segments): Likewise. | |
1756 | * typecheck/rust-hir-type-check-type.cc: Likewise. | |
1757 | * backend/rust-compile-resolve-path.cc | |
1758 | (HIRCompileBase::query_compile): Likewise. Removecall to | |
1759 | set_ty_ref. | |
1760 | * typecheck/rust-hir-path-probe.h (struct PathProbeCandidate): Add | |
1761 | locus initializer in ctor, implement get_defid. | |
1762 | (class PathProbeType::Probe): return a set instead of vector. | |
1763 | Adjust class impl. | |
1764 | (class ReportMultipleCandidateError): Do not inherit from | |
1765 | HIRImplVisitor anymore and remove corresponding impl. Adjust for | |
1766 | change in Probe. Simplify Report handling. | |
1767 | (class PathProbeImplTrait::Probe): Adjust return type. | |
1768 | ||
1769 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1770 | ||
1771 | * typecheck/rust-hir-type-check-enumitem.cc | |
1772 | (TypeCheckEnumItem::visit): Adjust VariantDef ctor calls with | |
1773 | DefID. | |
1774 | * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): | |
1775 | Likewise. | |
1776 | * typecheck/rust-tyty.h (VariantDef): Add defid parameter to ctor. | |
1777 | ||
1778 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1779 | ||
1780 | * Make-lang.in: Add `rust-builtins.o` as target | |
1781 | * backend/rust-builtins.h: Refactor to new file. | |
1782 | * backend/rust-builtins.cc: New file. | |
1783 | ||
1784 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1785 | ||
1786 | * ast/rust-ast-dump.cc (Dump::visit): Implement visitor for If | |
1787 | expressions. | |
1788 | ||
1789 | 2023-02-21 David Faust <david.faust@oracle.com> | |
1790 | ||
1791 | * ast/rust-ast-dump.cc (Dump::visit): Dump assignment and compound | |
1792 | assignment expressions. | |
1793 | ||
1794 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1795 | ||
1796 | * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type): | |
1797 | Check for recursive queries. | |
1798 | * typecheck/rust-hir-type-check.h: New functions: `query_completed`, | |
1799 | `query_in_progress`, `insert_query`. | |
1800 | * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Use `query_type` API. | |
1801 | ||
1802 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1803 | ||
1804 | * ast/rust-ast-dump.cc (Dump::emit_visibility): New function. | |
1805 | (Dump::visit): Call into `emit_visibility`. | |
1806 | (Dump::format_function_common): Likewise. | |
1807 | * ast/rust-ast-dump.h: Declare `emit_visibility`. | |
1808 | ||
1809 | 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com> | |
1810 | ||
1811 | * ast/rust-item.h: Rename get_public_vis_type. | |
1812 | * hir/rust-ast-lower.cc (translate_visibility): Use new name. | |
1813 | ||
1814 | 2023-02-21 Philip Herron <philip.herron@embecosm.com> | |
1815 | ||
1816 | * resolve/rust-name-resolver.h: Add miscellenaous item mappings. | |
1817 | * resolve/rust-name-resolver.cc (Resolver::insert_resolved_misc): Use | |
1818 | new mappings. | |
1819 | (Resolver::lookup_resolved_misc): Likewise. | |
1820 | * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): | |
1821 | Adapt function to insert into miscelleanous mappings. | |
1822 | * checks/lints/rust-lint-marklive.cc (MarkLive::find_ref_node_id): | |
1823 | Allow lookup in miscelleanous mappings in mark-live phase. | |
1824 | ||
65c64105 GA |
1825 | 2023-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
1826 | ||
1827 | * backend/rust-tree.cc: Include memmodel.h. | |
1828 | ||
7814ce44 GA |
1829 | 2023-02-17 Thomas Schwinge <thomas@codesourcery.com> |
1830 | ||
1831 | * backend/rust-tree.cc: '#include "tm_p.h"'. | |
1832 | ||
317525b0 GA |
1833 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> |
1834 | ||
1835 | * Make-lang.in: Remove `rust-hir-typecheck-toplevel` object and add | |
1836 | `rust-hir-path-probe` one. | |
1837 | * typecheck/rust-hir-dot-operator.cc (MethodResolver::MethodResolver): | |
1838 | Remove no longer used `context` and `mapping` fields, and use new | |
1839 | `query_type` API. | |
1840 | (MethodResolver::MethodResolver): Likewise. | |
1841 | (MethodResolver::select): Use new `query_type` API. | |
1842 | * typecheck/rust-hir-path-probe.h: New header. | |
1843 | * typecheck/rust-hir-path-probe.cc: New file. | |
1844 | * typecheck/rust-hir-dot-operator.h (class MethodResolver): Remove no | |
1845 | longer used `context` and `mapping` fields, and use new `query_type` API. | |
1846 | * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type): New function. | |
1847 | * typecheck/rust-hir-type-check-base.h: Declare `query_type` function. | |
1848 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Add debug print. | |
1849 | * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::Resolve): | |
1850 | Refactor and make use of new query system. | |
1851 | (TypeCheckTopLevelExternItem::Resolve): Likewise. | |
1852 | (TypeCheckTopLevelExternItem::visit): Likewise. | |
1853 | (TypeCheckTopLevelImplItem::visit): Likewise. | |
1854 | (TypeCheckImplItem::visit): Likewise. | |
1855 | (TypeCheckImplItem::TypeCheckImplItem): Likewise. | |
1856 | (TypeCheckImplItem::Resolve): Likewise. | |
1857 | (TypeCheckImplItemWithTrait::visit): Likewise. | |
1858 | * typecheck/rust-hir-type-check-implitem.h (class TypeCheckTopLevelImplItem): Likewise. | |
1859 | (class TypeCheckImplItemWithTrait): Likewise. | |
1860 | * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::TypeCheckItem): Likewise. | |
1861 | (TypeCheckItem::Resolve): Likewise. | |
1862 | (TypeCheckItem::ResolveImplItem): Likewise. | |
1863 | (TypeCheckItem::ResolveImplBlockSelf): Likewise. | |
1864 | (TypeCheckItem::visit): Likewise. | |
1865 | (TypeCheckItem::resolve_impl_item): Likewise. | |
1866 | (TypeCheckItem::resolve_impl_block_substitutions): Likewise. | |
1867 | (TypeCheckItem::resolve_impl_block_self): Likewise. | |
1868 | * typecheck/rust-hir-type-check-item.h: Likewise. | |
1869 | * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): Likewise. | |
1870 | (TypeCheckExpr::resolve_segments): Likewise. | |
1871 | * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise. | |
1872 | * typecheck/rust-hir-type-check-stmt.h: Likewise. | |
1873 | * typecheck/rust-hir-type-check-type.cc (TypeCheckType::Resolve): Likewise. | |
1874 | (TypeCheckType::visit): Likewise. | |
1875 | (TypeCheckType::resolve_root_path): Likewise. | |
1876 | * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise. | |
1877 | * typecheck/rust-hir-type-check.h: Likewise. | |
1878 | * typecheck/rust-substitution-mapper.h: Likewise. | |
1879 | * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Likewise. | |
1880 | (TypeCheckBase::get_predicate_from_bound): Likewise. | |
1881 | (TypeBoundsMappings::add_bound): Likewise. | |
1882 | * typecheck/rust-tyty-cmp.h: Likewise. | |
1883 | * typecheck/rust-tyty.h: Likewise. | |
1884 | * typecheck/rust-tyty.cc (SubstitutionRef::infer_substitions): Likewise. | |
1885 | (ParamType::resolve): Do not infinite loop anymore. | |
1886 | * util/rust-hir-map.h: Add new `hirImplBlockTypeMappings` and | |
1887 | declare `lookup_impl_block_type`. | |
1888 | * util/rust-hir-map.cc (Mappings::insert_hir_impl_block): Use new | |
1889 | `hirImplBlockTypeMappings` | |
1890 | (Mappings::lookup_impl_block_type): New function. | |
1891 | ||
1892 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1893 | ||
1894 | * backend/rust-compile-context.h: Add new optional `asm_name` string | |
1895 | argument to `lookup_function_decl`. | |
1896 | * backend/rust-compile-item.cc (CompileItem::visit): Compute assembly | |
1897 | name and pass it to `lookup_function_decl` when calling it. | |
1898 | ||
1899 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1900 | ||
1901 | * backend/rust-constexpr.cc (eval_store_expression): Remove invalid | |
1902 | assertion on constexpr constructors. | |
1903 | ||
1904 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1905 | ||
1906 | * backend/rust-compile-expr.h: Formatting. | |
1907 | ||
1908 | 2023-01-31 liushuyu <liushuyu011@gmail.com> | |
1909 | ||
1910 | * ast/rust-ast.h (class MacroInvocData): Store expander as | |
1911 | member of the class. | |
1912 | (class Expr): Add `is_literal` virtual method | |
1913 | * ast/rust-expr.h: Override `is_literal` for `LiteralExpr`s. | |
1914 | * expand/rust-macro-builtins.cc (try_expand_macro_expression): New function. | |
1915 | (try_extract_string_literal_from_fragment): Likewise. | |
1916 | (try_expand_single_string_literal): Likewise. | |
1917 | (try_expand_many_expr): Likewise. | |
1918 | (parse_single_string_literal): Add macro expander as argument. | |
1919 | (MacroBuiltin::include_bytes): Pass expander as argument to | |
1920 | `parse_single_string_literal`. | |
1921 | (MacroBuiltin::include_str): Likewise. | |
1922 | (MacroBuiltin::compile_error): Likewise. | |
1923 | (MacroBuiltin::include): Likewise. | |
1924 | (MacroBuiltin::concat): Likewise and add better error handling. | |
1925 | (MacroBuiltin::env): Likewise. | |
1926 | * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Expand | |
1927 | invocations recursively. | |
1928 | ||
1929 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
1930 | ||
1931 | * lang.opt: Add new ``-frust-compile-until` option. | |
1932 | * rust-session-manager.cc (Session::compile_crate): Add stops around | |
1933 | various compilation steps in the pipeline. | |
1934 | * rust-session-manager.h (struct CompileOptions): Add `CompileStep` enum | |
1935 | and field. | |
1936 | ||
1937 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1938 | ||
1939 | * backend/rust-tree.cc (rs_type_quals): Comment out bad assertion | |
1940 | ||
1941 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1942 | ||
1943 | * typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit): | |
1944 | Make static items behave more similarly to const items. | |
1945 | ||
1946 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1947 | ||
1948 | * backend/rust-compile-item.cc (CompileItem::visit): Const evaluate | |
1949 | static item expressions. | |
1950 | ||
1951 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
1952 | ||
1953 | * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Do not lower | |
1954 | null items within modules. | |
1955 | ||
1956 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
1957 | ||
1958 | * util/rust-attributes.cc: Add `macro_use` to list of builtin | |
1959 | attributes. | |
1960 | ||
1961 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
1962 | ||
1963 | * checks/errors/rust-const-checker.cc (ConstChecker::ctx_to_str): Allow | |
1964 | getting an error string from a specific constant context. | |
1965 | (ConstChecker::ctx_allows_default): New function, check if a context | |
1966 | allows default values for Const generics. | |
1967 | (ConstChecker::visit): Call into `ctx_allows_default`. | |
1968 | * checks/errors/rust-const-checker.h: Declare `ctx_allows_default`. | |
1969 | ||
1970 | 2023-01-31 liushuyu <liushuyu011@gmail.com> | |
1971 | ||
1972 | * backend/rust-compile-expr.cc (CompileExpr::visit): Properly formulate | |
1973 | exit condition when compiling while loops. | |
1974 | ||
1975 | 2023-01-31 Faisal Abbas <90.abbasfaisal@gmail.com> | |
1976 | ||
1977 | * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Turn | |
1978 | constant item typechecking into a coercion site instead of a unify | |
1979 | site. | |
1980 | ||
1981 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1982 | ||
1983 | * typecheck/rust-tyty.h: Fix `is_concrete` for unit types with | |
1984 | substitutions. | |
1985 | ||
1986 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1987 | ||
1988 | * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::contains_associated_types): | |
1989 | Check if a type bound predicate contains assocated types. | |
1990 | * typecheck/rust-tyty.h: Declare the above mentioned function. | |
1991 | * typecheck/rust-hir-trait-resolve.cc: Use `contains_associated_types` | |
1992 | function. | |
1993 | ||
1994 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
1995 | ||
1996 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Add | |
1997 | more calls to `rust_debug` for development. | |
1998 | ||
1999 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
2000 | ||
2001 | * backend/rust-compile-base.cc: Improve compilation pipeline and simplify | |
2002 | function. | |
2003 | ||
2004 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
2005 | ||
2006 | * backend/rust-tree.cc (comptypes): Remove some C++ specific checks in | |
2007 | Rust const folder for now. | |
2008 | ||
2009 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
2010 | ||
2011 | * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site): Add | |
2012 | better unification function with debug calls. | |
2013 | * typecheck/rust-autoderef.cc (AutoderefCycle::cycle): Add more debug | |
2014 | calls and use new unify API. | |
2015 | * typecheck/rust-coercion.cc (TypeCoercionRules::do_coercion): Likewise. | |
2016 | (TypeCoercionRules::coerce_borrowed_pointer): Likewise. | |
2017 | (TypeCoercionRules::select): Likewise. | |
2018 | * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): Likewise. | |
2019 | * typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item): Likewise. | |
2020 | (TypeCheckBase::coercion_site): Likewise. | |
2021 | (TypeCheckBase::cast_site): Likewise. | |
2022 | * typecheck/rust-hir-type-check-base.h: Likewise. | |
2023 | * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise. | |
2024 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise. | |
2025 | * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelImplItem::visit): Likewise. | |
2026 | (TypeCheckImplItem::visit): Likewise. | |
2027 | * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Likewise. | |
2028 | * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): Likewise. | |
2029 | * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise. | |
2030 | * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise. | |
2031 | * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve): Likewise. | |
2032 | * typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit): Likewise. | |
2033 | * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): Likewise. | |
2034 | * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise. | |
2035 | * typecheck/rust-tyctx.cc (TypeCheckContext::peek_return_type): Likewise. | |
2036 | * typecheck/rust-tyty-call.cc (TypeCheckMethodCallExpr::visit): Likewise. | |
2037 | * typecheck/rust-tyty-cmp.h: Likewise. | |
2038 | * typecheck/rust-tyty-rules.h: Likewise. | |
2039 | * typecheck/rust-tyty.cc (BaseType::mappings_str): Likewise. | |
2040 | (BaseType::debug): Print type name more clearly. | |
2041 | (BaseType::debug_str): Add new function to print type pointer and name. | |
2042 | (TupleType::get_name): Improve type name fetching function. | |
2043 | (ReferenceType::get_name): Likewise. | |
2044 | (PointerType::get_name): Likewise. | |
2045 | * typecheck/rust-tyty.h: Refactor definitions outside of the header. | |
2046 | ||
2047 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
2048 | ||
2049 | * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::TypeCheckBase): | |
2050 | Remove constructor. | |
2051 | (TypeCheckBase::coercion_site): Add `Location` argument to function. | |
2052 | * typecheck/rust-hir-type-check-base.h: Use `TypeCheckBase::coercion_site` | |
2053 | function with location argument. | |
2054 | * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise. | |
2055 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise. | |
2056 | * typecheck/rust-hir-type-check-expr.h (class TypeCheckExpr): Likewise. | |
2057 | * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise. | |
2058 | * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::visit): Likewise. | |
2059 | * typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit): Likewise. | |
2060 | * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise. | |
2061 | (TypeCheckMethodCallExpr::visit): Likewise. | |
2062 | * typecheck/rust-tyty.h: Add missing locus field. | |
2063 | * typecheck/rust-tyty.cc (StructFieldType::clone): Use locus field. | |
2064 | (StructFieldType::monomorphized_clone): Likewise. | |
2065 | ||
2066 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
2067 | ||
2068 | * typecheck/rust-tyctx.cc (TypeCheckContext::pop_return_type): Add | |
2069 | guards around `std::vector<T>.pop_back()`. | |
2070 | (TypeCheckContext::peek_context): Likewise for `std::vector<T>.back()`. | |
2071 | ||
2072 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2073 | philberty <philip.herron@embecosm.com> | |
2074 | ||
2075 | * ast/rust-ast.h: Improve assertions within ASTFragment API. | |
2076 | ||
2077 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2078 | ||
2079 | * ast/rust-ast.h: Add assertions and accessors for fragment nodes. | |
2080 | * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Fix expansion | |
2081 | context typo when visiting `InherentImpl` items. | |
2082 | (AttrVisitor::maybe_expand_expr): Use new Fragment accessor to fetch | |
2083 | properly typed node. | |
2084 | (AttrVisitor::maybe_expand_type): Likewise. | |
2085 | * expand/rust-macro-expand.cc (transcribe_type): Emit parse errors | |
2086 | when trying to parse a type. | |
2087 | ||
2088 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2089 | ||
2090 | * ast/rust-ast-dump.h: Add shorthand `AST::Dump::debug` function to | |
2091 | dump an AST node on `stderr`. | |
2092 | ||
2093 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2094 | philberty <philip.herron@embecosm.com> | |
2095 | ||
2096 | * expand/rust-macro-expand.cc (parse_many): Return early from parsing | |
2097 | loop if we encounter an error, and emit that error in the meantime. | |
2098 | ||
2099 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2100 | ||
2101 | * expand/rust-macro-expand.cc (MacroExpander::match_matcher): Handle | |
2102 | fragments differently based on whether or not we are currently trying | |
2103 | to match a matcher in a repetition context. | |
2104 | (MacroExpander::match_n_matches): Use new `in_repetition` argument | |
2105 | properly when calling `match_matcher`. | |
2106 | * expand/rust-macro-expand.h (MacroExpander::match_matcher): Allow | |
2107 | passing extra `in_repetition` bool argument | |
2108 | ||
2109 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2110 | ||
2111 | * parse/rust-parse-impl.h: Allow parsing full range expressions without | |
2112 | erroring out. | |
2113 | ||
2114 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2115 | ||
2116 | * checks/lints/rust-lint-scan-deadcode.h: Do not report public items | |
2117 | as dead code. | |
2118 | ||
2119 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2120 | ||
2121 | * util/rust-attributes.cc: Add `rustc_inherit_overflow_checks` to list | |
2122 | of builtin attributes. | |
2123 | ||
2124 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2125 | ||
2126 | * backend/rust-compile-expr.cc (CompileExpr::visit): Insert overflow | |
2127 | checks logic. | |
2128 | (CompileExpr::array_copied_expr): Insert overflow checks logic. | |
2129 | * backend/rust-compile-item.cc (CompileItem::visit): Insert overflow | |
2130 | checks logic. | |
2131 | * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Insert | |
2132 | overflow checks logic. | |
2133 | * rust-gcc.cc (Gcc_backend::arithmetic_or_logical_expression): Differentiate | |
2134 | existing function from `arithmetic_or_logical_expression_checked`. | |
2135 | This function does insert perform overflow checks. | |
2136 | (Gcc_backend::arithmetic_or_logical_expression_checked): New | |
2137 | function. | |
2138 | (is_overflowing_expr): New function. Check if an expression is an | |
2139 | overflowing one (ADD, SUB, MUL). | |
2140 | (fetch_overflow_builtins): New function. | |
2141 | * rust-backend.h: Declare `arithmetic_or_logical_expression_checked` in | |
2142 | abstract `Backend` class. | |
2143 | ||
2144 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2145 | ||
2146 | * backend/rust-builtins.h: Refactor builtin context class and add | |
2147 | overflow builtins. | |
2148 | ||
2149 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2150 | ||
2151 | * rust-gcc.cc (class Bvariable): Move class to `rust-gcc.h` header. | |
2152 | * rust-gcc.h: New file. | |
2153 | ||
2154 | 2023-01-31 Philip Herron <philip.herron@embecosm.com> | |
2155 | ||
2156 | * hir/rust-ast-lower-expr.h: Lower double borrow expressions to two | |
2157 | `HIR::BorrowExpr`s. | |
2158 | * hir/tree/rust-hir-expr.h: Remove `is_double_borrow` field from | |
2159 | `HIR::BorrowExpr`. | |
2160 | * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Remove | |
2161 | call to `gcc_unreachable` on double borrow expressions. | |
2162 | ||
2163 | 2023-01-31 Faisal Abbas <90.abbasfaisal@gmail.com> | |
2164 | ||
2165 | * backend/rust-tree.cc : Add new includes. | |
2166 | (scope_chain): New. | |
2167 | (maybe_add_global): New. | |
2168 | (init_modules): New (copied from cp) | |
2169 | (var_in_constexpr_fn): Likewise. | |
2170 | (member_vec_linear_search): Likewise. | |
2171 | (member_vec_binary_search): Likewise. | |
2172 | (is_overloaded_fn): Likewise. | |
2173 | (ovl_make): Likewise. | |
2174 | (lookup_add): Likewise. | |
2175 | (type_memfn_quals): Likewise. | |
2176 | (struct find_parameter_pack_data): Likewise. | |
2177 | (struct conv_type_hasher): Likewise. | |
2178 | (make_conv_op_name): Likewise. | |
2179 | (builtin_pack_fn_p): Likewise. | |
2180 | (builtin_pack_call_p): Likewise. | |
2181 | (has_extra_args_mechanism_p): Likewise. | |
2182 | (find_parameter_packs_r): Likewise. | |
2183 | (WALK_SUBTREE): Likewise. | |
2184 | (type_memfn_rqual): Likewise. | |
2185 | (maybe_add_lang_type_raw): Likewise. | |
2186 | (struct c_fileinfo): Likewise. | |
2187 | (get_fileinfo): Likewise. | |
2188 | (cxx_make_type): Likewise. | |
2189 | (build_min_array_type): Likewise. | |
2190 | (fields_linear_search): Likewise. | |
2191 | (nothrow_spec_p): Likewise. | |
2192 | (maybe_get_fns): Likewise. | |
2193 | (get_fns): Likewise. | |
2194 | (get_first_fn): Likewise. | |
2195 | (dependent_name): Likewise. | |
2196 | (called_fns_equal): Likewise. | |
2197 | (canonical_eh_spec): Likewise. | |
2198 | (rs_tree_code_length): Likewise. | |
2199 | (rs_tree_operand_length): Likewise. | |
2200 | (rs_tree_equal): Likewise. | |
2201 | (publicly_uniquely_derived_p): Likewise. | |
2202 | (comp_except_types): Likewise. | |
2203 | (comp_except_specs): Likewise. | |
2204 | (compparms): Likewise. | |
2205 | (set_array_type_canon): Likewise. | |
2206 | (struct cplus_array_info): Likewise. | |
2207 | (struct cplus_array_hasher): Likewise. | |
2208 | (cplus_array_hasher::hash): Likewise. | |
2209 | (cplus_array_hasher::equal): Likewise. | |
2210 | (is_byte_access_type): Likewise. | |
2211 | (build_cplus_array_type): Likewise. | |
2212 | (rs_build_qualified_type_real): Likewise. | |
2213 | (vector_targets_convertible_p): Likewise. | |
2214 | (comp_array_types): Likewise. | |
2215 | (same_type_ignoring_top_level_qualifiers_p): Likewise. | |
2216 | (comp_ptr_ttypes_const): Likewise. | |
2217 | (similar_type_p): Likewise. | |
2218 | (structural_comptypes): Likewise. | |
2219 | (comptypes): Likewise. | |
2220 | (next_initializable_field): Likewise. | |
2221 | (sufficient_parms_p): Likewise. | |
2222 | (default_ctor_p): Likewise. | |
2223 | (user_provided_p): Likewise. | |
2224 | (type_has_non_user_provided_default_constructor): Likewise. | |
2225 | (default_init_uninitialized_part): Likewise. | |
2226 | (extract_conversion_operator): Likewise. | |
2227 | (get_class_binding_direct): Likewise. | |
2228 | (lang_check_failed): Likewise. | |
2229 | (skip_artificial_parms_for): Likewise. | |
2230 | (in_class_defaulted_default_constructor): Likewise. | |
2231 | (is_instantiation_of_constexpr): Likewise. | |
2232 | (check_for_uninitialized_const_var): Likewise. | |
2233 | (cv_unqualified): Likewise. | |
2234 | (make_tree_vector): Likewise. | |
2235 | (release_tree_vector): Likewise. | |
2236 | (instantiation_dependent_expression_p): Likewise. | |
2237 | (cp_get_callee): Likewise. | |
2238 | (build_nop): Likewise. | |
2239 | (scalarish_type_p): Likewise. | |
2240 | (type_has_nontrivial_copy_init): Likewise. | |
2241 | (build_local_temp): Likewise. | |
2242 | (is_normal_capture_proxy): Likewise. | |
2243 | (reject_gcc_builtin): Likewise. | |
2244 | (is_bitfield_expr_with_lowered_type): Likewise. | |
2245 | (maybe_undo_parenthesized_ref): Likewise. | |
2246 | (fold_offsetof): Likewise. | |
2247 | (char_type_p): Likewise. | |
2248 | (resolve_nondeduced_context): Likewise. | |
2249 | (instantiate_non_dependent_or_null): Likewise. | |
2250 | (resolve_nondeduced_context_or_error): Likewise. | |
2251 | (really_overloaded_fn): Likewise. | |
2252 | (invalid_nonstatic_memfn_p): Likewise. | |
2253 | (strip_top_quals): Likewise. | |
2254 | (cxx_incomplete_type_inform): Likewise. | |
2255 | (cxx_incomplete_type_diagnostic): Likewise. | |
2256 | (decl_constant_var_p): Likewise. | |
2257 | (undeduced_auto_decl): Likewise. | |
2258 | (require_deduced_type): Likewise. | |
2259 | * backend/rust-tree.h (enum c_tree_index): Likewise. | |
2260 | (GTY): Likewise. | |
2261 | (enum cp_tree_index): Likewise. | |
2262 | (wchar_decl_node): Likewise. | |
2263 | (vtable_entry_type): Likewise. | |
2264 | (delta_type_node): Likewise. | |
2265 | (vtable_index_type): Likewise. | |
2266 | (class_type_node): Likewise. | |
2267 | (unknown_type_node): Likewise. | |
2268 | (init_list_type_node): Likewise. | |
2269 | (explicit_void_list_node): Likewise. | |
2270 | (vtbl_type_node): Likewise. | |
2271 | (vtbl_ptr_type_node): Likewise. | |
2272 | (std_node): Likewise. | |
2273 | (abi_node): Likewise. | |
2274 | (global_namespace): Likewise. | |
2275 | (const_type_info_type_node): Likewise. | |
2276 | (conv_op_marker): Likewise. | |
2277 | (abort_fndecl): Likewise. | |
2278 | (current_aggr): Likewise. | |
2279 | (nullptr_node): Likewise. | |
2280 | (nullptr_type_node): Likewise. | |
2281 | (align_type_node): Likewise. | |
2282 | (char8_type_node): Likewise. | |
2283 | (char16_type_node): Likewise. | |
2284 | (char32_type_node): Likewise. | |
2285 | (wchar_type_node): Likewise. | |
2286 | (underlying_wchar_type_node): Likewise. | |
2287 | (wint_type_node): Likewise. | |
2288 | (signed_size_type_node): Likewise. | |
2289 | (unsigned_ptrdiff_type_node): Likewise. | |
2290 | (intmax_type_node): Likewise. | |
2291 | (uintmax_type_node): Likewise. | |
2292 | (widest_integer_literal_type_node): Likewise. | |
2293 | (widest_unsigned_literal_type_node): Likewise. | |
2294 | (sig_atomic_type_node): Likewise. | |
2295 | (int8_type_node): Likewise. | |
2296 | (int16_type_node): Likewise. | |
2297 | (int32_type_node): Likewise. | |
2298 | (int64_type_node): Likewise. | |
2299 | (uint8_type_node): Likewise. | |
2300 | (c_uint16_type_node): Likewise. | |
2301 | (c_uint32_type_node): Likewise. | |
2302 | (c_uint64_type_node): Likewise. | |
2303 | (int_least8_type_node): Likewise. | |
2304 | (int_least16_type_node): Likewise. | |
2305 | (int_least32_type_node): Likewise. | |
2306 | (int_least64_type_node): Likewise. | |
2307 | (uint_least8_type_node): Likewise. | |
2308 | (uint_least16_type_node): Likewise. | |
2309 | (uint_least32_type_node): Likewise. | |
2310 | (uint_least64_type_node): Likewise. | |
2311 | (int_fast8_type_node): Likewise. | |
2312 | (int_fast16_type_node): Likewise. | |
2313 | (int_fast32_type_node): Likewise. | |
2314 | (int_fast64_type_node): Likewise. | |
2315 | (uint_fast8_type_node): Likewise. | |
2316 | (uint_fast16_type_node): Likewise. | |
2317 | (uint_fast32_type_node): Likewise. | |
2318 | (uint_fast64_type_node): Likewise. | |
2319 | (intptr_type_node): Likewise. | |
2320 | (uintptr_type_node): Likewise. | |
2321 | (truthvalue_type_node): Likewise. | |
2322 | (truthvalue_true_node): Likewise. | |
2323 | (truthvalue_false_node): Likewise. | |
2324 | (char_array_type_node): Likewise. | |
2325 | (char8_array_type_node): Likewise. | |
2326 | (char16_array_type_node): Likewise. | |
2327 | (char32_array_type_node): Likewise. | |
2328 | (wchar_array_type_node): Likewise. | |
2329 | (string_type_node): Likewise. | |
2330 | (const_string_type_node): Likewise. | |
2331 | (default_function_type): Likewise. | |
2332 | (function_name_decl_node): Likewise. | |
2333 | (pretty_function_name_decl_node): Likewise. | |
2334 | (c99_function_name_decl_node): Likewise. | |
2335 | (saved_function_name_decls): Likewise. | |
2336 | (null_node): Likewise. | |
2337 | (ctor_identifier): Likewise. | |
2338 | (complete_ctor_identifier): Likewise. | |
2339 | (base_ctor_identifier): Likewise. | |
2340 | (dtor_identifier): Likewise. | |
2341 | (complete_dtor_identifier): Likewise. | |
2342 | (base_dtor_identifier): Likewise. | |
2343 | (deleting_dtor_identifier): Likewise. | |
2344 | (conv_op_identifier): Likewise. | |
2345 | (delta_identifier): Likewise. | |
2346 | (in_charge_identifier): Likewise. | |
2347 | (vtt_parm_identifier): Likewise. | |
2348 | (as_base_identifier): Likewise. | |
2349 | (this_identifier): Likewise. | |
2350 | (pfn_identifier): Likewise. | |
2351 | (vptr_identifier): Likewise. | |
2352 | (global_identifier): Likewise. | |
2353 | (anon_identifier): Likewise. | |
2354 | (auto_identifier): Likewise. | |
2355 | (decltype_auto_identifier): Likewise. | |
2356 | (init_list_identifier): Likewise. | |
2357 | (for_range__identifier): Likewise. | |
2358 | (for_begin__identifier): Likewise. | |
2359 | (for_end__identifier): Likewise. | |
2360 | (for_range_identifier): Likewise. | |
2361 | (for_begin_identifier): Likewise. | |
2362 | (for_end_identifier): Likewise. | |
2363 | (abi_tag_identifier): Likewise. | |
2364 | (aligned_identifier): Likewise. | |
2365 | (begin_identifier): Likewise. | |
2366 | (end_identifier): Likewise. | |
2367 | (get__identifier): Likewise. | |
2368 | (gnu_identifier): Likewise. | |
2369 | (tuple_element_identifier): Likewise. | |
2370 | (tuple_size_identifier): Likewise. | |
2371 | (type_identifier): Likewise. | |
2372 | (value_identifier): Likewise. | |
2373 | (fun_identifier): Likewise. | |
2374 | (closure_identifier): Likewise. | |
2375 | (heap_uninit_identifier): Likewise. | |
2376 | (heap_identifier): Likewise. | |
2377 | (heap_deleted_identifier): Likewise. | |
2378 | (heap_vec_uninit_identifier): Likewise. | |
2379 | (heap_vec_identifier): Likewise. | |
2380 | (omp_identifier): Likewise. | |
2381 | (lang_name_c): Likewise. | |
2382 | (lang_name_cplusplus): Likewise. | |
2383 | (empty_except_spec): Likewise. | |
2384 | (noexcept_true_spec): Likewise. | |
2385 | (noexcept_false_spec): Likewise. | |
2386 | (noexcept_deferred_spec): Likewise. | |
2387 | (terminate_fn): Likewise. | |
2388 | (call_unexpected_fn): Likewise. | |
2389 | (get_exception_ptr_fn): Likewise. | |
2390 | (begin_catch_fn): Likewise. | |
2391 | (end_catch_fn): Likewise. | |
2392 | (allocate_exception_fn): Likewise. | |
2393 | (free_exception_fn): Likewise. | |
2394 | (throw_fn): Likewise. | |
2395 | (rethrow_fn): Likewise. | |
2396 | (atexit_fn_ptr_type_node): Likewise. | |
2397 | (atexit_node): Likewise. | |
2398 | (dso_handle_node): Likewise. | |
2399 | (dynamic_cast_node): Likewise. | |
2400 | (cleanup_type): Likewise. | |
2401 | (vtt_parm_type): Likewise. | |
2402 | (any_targ_node): Likewise. | |
2403 | (source_location_impl): Likewise. | |
2404 | (OVL_FUNCTION): Likewise. | |
2405 | (OVL_CHAIN): Likewise. | |
2406 | (OVL_DEDUP_P): Likewise. | |
2407 | (OVL_USING_P): Likewise. | |
2408 | (OVL_HIDDEN_P): Likewise. | |
2409 | (OVL_NESTED_P): Likewise. | |
2410 | (OVL_LOOKUP_P): Likewise. | |
2411 | (OVL_EXPORT_P): Likewise. | |
2412 | (OVL_FIRST): Likewise. | |
2413 | (OVL_NAME): Likewise. | |
2414 | (OVL_P): Likewise. | |
2415 | (OVL_SINGLE_P): Likewise. | |
2416 | (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. | |
2417 | (CLASSTYPE_LAZY_DEFAULT_CTOR): Likewise. | |
2418 | (CLASSTYPE_CONSTRUCTORS): Likewise. | |
2419 | (ATTR_IS_DEPENDENT): Likewise. | |
2420 | (ABI_TAG_IMPLICIT): Likewise. | |
2421 | (PARENTHESIZED_LIST_P): Likewise. | |
2422 | (DECL_DEPENDENT_P): Likewise. | |
2423 | (USING_DECL_SCOPE): Likewise. | |
2424 | (USING_DECL_DECLS): Likewise. | |
2425 | (USING_DECL_TYPENAME_P): Likewise. | |
2426 | (USING_DECL_UNRELATED_P): Likewise. | |
2427 | (DECL_DECLARES_FUNCTION_P): Likewise. | |
2428 | (DECL_DECLARES_TYPE_P): Likewise. | |
2429 | (IDENTIFIER_KIND_BIT_0): Likewise. | |
2430 | (IDENTIFIER_KIND_BIT_1): Likewise. | |
2431 | (IDENTIFIER_KIND_BIT_2): Likewise. | |
2432 | (IDENTIFIER_MARKED): Likewise. | |
2433 | (IDENTIFIER_VIRTUAL_P): Likewise. | |
2434 | (IDENTIFIER_KEYWORD_P): Likewise. | |
2435 | (IDENTIFIER_CDTOR_P): Likewise. | |
2436 | (IDENTIFIER_CTOR_P): Likewise. | |
2437 | (IDENTIFIER_DTOR_P): Likewise. | |
2438 | (IDENTIFIER_ANY_OP_P): Likewise. | |
2439 | (IDENTIFIER_OVL_OP_P): Likewise. | |
2440 | (IDENTIFIER_ASSIGN_OP_P): Likewise. | |
2441 | (IDENTIFIER_CONV_OP_P): Likewise. | |
2442 | (IDENTIFIER_NEWDEL_OP_P): Likewise. | |
2443 | (IDENTIFIER_NEW_OP_P): Likewise. | |
2444 | (CLASSTYPE_DIAMOND_SHAPED_P): Likewise. | |
2445 | (CLASSTYPE_REPEATED_BASE_P): Likewise. | |
2446 | (CLASSTYPE_KEY_METHOD): Likewise. | |
2447 | (CLASSTYPE_MEMBER_VEC): Likewise. | |
2448 | (CLASSTYPE_DECL_LIST): Likewise. | |
2449 | (CLASSTYPE_DESTRUCTOR): Likewise. | |
2450 | (CLASSTYPE_HAS_PRIMARY_BASE_P): Likewise. | |
2451 | (CLASSTYPE_PRIMARY_BINFO): Likewise. | |
2452 | (CLASSTYPE_VBASECLASSES): Likewise. | |
2453 | (CLASSTYPE_AS_BASE): Likewise. | |
2454 | (DECL_CONV_FN_P): Likewise. | |
2455 | (DECL_CONV_FN_TYPE): Likewise. | |
2456 | (same_type_p): Likewise. | |
2457 | (WILDCARD_TYPE_P): Likewise. | |
2458 | (MAYBE_CLASS_TYPE_P): Likewise. | |
2459 | (FUNCTION_REF_QUALIFIED): Likewise. | |
2460 | (FUNCTION_RVALUE_QUALIFIED): Likewise. | |
2461 | (TYPE_PTRMEMFUNC_FN_TYPE): Likewise. | |
2462 | (TYPE_PTRMEMFUNC_FN_TYPE_RAW): Likewise. | |
2463 | (TYPE_DEPENDENT_P): Likewise. | |
2464 | (TYPE_DEPENDENT_P_VALID): Likewise. | |
2465 | (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. | |
2466 | (TYPE_RAISES_EXCEPTIONS): Likewise. | |
2467 | (IDENTIFIER_BINDING): Likewise. | |
2468 | (LANG_IDENTIFIER_CAST): Likewise. | |
2469 | (IF_COND): Likewise. | |
2470 | (THEN_CLAUSE): Likewise. | |
2471 | (ELSE_CLAUSE): Likewise. | |
2472 | (IF_SCOPE): Likewise. | |
2473 | (IF_STMT_CONSTEXPR_P): Likewise. | |
2474 | (IF_STMT_CONSTEVAL_P): Likewise. | |
2475 | (DECLTYPE_TYPE_EXPR): Likewise. | |
2476 | (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. | |
2477 | (CLASSTYPE_INTERFACE_ONLY): Likewise. | |
2478 | (TYPE_NAME_STRING): Likewise. | |
2479 | (TYPE_NAME_LENGTH): Likewise. | |
2480 | (CONSTRAINT_VAR_P): Likewise. | |
2481 | (KOENIG_LOOKUP_P): Likewise. | |
2482 | (DECL_PARM_INDEX): Likewise. | |
2483 | (DECL_PARM_LEVEL): Likewise. | |
2484 | (CONV_IMPLICIT): Likewise. | |
2485 | (CONV_STATIC): Likewise. | |
2486 | (CONV_CONST): Likewise. | |
2487 | (CONV_REINTERPRET): Likewise. | |
2488 | (CONV_PRIVATE): Likewise. | |
2489 | (CONV_FORCE_TEMP): Likewise. | |
2490 | (CONV_FOLD): Likewise. | |
2491 | (CONV_OLD_CONVERT): Likewise. | |
2492 | (CONV_C_CAST): Likewise. | |
2493 | (CONV_BACKEND_CONVERT): Likewise. | |
2494 | (WANT_INT): Likewise. | |
2495 | (WANT_FLOAT): Likewise. | |
2496 | (WANT_ENUM): Likewise. | |
2497 | (WANT_POINTER): Likewise. | |
2498 | (WANT_NULL): Likewise. | |
2499 | (WANT_VECTOR_OR_COMPLEX): Likewise. | |
2500 | (WANT_ARITH): Likewise. | |
2501 | (COMPARE_STRICT): Likewise. | |
2502 | (COMPARE_BASE): Likewise. | |
2503 | (COMPARE_DERIVED): Likewise. | |
2504 | (COMPARE_REDECLARATION): Likewise. | |
2505 | (COMPARE_STRUCTURAL): Likewise. | |
2506 | (SF_DEFAULT): Likewise. | |
2507 | (SF_PRE_PARSED): Likewise. | |
2508 | (SF_INCLASS_INLINE): Likewise. | |
2509 | (SD_UNINITIALIZED): Likewise. | |
2510 | (SD_INITIALIZED): Likewise. | |
2511 | (SD_DECOMPOSITION): Likewise. | |
2512 | (SD_DEFAULTED): Likewise. | |
2513 | (SD_DELETED): Likewise. | |
2514 | (TYPE_PTRDATAMEM_P): Likewise. | |
2515 | (RS_TYPE_CONST_P): Likewise. | |
2516 | (TYPE_MAIN_DECL): Likewise. | |
2517 | (DECL_NONTRIVIALLY_INITIALIZED_P): Likewise. | |
2518 | (DECL_DEFAULTED_FN): Likewise. | |
2519 | (TYPE_HAS_USER_CONSTRUCTOR): Likewise. | |
2520 | (DECL_INITIALIZED_IN_CLASS_P): Likewise. | |
2521 | (DECL_DEFAULTED_IN_CLASS_P): Likewise. | |
2522 | (DECL_NONSTATIC_MEMBER_FUNCTION_P): Likewise. | |
2523 | (DECL_HAS_IN_CHARGE_PARM_P): Likewise. | |
2524 | (DECL_HAS_VTT_PARM_P): Likewise. | |
2525 | (FUNCTION_FIRST_USER_PARMTYPE): Likewise. | |
2526 | (FUNCTION_FIRST_USER_PARM): Likewise. | |
2527 | (DECL_CONSTRUCTOR_P): Likewise. | |
2528 | (DECL_DELETED_FN): Likewise. | |
2529 | (BRACE_ENCLOSED_INITIALIZER_P): Likewise. | |
2530 | (DECL_IMMEDIATE_FUNCTION_P): Likewise. | |
2531 | (SET_DECL_IMMEDIATE_FUNCTION_P): Likewise. | |
2532 | (CONSTRUCTOR_MUTABLE_POISON): Likewise. | |
2533 | (PTRMEM_CST_MEMBER): Likewise. | |
2534 | (REF_PARENTHESIZED_P): Likewise. | |
2535 | (TYPE_PTRMEM_P): Likewise. | |
2536 | (TYPE_PTR_OR_PTRMEM_P): Likewise. | |
2537 | (DECL_DECOMPOSITION_P): Likewise. | |
2538 | (DECL_DECOMP_BASE): Likewise. | |
2539 | (DECL_MAYBE_IN_CHARGE_CDTOR_P): Likewise. | |
2540 | (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. | |
2541 | (DECL_CLONED_FUNCTION_P): Likewise. | |
2542 | (DECL_CLONED_FUNCTION): Likewise. | |
2543 | (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. | |
2544 | (cp_function_chain): Likewise. | |
2545 | (cdtor_label): Likewise. | |
2546 | (current_class_ptr): Likewise. | |
2547 | (current_class_ref): Likewise. | |
2548 | (current_eh_spec_block): Likewise. | |
2549 | (current_in_charge_parm): Likewise. | |
2550 | (current_vtt_parm): Likewise. | |
2551 | (current_retval_sentinel): Likewise. | |
2552 | (current_function_returns_value): Likewise. | |
2553 | (current_function_returns_null): Likewise. | |
2554 | (current_function_returns_abnormally): Likewise. | |
2555 | (current_function_infinite_loop): Likewise. | |
2556 | (in_base_initializer): Likewise. | |
2557 | (in_function_try_handler): Likewise. | |
2558 | (current_function_return_value): Likewise. | |
2559 | (current_class_type): Likewise. | |
2560 | (TYPE_BEING_DEFINED): Likewise. | |
2561 | (DECL_STATIC_FUNCTION_P): Likewise. | |
2562 | (DECL_FUNCTION_MEMBER_P): Likewise. | |
2563 | (LANG_DECL_MIN_CHECK): Likewise. | |
2564 | (LANG_DECL_FN_CHECK): Likewise. | |
2565 | (LANG_DECL_NS_CHECK): Likewise. | |
2566 | (LANG_DECL_PARM_CHECK): Likewise. | |
2567 | (LANG_DECL_DECOMP_CHECK): Likewise. | |
2568 | (RS_INTEGRAL_TYPE_P): Likewise. | |
2569 | (STAT_HACK_P): Likewise. | |
2570 | (STAT_TYPE_VISIBLE_P): Likewise. | |
2571 | (STAT_TYPE): Likewise. | |
2572 | (STAT_DECL): Likewise. | |
2573 | (STAT_VISIBLE): Likewise. | |
2574 | (MAYBE_STAT_DECL): Likewise. | |
2575 | (MAYBE_STAT_TYPE): Likewise. | |
2576 | (STAT_TYPE_HIDDEN_P): Likewise. | |
2577 | (STAT_DECL_HIDDEN_P): Likewise. | |
2578 | (class warning_sentinel): Likewise. | |
2579 | (struct uid_sensitive_constexpr_evaluation_checker): Likewise. | |
2580 | (class iloc_sentinel): Likewise. | |
2581 | (struct GTY): Likewise. | |
2582 | (struct named_decl_hash): Likewise. | |
2583 | (enum lang_decl_selector): Likewise. | |
2584 | (LANG_DECL_HAS_MIN): Likewise. | |
2585 | (struct named_label_entry): Likewise. | |
2586 | (struct named_label_hash): Likewise. | |
2587 | (enum ref_operator): Likewise. | |
2588 | (struct c_fileinfo): Likewise. | |
2589 | (class ovl_iterator): Likewise. | |
2590 | (class lkp_iterator): Likewise. | |
2591 | (enum rs_ref_qualifier): Likewise. | |
2592 | (enum tsubst_flags): Likewise. | |
2593 | (enum cp_identifier_kind): Likewise. | |
2594 | (enum tag_types): Likewise. | |
2595 | (enum compare_bounds_t): Likewise. | |
2596 | (mark_rvalue_use): Likewise. | |
2597 | (type_unknown_p): Likewise. | |
2598 | (init_modules): Likewise. | |
2599 | (var_in_constexpr_fn): Likewise. | |
2600 | (ovl_first): Likewise. | |
2601 | (lookup_add): Likewise. | |
2602 | (ovl_make): Likewise. | |
2603 | (is_overloaded_fn): Likewise. | |
2604 | (maybe_add_lang_type_raw): Likewise. | |
2605 | (type_memfn_rqual): Likewise. | |
2606 | (builtin_pack_fn_p): Likewise. | |
2607 | (make_conv_op_name): Likewise. | |
2608 | (type_memfn_quals): Likewise. | |
2609 | (get_fileinfo): Likewise. | |
2610 | (cxx_make_type): Likewise. | |
2611 | (build_cplus_array_type): Likewise. | |
2612 | (is_byte_access_type): Likewise. | |
2613 | (comptypes): Likewise. | |
2614 | (canonical_eh_spec): Likewise. | |
2615 | (cp_tree_operand_length): Likewise. | |
2616 | (rs_tree_equal): Likewise. | |
2617 | (compparms): Likewise. | |
2618 | (rs_build_qualified_type_real): Likewise. | |
2619 | (rs_build_qualified_type): Likewise. | |
2620 | (cv_qualified_p): Likewise. | |
2621 | (similar_type_p): Likewise. | |
2622 | (vector_targets_convertible_p): Likewise. | |
2623 | (same_type_ignoring_top_level_qualifiers_p): Likewise. | |
2624 | (comp_ptr_ttypes_const): Likewise. | |
2625 | (get_class_binding_direct): Likewise. | |
2626 | (skip_artificial_parms_for): Likewise. | |
2627 | (lang_check_failed): Likewise. | |
2628 | (default_init_uninitialized_part): Likewise. | |
2629 | (type_has_non_user_provided_default_constructor): Likewise. | |
2630 | (default_ctor_p): Likewise. | |
2631 | (user_provided_p): Likewise. | |
2632 | (sufficient_parms_p): Likewise. | |
2633 | (next_initializable_field): Likewise. | |
2634 | (in_class_defaulted_default_constructor): Likewise. | |
2635 | (is_instantiation_of_constexpr): Likewise. | |
2636 | (check_for_uninitialized_const_var): Likewise. | |
2637 | (reduced_constant_expression_p): Likewise. | |
2638 | (cv_unqualified): Likewise. | |
2639 | (cp_get_callee): Likewise. | |
2640 | (cp_get_callee_fndecl_nofold): Likewise. | |
2641 | (is_nondependent_static_init_expression): Likewise. | |
2642 | (maybe_constant_init): Likewise. | |
2643 | (build_nop): Likewise. | |
2644 | (scalarish_type_p): Likewise. | |
2645 | (is_bitfield_expr_with_lowered_type): Likewise. | |
2646 | (convert_bitfield_to_declared_type): Likewise. | |
2647 | (cp_fold_maybe_rvalue): Likewise. | |
2648 | (maybe_undo_parenthesized_ref): Likewise. | |
2649 | (fold_offsetof): Likewise. | |
2650 | (cp_truthvalue_conversion): Likewise. | |
2651 | (fold_non_dependent_expr): Likewise. | |
2652 | (char_type_p): Likewise. | |
2653 | (instantiation_dependent_expression_p): Likewise. | |
2654 | (type_has_nontrivial_copy_init): Likewise. | |
2655 | (build_local_temp): Likewise. | |
2656 | (is_normal_capture_proxy): Likewise. | |
2657 | (reject_gcc_builtin): Likewise. | |
2658 | (resolve_nondeduced_context): Likewise. | |
2659 | (cxx_incomplete_type_diagnostic): Likewise. | |
2660 | (cxx_incomplete_type_error): Likewise. | |
2661 | (invalid_nonstatic_memfn_p): Likewise. | |
2662 | (really_overloaded_fn): Likewise. | |
2663 | (resolve_nondeduced_context_or_error): Likewise. | |
2664 | (instantiate_non_dependent_or_null): Likewise. | |
2665 | (cxx_incomplete_type_inform): Likewise. | |
2666 | (strip_top_quals): Likewise. | |
2667 | (undeduced_auto_decl): Likewise. | |
2668 | (require_deduced_type): Likewise. | |
2669 | (decl_constant_var_p): Likewise. | |
2670 | (type_of_this_parm): Likewise. | |
2671 | (class_of_this_parm): Likewise. | |
2672 | (identifier_p): Likewise. | |
2673 | (gnu_vector_type_p): Likewise. | |
2674 | (make_tree_vector): Likewise. | |
2675 | (release_tree_vector): Likewise. | |
2676 | (class releasing_vec): Likewise. | |
2677 | (vec_safe_push): Likewise. | |
2678 | (null_node_p): Likewise. | |
2679 | * backend/rust-compile-base.cc (HIRCompileBase::setup_fndecl): Correctly | |
2680 | set fndecl as constexpr from qualifiers. | |
2681 | (HIRCompileBase::compile_function): Test if fndecl is constexpr. | |
2682 | (HIRCompileBase::compile_constant_item): Set fndecl as constexpr. | |
2683 | * backend/rust-compile-intrinsic.cc : Update include. | |
2684 | (finalize_intrinsic_block): Set fndecl as constexpr. | |
2685 | * backend/rust-constexpr.cc : Update include. | |
2686 | (VERIFY_CONSTANT): New. | |
2687 | (is_instantiation_of_constexpr): New. | |
2688 | (literal_type_p): New. | |
2689 | (verify_constant): New. | |
2690 | (find_array_ctor_elt): New. | |
2691 | (array_index_cmp): New. | |
2692 | (potential_constant_expression_1): New. | |
2693 | (get_nth_callarg): New. | |
2694 | (unshare_constructor): New. | |
2695 | (maybe_save_constexpr_fundef): New. | |
2696 | (returns): New. | |
2697 | (breaks): New. | |
2698 | (continues): New. | |
2699 | (switches): New. | |
2700 | (struct constexpr_global_ctx): Add new fields. | |
2701 | (constexpr_fundef): New. | |
2702 | (struct constexpr_call): New. | |
2703 | (constexpr_call_hasher : ggc_ptr_hash<constexpr_call>): New. | |
2704 | (enum constexpr_switch_state): New. | |
2705 | (struct constexpr_ctx): Add new fields. | |
2706 | (struct constexpr_fundef_hasher): New. | |
2707 | (constexpr_fundef_table): New. | |
2708 | (constexpr_fundef_hasher::equal): New. | |
2709 | (constexpr_fundef_hasher::hash): New. | |
2710 | (retrieve_constexpr_fundef): New. | |
2711 | (uid_sensitive_constexpr_evaluation_value): New. | |
2712 | (uid_sensitive_constexpr_evaluation_true_counter): New. | |
2713 | (uid_sensitive_constexpr_evaluation_p): New. | |
2714 | (class temp_override): New. | |
2715 | (struct uid_sensitive_constexpr_evaluation_sentinel): New. | |
2716 | (struct uid_sensitive_constexpr_evaluation_checker): New. | |
2717 | (::uid_sensitive_constexpr_evaluation_sentinel): New. | |
2718 | (::uid_sensitive_constexpr_evaluation_checker): New. | |
2719 | (uid_sensitive_constexpr_evaluation_checker::evaluation_restricted_p): New. | |
2720 | (constexpr_call_table): New. | |
2721 | (constexpr_call_hasher::hash): New. | |
2722 | (constexpr_call_hasher::equal): New. | |
2723 | (maybe_initialize_constexpr_call_table): New. | |
2724 | (fundef_copies_table): New. | |
2725 | (get_fundef_copy): New. | |
2726 | (save_fundef_copy): New. | |
2727 | (constexpr_expression): Refactor in ... | |
2728 | (eval_constant_expression): ...this. | |
2729 | (eval_store_expression): Add 3 bool params. | |
2730 | (eval_call_expression): Likewise. | |
2731 | (eval_binary_expression): Likewise. | |
2732 | (eval_statement_list): New. | |
2733 | (extract_string_elt): New. | |
2734 | (eval_conditional_expression): New. | |
2735 | (eval_bit_field_ref): New. | |
2736 | (eval_loop_expr): New. | |
2737 | (eval_switch_expr): New. | |
2738 | (eval_unary_expression): New. | |
2739 | (call_stack): New. | |
2740 | (call_stack_tick): New. | |
2741 | (last_cx_error_tick): New. | |
2742 | (push_cx_call_context): New. | |
2743 | (pop_cx_call_context): New. | |
2744 | (cx_error_context): New. | |
2745 | (fold_expr): Adjust call to eval_constant_expression. | |
2746 | (same_type_ignoring_tlq_and_bounds_p): New. | |
2747 | (union_active_member): Port more for cxx constexpr. | |
2748 | (fold_indirect_ref_1): New. | |
2749 | (rs_fold_indirect_ref): Likewise. | |
2750 | (rs_eval_indirect_ref): New (from corresponding cxx FE file). | |
2751 | (eval_logical_expression): Adjust parameter list. | |
2752 | (lookup_placeholder): New (from corresponding cxx FE file). | |
2753 | (constant_value_1): Remove. | |
2754 | (inline_asm_in_constexpr_error): New (from corresponding cxx FE file). | |
2755 | (verify_ctor_sanity): New. | |
2756 | (get_callee): Remove. | |
2757 | (initialized_type): New. | |
2758 | (maybe_constexpr_fn): Remove. | |
2759 | (init_subob_ctx): New. | |
2760 | (base_field_constructor_elt): New. | |
2761 | (get_or_insert_ctor_field): New. | |
2762 | (eval_vector_conditional_expression): New (from correponding cxx FE file). | |
2763 | (eval_bare_aggregate): New. | |
2764 | (cxx_eval_trinary_expression): New. | |
2765 | (reduced_constant_expression_p): New. | |
2766 | (adjust_temp_type): New. | |
2767 | (free_constructor): New. | |
2768 | (eval_and_check_array_index): New. | |
2769 | (eval_array_reference): New. | |
2770 | (eval_component_reference): New. | |
2771 | (label_matches): New. | |
2772 | (eval_constant_expression): New. | |
2773 | (modifying_const_object_error): New. | |
2774 | (is_empty_field): New. | |
2775 | (eval_store_expression): New. | |
2776 | (eval_binary_expression): New. | |
2777 | (addr_of_non_const_var): New. | |
2778 | (rs_bind_parameters_in_call): New. | |
2779 | (eval_builtin_function_call): New. | |
2780 | (eval_call_expression): New. | |
2781 | (build_anon_member_initialization): New. | |
2782 | (build_data_member_initialization): New. | |
2783 | (constexpr_fn_retval): New. | |
2784 | (constant_value_1): New. | |
2785 | (decl_constant_value): New. | |
2786 | (non_const_var_error): New. | |
2787 | (get_callee): New. | |
2788 | (get_function_named_in_call): New. | |
2789 | (maybe_constexpr_fn): New. | |
2790 | (get_nth_callarg): New. | |
2791 | (var_in_maybe_constexpr_fn): New. | |
2792 | (instantiate_cx_fn_r): New. | |
2793 | (instantiate_constexpr_fns): New. | |
2794 | (array_index_cmp): New. | |
2795 | (unshare_constructor): New. | |
2796 | (find_array_ctor_elt): New. | |
2797 | (verify_constant): New. | |
2798 | (find_heap_var_refs): New. | |
2799 | (find_immediate_fndecl): New. | |
2800 | (diag_array_subscript): New. | |
2801 | (get_array_or_vector_nelts): New. | |
2802 | (eval_and_check_array_index): New. | |
2803 | (extract_string_elt): New. | |
2804 | (is_valid_constexpr_fn): New. | |
2805 | (explain_invalid_constexpr_fn): New. | |
2806 | (register_constexpr_fundef): New. | |
2807 | (maybe_save_constexpr_fundef): New. | |
2808 | (eval_statement_list): New. | |
2809 | (eval_conditional_expression): New. | |
2810 | (eval_bit_field_ref): New. | |
2811 | (returns): New. | |
2812 | (breaks): New. | |
2813 | (continues): New. | |
2814 | (switches): New. | |
2815 | (eval_loop_expr): New. | |
2816 | (eval_switch_expr): New. | |
2817 | (eval_unary_expression): New. | |
2818 | (cxx_eval_outermost_constant_expr): New. | |
2819 | (is_static_init_expression): New. | |
2820 | (is_constant_expression): New. | |
2821 | (is_nondependent_static_init_expression): New. | |
2822 | (maybe_constant_init_1): New. | |
2823 | (maybe_constant_init): New. | |
2824 | (is_nondependent_constant_expression): New. | |
2825 | (cv_cache): New. | |
2826 | (maybe_constant_value): New. | |
2827 | (potential_constant_expression): New. | |
2828 | (struct check_for_return_continue_data): New. | |
2829 | (check_for_return_continue): New. | |
2830 | (decl_namespace_context): New. | |
2831 | (decl_in_std_namespace_p): New. | |
2832 | (is_std_construct_at): New. | |
2833 | (cxx_dynamic_cast_fn_p): New. | |
2834 | (is_std_allocator_allocate): New. | |
2835 | (is_std_allocator_allocate): New. | |
2836 | (potential_constant_expression_1): New. | |
2837 | (potential_constant_expression_1): New. | |
2838 | (fold_non_dependent_init): New. | |
2839 | * backend/rust-constexpr.h (maybe_save_constexpr_fundef): New. | |
2840 | ||
2841 | 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com> | |
2842 | ||
2843 | * rust-session-manager.cc (Session::compile_crate): Allow the dump of prettified AST | |
2844 | (Session::dump_ast_pretty): New | |
2845 | * rust-session-manager.h: Add new output file for pretty AST dump | |
2846 | ||
53ef7c1d GA |
2847 | 2023-01-05 David Malcolm <dmalcolm@redhat.com> |
2848 | ||
2849 | * resolve/rust-ast-resolve-item.cc (selftest::rust_flatten_list): | |
2850 | Remove output to stderr. | |
2851 | ||
2852 | 2023-01-05 David Malcolm <dmalcolm@redhat.com> | |
2853 | ||
2854 | * Make-lang.in (selftest-rust-gdb): New. | |
2855 | (selftest-rust-valgrind): New. | |
2856 | ||
a9968883 GA |
2857 | 2022-12-20 Marc Poulhiès <dkm@kataplop.net> |
2858 | ||
2859 | PR rust/108113 | |
2860 | * Make-lang.in (rust.serial): New variable. | |
2861 | (rust1$(exeext)): Depend on $(rust.prev). Call LINK_PROGRESS. | |
2862 | ||
26f4aefa GA |
2863 | 2022-12-14 Jakub Jelinek <jakub@redhat.com> |
2864 | ||
2865 | PR rust/106072 | |
2866 | * parse/rust-parse-impl.h (parse_closure_param): Store | |
2867 | pattern->get_locus () in a temporary before std::move (pattern) is | |
2868 | invoked. | |
2869 | ||
f17ddf2c GA |
2870 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> |
2871 | ||
2872 | * CONTRIBUTING.md: New. | |
2873 | * README.md: New. | |
2874 | * logo.png: New. | |
2875 | ||
2876 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2877 | ||
2878 | * config-lang.in: New. | |
2879 | ||
2880 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
2881 | ||
2882 | * lang.opt (-frust-incomplete-and-experimental-compiler-do-not-use): | |
2883 | New. | |
2884 | * rust-session-manager.cc (Session::compile_crate): Check it. | |
2885 | * Make-lang.in (RUST_SELFTEST_FLAGS): Add it. | |
2886 | ||
2887 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2888 | ||
2889 | * Make-lang.in: New. | |
2890 | ||
2891 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2892 | ||
2893 | * lang.opt: New. | |
2894 | ||
2895 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2896 | ||
2897 | * lang-specs.h: New. | |
2898 | ||
2899 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2900 | ||
2901 | * rust-lang.cc: New. | |
2902 | * rust-session-manager.cc: New. | |
2903 | * rust-session-manager.h: New. | |
2904 | ||
2905 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2906 | ||
2907 | * rustspec.cc: New. | |
2908 | ||
2909 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2910 | ||
2911 | * rust-diagnostics.cc: New. | |
2912 | * rust-diagnostics.h: New. | |
2913 | * rust-gcc-diagnostics.cc: New. | |
2914 | * rust-linemap.cc: New. | |
2915 | * rust-linemap.h: New. | |
2916 | * rust-location.h: New. | |
2917 | * rust-system.h: New. | |
2918 | ||
2919 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2920 | David Faust <david.faust@oracle.com> | |
2921 | Faisal Abbas <90.abbasfaisal@gmail.com> | |
2922 | ||
2923 | * backend/rust-compile-context.cc: New. | |
2924 | * backend/rust-compile-context.h: New. | |
2925 | * backend/rust-compile.cc: New. | |
2926 | * backend/rust-compile.h: New. | |
2927 | * backend/rust-constexpr.cc: New. | |
2928 | * backend/rust-constexpr.h: New. | |
2929 | ||
2930 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2931 | David Faust <david.faust@oracle.com> | |
2932 | ||
2933 | * backend/rust-compile-block.cc: New. | |
2934 | * backend/rust-compile-block.h: New. | |
2935 | * backend/rust-compile-expr.cc: New. | |
2936 | * backend/rust-compile-expr.h: New. | |
2937 | * backend/rust-compile-extern.h: New. | |
2938 | * backend/rust-compile-fnparam.cc: New. | |
2939 | * backend/rust-compile-fnparam.h: New. | |
2940 | * backend/rust-compile-implitem.cc: New. | |
2941 | * backend/rust-compile-implitem.h: New. | |
2942 | * backend/rust-compile-intrinsic.cc: New. | |
2943 | * backend/rust-compile-intrinsic.h: New. | |
2944 | * backend/rust-compile-item.cc: New. | |
2945 | * backend/rust-compile-item.h: New. | |
2946 | * backend/rust-compile-pattern.cc: New. | |
2947 | * backend/rust-compile-pattern.h: New. | |
2948 | * backend/rust-compile-resolve-path.cc: New. | |
2949 | * backend/rust-compile-resolve-path.h: New. | |
2950 | * backend/rust-compile-stmt.cc: New. | |
2951 | * backend/rust-compile-stmt.h: New. | |
2952 | * backend/rust-compile-struct-field-expr.cc: New. | |
2953 | * backend/rust-compile-struct-field-expr.h: New. | |
2954 | * backend/rust-compile-type.cc: New. | |
2955 | * backend/rust-compile-type.h: New. | |
2956 | * backend/rust-compile-var-decl.h: New. | |
2957 | ||
2958 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2959 | David Faust <david.faust@oracle.com> | |
2960 | ||
2961 | * backend/rust-builtins.h: New. | |
2962 | * backend/rust-compile-base.cc: New. | |
2963 | * backend/rust-compile-base.h: New. | |
2964 | * backend/rust-mangle.cc: New. | |
2965 | * backend/rust-mangle.h: New. | |
2966 | * backend/rust-tree.cc: New. | |
2967 | * backend/rust-tree.h: New. | |
2968 | * rust-backend.h: New. | |
2969 | * rust-gcc.cc: New. | |
2970 | ||
2971 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2972 | ||
2973 | * metadata/rust-export-metadata.cc: New. | |
2974 | * metadata/rust-export-metadata.h: New. | |
2975 | * metadata/rust-extern-crate.cc: New. | |
2976 | * metadata/rust-extern-crate.h: New. | |
2977 | * metadata/rust-import-archive.cc: New. | |
2978 | * metadata/rust-imports.cc: New. | |
2979 | * metadata/rust-imports.h: New. | |
2980 | * rust-object-export.cc: New. | |
2981 | * rust-object-export.h: New. | |
2982 | ||
2983 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
2984 | ||
2985 | * checks/lints/rust-lint-unused-var.cc: New. | |
2986 | * checks/lints/rust-lint-unused-var.h: New. | |
2987 | ||
2988 | 2022-12-13 Thomas Young <wenzhang5800@gmail.com> | |
2989 | ||
2990 | * checks/lints/rust-lint-marklive-base.h: New. | |
2991 | * checks/lints/rust-lint-marklive.cc: New. | |
2992 | * checks/lints/rust-lint-marklive.h: New. | |
2993 | * checks/lints/rust-lint-scan-deadcode.h: New. | |
2994 | ||
2995 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
2996 | ||
2997 | * checks/errors/privacy/rust-privacy-check.cc: New. | |
2998 | * checks/errors/privacy/rust-privacy-check.h: New. | |
2999 | * checks/errors/privacy/rust-privacy-common.h: New. | |
3000 | * checks/errors/privacy/rust-privacy-ctx.cc: New. | |
3001 | * checks/errors/privacy/rust-privacy-ctx.h: New. | |
3002 | * checks/errors/privacy/rust-privacy-reporter.cc: New. | |
3003 | * checks/errors/privacy/rust-privacy-reporter.h: New. | |
3004 | * checks/errors/privacy/rust-pub-restricted-visitor.cc: New. | |
3005 | * checks/errors/privacy/rust-pub-restricted-visitor.h: New. | |
3006 | * checks/errors/privacy/rust-reachability.cc: New. | |
3007 | * checks/errors/privacy/rust-reachability.h: New. | |
3008 | * checks/errors/privacy/rust-visibility-resolver.cc: New. | |
3009 | * checks/errors/privacy/rust-visibility-resolver.h: New. | |
3010 | ||
3011 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
3012 | ||
3013 | * checks/errors/rust-const-checker.cc: New. | |
3014 | * checks/errors/rust-const-checker.h: New. | |
3015 | ||
3016 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
3017 | ||
3018 | * checks/errors/rust-unsafe-checker.cc: New. | |
3019 | * checks/errors/rust-unsafe-checker.h: New. | |
3020 | ||
3021 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3022 | ||
3023 | * typecheck/rust-autoderef.cc: New. | |
3024 | * typecheck/rust-autoderef.h: New. | |
3025 | * typecheck/rust-casts.cc: New. | |
3026 | * typecheck/rust-casts.h: New. | |
3027 | * typecheck/rust-coercion.cc: New. | |
3028 | * typecheck/rust-coercion.h: New. | |
3029 | * typecheck/rust-hir-dot-operator.cc: New. | |
3030 | * typecheck/rust-hir-dot-operator.h: New. | |
3031 | * typecheck/rust-hir-inherent-impl-overlap.h: New. | |
3032 | * typecheck/rust-hir-path-probe.h: New. | |
3033 | * typecheck/rust-hir-trait-ref.h: New. | |
3034 | * typecheck/rust-hir-type-bounds.h: New. | |
3035 | * typecheck/rust-substitution-mapper.cc: New. | |
3036 | * typecheck/rust-substitution-mapper.h: New. | |
3037 | * typecheck/rust-tycheck-dump.h: New. | |
3038 | * typecheck/rust-tyctx.cc: New. | |
3039 | * typecheck/rust-tyty-bounds.cc: New. | |
3040 | * typecheck/rust-tyty-call.cc: New. | |
3041 | * typecheck/rust-tyty-call.h: New. | |
3042 | * typecheck/rust-tyty-cmp.h: New. | |
3043 | * typecheck/rust-tyty-rules.h: New. | |
3044 | ||
3045 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3046 | ||
3047 | * typecheck/rust-tyty.cc: New. | |
3048 | * typecheck/rust-tyty.h: New. | |
3049 | ||
3050 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3051 | ||
3052 | * typecheck/rust-hir-trait-resolve.cc: New. | |
3053 | * typecheck/rust-hir-trait-resolve.h: New. | |
3054 | * typecheck/rust-hir-type-check-base.cc: New. | |
3055 | * typecheck/rust-hir-type-check-base.h: New. | |
3056 | * typecheck/rust-hir-type-check-enumitem.cc: New. | |
3057 | * typecheck/rust-hir-type-check-enumitem.h: New. | |
3058 | * typecheck/rust-hir-type-check-expr.cc: New. | |
3059 | * typecheck/rust-hir-type-check-expr.h: New. | |
3060 | * typecheck/rust-hir-type-check-implitem.cc: New. | |
3061 | * typecheck/rust-hir-type-check-implitem.h: New. | |
3062 | * typecheck/rust-hir-type-check-item.cc: New. | |
3063 | * typecheck/rust-hir-type-check-item.h: New. | |
3064 | * typecheck/rust-hir-type-check-path.cc: New. | |
3065 | * typecheck/rust-hir-type-check-pattern.cc: New. | |
3066 | * typecheck/rust-hir-type-check-pattern.h: New. | |
3067 | * typecheck/rust-hir-type-check-stmt.cc: New. | |
3068 | * typecheck/rust-hir-type-check-stmt.h: New. | |
3069 | * typecheck/rust-hir-type-check-struct-field.h: New. | |
3070 | * typecheck/rust-hir-type-check-struct.cc: New. | |
3071 | * typecheck/rust-hir-type-check-toplevel.cc: New. | |
3072 | * typecheck/rust-hir-type-check-toplevel.h: New. | |
3073 | * typecheck/rust-hir-type-check-type.cc: New. | |
3074 | * typecheck/rust-hir-type-check-type.h: New. | |
3075 | * typecheck/rust-hir-type-check-util.cc: New. | |
3076 | * typecheck/rust-hir-type-check-util.h: New. | |
3077 | * typecheck/rust-hir-type-check.cc: New. | |
3078 | * typecheck/rust-hir-type-check.h: New. | |
3079 | * typecheck/rust-tyty-visitor.h: New. | |
3080 | ||
3081 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3082 | ||
3083 | * util/rust-canonical-path.h: New. | |
3084 | * util/rust-common.h: New. | |
3085 | * util/rust-hir-map.cc: New. | |
3086 | * util/rust-hir-map.h: New. | |
3087 | * util/rust-identifier.h: New. | |
3088 | * util/rust-lang-item.h: New. | |
3089 | * util/rust-mapping-common.h: New. | |
3090 | * util/rust-stacked-contexts.h: New. | |
3091 | ||
3092 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
3093 | ||
3094 | * util/rust-attributes.cc: New. | |
3095 | * util/rust-attributes.h: New. | |
3096 | ||
3097 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
3098 | ||
3099 | * util/rust-optional-test.cc: New. | |
3100 | * util/rust-optional.h: New. | |
3101 | ||
3102 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
3103 | ||
3104 | * util/rust-base62.cc: New. | |
3105 | * util/rust-base62.h: New. | |
3106 | ||
3107 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3108 | ||
3109 | * util/rust-abi.cc: New. | |
3110 | * util/rust-abi.h: New. | |
3111 | ||
3112 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3113 | ||
3114 | * util/fnv-hash.h: New. | |
3115 | ||
3116 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3117 | ||
3118 | * util/rust-make-unique.h: New. | |
3119 | ||
3120 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3121 | ||
3122 | * hir/rust-ast-lower-base.cc: New. | |
3123 | * hir/rust-ast-lower-base.h: New. | |
3124 | * hir/rust-ast-lower-block.h: New. | |
3125 | * hir/rust-ast-lower-enumitem.h: New. | |
3126 | * hir/rust-ast-lower-expr.h: New. | |
3127 | * hir/rust-ast-lower-extern.h: New. | |
3128 | * hir/rust-ast-lower-implitem.h: New. | |
3129 | * hir/rust-ast-lower-item.cc: New. | |
3130 | * hir/rust-ast-lower-item.h: New. | |
3131 | * hir/rust-ast-lower-pattern.cc: New. | |
3132 | * hir/rust-ast-lower-pattern.h: New. | |
3133 | * hir/rust-ast-lower-stmt.h: New. | |
3134 | * hir/rust-ast-lower-struct-field-expr.h: New. | |
3135 | * hir/rust-ast-lower-type.h: New. | |
3136 | * hir/rust-ast-lower.cc: New. | |
3137 | * hir/rust-ast-lower.h: New. | |
3138 | * hir/rust-hir-dump.cc: New. | |
3139 | * hir/rust-hir-dump.h: New. | |
3140 | ||
3141 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3142 | ||
3143 | * hir/tree/rust-hir-full-decls.h: New. | |
3144 | * hir/tree/rust-hir-full-test.cc: New. | |
3145 | * hir/tree/rust-hir-full.h: New. | |
3146 | * hir/tree/rust-hir-visitor.h: New. | |
3147 | * hir/tree/rust-hir.h: New. | |
3148 | ||
3149 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3150 | ||
3151 | * hir/tree/rust-hir-expr.h: New. | |
3152 | * hir/tree/rust-hir-item.h: New. | |
3153 | * hir/tree/rust-hir-path.h: New. | |
3154 | * hir/tree/rust-hir-pattern.h: New. | |
3155 | * hir/tree/rust-hir-stmt.h: New. | |
3156 | * hir/tree/rust-hir-type.h: New. | |
3157 | ||
3158 | 2022-12-13 Philip Herron <philip.herron@embecosm.com> | |
3159 | ||
3160 | * resolve/rust-ast-resolve-base.cc: New. | |
3161 | * resolve/rust-ast-resolve-base.h: New. | |
3162 | * resolve/rust-ast-resolve-expr.cc: New. | |
3163 | * resolve/rust-ast-resolve-expr.h: New. | |
3164 | * resolve/rust-ast-resolve-implitem.h: New. | |
3165 | * resolve/rust-ast-resolve-item.cc: New. | |
3166 | * resolve/rust-ast-resolve-item.h: New. | |
3167 | * resolve/rust-ast-resolve-path.cc: New. | |
3168 | * resolve/rust-ast-resolve-path.h: New. | |
3169 | * resolve/rust-ast-resolve-pattern.cc: New. | |
3170 | * resolve/rust-ast-resolve-pattern.h: New. | |
3171 | * resolve/rust-ast-resolve-stmt.cc: New. | |
3172 | * resolve/rust-ast-resolve-stmt.h: New. | |
3173 | * resolve/rust-ast-resolve-struct-expr-field.cc: New. | |
3174 | * resolve/rust-ast-resolve-struct-expr-field.h: New. | |
3175 | * resolve/rust-ast-resolve-toplevel.h: New. | |
3176 | * resolve/rust-ast-resolve-type.cc: New. | |
3177 | * resolve/rust-ast-resolve-type.h: New. | |
3178 | * resolve/rust-ast-resolve.cc: New. | |
3179 | * resolve/rust-ast-resolve.h: New. | |
3180 | * resolve/rust-ast-verify-assignee.h: New. | |
3181 | * resolve/rust-name-resolver.cc: New. | |
3182 | * resolve/rust-name-resolver.h: New. | |
3183 | ||
3184 | 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com> | |
3185 | Philip Herron <philip.herron@embecosm.com> | |
3186 | Joel Phillips <simplytheother@gmail.com> | |
3187 | ||
3188 | * expand/rust-attribute-visitor.cc: New. | |
3189 | * expand/rust-attribute-visitor.h: New. | |
3190 | * expand/rust-macro-builtins.cc: New. | |
3191 | * expand/rust-macro-builtins.h: New. | |
3192 | * expand/rust-macro-expand.cc: New. | |
3193 | * expand/rust-macro-expand.h: New. | |
3194 | * expand/rust-macro-invoc-lexer.cc: New. | |
3195 | * expand/rust-macro-invoc-lexer.h: New. | |
3196 | * expand/rust-macro-substitute-ctx.cc: New. | |
3197 | * expand/rust-macro-substitute-ctx.h: New. | |
3198 | ||
3199 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3200 | Philip Herron <philip.herron@embecosm.com> | |
3201 | Arthur Cohen <arthur.cohen@embecosm.com> | |
3202 | ||
3203 | * parse/rust-parse-impl.h: New, second half. | |
3204 | ||
3205 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3206 | Philip Herron <philip.herron@embecosm.com> | |
3207 | Arthur Cohen <arthur.cohen@embecosm.com> | |
3208 | ||
3209 | * parse/rust-cfg-parser.cc: New. | |
3210 | * parse/rust-cfg-parser.h: New. | |
3211 | * parse/rust-parse-impl.h: New. | |
3212 | * parse/rust-parse.cc: New. | |
3213 | * parse/rust-parse.h: New. | |
3214 | ||
3215 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3216 | Philip Herron <philip.herron@embecosm.com> | |
3217 | Arthur Cohen <arthur.cohen@embecosm.com> | |
3218 | Mark Wielaard <mark@klomp.org> | |
3219 | ||
3220 | * lex/rust-codepoint.h: New. | |
3221 | * lex/rust-lex.cc: New. | |
3222 | * lex/rust-lex.h: New. | |
3223 | * lex/rust-token.cc: New. | |
3224 | * lex/rust-token.h: New. | |
3225 | * rust-buffered-queue.h: New. | |
3226 | ||
3227 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3228 | Philip Herron <philip.herron@embecosm.com> | |
3229 | Arthur Cohen <arthur.cohen@embecosm.com> | |
3230 | ||
3231 | * ast/rust-ast-dump.cc: New. | |
3232 | * ast/rust-ast-dump.h: New. | |
3233 | * ast/rust-ast-visitor.h: New. | |
3234 | * ast/rust-cond-compilation.h: New. | |
3235 | ||
3236 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3237 | Philip Herron <philip.herron@embecosm.com> | |
3238 | ||
3239 | * ast/rust-expr.h: New. | |
3240 | * ast/rust-macro.h: New. | |
3241 | * ast/rust-path.h: New. | |
3242 | * ast/rust-pattern.h: New. | |
3243 | * ast/rust-stmt.h: New. | |
3244 | * ast/rust-type.h: New. | |
3245 | ||
3246 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3247 | Philip Herron <philip.herron@embecosm.com> | |
3248 | ||
3249 | * ast/rust-item.h: New. | |
3250 | ||
3251 | 2022-12-13 Joel Phillips <simplytheother@gmail.com> | |
3252 | Philip Herron <philip.herron@embecosm.com> | |
3253 | Arthur Cohen <arthur.cohen@embecosm.com> | |
3254 | ||
3255 | * ast/rust-ast-full-decls.h: New. | |
3256 | * ast/rust-ast-full-test.cc: New. | |
3257 | * ast/rust-ast-full.h: New. | |
3258 | * ast/rust-ast.h: New. | |
3259 | * operator.h: New. | |
3260 | ||
24ff0b3e | 3261 | \f |
83ffe9cd | 3262 | Copyright (C) 2022-2023 Free Software Foundation, Inc. |
24ff0b3e TS |
3263 | |
3264 | Copying and distribution of this file, with or without modification, | |
3265 | are permitted in any medium without royalty provided the copyright | |
3266 | notice and this notice are preserved. |