Commit cf7f1e1a authored by Vitja Makarov's avatar Vitja Makarov

Add GlobalsExprNode

parent ea6c7596
......@@ -5438,6 +5438,22 @@ class YieldExprNode(ExprNode):
else:
code.putln(code.error_goto_if_null(Naming.sent_value_cname, self.pos))
class GlobalsExprNode(AtomicExprNode):
type = dict_type
is_temp = 1
def analyse_types(self, env):
env.use_utility_code(Builtin.globals_utility_code)
gil_message = "Constructing globals dict"
def generate_result_code(self, code):
code.putln('%s = __Pyx_Globals(); %s' % (
self.result(),
code.error_goto_if_null(self.result(), self.pos)))
code.put_gotref(self.result())
#-------------------------------------------------------------------
#
# Unary operator nodes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment