Bytes literal.

This commit is contained in:
Thomas Wouters 2007-02-23 19:56:57 +00:00
parent cf297e46b8
commit 00e41defe8
15 changed files with 179 additions and 19 deletions

View file

@ -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.