Author Demur Rumed
Recipients Demur Rumed, benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, serhiy.storchaka, vstinner, yselivanov
Date 2016-05-30.12:14:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464610492.7.0.981714634304.issue27140@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-05-30 12:14:52Demur Rumedsetrecipients: + Demur Rumed, brett.cannon, georg.brandl, ncoghlan, vstinner, benjamin.peterson, serhiy.storchaka, yselivanov
2016-05-30 12:14:52Demur Rumedsetmessageid: <1464610492.7.0.981714634304.issue27140@psf.upfronthosting.co.za>
2016-05-30 12:14:52Demur Rumedlinkissue27140 messages
2016-05-30 12:14:52Demur Rumedcreate