module_value1 = 1000
module_value2 = 50

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1
    local_value2 = module_value2

# construct_begin
    local_value2 = local_value * 2
# construct_alternative
    local_value * 2
# construct_end

for x in xrange(50000):
    calledRepeatedly()

print("OK.")

module_value1 = 1000
module_value2 = 50

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1
    local_value2 = module_value2

# construct_begin
    local_value2 = local_value * 2
# construct_alternative
    local_value * 2
# construct_end

    return local_value

for x in xrange(50000):
    calledRepeatedly()

print("OK.")

Enhance construct test to avoid local variable optimization.
Tests: Enhance construct test to avoid local variable optimization.

  module_value1 = 1000
  module_value2 = 50
  
  def calledRepeatedly():
      # Force frame and eliminate forward propagation (currently).
      module_value1
  
      local_value = module_value1
      local_value2 = module_value2
  
  # construct_begin
      local_value2 = local_value * 2
  # construct_alternative
      local_value * 2
  # construct_end
  
+     return local_value
+ 
  for x in xrange(50000):
      calledRepeatedly()
  
  print("OK.")
  
Enhance construct test to avoid local variable optimization.
## Code Before:
module_value1 = 1000
module_value2 = 50

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1
    local_value2 = module_value2

# construct_begin
    local_value2 = local_value * 2
# construct_alternative
    local_value * 2
# construct_end

for x in xrange(50000):
    calledRepeatedly()

print("OK.")

## Instruction:
Enhance construct test to avoid local variable optimization.
## Code After:
module_value1 = 1000
module_value2 = 50

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1
    local_value2 = module_value2

# construct_begin
    local_value2 = local_value * 2
# construct_alternative
    local_value * 2
# construct_end

    return local_value

for x in xrange(50000):
    calledRepeatedly()

print("OK.")
