Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • asm asm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • asmasm
  • asmasm
  • Merge requests
  • !180

Call interpreter.copyOperation consistently

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Jason Zaugg requested to merge retronymm/asm:unfork/copy-instruction into master Jun 11, 2018
  • Overview 3
  • Commits 1
  • Pipelines 1
  • Changes 1

Before this change, Frame.execute did not invoke the interpreter's copyOperation method for all values that are pushed on the frame's when executing some copying instructions.

For example, in the case of SWAP, copyOperation is invoked:

value2 = pop();
value1 = pop();
push(interpreter.copyOperation(insn, value2));
push(interpreter.copyOperation(insn, value1));

For DUP on the other hand, the original value is pushed onto the stack without notifying the interpreter:

value1 = pop();
push(value1);
push(interpreter.copyOperation(insn, value1));

This leads to a problem for the SourceInterpreter, which collects for every value a set of potential producer instructions. Given the bytecode sequence

NEW java/lang/Object
DUP
INVOKESPECIAL java/lang/Object.<init> ()V

In the frame of the INVOKESPECIAL instruction, the value on the stack lists as its producer the NEW operation instead of the DUP, which not expected.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: unfork/copy-instruction