Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36ca39e
commit 8c1db67
Showing
3 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
.../java/hu/bme/mit/theta/frontend/transformation/model/types/complex/integer/c128/C128.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,50 @@ | ||
/* | ||
* Copyright 2024 Budapest University of Technology and Economics | ||
* | ||
* Licensed 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 hu.bme.mit.theta.frontend.transformation.model.types.complex.integer.c128; | ||
|
||
import hu.bme.mit.theta.frontend.ParseContext; | ||
import hu.bme.mit.theta.frontend.transformation.model.types.complex.integer.CInteger; | ||
import hu.bme.mit.theta.frontend.transformation.model.types.simple.CSimpleType; | ||
|
||
public abstract class C128 extends CInteger { | ||
|
||
private static final int RANK = 60; | ||
|
||
protected C128(CSimpleType origin, ParseContext parseContext) { | ||
super(origin, parseContext); | ||
rank = RANK; | ||
} | ||
|
||
public <T, R> R accept(CComplexTypeVisitor<T, R> visitor, T param) { | ||
return visitor.visit(this, param); | ||
} | ||
|
||
@Override | ||
public String getTypeName() { | ||
return "__int128"; | ||
} | ||
|
||
@Override | ||
public CInteger getSignedVersion() { | ||
return new CSigned128(null, parseContext); | ||
} | ||
|
||
@Override | ||
public CInteger getUnsignedVersion() { | ||
return new CUnsigned128(null, parseContext); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...hu/bme/mit/theta/frontend/transformation/model/types/complex/integer/c128/CSigned128.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,32 @@ | ||
/* | ||
* Copyright 2024 Budapest University of Technology and Economics | ||
* | ||
* Licensed 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 hu.bme.mit.theta.frontend.transformation.model.types.complex.integer.c128; | ||
|
||
import hu.bme.mit.theta.frontend.ParseContext; | ||
import hu.bme.mit.theta.frontend.transformation.model.types.complex.integer.Signed; | ||
import hu.bme.mit.theta.frontend.transformation.model.types.simple.CSimpleType; | ||
|
||
public class CSigned128 extends C128 implements Signed { | ||
|
||
public CSigned128(CSimpleType origin, ParseContext parseContext) { | ||
super(origin, parseContext); | ||
} | ||
|
||
public <T, R> R accept(CComplexTypeVisitor<T, R> visitor, T param) { | ||
return visitor.visit(this, param); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
.../bme/mit/theta/frontend/transformation/model/types/complex/integer/c128/CUnsigned128.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 2024 Budapest University of Technology and Economics | ||
* | ||
* Licensed 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 hu.bme.mit.theta.frontend.transformation.model.types.complex.integer.c128; | ||
|
||
import hu.bme.mit.theta.frontend.ParseContext; | ||
import hu.bme.mit.theta.frontend.transformation.model.types.complex.integer.Unsigned; | ||
import hu.bme.mit.theta.frontend.transformation.model.types.simple.CSimpleType; | ||
|
||
public class CUnsigned128 extends C128 implements Unsigned { | ||
|
||
public CUnsigned128(CSimpleType origin, ParseContext parseContext) { | ||
super(origin, parseContext); | ||
unsigned = true; | ||
} | ||
|
||
public <T, R> R accept(CComplexTypeVisitor<T, R> visitor, T param) { | ||
return visitor.visit(this, param); | ||
} | ||
} |