-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43279 from heshanpadmasiri/feat/runtime-stream
Implement runtime type checker on SemTypes
- Loading branch information
Showing
232 changed files
with
18,307 additions
and
5,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ina-shell/modules/shell-core/src/test/resources/testcases/evaluator/operations.clone.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...shell/modules/shell-core/src/test/resources/testcases/evaluator/operations.immutable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/api/types/semtype/Atom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package io.ballerina.runtime.api.types.semtype; | ||
|
||
/** | ||
* Represent the BDD atom. | ||
* | ||
* @since 2201.11.0 | ||
*/ | ||
public sealed interface Atom permits RecAtom, TypeAtom { | ||
|
||
/** | ||
* Get the index of the atom. For {@code TypeAtoms} this is a unique index within the {@code Env}. Each | ||
* {@code RecAtom} that points to the same {@code TypeAtom} will have the same index. | ||
* | ||
* @return index of the atom | ||
*/ | ||
int index(); | ||
} |
33 changes: 33 additions & 0 deletions
33
bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/api/types/semtype/AtomicType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package io.ballerina.runtime.api.types.semtype; | ||
|
||
import io.ballerina.runtime.internal.types.semtype.CellAtomicType; | ||
import io.ballerina.runtime.internal.types.semtype.FunctionAtomicType; | ||
import io.ballerina.runtime.internal.types.semtype.ListAtomicType; | ||
import io.ballerina.runtime.internal.types.semtype.MappingAtomicType; | ||
|
||
/** | ||
* Marker type representing AtomicType. | ||
* | ||
* @since 2201.11.0 | ||
*/ | ||
public sealed interface AtomicType permits CellAtomicType, FunctionAtomicType, ListAtomicType, MappingAtomicType { | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...llerina-runtime/src/main/java/io/ballerina/runtime/api/types/semtype/BasicTypeBitSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.ballerina.runtime.api.types.semtype; | ||
|
||
abstract sealed class BasicTypeBitSet permits SemType { | ||
|
||
private int all; | ||
|
||
protected BasicTypeBitSet(int all) { | ||
this.all = all; | ||
} | ||
|
||
protected void setAll(int all) { | ||
this.all = all; | ||
} | ||
|
||
public final int all() { | ||
assert all != -1 : "SemType created by no arg constructor must be initialized with setAll"; | ||
return all; | ||
} | ||
} |
Oops, something went wrong.