消息 [234521]
I imagine it like (in the map unpacking code)
func_offset = (oparg >> 8) & 0xFF;
num_maps = oparg & 0xFF;
// later
if (func_offset) {
// do checks
if (repeated_argument) {
raise_error_from_function(PEEK(func_offset + num_maps));
}
}
This code should be relatively quick, in an already-slow opcode, and rather short.
If adding to CALL_FUNCTION_XXX, you would have to add an EXTENDED_ARG opcode (because CALL_FUNCTION_XXX already uses the bottom 16 bits), add checks for the top bits in the opcode, duplicate the (large) dictionary merging function. This doesn't seem like it saves much work. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2015-01-22 22:36:02 | Joshua.Landau | 修改 | recipients:
+ Joshua.Landau, gvanrossum, twouters, georg.brandl, terry.reedy, paul.moore, ncoghlan, belopolsky, ezio.melotti, eric.araujo, andybuckley, r.david.murray, zbysz, eric.snow, Rosuav, berker.peksag, pconnell, NeilGirdhar, Jeff.Kaufman, SpaghettiToastBook |
| 2015-01-22 22:36:02 | Joshua.Landau | 修改 | messageid: <1421966162.65.0.666772183716.issue2292@psf.upfronthosting.co.za> |
| 2015-01-22 22:36:02 | Joshua.Landau | 链接 | issue2292 messages |
| 2015-01-22 22:36:02 | Joshua.Landau | 创建 | |
|