Skip to content

Commit

Permalink
update std::jule::sema and compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 3, 2023
1 parent a0218b9 commit 534dc75
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/compiler/compiler-optimizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ It reduces copying operations whenever possible.
It eliminates dead codes (unused) from object code.

- Eliminates dead globals.
- Eliminates dead structs.
- Eliminates dead traits. These traits are not implemented by any alive struct.
- Eliminates dead functions.
- Eliminates followed statements of the return statement.

Expand Down
34 changes: 19 additions & 15 deletions src/standard-library/std-jule-sema.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ struct Fn {
result: &RetType
params: []&Param
owner: &Struct
references: &ReferenceStack
// Function instances for each unique type combination of function call.
// Nil if function is never used.
Expand Down Expand Up @@ -587,12 +586,17 @@ Parameter instance.

```
struct FnIns {
owner: &StructIns
decl: &Fn
generics: []&TypeKind
params: []&ParamIns
result: &TypeKind
scope: &Scope
owner: &StructIns
decl: &Fn
generics: []&TypeKind
params: []&ParamIns
result: &TypeKind
scope: &Scope
references: &ReferenceStack
// Stores all referenced definitions.
// Only stores for initializer functions.
refers: &ReferenceStack
}
```
Function instance.
Expand Down Expand Up @@ -939,10 +943,9 @@ struct Struct {
generics: []&GenericDecl
implements: []&Trait
instances: []&StructIns
references: &ReferenceStack
}
```
Structure.
Structure.

**Methods:**

Expand Down Expand Up @@ -977,12 +980,13 @@ Field instance.

```
struct StructIns {
checked: bool
decl: &Struct
generics: []&TypeKind
fields: []&FieldIns
methods: []&Fn
has_mut: bool
checked: bool
decl: &Struct
generics: []&TypeKind
fields: []&FieldIns
methods: []&Fn
has_mut: bool
references: &ReferenceStack
}
```
Structure instance.
Expand Down

0 comments on commit 534dc75

Please sign in to comment.