Recent activity

[PATCH harec v1] scan_enum_field: store type directly in scope_object 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
 include/check.h | 1 -
 src/check.c     | 7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/check.h b/include/check.h
index d9c7e24..5fe6228 100644
--- a/include/check.h
+++ b/include/check.h
@@ -104,7 +104,6 @@ enum idecl_type {
// Keeps track of enum specific context required for enum field resolution
struct incomplete_enum_field {
	struct ast_enum_field *field;
[message trimmed]

[PATCH harec v3] check: verify define compatibility 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
v3:
	don't remove comment in check_internal
	check for IDECL_DECL
 src/check.c         | 36 +++++++++++++++++++++++++++++++++++-
 tests/36-defines.ha |  2 +-
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/check.c b/src/check.c
index e18202a..72e0161 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3311,11 +3311,24 @@ check_expression(struct context *ctx,
[message trimmed]

[PATCH harec v2] check: verify define compatibility 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
v2:
	rebase
	improved error message
 src/check.c         | 36 ++++++++++++++++++++++++++++++++++--
 tests/36-defines.ha |  2 +-
 2 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/src/check.c b/src/check.c
index 5440134..acfb566 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3313,11 +3313,24 @@ check_expression(struct context *ctx,
[message trimmed]

[PATCH harec v3 8/8] gen_function_decl: remove no longer necessary function name generation 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
v3:
	rebase
 src/gen.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/gen.c b/src/gen.c
index bc4bc8d..08c92e1 100644
--- a/src/gen.c
+++ b/src/gen.c
@@ -3301,16 +3301,8 @@ gen_function_decl(struct gen_context *ctx, const struct declaration *decl)
	qdef->exported = decl->exported;
	ctx->current = &qdef->func;
[message trimmed]

[PATCH harec v3 6/8] check_function: reuse resolved type 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
v3:
	rebase
 src/check.c | 39 +++++++++++++++------------------------
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/src/check.c b/src/check.c
index ff387e3..6b162ae 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3332,30 +3332,21 @@ check_const(struct context *ctx,

static struct declaration *
[message trimmed]

[PATCH harec v3 7/8] check_global: reuse resolved type 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
v3:
	rebase
 src/check.c | 44 ++++++++++++++------------------------------
 1 file changed, 14 insertions(+), 30 deletions(-)

diff --git a/src/check.c b/src/check.c
index 6b162ae..4cbc7e0 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3429,21 +3429,15 @@ check_function(struct context *ctx,

static struct declaration *
[message trimmed]

[PATCH harec v3 5/8] check_const: reuse resolved type 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
 src/check.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/check.c b/src/check.c
index ea26252..ff387e3 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3317,19 +3317,16 @@ check_expression(struct context *ctx,

static struct declaration *
check_const(struct context *ctx,
	const struct scope_object *obj,
[message trimmed]

[PATCH harec v3 4/8] check_type: reuse resolved type 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
 src/check.c | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/src/check.c b/src/check.c
index 1a50f67..ea26252 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3504,32 +3504,14 @@ check_global(struct context *ctx,

static struct declaration *
check_type(struct context *ctx,
	const struct scope_object *obj,
[message trimmed]

[PATCH harec v3 3/8] check: iterate on incomplete declarations instead of ast declarations 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

This reduces code duplication between scan and check, making scan the
single source of truth. And simplifies reuse of information (idents,
names, types) already calculated in scan or resolve.

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
 src/check.c | 122 ++++++++++++++++++----------------------------------
 1 file changed, 41 insertions(+), 81 deletions(-)

diff --git a/src/check.c b/src/check.c
index 3a8ff34..1a50f67 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3534,70 +3534,34 @@ check_type(struct context *ctx,
[message trimmed]

[PATCH harec v3 2/8] check: keep defines in their own scope 1 year, 3 months ago

From Armin Weigl to ~sircmpwn/hare-dev

This has multiple effects:
	- All objects in SCOPE_UNIT are now guaranteed to be
	  incomplete_declarations, which is a prerequisite for a later
	  patch.
	- Defines are no longer (redundantly) imported from
	  type definitions.

Signed-off-by: Armin Weigl <tb46305@gmail.com>
---
 docs/declaration_solver.txt |  2 +-
 include/check.h             |  1 +
 include/scope.h             |  1 +
 src/check.c                 | 34 +++++++++++-----------------------
 tests/36-defines.ha         |  2 +-
[message trimmed]