Permalink
Browse files

Fix the Travis build.

  • Loading branch information...
Andy Chu
Andy Chu committed Jul 2, 2018
1 parent 676f988 commit 6740baabda578b45eb3ad401afcbcabba4cd00ba
Showing with 8 additions and 3 deletions.
  1. +8 −3 opy/compiler2/ovm_codegen.py
@@ -8,11 +8,14 @@
Constructs to audit the code for:
- **kwargs (I know I have *args)
- yield -- there are a few
- StopIteration -- is that special?
- 1 < x < 2 (probably not used)
Static assumptions:
- s % (a,) is (string, tuple)
- a + b is int or float addition
- "function pointers" like self.newBlock = self.graph.newBlock
"""
@@ -118,9 +121,11 @@ def visitWhile(self, node):
loop = self.newBlock()
else_ = self.newBlock()
# After is where 'break' should jump to!
after = self.newBlock()
self.emit('SETUP_LOOP', after)
# 'loop' is where 'continue' should jump to!
self.nextBlock(loop)
self.setups.push((LOOP, loop))
@@ -296,16 +301,16 @@ def visitCallFunc(self, node):
pos += 1
self.emit('CALL_FUNCTION', pos)
# For f(*args, **kwargs)
return
# Unused code for f(*args, **kwargs)
if node.star_args is not None:
self.visit(node.star_args)
if node.dstar_args is not None:
self.visit(node.dstar_args)
have_star = node.star_args is not None
have_dstar = node.dstar_args is not None
opcode = _CALLFUNC_OPCODE_INFO[have_star, have_dstar]
self.emit(opcode, kw << 8 | pos)
#opcode = _CALLFUNC_OPCODE_INFO[have_star, have_dstar]
#self.emit(opcode, kw << 8 | pos)
def visitConst(self, node):
print('Const')

0 comments on commit 6740baa

Please sign in to comment.