消息 [266689]
Perhaps BUILD_CONST_KEY_MAP?
Ideally the opcode could ellide the LOAD_CONST for the tuple. ie have LOAD_CONST 2 (1, 2, 3), BUILD_CONST_KEY_MAP 3 be BUILD_CONST_KEY_MAP 2 (1, 2, 3). However that'd require stack_effect to somehow lookup the const tuple
Thinking to in the context of MAKE_FUNCTION, I'd like to create a function for ceval which takes stack_pointer & returns stack_pointer at new offset with dict at top of stack. Then use this both for this opcode & have MAKE_FUNCTION call it directly (ie, don't have to emit BUILD_MAP_EX). This too makes for a need to do some backtracking to figure out stack effect
Relying on the peepholer seems unideal; it does more work than generating the tuple the first time & doing it eagerly will produce a more compact stack depth & co_consts |
|
| 日期 |
用户 |
动作 |
参数 |
| 2016-05-30 12:14:52 | Demur Rumed | 修改 | recipients:
+ Demur Rumed, brett.cannon, georg.brandl, ncoghlan, vstinner, benjamin.peterson, serhiy.storchaka, yselivanov |
| 2016-05-30 12:14:52 | Demur Rumed | 修改 | messageid: <1464610492.7.0.981714634304.issue27140@psf.upfronthosting.co.za> |
| 2016-05-30 12:14:52 | Demur Rumed | 链接 | issue27140 messages |
| 2016-05-30 12:14:52 | Demur Rumed | 创建 | |
|