Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-103963: Make dis display names of args for intrinsics opcodes#104029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
15 commits
Select commitHold shift + click to select a range
119c628
Add intrinsic names to opcode.py
jkchandaliaApr 30, 2023
74ddc3e
Use intrinsics names define in opcode.py in dis.py
jkchandaliaApr 30, 2023
0ecf7f5
Add single test for 3 CALL_INTRINSIC_1 codes and update one existing …
jkchandaliaApr 30, 2023
9d93d89
Update opcode.h generation to include intrinsics codes
jkchandaliaApr 30, 2023
3056de5
Update opcode.h to include the new intrinsics sections
jkchandaliaApr 30, 2023
be813ee
Revert changes to opcode.h for intrinsics
jkchandaliaApr 30, 2023
0f10791
Add test for CALL_INTRINSIC_2
jkchandaliaMay 1, 2023
89bfd12
Update generate_opcode to generate intrinsics header file
jkchandaliaMay 1, 2023
e10dae1
Update intrinsics outfile
jkchandaliaMay 1, 2023
f78e70e
Regenerate intrinsics header file
jkchandaliaMay 1, 2023
2267933
📜🤖 Added by blurb_it.
blurb-it[bot]May 1, 2023
db9a1e9
Move static statements to footer and add newline
jkchandaliaMay 2, 2023
f034688
Test CALL_INTRINSIC_2 arg name with less hardcoded bytecode
jkchandaliaMay 2, 2023
cca18e9
Use assertIn
jkchandaliaMay 2, 2023
abd3ff1
Differentiate between intrinsic invalid args
jkchandaliaMay 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Move static statements to footer and add newline
  • Loading branch information
@jkchandalia
jkchandalia committedMay 2, 2023
commitdb9a1e9dec1cb3a1d5dbaf0eaa80ef772a31829c
3 changes: 2 additions & 1 deletionInclude/internal/pycore_intrinsics.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,8 @@
#define INTRINSIC_PREP_RERAISE_STAR 1

#define MAX_INTRINSIC_2 1

typedef PyObject *(*instrinsic_func1)(PyThreadState* tstate, PyObject *value);
typedef PyObject *(*instrinsic_func2)(PyThreadState* tstate, PyObject *value1, PyObject *value2);
extern const instrinsic_func1 _PyIntrinsics_UnaryFunctions[];
extern const instrinsic_func2 _PyIntrinsics_BinaryFunctions[];
extern const instrinsic_func2 _PyIntrinsics_BinaryFunctions[];
19 changes: 8 additions & 11 deletionsTools/build/generate_opcode_h.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,6 +57,13 @@

""".lstrip()

intrinsic_footer = """
typedef PyObject *(*instrinsic_func1)(PyThreadState* tstate, PyObject *value);
typedef PyObject *(*instrinsic_func2)(PyThreadState* tstate, PyObject *value1, PyObject *value2);
extern const instrinsic_func1 _PyIntrinsics_UnaryFunctions[];
extern const instrinsic_func2 _PyIntrinsics_BinaryFunctions[];
"""

DEFINE = "#define {:<38} {:>3}\n"

UINT32_MASK = (1<<32)-1
Expand DownExpand Up@@ -195,17 +202,7 @@ def main(opcode_py, outfile='Include/opcode.h',
nobj.write("\n")
nobj.write(DEFINE.format("MAX_INTRINSIC_2", i))

nobj.write(
"typedef PyObject *(*instrinsic_func1)(PyThreadState* tstate, PyObject *value);"
)
nobj.write("\n")
nobj.write(
"typedef PyObject *(*instrinsic_func2)(PyThreadState* tstate, PyObject *value1, PyObject *value2);"
)
nobj.write("\n")
nobj.write("extern const instrinsic_func1 _PyIntrinsics_UnaryFunctions[];")
nobj.write("\n")
nobj.write("extern const instrinsic_func2 _PyIntrinsics_BinaryFunctions[];")
nobj.write(intrinsic_footer)

fobj.write("\n")
fobj.write("/* Defined in Lib/opcode.py */\n")
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp