-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into codedb-ffi-io
Conflicts: machine/builtin/io.cpp
- Loading branch information
Showing
145 changed files
with
3,003 additions
and
4,099 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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,23 +1,40 @@ | ||
module Rubinius | ||
class CallSite | ||
attr_reader :name | ||
attr_reader :executable | ||
|
||
def hits | ||
0 | ||
end | ||
attr_reader :cache | ||
|
||
def ip | ||
Rubinius.primitive :call_site_ip | ||
raise PrimitiveFailure, "CallSite#ip primitive failed" | ||
end | ||
|
||
def location | ||
"#{@executable.file}:#{@executable.line_from_ip(ip)}" | ||
def depth | ||
Rubinius.primitive :call_site_depth | ||
raise PrimitiveFailure, "CallSite#depth primitive failed" | ||
end | ||
|
||
def invokes | ||
Rubinius.primitive :call_site_invokes | ||
raise PrimitiveFailure, "CallSite#invokes primitive failed" | ||
end | ||
|
||
def hits | ||
Rubinius.primitive :call_site_hits | ||
raise PrimitiveFailure, "CallSite#hits primitive failed" | ||
end | ||
|
||
def misses | ||
Rubinius.primitive :call_site_misses | ||
raise PrimitiveFailure, "CallSite#misses primitive failed" | ||
end | ||
|
||
def reset | ||
Rubinius.primitive :call_site_reset | ||
raise PrimitiveFailure, "CallSite#reset primitive failed" | ||
end | ||
|
||
def inspect | ||
"#<#{self.class.name}:0x#{self.object_id.to_s(16)} #{location}##{@name}(#{hits})>" | ||
"#<#{self.class.name}:0x#{self.object_id.to_s(16)} name=#{@name} ip=#{ip} depth=#{depth} invokes=#{invokes} hits=#{hits} misses=#{misses}>" | ||
end | ||
end | ||
end |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.