Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
DiSL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matteo Basso
DiSL
Commits
26e2d89c
Commit
26e2d89c
authored
Aug 22, 2012
by
Lukáš Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small renaming
parent
fd70b486
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
25 deletions
+49
-25
src/ch/usi/dag/disl/DiSL.java
src/ch/usi/dag/disl/DiSL.java
+2
-2
src/ch/usi/dag/disl/exception/DynamicContextException.java
src/ch/usi/dag/disl/exception/DynamicContextException.java
+24
-0
src/ch/usi/dag/disl/guard/GuardHelper.java
src/ch/usi/dag/disl/guard/GuardHelper.java
+2
-2
src/ch/usi/dag/disl/resolver/SCResolver.java
src/ch/usi/dag/disl/resolver/SCResolver.java
+4
-4
src/ch/usi/dag/disl/staticcontext/generator/SCGenerator.java
src/ch/usi/dag/disl/staticcontext/generator/SCGenerator.java
+2
-2
src/ch/usi/dag/disl/weaver/Weaver.java
src/ch/usi/dag/disl/weaver/Weaver.java
+3
-3
src/ch/usi/dag/disl/weaver/WeavingCode.java
src/ch/usi/dag/disl/weaver/WeavingCode.java
+12
-12
No files found.
src/ch/usi/dag/disl/DiSL.java
View file @
26e2d89c
...
...
@@ -25,7 +25,7 @@ import ch.usi.dag.disl.classparser.ClassParser;
import
ch.usi.dag.disl.exception.DiSLException
;
import
ch.usi.dag.disl.exception.DiSLIOException
;
import
ch.usi.dag.disl.exception.DiSLInMethodException
;
import
ch.usi.dag.disl.exception.Dynamic
Info
Exception
;
import
ch.usi.dag.disl.exception.Dynamic
Context
Exception
;
import
ch.usi.dag.disl.exception.InitException
;
import
ch.usi.dag.disl.exception.ManifestInfoException
;
import
ch.usi.dag.disl.exception.MarkerException
;
...
...
@@ -207,7 +207,7 @@ public class DiSL {
*/
private
boolean
instrumentMethod
(
ClassNode
classNode
,
MethodNode
methodNode
)
throws
ReflectionException
,
StaticContextGenException
,
ProcessorException
,
Dynamic
Info
Exception
,
MarkerException
{
ProcessorException
,
Dynamic
Context
Exception
,
MarkerException
{
// skip abstract methods
if
((
methodNode
.
access
&
Opcodes
.
ACC_ABSTRACT
)
!=
0
)
{
...
...
src/ch/usi/dag/disl/exception/Dynamic
Info
Exception.java
→
src/ch/usi/dag/disl/exception/Dynamic
Context
Exception.java
View file @
26e2d89c
package
ch.usi.dag.disl.exception
;
public
class
Dynamic
Info
Exception
extends
DiSLException
{
public
class
Dynamic
Context
Exception
extends
DiSLException
{
private
static
final
long
serialVersionUID
=
-
4897273691513425444L
;
public
Dynamic
Info
Exception
()
{
public
Dynamic
Context
Exception
()
{
super
();
}
public
Dynamic
Info
Exception
(
String
message
,
Throwable
cause
)
{
public
Dynamic
Context
Exception
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
public
Dynamic
Info
Exception
(
String
message
)
{
public
Dynamic
Context
Exception
(
String
message
)
{
super
(
message
);
}
public
Dynamic
Info
Exception
(
Throwable
cause
)
{
public
Dynamic
Context
Exception
(
Throwable
cause
)
{
super
(
cause
);
}
...
...
src/ch/usi/dag/disl/guard/GuardHelper.java
View file @
26e2d89c
...
...
@@ -15,7 +15,7 @@ import ch.usi.dag.disl.guardcontext.GuardContext;
import
ch.usi.dag.disl.processorcontext.ArgumentContext
;
import
ch.usi.dag.disl.resolver.GuardMethod
;
import
ch.usi.dag.disl.resolver.GuardResolver
;
import
ch.usi.dag.disl.resolver.S
tCon
Resolver
;
import
ch.usi.dag.disl.resolver.S
C
Resolver
;
import
ch.usi.dag.disl.snippet.Shadow
;
import
ch.usi.dag.disl.staticcontext.StaticContext
;
import
ch.usi.dag.disl.util.ReflectionHelper
;
...
...
@@ -237,7 +237,7 @@ public abstract class GuardHelper {
try
{
// get static context
StaticContext
scInst
=
S
tCon
Resolver
.
getInstance
()
StaticContext
scInst
=
S
C
Resolver
.
getInstance
()
.
getStaticContextInstance
(
argType
);
// populate with data
...
...
src/ch/usi/dag/disl/resolver/S
tCon
Resolver.java
→
src/ch/usi/dag/disl/resolver/S
C
Resolver.java
View file @
26e2d89c
...
...
@@ -8,12 +8,12 @@ import ch.usi.dag.disl.staticcontext.StaticContext;
import
ch.usi.dag.disl.util.ReflectionHelper
;
public
class
S
tCon
Resolver
{
public
class
S
C
Resolver
{
// NOTE: This is internal DiSL cache. For user static context cache see
// ch.usi.dag.disl.staticcontext.cache.StaticContextCache
private
static
S
tCon
Resolver
instance
=
null
;
private
static
S
C
Resolver
instance
=
null
;
// list of static context instances
// validity of an instance is for whole instrumentation run
...
...
@@ -40,10 +40,10 @@ public class StConResolver {
return
(
StaticContext
)
scInst
;
}
public
static
synchronized
S
tCon
Resolver
getInstance
()
{
public
static
synchronized
S
C
Resolver
getInstance
()
{
if
(
instance
==
null
)
{
instance
=
new
S
tCon
Resolver
();
instance
=
new
S
C
Resolver
();
}
return
instance
;
}
...
...
src/ch/usi/dag/disl/staticcontext/generator/SCGenerator.java
View file @
26e2d89c
...
...
@@ -10,7 +10,7 @@ import ch.usi.dag.disl.coderep.StaticContextMethod;
import
ch.usi.dag.disl.exception.ReflectionException
;
import
ch.usi.dag.disl.exception.StaticContextGenException
;
import
ch.usi.dag.disl.processor.ProcMethod
;
import
ch.usi.dag.disl.resolver.S
tCon
Resolver
;
import
ch.usi.dag.disl.resolver.S
C
Resolver
;
import
ch.usi.dag.disl.snippet.ProcInvocation
;
import
ch.usi.dag.disl.snippet.Shadow
;
import
ch.usi.dag.disl.snippet.Snippet
;
...
...
@@ -153,7 +153,7 @@ public class SCGenerator {
for
(
StaticContextMethod
stConMth
:
stConMethods
)
{
// get static context instance
StaticContext
scInst
=
S
tCon
Resolver
.
getInstance
()
StaticContext
scInst
=
S
C
Resolver
.
getInstance
()
.
getStaticContextInstance
(
stConMth
.
getReferencedClass
());
...
...
src/ch/usi/dag/disl/weaver/Weaver.java
View file @
26e2d89c
...
...
@@ -22,7 +22,7 @@ import ch.usi.dag.disl.annotation.AfterReturning;
import
ch.usi.dag.disl.annotation.AfterThrowing
;
import
ch.usi.dag.disl.annotation.Before
;
import
ch.usi.dag.disl.annotation.SyntheticLocal.Initialize
;
import
ch.usi.dag.disl.exception.Dynamic
Info
Exception
;
import
ch.usi.dag.disl.exception.Dynamic
Context
Exception
;
import
ch.usi.dag.disl.localvar.SyntheticLocalVar
;
import
ch.usi.dag.disl.processor.generator.PIResolver
;
import
ch.usi.dag.disl.snippet.Shadow
;
...
...
@@ -214,7 +214,7 @@ public class Weaver {
private
static
void
insert
(
MethodNode
methodNode
,
SCGenerator
staticInfoHolder
,
PIResolver
piResolver
,
WeavingInfo
info
,
Snippet
snippet
,
SnippetCode
code
,
Shadow
shadow
,
AbstractInsnNode
loc
)
throws
Dynamic
Info
Exception
{
AbstractInsnNode
loc
)
throws
Dynamic
Context
Exception
{
// exception handler will discard the stack and push the
// exception object. Thus, before entering this snippet,
...
...
@@ -244,7 +244,7 @@ public class Weaver {
Map
<
Snippet
,
List
<
Shadow
>>
snippetMarkings
,
List
<
SyntheticLocalVar
>
syntheticLocalVars
,
SCGenerator
staticInfoHolder
,
PIResolver
piResolver
)
throws
Dynamic
Info
Exception
{
throws
Dynamic
Context
Exception
{
WeavingInfo
info
=
new
WeavingInfo
(
classNode
,
methodNode
,
snippetMarkings
);
...
...
src/ch/usi/dag/disl/weaver/WeavingCode.java
View file @
26e2d89c
...
...
@@ -24,7 +24,7 @@ import ch.usi.dag.disl.classcontext.ClassContext;
import
ch.usi.dag.disl.coderep.Code
;
import
ch.usi.dag.disl.dynamiccontext.DynamicContext
;
import
ch.usi.dag.disl.exception.DiSLFatalException
;
import
ch.usi.dag.disl.exception.Dynamic
Info
Exception
;
import
ch.usi.dag.disl.exception.Dynamic
Context
Exception
;
import
ch.usi.dag.disl.processor.generator.PIResolver
;
import
ch.usi.dag.disl.processor.generator.ProcInstance
;
import
ch.usi.dag.disl.processor.generator.ProcMethodInstance
;
...
...
@@ -142,7 +142,7 @@ public class WeavingCode {
}
}
private
void
preFixDynamicInfoCheck
()
throws
Dynamic
Info
Exception
{
private
void
preFixDynamicInfoCheck
()
throws
Dynamic
Context
Exception
{
for
(
AbstractInsnNode
instr
:
iList
.
toArray
())
{
...
...
@@ -180,7 +180,7 @@ public class WeavingCode {
break
;
default
:
throw
new
Dynamic
Info
Exception
(
"In snippet "
throw
new
Dynamic
Context
Exception
(
"In snippet "
+
snippet
.
getOriginClassName
()
+
"."
+
snippet
.
getOriginMethodName
()
+
" - pass the first (pos)"
...
...
@@ -190,7 +190,7 @@ public class WeavingCode {
// second operand test
if
(
AsmHelper
.
getClassType
(
secondOperand
)
==
null
)
{
throw
new
Dynamic
Info
Exception
(
"In snippet "
throw
new
Dynamic
Context
Exception
(
"In snippet "
+
snippet
.
getOriginClassName
()
+
"."
+
snippet
.
getOriginMethodName
()
+
" - pass the second (type)"
...
...
@@ -219,7 +219,7 @@ public class WeavingCode {
// NOTE that if the user requests for the stack value, some store
// instructions will be inserted to the target method, and new local slot
// will be used for storing this.
public
void
fixDynamicInfo
(
boolean
throwing
)
throws
Dynamic
Info
Exception
{
public
void
fixDynamicInfo
(
boolean
throwing
)
throws
Dynamic
Context
Exception
{
preFixDynamicInfoCheck
();
...
...
@@ -300,7 +300,7 @@ public class WeavingCode {
// index should be less than the stack height
if
(
operand
>=
basicframe
.
getStackSize
()
||
operand
<
0
)
{
throw
new
Dynamic
Info
Exception
(
throw
new
Dynamic
Context
Exception
(
"Dynamic context wrong access."
+
" Access out of bounds. Accessed "
+
operand
+
", but the size of stack is "
...
...
@@ -312,7 +312,7 @@ public class WeavingCode {
operand
).
getType
();
if
(
t
.
getSort
()
!=
targetType
.
getSort
())
{
throw
new
Dynamic
Info
Exception
(
throw
new
Dynamic
Context
Exception
(
"Dynamic context wrong access. Requested \""
+
t
+
"\" but found \""
+
targetType
+
"\" on the stack."
);
...
...
@@ -346,7 +346,7 @@ public class WeavingCode {
// index should be less than the size of local variables
if
(
slot
>=
basicframe
.
getLocals
()
||
slot
<
0
)
{
throw
new
Dynamic
Info
Exception
(
throw
new
Dynamic
Context
Exception
(
"Dynamic context wrong access."
+
" Access out of bounds. Accessed "
+
slot
+
", but the size of stack is "
...
...
@@ -357,7 +357,7 @@ public class WeavingCode {
Type
targetType
=
basicframe
.
getLocal
(
slot
).
getType
();
if
(
t
.
getSort
()
!=
targetType
.
getSort
())
{
throw
new
Dynamic
Info
Exception
(
throw
new
Dynamic
Context
Exception
(
"Dynamic context wrong access. Requested \""
+
t
+
"\" but found \""
+
targetType
+
"\" on the stack."
);
...
...
@@ -379,7 +379,7 @@ public class WeavingCode {
// index should be less than the size of local variables
if
(
operand
>=
basicframe
.
getLocals
()
||
operand
<
0
)
{
throw
new
Dynamic
Info
Exception
(
throw
new
Dynamic
Context
Exception
(
"Dynamic context wrong access."
+
" Access out of bounds. Accessed "
+
operand
+
", but the size of stack is "
...
...
@@ -390,7 +390,7 @@ public class WeavingCode {
Type
targetType
=
basicframe
.
getLocal
(
operand
).
getType
();
if
(
t
.
getSort
()
!=
targetType
.
getSort
())
{
throw
new
Dynamic
Info
Exception
(
throw
new
Dynamic
Context
Exception
(
"Dynamic context wrong access. Requested \""
+
t
+
"\" but found \""
+
targetType
+
"\" on the stack."
);
...
...
@@ -824,7 +824,7 @@ public class WeavingCode {
}
public
void
transform
(
SCGenerator
staticInfoHolder
,
PIResolver
piResolver
,
boolean
throwing
)
throws
Dynamic
Info
Exception
{
throws
Dynamic
Context
Exception
{
fixProcessor
(
piResolver
);
fixProcessorInfo
();
fixStaticInfo
(
staticInfoHolder
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment