Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Regenerate intrinsics header file
  • Loading branch information
jkchandalia committed May 1, 2023
commit f78e70e9e452cb0107c59bb6d05f65064aa90bb2
29 changes: 13 additions & 16 deletions Include/internal/pycore_intrinsics.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
// Auto-generated by Tools/build/generate_opcode_h.py from Lib/opcode.py

/* Unary Functions: */
#define INTRINSIC_INVALID 0
#define INTRINSIC_PRINT 1
#define INTRINSIC_IMPORT_STAR 2
#define INTRINSIC_STOPITERATION_ERROR 3
#define INTRINSIC_ASYNC_GEN_WRAP 4
#define INTRINSIC_UNARY_POSITIVE 5
#define INTRINSIC_LIST_TO_TUPLE 6

#define INTRINSIC_PRINT 1
#define INTRINSIC_IMPORT_STAR 2
#define INTRINSIC_STOPITERATION_ERROR 3
#define INTRINSIC_ASYNC_GEN_WRAP 4
#define INTRINSIC_UNARY_POSITIVE 5
#define INTRINSIC_LIST_TO_TUPLE 6

#define MAX_INTRINSIC_1 6
#define MAX_INTRINSIC_1 6


/* Binary Functions: */
#define INTRINSIC_INVALID 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like INTRINSIC_INVALID is defined twice?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to differentiate between invalid for the two CALL_INTRINSIC_* opcodes.

#define INTRINSIC_PREP_RERAISE_STAR 1

#define INTRINSIC_PREP_RERAISE_STAR 1

#define MAX_INTRINSIC_2 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[];