-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
12 changes: 8 additions & 4 deletions
12
src/TruffleSqueak-Tests.package/TruffleSqueakTest.class/instance/testCallTarget.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
testing | ||
testCallTarget | ||
| method string | | ||
Java primitiveIsHostLookupAllowed ifFalse: [ ^ false ]. | ||
| method callTarget string | | ||
Java primitiveIsHostLookupAllowed ifFalse: [ ^ self ]. | ||
|
||
self assert: (SmalltalkImage >> #exitToDebugger) callTarget isNil. | ||
|
||
method := Integer >> #benchFib. | ||
1 benchFib. "Ensure method is called" | ||
callTarget := method callTarget. | ||
|
||
self deny: method callTarget isNil. | ||
self deny: callTarget isNil. | ||
|
||
(callTarget getClass getName asString includesSubstring: 'OptimizedCallTarget') | ||
ifFalse: [ ^ self ]. | ||
|
||
string := CallTargetBrowser callTargetInfoStringFor: method callTarget. | ||
string := CallTargetBrowser callTargetInfoStringFor: callTarget. | ||
self assert: (string includesSubstring: 'knownCallSiteCount') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters