Examples of callEventHooks()


Examples of org.jruby.Ruby.callEventHooks()

            assert args != null;
            Ruby runtime = context.getRuntime();
            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() == this) 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.getRuntime();
       
        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

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());
                   
                    if (isStatic) {
                        return (IRubyObject)method.invoke(null, params);
                    } else {
                        return (IRubyObject)method.invoke(self, params);
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                    } else {
                        return (IRubyObject)method.invoke(self, params);
                    }
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                }
            }
        } catch (IllegalArgumentException e) {
            throw RaiseException.createNativeRaiseException(runtime, e);
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

        try {
            boolean isTrace = runtime.hasEventHooks();
            try {
                if (isTrace) {
                    // XXX Wrong, but will have to do for now
                    runtime.callEventHooks(context, RubyEvent.CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                }
                return (IRubyObject)method.invoke($scriptObject, context, self, args, block);
            } finally {
                if (isTrace) {
                    Frame frame = context.getPreviousFrame();
View Full Code Here

Examples of org.jruby.Ruby.callEventHooks()

                return (IRubyObject)method.invoke($scriptObject, context, self, args, block);
            } finally {
                if (isTrace) {
                    Frame frame = context.getPreviousFrame();

                    runtime.callEventHooks(context, RubyEvent.RETURN, frame.getFile(), frame.getLine(), name, getImplementationClass());
                }
            }
           
        } catch (IllegalArgumentException e) {
            throw RaiseException.createNativeRaiseException(runtime, e);
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.