Examples of callEventHooks()


Examples of org.jruby.Ruby.callEventHooks()

           
            if (argsAsIs) {
                boolean isTrace = runtime.hasEventHooks();
                try {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                   
                    return (IRubyObject)method.invoke(self, (Object[])args);
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                        runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                   
                    return (IRubyObject)method.invoke(self, (Object[])args);
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                }                   
            } else {
                int argsLength = calcArgsLength();
               
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                }
               
                boolean isTrace = runtime.hasEventHooks();
                try {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                    IRubyObject result;
                    if (isStatic) {
                        result = (IRubyObject)method.invoke(null, params);
                    } else {
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                    }

                    return result == null ? runtime.getNil() : result;
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                }
            }
        } catch (IllegalArgumentException e) {
            throw RaiseException.createNativeRaiseException(runtime, e, method);
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

        int callNumber = context.callNumber;
        try {
            boolean isTrace = runtime.hasEventHooks();
            try {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.CALL, position.getFile(), position.getStartLine(), name, getImplementationClass());
                }
                return (IRubyObject)method.invoke(null, $scriptObject, context, self, args, block);
            } finally {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                    runtime.callEventHooks(context, RubyEvent.CALL, position.getFile(), position.getStartLine(), name, getImplementationClass());
                }
                return (IRubyObject)method.invoke(null, $scriptObject, context, self, args, block);
            } finally {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                }
            }
           
        } catch (IllegalArgumentException e) {
            throw RaiseException.createNativeRaiseException(runtime, e, method);
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

            assert args != null;
            Ruby runtime = context.runtime;
            boolean isTrace = runtime.hasEventHooks();

            if (isTrace) {
                runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
            }

            try {
                return callback.execute(self, args, block);
            } catch (JumpException.ReturnJump rj) {
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                if (rj.getTarget() == context.getFrameJumpTarget()) return (IRubyObject)rj.getValue();

                throw rj;
            } finally {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                }
            }
        } finally {
            callConfig.post(context);
        }
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args, Block block) {
      assert args != null;
        Ruby runtime = context.runtime;
       
        if (runtime.hasEventHooks()) {
            runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
            try {
                return callback.execute(self, args, block);
            } finally {
                runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
            }
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

        if (runtime.hasEventHooks()) {
            runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
            try {
                return callback.execute(self, args, block);
            } finally {
                runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
            }
        }
       
        return callback.execute(self, args, block);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.