Skip to content

Commit a779c9d

Browse files
committed
[GR-43663] Implement the computeSize truffle api.
PullRequest: graalpython/2659
2 parents 7785245 + fe55eb1 commit a779c9d

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "ca33e3ab48baa95653f7e675fc0b89cf7f0d03df" }
1+
{ "overlay": "23eced0a479624cb01e2b179a569d13d60b6bc6d" }

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/PBytecodeRootNode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,11 @@ private PBytecodeRootNode(PythonLanguage language, FrameDescriptor fd, Signature
688688
this.selfIndex = selfIndexValue;
689689
}
690690

691+
@Override
692+
protected int computeSize() {
693+
return bytecode.length / 2;
694+
}
695+
691696
@Override
692697
public String getName() {
693698
return name.toJavaStringUncached();

mx.graalpython/mx_graalpython.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,10 @@ def update_import_cmd(args):
16851685
# copy files we inline from our imports
16861686
shutil.copy(
16871687
join(mx.suite("truffle").dir, "..", "common.json"),
1688-
join(overlaydir, "python", "graal-common.json"))
1688+
join(overlaydir, "python", "graal", "common.json"))
1689+
shutil.copy(
1690+
join(mx.suite("truffle").dir, "..", "ci", "common.jsonnet"),
1691+
join(overlaydir, "python", "graal", "ci", "common.jsonnet"))
16891692

16901693
# update the graal-enterprise revision in the overlay (used by benchmarks)
16911694
with open(join(overlaydir, "python", "imported-constants.json"), 'w') as fp:

mx.graalpython/suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,31 @@
4444
},
4545
{
4646
"name": "sdk",
47-
"version": "5e05eb4a9ea69eb9b20fe7acd3835ef610db5822",
47+
"version": "754fbaf4c0da8c422871721fd80c218f223220e6",
4848
"subdir": True,
4949
"urls": [
5050
{"url": "https://github.com/oracle/graal", "kind": "git"},
5151
]
5252
},
5353
{
5454
"name": "tools",
55-
"version": "5e05eb4a9ea69eb9b20fe7acd3835ef610db5822",
55+
"version": "754fbaf4c0da8c422871721fd80c218f223220e6",
5656
"subdir": True,
5757
"urls": [
5858
{"url": "https://github.com/oracle/graal", "kind": "git"},
5959
],
6060
},
6161
{
6262
"name": "sulong",
63-
"version": "5e05eb4a9ea69eb9b20fe7acd3835ef610db5822",
63+
"version": "754fbaf4c0da8c422871721fd80c218f223220e6",
6464
"subdir": True,
6565
"urls": [
6666
{"url": "https://github.com/oracle/graal", "kind": "git"},
6767
]
6868
},
6969
{
7070
"name": "regex",
71-
"version": "5e05eb4a9ea69eb9b20fe7acd3835ef610db5822",
71+
"version": "754fbaf4c0da8c422871721fd80c218f223220e6",
7272
"subdir": True,
7373
"urls": [
7474
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)