-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-131798: JIT: Split CALL_STR_1 into several uops #132849
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -855,8 +855,15 @@ dummy_func(void) { | |
| } | ||
| } | ||
|
|
||
| op(_CALL_STR_1, (unused, unused, unused -- res)) { | ||
| res = sym_new_type(ctx, &PyUnicode_Type); | ||
| op(_CALL_STR_1, (unused, unused, arg -- res)) { | ||
| if (sym_matches_type(arg, &PyUnicode_Type)) { | ||
| // e.g. str('foo') or str(foo) where foo is known to be a string | ||
| PyObject *value = sym_get_const(ctx, arg); | ||
| res = sym_new_const(ctx, value); | ||
|
tomasr8 marked this conversation as resolved.
Outdated
|
||
| } | ||
|
Comment on lines
+859
to
+862
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an optimization that Brandt suggested. When in |
||
| else { | ||
| res = sym_new_type(ctx, &PyUnicode_Type); | ||
| } | ||
| } | ||
|
|
||
| op(_GUARD_IS_TRUE_POP, (flag -- )) { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.