Skip to content

Commit

Permalink
marshal to pickle
Browse files Browse the repository at this point in the history
  • Loading branch information
Thamirawaran committed Dec 30, 2024
1 parent 69f4528 commit 3e56eef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jac/jaclang/compiler/passes/main/import_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"""

import ast as py_ast
import marshal
import os
import pathlib
import pickle
from typing import Optional


Expand Down Expand Up @@ -473,7 +473,7 @@ def __load_builtins(self) -> None:
if mod_file_path.exists():
print(f"Loading `mod` from {mod_file_path}")
with open(mod_file_path, "rb") as mod_file:
mod = marshal.load(mod_file)
mod = pickle.load(mod_file)
else:
file_to_raise = str(
pathlib.Path(os.path.dirname(__file__)).parent.parent.parent
Expand All @@ -492,7 +492,7 @@ def __load_builtins(self) -> None:
),
).ir
with open(mod_file_path, "wb") as mod_file:
marshal.dump(mod, mod_file)
pickle.dump(mod, mod_file)
print(f"`mod` has been stored in {mod_file_path}")
mod.parent = self.ir
SubNodeTabPass(input_ir=mod, prior=self)
Expand Down

0 comments on commit 3e56eef

Please sign in to comment.