Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SWEN90006-A1-2018
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jiankun Cai
SWEN90006-A1-2018
Commits
2fa219a8
Commit
2fa219a8
authored
Sep 12, 2018
by
JKCai
Browse files
Options
Downloads
Patches
Plain Diff
877109 Jiankun Cai
Assignment 1
parent
7e6e7575
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mutants/mutant-5/swen90006/machine/Machine.java
+2
-2
2 additions, 2 deletions
mutants/mutant-5/swen90006/machine/Machine.java
with
2 additions
and
2 deletions
mutants/mutant-5/swen90006/machine/Machine.java
+
2
−
2
View file @
2fa219a8
...
@@ -148,7 +148,7 @@ public class Machine
...
@@ -148,7 +148,7 @@ public class Machine
private
void
validate_offset
(
int
offset
)
private
void
validate_offset
(
int
offset
)
throws
InvalidInstructionException
throws
InvalidInstructionException
{
{
if
(
offset
<
-
MAX_ADDR
||
offset
>
MAX_ADDR
)
{
if
(
offset
<
-
MAX_ADDR
||
offset
>
=
MAX_ADDR
)
{
throw
new
InvalidInstructionException
();
throw
new
InvalidInstructionException
();
}
}
}
}
...
@@ -266,7 +266,7 @@ public class Machine
...
@@ -266,7 +266,7 @@ public class Machine
throw
new
InvalidInstructionException
();
throw
new
InvalidInstructionException
();
}
}
int
offs
=
parseOffset
(
toks
[
1
]);
int
offs
=
parseOffset
(
toks
[
1
]);
pc
=
pc
+
offs
+
1
;
pc
=
pc
+
offs
;
count
++;
count
++;
continue
;
/* avoid default increment of pc below */
continue
;
/* avoid default increment of pc below */
}
else
if
(
toks
[
0
].
equals
(
INSTRUCTION_JZ
)){
}
else
if
(
toks
[
0
].
equals
(
INSTRUCTION_JZ
)){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment