mirror of
https://github.com/python/cpython.git
synced 2025-09-07 09:21:27 +00:00
Bytes literal.
This commit is contained in:
parent
cf297e46b8
commit
00e41defe8
15 changed files with 179 additions and 19 deletions
|
@ -789,6 +789,8 @@ opcode_stack_effect(int opcode, int oparg)
|
|||
return 1-oparg;
|
||||
case BUILD_MAP:
|
||||
return 1;
|
||||
case MAKE_BYTES:
|
||||
return 0;
|
||||
case LOAD_ATTR:
|
||||
return 0;
|
||||
case COMPARE_OP:
|
||||
|
@ -3077,6 +3079,10 @@ compiler_visit_expr(struct compiler *c, expr_ty e)
|
|||
case Str_kind:
|
||||
ADDOP_O(c, LOAD_CONST, e->v.Str.s, consts);
|
||||
break;
|
||||
case Bytes_kind:
|
||||
ADDOP_O(c, LOAD_CONST, e->v.Bytes.s, consts);
|
||||
ADDOP(c, MAKE_BYTES);
|
||||
break;
|
||||
case Ellipsis_kind:
|
||||
ADDOP_O(c, LOAD_CONST, Py_Ellipsis, consts);
|
||||
break;
|
||||
|
@ -3426,7 +3432,6 @@ compiler_visit_slice(struct compiler *c, slice_ty s, expr_context_ty ctx)
|
|||
return compiler_handle_subscr(c, kindname, ctx);
|
||||
}
|
||||
|
||||
|
||||
/* End of the compiler section, beginning of the assembler section */
|
||||
|
||||
/* do depth-first search of basic block graph, starting with block.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue