Displaying 8 results from an estimated 8 matches for "method_id".
2015 Jun 01
0
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
...; specifying a particular register (albeit encoding target-specific
> information like this isn't ideal).
Assuming you have full control over your environment, I'd not start by
writing a new calling convention. I'd just have:
...
%dest = load_from_itable()
call i32 %dest(i32 METHOD_ID, rest of the arguments ...)
...
and have the conflict resolution stub be:
define i32 @conflict_redo(i32 %method_id, arg0, arg1, arg2) {
dispatch based on %method_id
}
with the normal x86 calling conventions. Later, as an *optimization*
I'd consider a custom calling convention for...
2006 Jan 19
2
Easy way to handle form input without a model class?
I have a couple forms that I''d like to be able to validate and
automatically populate, but it shouldn''t be based on AR. In fact I
often have a bunch of small forms that I can''t really justify writing
a whole new model class for anyway. I''d like to validate the form
input, and then use rails helpers to automatically populate the form
if validations fail.
2015 May 31
4
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
Hi everyone,
I'm the developer of the Loci programming language (
http://loci-lang.org ), for which the compiler is a front-end for
LLVM. I would like to say that LLVM has been extremely useful for the
development of the compiler and so thank you everyone for building
this amazing system.
---- Virtual Method Calls ----
While most aspects of the language map well onto LLVM IR, it seems
2006 Apr 10
0
Inheriting data from one model to another
...d"
@@generate_read_methods = false # turn off generating read_methods
otherwise method_missing won''t get called more than once
# intercept calls to read attributes. If this instance has
# a value return it, otherwise escalate the call to the parent_product
def method_missing(method_id, *args, &block)
method_name = method_id.to_s
if @attributes.include?(method_name)
if !read_attribute(method_name).nil?
puts "Returning #{method_name}"
return read_attribute(method_name)
elsif @parent_product
puts "Escalating #{method_na...
2006 Jul 24
1
meantime_filter won''t pick up my missing methods
<code><pre>
module Scope
protected
def method_missing(method_id, *arguments, &block)
if method_id.id2name =~ /^scope_([_a-z]\w*)_to_([_a-z]\w*)/
scope_model($1.singularize.capitalize, "#{$2}_id", &block)
else
super
end
end
def scope_model(klass, foreign_key, &block)
eval(klass).with_scope({...
2007 Nov 23
2
Create my own dynamic "finder" method?
Hi all
I''m having an authorization method that looks like the following:
def user_requests_authorization_to(right_name)
...
end
I find it boring to always use
user_requests_authorization_to(''EDIT'')
user_requests_authorization_to(''CREATE'')
etc., so I thought I could implement my own dynamic method, like the
dynamic finders! Instead of the calls
2006 Aug 02
2
Hiding Model Attribute
I have a model object for which I would like to effectively hide one
attribute (a password hash) so that it is never returned by a find_*
call. I have tried several unsuccessful means. Is there a simple way
to do this that I am overlooking?
Thanks,
Doug
2006 May 31
6
habtm on an array (or object.habtm.habtm)
Hi,
I have three Models: User, Group and File.
User habtm groups
and
Group habtm Files
How can I find all files that a particular user has access to?
eg user.groups.files ?
As user.groups returns an array, the above doesn''t work.
Id like to find the files for all groups in that array, without adding
any code to the User model.
Thanks in advance
PS I just posted this in the